Wednesday, August 26, 2015

Standby Database Commands

  Standby Database Commands

Open Standby In Read Only :

    SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;
    SQL> ALTER DATABASE OPEN READ ONLY;

Back to Mount Point ( Same as Before Open in Read Only ) :

    SQL > shutdown;
    SQL > startup nomount
    SQL > alter database mount standby database
    SQL > alter database recover managed standby database disconnect from session;

Switch Over Primary As Standby , And Standby As Primary

Primary Database : Prim
Standby Database : Stdby

On Prim :

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY;
SQL> SHUTDOWN NORMAL;
SQL> STARTUP NOMOUNT;
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;


On standby:

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
SQL> SHUTDOWN;
SQL> STARTUP;

On Prim :

    SQL> ALTER DATABASE RECOVDR MANAGED STANDBY DATABASE;



On standby:

SQL> ALTER SYSTEM ARCHIVE LOG START;
SQL> ALTER SYSTEM SWITCH LOGFILE

No comments: