tnsnames.ora文件中增加GERPDG监听(先要确保本GERPDG本身的监听要存在,不存在就要添加):
GERPB =
在主库主机和备库主机上分别执行
tnsping GERPB
tnsping GERPDG
确保两边的监听都在正常工作。
4. 复制数据库
Target库:
GERPB重启
shutdown immediate;
alter database mount;
alter database force logging;
alter database archivelog;
alter database open;
Auxiliary库:
GERPDG:
sqlplus "/as sysdba"
startup nomount;
exit;
rman target sys/oracle1234@GERPB auxiliary sys/oracle1234@GERPDG
run{
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate auxiliary channel stby1 type disk;
allocate auxiliary channel stby2 type disk;
allocate auxiliary channel stby3 type disk;
allocate auxiliary channel stby4 type disk;
duplicate target database for standby from active database nofilenamecheck;
}