首页 » ORACLE » read/write mode open no longer be physical standby db

read/write mode open no longer be physical standby db

如果primary db 丢失或不再需要的physical standby ,想把这些库(standby)利用起来,logical standby 本来就可以write open,11g ADG也可以APPLY LOG时open,但是read only,下面演示如果把off-line standby 转为primary,open  read/write mode.

1. Open standby database in mount state :
shutdown immediate;
startup mount

2. recover if there is any archive log
alter database recover managed standby database cancel;
recover standby database;
cancel

3. finished the recover process

alter database recover managed standby database finish;

Note: Do not use the ALTER DATABASE ACTIVATE STANDBY DATABASE statement to failover because it causes data loss. Instead, use the following best practices: For physical standby databases, use the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement with the FINISH keyword to perform the role transition as quickly as possible with little or no data loss and without rendering other standby databases unusable. For logical standby databases, use the ALTER DATABASE PREPARE TO SWITCHOVER and ALTER DATABASE COMMIT TO SWITCHOVER statements.

4. activate standby database idle>select database_role,log_mode,protection_mode,open_mode,db_unique_name from v$database; DATABASE_ROLE LOG_MODE PROTECTION_MODE OPEN_MODE DB_UNIQUE_NAME —————- ———— ——————– ——————– —————————— PHYSICAL STANDBY ARCHIVELOG MAXIMUM PERFORMANCE MOUNTED stdby idle>alter database activate standby database; Database altered. idle>select database_role,log_mode,protection_mode,open_mode,db_unique_name from v$database; DATABASE_ROLE LOG_MODE PROTECTION_MODE OPEN_MODE DB_UNIQUE_NAME —————- ———— ——————– ——————– —————————— PRIMARY ARCHIVELOG MAXIMUM PERFORMANCE MOUNTED stdby idle>alter database open; Database altered. idle>select database_role,log_mode,protection_mode,open_mode,db_unique_name from v$database; DATABASE_ROLE LOG_MODE PROTECTION_MODE OPEN_MODE DB_UNIQUE_NAME —————- ———— ——————– ——————– —————————— PRIMARY ARCHIVELOG MAXIMUM PERFORMANCE READ WRITE stdby

ok.

打赏

对不起,这篇文章暂时关闭评论。