Monday, November 30, 2009

Performing DDL on a Logical Standby Database

Performing DDL on a Logical Standby Database

You can temporarily disable Data Guard within a logical standby database. When you need to perform DDL operations (such as the creation of new indexes to improve query performance), you will follow the same basic steps:

1. Stop the application of redo on the logical standby database.
2. Disable Data Guard.
3. Execute the DDL commands.
4. Enable Data Guard.
5. Restart the redo apply process.

For example, to create a new index, start by turning off the Data Guard features:

SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;
SQL> ALTER SESSION DISABLE GUARD;


Execute DDL operations. When you are done, re-enable the Data Guard features:

SQL> ALTER SESSION ENABLE GUARD;
SQL> ALTER DATABASE START LOGICAL APPLY;


The logical standby database will then restart its redo apply process, while the index will be
available to its query users.

0 comments: