Including:
centos6.5 ORACLE11GR2 Dataguard Installation
DataGuard Primary and Standby switchover role switching
Data Synchronization Test
< one, >DG database data synchronization test
1. Start the main library normally
$sqlplus/as SYSDBA
Sql>startup
2. Start the Standby library
$sqlplus/as SYSDBA
Sql>startup Mount
Sql>alter database recover managed standby database disconnect from session
Sql>alter database recover managed Standby database cancel
Sql>alter Database Open Read Only
Sql>alter database recover managed standby database using current logfile disconnect
3. Log switchover on the main library
Sql>alter System Switch LogFile
4, create a table on the main library to insert data and query in the standby library
Sql>create table Smsinfo (id integer,name char (10))
Sql>insert into Smsinfo values (1, ' Chkruiy ')
sql>commit;
#如果standby模式为read-only mode of real-time redo application mode, after the main library commit, in the standby library directly query can
Sql>select * from Smsinfo
5, if the standby mode for the Redo application mode, you need to do the following to query
#测试时, you need to do a log archive on the main library and send the logs to the standby library
Sql>alter System Archive Log Current
#在备库上取消redo应用 because the database cannot be opened in Redo Application mode
Sql>alter database recover managed Standby database cancel
Sql>select * from Smsinfo
Test success!
New user and Tablespace synchronization test
< two,> primary and standby switching
Select Name,open_mode,database_role,protection_level,protection_mode from V$database;
1, Main library execution
Sql>alter System archive Log current;
Sql>alter database commit to switchover-physical standby with session shutdown;
Sql>shutdown Immediate
Sql>startup Mount
Main Library switchover switch to standby status View
Select Open_mode,switchover_status,database_role from V$database
2, Standby library execution
Sql>alter database commit to switchover-primary with SESSION SHUTDOWN;;
Sql>alter DATABASE COMMIT to switchover-physical STANDBY with SESSION SHUTDOWN;
Sql>alter Database Open
Sql>alter database recover managed standby database disconnect;
Dataguard Maintenance Commands
Detection of application rates and activities on 1,standby
Select To_char (start_time, ' dd-mon-rr hh24:mi:ss ') Start_time,item,sofar from v$recovery_progress where item in (' Active Apply rate ', ' Average Apply rate ', ' Redo applied ');
2, real-time synchronization log View
/ruiy/ocr/dbsoftware/app/oracle/diag/rdbms/dg1/dg/trace/alert_dg.log
3, the following query before and after switching on the main and standby to check the archive log transfer from the main library to the standby library
SELECT sequence#,applied from V$archived_log ORDER by sequence#;
Oracle Dataguard HA (master preparation, disaster preparedness) scenario deployment debugging