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_NAMEinitialization 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-ONand this database is currently a physical or logical standby database, the optionalWITH APPLY INSTANCEclause specifies which instance will become the apply instance. -
If the target state is not
APPLY-ONor if the database is currently in the primary role, theWITH APPLY INSTANCEclause 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.