8.1 Starting Up and Shutting Down a Physical Standby Database
This section describes the procedures for starting up and shutting down a physical standby database.
8.1.1 Starting Up a Physical Standby Database
To start up a physical standby database, use SQL*Plus to connect to the database with administrator privileges, and then use the SQL*Plus
STARTUP
command with the NOMOUNT
option. (You must use theNOMOUNT
option with a standby database.)
If both the primary and standby databases are offline, then always (if possible) start the standby database before starting the primary database.
After the database is started, mount the database as a standby database. Once it is mounted, the database can receive archived redo data from the primary database.
You then have the option of either starting a managed recovery operation or opening the database for read-only access. Typically, you start a managed recovery operation. The following example shows how to start a standby database:
- Start the database:
SQL> STARTUP NOMOUNT;
- Mount the standby database:
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
- Start the managed recovery operation:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE 2> DISCONNECT FROM SESSION;
Once the database is performing managed recovery, log apply services apply the archived redo logs to the standby database.
See Also:
Section 6.2.2 for information about managed recovery and Section 8.2 for information on opening a standby database for read-only access
|
8.1.2 Shutting Down a Physical Standby Database
To shut down a physical standby database, use the SQL*Plus
SHUTDOWN
command. If the database is performing managed recovery, you must cancel managed recovery operations before issuing theSHUTDOWN
command. Control is not returned to the session that initiates a database shutdown until shutdown is complete.
If the primary database is up and running, defer the archive log destination on the primary database and perform a log switch operation (to make the defer operation take effect) before shutting down the standby database. Otherwise, log transport services will not be able to transmit redo data to this standby site.
The following steps show you how to shut down a standby database:
- Find out if the standby database is performing managed recovery. If the MRP0 or MRP process exists, then the standby database is performing managed recovery.
SQL> SELECT PROCESS, STATUS FROM V$MANAGED_STANDBY;
- Cancel managed recovery operations.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
- Shut down the standby database.
SQL> SHUTDOWN IMMEDIATE;
No comments:
Post a Comment