Monday 26 March 2007

Dataguard Syntax Short

This little list has proven to be quite usefull for me. Escpesially since they made the commands so loooong. Its all there in the manual, but with a lot more stuff around it ;).

Be Aware! The lines break like the wave Maveric in this blog!

Physical standby database commands

Goal
Mount a standby database
Command
SQL> alter database mount standby database;

Goal
Start Redo Apply (Normal Recovery Process)
Command
SQL> alter database recover managed standby database disconnect;

Goal
Start Real Time Apply
Command
SQL> alter database recover managed standby database using current logfile disconnect;

Goal
Stop Apply (Redo or Real Time)
Command
SQL> alter database recover managed standby database cancel;

Goal
Run the recovery process in paralell (Number of CPU*2)
Command
alter database recover managed standby database using current logfile disconnect paralell 16;

Logical standby database commands

Goal

Start SQL Apply
Command
SQL> alter database start logical standby apply;

Goal
Start SQL Apply with Real Time Apply
Command
SQL> alter database start logical standby apply immediate;

Goal
Stop SQL Apply
Command
SQL> alter database stop logical standby apply;

Switchover

Goal
Check if you database is ready to switch over
Command
SQL> select switchover_status from v$database;
Expected result
SWITCHOVER_STATUS
-----------------
TO PRIMARY



Other commands

Goal
List information about archivelogs (I just had to put it in here, cause its cute)
Command
SQL> archive log list;

No comments: