EDIT DATABASE (State)

The EDIT DATABASE (State) command changes the state of the specified database.

Format

EDIT DATABASE <db_unique_name> SET STATE=state [WITH APPLY INSTANCE=<instance_name>];

Command Parameters

db_unique_name

The DB_UNIQUE_NAME initialization parameter value of the database whose state is to be changed.

state

The state in which you want the database to be running. The possible states are:

  • TRANSPORT-ON (primary database only)
  • TRANSPORT-OFF (primary database only)
  • APPLY-ON (physical or logical standby database only)
  • APPLY-OFF (physical or logical standby database only)
instance_name

The name of the instance you want to become the apply instance if this is an Oracle RAC standby database.

Usage Notes

  • If the target state is APPLY-ON and this database is currently a physical or logical standby database, the optional WITH APPLY INSTANCE clause specifies which instance will become the apply instance.

  • If the target state is not APPLY-ON or if the database is currently in the primary role, the WITH APPLY INSTANCE clause is ignored even if it is specified.

  • You cannot change the state of a snapshot standby database.

  • All instances of an Oracle RAC database are affected by this database state change.

Command Example

The following examples show how to change the state of a database.

DGMGRL> EDIT DATABASE 'South_Sales' SET STATE='APPLY-ON';
Succeeded.