oracle rman登陆及连接target数据库的步骤方法
方法一:
[oracle@odd-oelr4u8~]$ rman target sys/oracle@PROD1521 catalogcatalog_admin/catalog_admin@PROD21521
RecoveryManager: Release 10.2.0.1.0 - Production on Mon Jan 20 07:56:30 2014
Copyright(c) 1982, 2005, Oracle. All rightsreserved.
connectedto target database: PROD (DBID=248672105)
connectedto recovery catalog database
该方法指定catalog库并连接了target库,是一种CATALOG Mode
方法二:
[oracle@odd-oelr4u8~]$ rman target sys/oracle@PROD1521
RMAN>connect catalog catalog_admin/catalog_admin@PROD21521
connectedto recovery catalog database
该方法先连接target库,再指定catalog库,也是一种CATALOG Mode
方法三:
[oracle@odd-oelr4u8~]$rman
RMAN>connect target sys/oracle@PROD1521
connectedto target database: PROD (DBID=248672105)
RMAN>connect catalog catalog_admin/catalog_admin@PROD21521
connectedto recovery catalog database
该方法先连接rman,再指定连接target库,再指定catalog库,也是一种CATALOG Mode
方法四:
[oracle@odd-oelr4u8~]$ rman
RecoveryManager: Release 10.2.0.1.0 - Production on Mon Jan 20 07:59:21 2014
Copyright(c) 1982, 2005, Oracle. All rightsreserved.
RMAN>connect target sys/oracle@PROD1521
connectedto target database: PROD (DBID=248672105) --有dbid证明已连接到目标库
RMAN>show all;
using target database control file instead of recovery catalog --使用控制文件来代替恢复目录数据库存放rman元数据信息
RMANconfiguration parameters are:
CONFIGURERETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
CONFIGUREBACKUP OPTIMIZATION ON;
CONFIGUREDEFAULT DEVICE TYPE TO DISK; # default
CONFIGURECONTROLFILE AUTOBACKUP ON;
CONFIGURECONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO'/home/oracle/backup/control/controlfile_%F';
CONFIGUREDEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGUREDATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGUREARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURECHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup/PROD_%U';
CONFIGUREMAXSETSIZE TO UNLIMITED; # default
CONFIGUREENCRYPTION FOR DATABASE OFF; # default
CONFIGUREENCRYPTION ALGORITHM 'AES128'; # default
CONFIGUREARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURESNAPSHOT CONTROLFILE NAME TO'/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_PROD.f'; # default
RMAN>connect catalog catalog_admin/catalog_admin@PROD21521
RMAN-00571:===========================================================
RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-06445:cannot connect to recovery catalog after NOCATALOG has been used
这种情况是在连接target库之后,做了其他的非连接catalog库的动作,因此系统默认的是NO CATALOG MODE,系统已经默认使用controlfile作为知识库,再相连接catalog库就报错了
如果想再次使用catalog库,并将controlfile中的内容同步到catalog库中,则需要重新连接target和catalog,并作同步如下:
采用如上方法一、二、三中的任何一种方式连接target和catalog后,在rman中执行:
RMAN>resync catalog;
startingfull resync of recovery catalog
fullresync complete