[oracle@lfdz1 ~]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.3.0 - Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@sbdb1
Connected.
DGMGRL>
DGMGRL> failover to 'SBDB1';
Performing failover NOW, please wait...
Failover succeeded, new primary is "SBDB1"
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
SBDB1 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
PROD1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
SYS@PROD1> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@PROD1> startup mount
ORACLE instance started.
Total System Global Area 523108352 bytes
Fixed Size 1346052 bytes
Variable Size 331351548 bytes
Database Buffers 184549376 bytes
Redo Buffers 5861376 bytes
Database mounted.
[oracle@lfdz1 ~]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.3.0 - Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@sbdb1
Connected.
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
SBDB1 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
PROD1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
DGMGRL> reinstate database 'PROD1';
Reinstating database "PROD1", please wait...
Reinstatement of database "PROD1" succeeded
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
SBDB1 - Primary database
PROD1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
DGMGRL> show database 'SBDB1';
Database - SBDB1
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
SBDB1
Database Status:
SUCCESS
DGMGRL> show database 'PROD1';
Database - PROD1
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: ON
Instance(s):
PROD1
Database Status:
SUCCESS
DGMGRL> failover to 'PROD1';
Performing failover NOW, please wait...
Failover succeeded, new primary is "PROD1"
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
PROD1 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
SBDB1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
DGMGRL> show database 'PROD1';
Database - PROD1
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
PROD1
Database Warning(s):
ORA-16817: unsynchronized fast-start failover configuration
Database Status:
WARNING
DGMGRL> show database 'SBDB1';
Database - SBDB1
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: (unknown)
Apply Lag: (unknown)
Real Time Query: OFF
Instance(s):
SBDB1
Database Status:
ORA-16661: the standby database needs to be reinstated
SYS@SBDB1> startup mount;
ORACLE instance started.
Total System Global Area 523108352 bytes
Fixed Size 1346052 bytes
Variable Size 331351548 bytes
Database Buffers 184549376 bytes
Redo Buffers 5861376 bytes
Database mounted.
DGMGRL> reinstate database 'SBDB1';
Reinstating database "SBDB1", please wait...
Reinstatement of database "SBDB1" succeeded
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
PROD1 - Primary database
SBDB1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
SYS@PROD1> select open_mode, database_role, switchover_status from v$database;
OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS
-------------------- ---------------- --------------------
READ WRITE PRIMARY TO STANDBY
SYS@SBDB1> select open_mode, database_role, switchover_status from v$database;
OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS
-------------------- ---------------- --------------------
READ ONLY WITH APPLY PHYSICAL STANDBY NOT ALLOWED
DGMGRL for Linux: Version 11.2.0.3.0 - Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@sbdb1
Connected.
DGMGRL>
DGMGRL> failover to 'SBDB1';
Performing failover NOW, please wait...
Failover succeeded, new primary is "SBDB1"
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
SBDB1 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
PROD1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
SYS@PROD1> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@PROD1> startup mount
ORACLE instance started.
Total System Global Area 523108352 bytes
Fixed Size 1346052 bytes
Variable Size 331351548 bytes
Database Buffers 184549376 bytes
Redo Buffers 5861376 bytes
Database mounted.
[oracle@lfdz1 ~]$ dgmgrl
DGMGRL for Linux: Version 11.2.0.3.0 - Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@sbdb1
Connected.
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
SBDB1 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
PROD1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
DGMGRL> reinstate database 'PROD1';
Reinstating database "PROD1", please wait...
Reinstatement of database "PROD1" succeeded
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
SBDB1 - Primary database
PROD1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
DGMGRL> show database 'SBDB1';
Database - SBDB1
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
SBDB1
Database Status:
SUCCESS
DGMGRL> show database 'PROD1';
Database - PROD1
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: ON
Instance(s):
PROD1
Database Status:
SUCCESS
DGMGRL> failover to 'PROD1';
Performing failover NOW, please wait...
Failover succeeded, new primary is "PROD1"
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
PROD1 - Primary database
Warning: ORA-16817: unsynchronized fast-start failover configuration
SBDB1 - (*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
DGMGRL> show database 'PROD1';
Database - PROD1
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
PROD1
Database Warning(s):
ORA-16817: unsynchronized fast-start failover configuration
Database Status:
WARNING
DGMGRL> show database 'SBDB1';
Database - SBDB1
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: (unknown)
Apply Lag: (unknown)
Real Time Query: OFF
Instance(s):
SBDB1
Database Status:
ORA-16661: the standby database needs to be reinstated
SYS@SBDB1> startup mount;
ORACLE instance started.
Total System Global Area 523108352 bytes
Fixed Size 1346052 bytes
Variable Size 331351548 bytes
Database Buffers 184549376 bytes
Redo Buffers 5861376 bytes
Database mounted.
DGMGRL> reinstate database 'SBDB1';
Reinstating database "SBDB1", please wait...
Reinstatement of database "SBDB1" succeeded
DGMGRL> show configuration;
Configuration - dgtest
Protection Mode: MaxAvailability
Databases:
PROD1 - Primary database
SBDB1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
SYS@PROD1> select open_mode, database_role, switchover_status from v$database;
OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS
-------------------- ---------------- --------------------
READ WRITE PRIMARY TO STANDBY
SYS@SBDB1> select open_mode, database_role, switchover_status from v$database;
OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS
-------------------- ---------------- --------------------
READ ONLY WITH APPLY PHYSICAL STANDBY NOT ALLOWED
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30192548/viewspace-2121493/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30192548/viewspace-2121493/