REINSTATE
The REINSTATE function can be used to reinstate a
database after a failover operation.
REINSTATE
Function
DBMS_DG.REINSTATE (
db_name IN VARCHAR2,
severity OUT BINARY_INTEGER)
RETURN BINARY_INTEGER;Parameters
| Parameter | Description |
|---|---|
db_name |
The DB_UNIQUE_NAME initialization
parameter value of the database to be reinstated.
|
severity |
The severity associated with the status returned by
this function. Severity will be one of the following Oracle error
numbers:
|
Usage Notes
-
This function returns a binary integer.
- If the conditions for reinstatement described in Reinstating the Former Primary Database in the Broker Configuration are not satisfied, the reinstatement will fail with an appropriate error status and the specified database will remain disabled.
- If the database name specified is that of the old primary and fast-start
failover is enabled, the old primary database will be reinstated as a standby to
the new primary, and the fast-start failover environment will be updated to
reflect the availability of the new standby database. It will accept redo data
from the new primary database and be the target of a fast-start failover should
the new primary database fail. Reinstatement occurs automatically if the
observer is running unless the FastStartFailoverAutoReinstate configuration
property is set to
FALSE. - This function does not require that fast-start failover be enabled. It can be used to reinstate an old primary database after a complete manual failover has been performed. It can also be used to reinstate a bystander standby database that had been disabled after either a complete or immediate failover.
- Call this function while connected to any database in the broker configuration, except the database that is to be reinstated.
Return Values
| Error | Description |
|---|---|
ORA-00000: normal, successful
completion |
The database was successfully reinstated. |
ORA-16540: invalid argument |
The name specified for the database was not a valid
DB_UNIQUE_NAME value.
|
ORA-16732: Oracle Clusterware is restarting
the database instance
|
Oracle Clusterware is restarting the database to the mode required by the broker. Once the database has been restarted, retry this function call. |
ORA-16897: start database to mount mode
|
Reinstatement was not performed because the database was not running in mount mode. Restart the database to mount mode and retry this function call. |
ORA-16899: Operation requires a connection
to the primary database.
|
A connection to the primary database is required to call this function. |
Other |
The Data Guard broker was unable to reinstate the specified database and the return value will indicate the reason for this failure. |