数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

OracleDataGuard常用维护命令参考手册


发布日期:2022年06月11日
 
OracleDataGuard常用维护命令参考手册

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_ = defer;

alter system set log_archive_dest_state_ = 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 downwe 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 filespec;

上一篇:Oracle分析函数详述

下一篇:10gR5提供面向OracleVM新管理功能