Oracle DataGuard 常用維護命令參考手冊

Start Standby Database

startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect;

    Disable/Enable archive log destinations

alter system set log_archive_dest_state_2 = ‘defer’;
alter system set log_archive_dest_state_2 = ‘enable’;

    To remove a delay from a standby

alter database recover managed standby database cancel;

alter database recover managed standby database nodelay disconnect;

    Stop and Start of Logical standby apply

alter database stop logical standby apply;
alter database start logical standby apply;

    Physical Standby switchover:
   
In Primary Database:

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;

    In standby Database:

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
SHUTDOWN IMMEDIATE;
STARTUP;

    In Primary Database:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

    If the primary Database is down,we can use fllowing step to active standby database:

Alter DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
Alter DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
SHUTDOWN IMMEDIATE;
STARTUP;

    Register missing archive log file
   
Find archive log gap by query:

SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;

    register using:

ALTER DATABASE REGISTER PHYSICAL LOGFILE ‘filespec1’;

 

www.51-pass.com

This entry was posted in OCA, Oracle.

发表评论

邮箱地址不会被公开。 必填项已用*标注


*

在线客服系统