rman登陆及连接target数据库的步骤方法
一、 方法一:
a) [oracle@odd-oelr4u8 ~]$ rman target sys/oracle@prod1521 catalog catalog_admin/catalog_admin@prod21521
b)
c) recovery manager: release 10.2.0.1.0 - production on mon jan 20 07:56:30 2014
d)
e) copyright (c) 1982, 2005, oracle. all rights reserved.
f)
g) connected to target database: prod (dbid=248672105)
h) connected to recovery catalog database
i) 该方法指定catalog库并连接了target库,是一种catalog mode
二、 方法二:
a) [oracle@odd-oelr4u8 ~]$ rman target sys/oracle@prod1521
b) rman> connect catalog catalog_admin/catalog_admin@prod21521
c)
d) connected to recovery catalog database
e) 该方法先连接target库,再指定catalog库,也是一种catalog mode
三、 方法三:
a) [oracle@odd-oelr4u8 ~]$rman
b) rman> connect target sys/oracle@prod1521
c)
d) connected to target database: prod (dbid=248672105)
e) rman> connect catalog catalog_admin/catalog_admin@prod21521
f)
g) connected to recovery catalog database
h) 该方法先连接rman,,再指定连接target库,再指定catalog库,也是一种catalog mode
四、 方法四:
a) [oracle@odd-oelr4u8 ~]$ rman
b)
c) recovery manager: release 10.2.0.1.0 - production on mon jan 20 07:59:21 2014
d)
e) copyright (c) 1982, 2005, oracle. all rights reserved.
f)
g) rman> connect target sys/oracle@prod1521
h)
i) connected to target database: prod (dbid=248672105) --有dbid证明已连接到目标库
j)
k) rman> show all;
l)
m) using target database control file instead of recovery catalog --使用控制文件来代替恢复目录数据库存放rman元数据信息
n) rman configuration parameters are:
o) configure retention policy to recovery window of 30 days;
p) configure backup optimization on;
q) configure default device type to disk; # default
r) configure controlfile autobackup on;
s) configure controlfile autobackup format for device type disk to '/home/oracle/backup/control/controlfile_%f';
t) configure device type disk parallelism 2 backup type to backupset;
u) configure datafile backup copies for device type disk to 1; # default
v) configure archivelog backup copies for device type disk to 1; # default
w) configure channel device type disk format '/home/oracle/backup/prod_%u';
x) configure maxsetsize to unlimited; # default
y) configure encryption for database off; # default
z) configure encryption algorithm 'aes128'; # default
aa) configure archivelog deletion policy to none; # default
bb) configure snapshot controlfile name to '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_prod.f'; # default
cc)
dd) rman> connect catalog catalog_admin/catalog_admin@prod21521
ee)
ff) rman-00571: ===========================================================
gg) rman-00569: =============== error message stack follows ===============
hh) rman-00571: ===========================================================
ii) rman-06445: cannot connect to recovery catalog after nocatalog has been used
jj) 这种情况是在连接target库之后,做了其他的非连接catalog库的动作,因此系统默认的是no catalog mode,系统已经默认使用controlfile作为知识库,再相连接catalog库就报错了
kk) 如果想再次使用catalog库,并将controlfile中的内容同步到catalog库中,则需要重新连接target和catalog,并作同步如下:
ll) 采用如上方法一、二、三中的任何一种方式连接target和catalog后,在rman中执行:
mm) rman> resync catalog;
nn)
oo) starting full resync of recovery catalog
pp) full resync complete
推荐阅读:
rman 配置归档日志删除策略
oracle基础教程之通过rman复制数据库
rman备份策略制定参考内容
rman备份学习笔记
oracle数据库备份加密 rman加密
