Backup And Recovery User's Guide-從RMAN開始-開始使用RMAN並連線到資料庫

LuiseDalian發表於2014-02-12

RMAN客戶端是通過在你的作業系統的提示符下輸入rman命令而啟動的。

[oracle@S1011:/export/home/oracle]$ rman

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jul 4 09:12:58 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN>

 

到資料庫的RMAN連線的指定和認證方式與SQL*Plus一致。

唯一的區別是RMAN連線到目標或輔助資料庫需要SYSDBA許可權。

AS SYSDBA關鍵字是隱式的,不能被顯式地指定。

注意:好的安全的實踐是不應該在命令列以文字的形式輸入口令,而是應該在RMAN提示輸入口令時再輸入。

# 使用CONNECT TARGET連線到目標資料庫

RMAN> connect target sys@testdb11

target database Password:

connected to target database: TESTDB11 (DBID=2578856066)

# 使用作業系統認證連線到目標資料庫

RMAN> connect target /

connected to target database: TESTDB11 (DBID=2578856066)

# rman命令列選項的語法

RMAN

[ TARGET connectStringSpec

| { CATALOG connectStringSpec }

| LOG ['] filename ['] [ APPEND ]

.

.

.

]...

connectStringSpec::=

['] [userid] [/ [password]] [@net_service_name] [']

# RMAN會話的輸出附加到/export/home/oracle/rman.log檔案

# 1. 自己建立一個日誌檔案

oracle@Redhat55.cuug.net:/home/oracle> touch rman.log

oracle@Redhat55.cuug.net:/home/oracle> ls

rman.log

# 2. 啟動RMAN時指定自己的日誌檔案

oracle@Redhat55.cuug.net:/home/oracle> rman target / log /home/oracle/rman.log append

# 3. 執行一些操作

RMAN> report obsolete;

RMAN> list backup;

RMAN> exit

oracle@Redhat55.cuug.net:/home/oracle> more rman.log

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Jul 12 00:19:44 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: TESTDB12 (DBID=2811829300)

RMAN>

using target database control file instead of recovery catalog

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

no obsolete backups found

RMAN>

specification does not match any backup in the repository

RMAN>

Recovery Manager complete.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17013648/viewspace-1079865/,如需轉載,請註明出處,否則將追究法律責任。

相關文章