lsnrctl
lsnrctl stop
lsnrctl start
lsnrctl stop
lsnrctl start
select instance_name,status from v$instance;
archive log list;
archive log list;
alter system switch logfile;
alter system archive log all;
alter system checkpoint;
shutdown immediate
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session;
alter database mount standby database;
alter database recover managed standby database disconnect from session;
******************************************************************************
alter database add standby logfile group 4 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\STD_REDO04.LOG') size 50M reuse;
alter database add standby logfile group 5 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\STD_REDO05.LOG') size 50M;
alter database add standby logfile group 6 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\STD_REDO06.LOG') size 50M;
alter database add standby logfile group 7 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\STD_REDO07.LOG') size 50M;
alter database add standby logfile group 5 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\STD_REDO05.LOG') size 50M;
alter database add standby logfile group 6 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\STD_REDO06.LOG') size 50M;
alter database add standby logfile group 7 ('C:\ORACLE\PRODUCT\10.2.0\ORADATA\TESTDB\STD_REDO07.LOG') size 50M;
------------------------------------------------------------------------------
alter database create standby controlfile as 'c:\control01.ctl';
alter database recover managed standby database disconnect from session;
alter database recover managed standby database using current logfile disconnect from session;
alter database recover managed standby database using current logfile disconnect from session;
select name,db_unique_name,database_role,protection_mode,protection_level from v$database;
select name,sequence#,applied from v$archived_log order by sequence#;
select process,status from v$managed_standby;
----------------------------Switchover-----------------------------------------
主:
1.select switchover_status from v$database;
2.alter database commit to switchover to physical standby with session shutdown;
3.shutdown immediate
startup nomount;
alter database mount standby database;
4.alter database recover managed standby database [using current logfile] disconnect from session;
主:
1.select switchover_status from v$database;
2.alter database commit to switchover to physical standby with session shutdown;
3.shutdown immediate
startup nomount;
alter database mount standby database;
4.alter database recover managed standby database [using current logfile] disconnect from session;
備:
5.select switchover_status from v$database;
6.alter database commit to switchover to primary with session shutdown;
7.shutdown immediate
8.startup
5.select switchover_status from v$database;
6.alter database commit to switchover to primary with session shutdown;
7.shutdown immediate
8.startup
----------------------------Failover-----------------------------------------
備:
1.alter database recover managed standby database finish (force); 若加force关键字将会立即停止当前RFS进程。
2.alter database commit to switchover to primary;
3.shutdown immediate;
4.startup;
--------------------------- 修改保護模式--------------------------------------
主:
1.select name,db_unique_name,database_role,protection_mode,protection_level from v$database;
2.修改主庫參數
2.A 最大性能模式
*.log_archive_dest_2='service=elms02 valid_for=(online_logfiles,primary_role) db_unique_name=elms02'
2.B 最大可用模式
*.log_archive_dest_2='service=elms02 optional lgwr sync affirm valid_for=(online_logfiles,primary_role) db_unique_name=elms02'
2.A 最大性能模式
*.log_archive_dest_2='service=elms02 valid_for=(online_logfiles,primary_role) db_unique_name=elms02'
2.B 最大可用模式
*.log_archive_dest_2='service=elms02 optional lgwr sync affirm valid_for=(online_logfiles,primary_role) db_unique_name=elms02'
3.startup mount
4.alter database set standby database to maximize [ performance |availability ];
5.shutdown immediate
6.startup
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27201538/viewspace-766954/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27201538/viewspace-766954/