6.注册数据库
RMAN> register database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 05/25/2007 00:38:55
RMAN-06428: recovery catalog is not installed
出错,recovery catalog is not installed
RMAN> register database zhirui;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: ";"
RMAN-01008: the bad identifier was: zhirui
RMAN-01007: at line 1 column 19 file: standard input
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, chan"
RMAN-01007: at line 1 column 25 file: standard input
7.建立catalog表空间到ora_backup
RMAN> create catalog tablespace ora_backup
recovery catalog created
这下可以注册了吧。
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
注册成功
8.尝试备份全库
RMAN> run {
2> allocate channel dev1 type disk;
3> backup
4> format '/home/oracle/data/db_t%t_s%s_p%p'
5> (database);
6> release channel dev1;
7> }
allocated channel: dev1
channel dev1: sid=159 devtype=DISK
Starting backup at 25-MAY-07
channel dev1: starting full datafile backupset
channel dev1: specifying datafile(s) in backupset
input datafile fno=00006 name=/dev/rora_backup
input datafile fno=00001 name=/dev/rora_system
input datafile fno=00003 name=/dev/rora_sysaux
input datafile fno=00005 name=/dev/rora_example
input datafile fno=00002 name=/dev/rora_undo1
input datafile fno=00004 name=/dev/rora_users
channel dev1: starting piece 1 at 25-MAY-07
至此,成功。