The primary database and the standby database are all RAC 11.1.0.6 for Solaris10 SPARC, the shared storage primary database takes Volumn CLUSTER MANAGER, and the standby database uses ASM.
Failover switch is used when the main library is unavailable.
This is relatively simple and does not require much preparation, but for impersonation, the primary database is first closed:
Sql> Select instance_name, status from Gv$instance;
instance_name STATUS
---------------- ------------
RAC11G1 OPEN
Rac11g2 OPEN
Sql> select Name,
2 Open_mode,
3 Database_role,
4 Guard_status,
5 Db_unique_name,
6 Primary_db_unique_name
7 from V$database;
NAME open_mode database_role guard_s db_unique_name primary_db_unique_name
--------- ---------- ---------------- ------- --------------- -------------------------
rac11g_l READ WRITE PRIMARY NONE rac11g_s rac11g
sql> shutdown Immediate
The database has been closed.
The database has been unloaded.
The Oracle routine has been closed.
The following closes instance 2:
Sql> select instance_name from Gv$instance;
Instance_name
----------------
Rac11g2
sql> shutdown Immediate
The database has been closed.
The database has been unloaded.
The Oracle routine has been closed.
The 2nd instance of logical standby is closed below:
Sql> Select instance_name, status from Gv$instance;
instance_name STATUS
---------------- ------------
Rac11g2 OPEN
RAC11G1 OPEN
Sql> select Name,
2 Open_mode,
3 Database_role,
4 Guard_status,
5 Db_unique_name,
6 Primary_db_unique_name
7 from V$database;
This article URL address: http://www.bianceng.cn/database/Oracle/201410/45385.htm
NAME open_mode database_role guard_s db_unique_name primary_db_unique_name
--------- ---------- ---------------- ------- --------------- -------------------------
rac11g READ WRITE LOGICAL STANDBY all rac11g rac11g_s
sql> shutdown Immediate
The database has been closed.
The database has been unloaded.
The Oracle routine has been closed.
Check Instance 1:
Sql> Select instance_name, status from Gv$instance;
instance_name STATUS
---------------- ------------
RAC11G1 OPEN
If an updated archive log can be found, it can be copied to the local database and registered through ALTER DATABASE register LOGICAL logfile.
The logical standby database is switched to the main database below:
Sql> Select instance_name, status from Gv$instance;
instance_name STATUS
---------------- ------------
RAC11G1 OPEN
Sql> ALTER DATABASE activate logical standby database;
The database has changed.
Sql> select Name,
2 Open_mode,