DB:
1,切换primary到standby:
1,切换primary到standby:
SQL> alter database commit to switchover to physical standby with session shutdown;
2,像DG一样的mount:
SQL> shutdown immediate;
SQL> startup nomount pfile='/u01/app/oracle/product/10.1.0/db_1/dbs/initoratest.ora';
SQL> alter database mount standby database;
SQL> startup nomount pfile='/u01/app/oracle/product/10.1.0/db_1/dbs/initoratest.ora';
SQL> alter database mount standby database;
3,改dest2的state到defer:
SQL> alter system set log_archive_dest_state_2=defer;
DG:
1,切换standby到primary:
SQL> alter database commit to switchover to primary;
2,startup
SQL> shutdown immediate;
SQL> startup pfile='/u01/app/oracle/product/10.1.0/db_1/dbs/initoratest.ora';
SQL> startup pfile='/u01/app/oracle/product/10.1.0/db_1/dbs/initoratest.ora';
3,改dest2的state到enable:
SQL> alter system set log_archive_dest_state_2=enable;
DB:
4,开始recover:
SQL> recover managed standby database disconnect from session;
DG:
4,切日志:
SQL> alter system switch logfile;
DB:
5,tail alertlog,看结果:
tail -f alert_oratest.log
=======================================
常见问题:
1,不可更改log_archive_dest_state_2 参数,说spfile不可以更新。
解决方法:startup的时候,用pfile开启,等alter结束后,再重建spfile即可。
相关文章
暂无评论...