1.主库:
备份数据库:
run{
allocate channel ch0 type disk;
backup database format '/oradata/%U' setsize=2100000;
release channel ch0;
}
生成 standby db 的 controlfile
ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/oradata/stdby.ctl';
2.从库:
把上面生成的文件拷贝到从库
3.
修改standby库的pfile:control_files = (/oradata/stdby.ctl)
4.standby 启动到mount
startup nomount ;
alter database mount standby database;
5.standby rman target / nocatalog
6.
run{
allocate channel ch0 type disk;
restore database;
release channel ch0 ;
}
cp archve log to standby db
7.recover managed standby database ;