본문 바로가기

Oracle/admin

Dataguard Switchover

Database Switchover


Primary

-- Convert primary database to standby
CONNECT / AS SYSDBA
ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY;

-- Shutdown primary database
SHUTDOWN IMMEDIATE;

-- Mount old primary database as standby database
STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;




Standby

-- Convert standby database to primary
CONNECT / AS SYSDBA
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

-- Shutdown standby database
SHUTDOWN IMMEDIATE;

-- Open old standby database as primary
STARTUP;


standby에서 primary로 넘길때 recover가 필요하다고 에러가 나오면 recover를 해준뒤 넘겨준다.


==>
SQL> alter database commit to switchover to primary;
alter database commit to switchover to primary
*
ERROR at line 1:
ORA-16139: media recovery required


SQL> RECOVER MANAGED STANDBY DATABASE FINISH;
Media recovery complete.
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

Database altered.




'Oracle > admin' 카테고리의 다른 글

Oracle Linux 커널 매게변수 및 Shell Limit(리소스 제한)  (0) 2016.07.01
SQL LOADER  (0) 2016.06.24
Oracle Dataguard Install  (0) 2016.06.16
패스워드 verify 설정 및 해제  (0) 2016.06.14
Oracle TDE  (0) 2016.06.14