1sql>showparameterspfile
2nametypevalue
3‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
4spfilestring new_data/racdb/spfileracdb.ora
1‐‐查看参数文件
2catinitracdb2.ora
3spfile=' new_data/racdb/spfileracdb.ora'#lineaddedbyagent
1sql>colnamefora50
2sql>selectstatus,namefromv$controlfile;
3statusname
4‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
5 data/racdb/control01.ctl
6 data/racdb/control02.ctl
7或
8sql>showparametercontrol_files;
9nametypevalue
10‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
‐‐
11control_filesstring data/racdb/control01.ctl,
12 data/racdb/control02.ctl
2、关闭数据库所有实例,启动一个实例到nomount,用rman备份控制文件
1sql>startupnomount;‐‐=>启库为nomount
2rman>restorecontrolfileto' new_data/racdb/control01.ctl'from' data/
racdb/control01.ctl';
3startingrestoreat15‐oct‐21
4usingtargetdatabasecontrolfileinsteadofrecoverycatalog
5allocatedchannel:ora_disk_1
6channelora_disk_1:sid=667instance=racdb3devicetype=disk
7
8channelora_disk_1:copiedcontrolfilecopy
9finishedrestoreat15‐oct‐21
10rman>restorecontrolfileto' new_data/racdb/control02.ctl'from' dat
a/racdb/control02.ctl';
11startingrestoreat15‐oct‐21
12usingchannelora_disk_1
13
文档被以下合辑收录
评论