Standby資料庫常用操作說明

paulyibinyi發表於2007-12-20

 u    Starting Up a Physical Standby Database

To start up a physical standby database, use SQL*Plus to connect to the database

with administrator privileges

1. Start the database:

SQL> STARTUP NOMOUNT;

2. Mount the standby database:

SQL> ALTER DATABASE MOUNT STANDBY DATABASE;

3. Start the managed recovery operation:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Once the database is performing managed recovery, log apply services apply the

archived redo logs to the standby database.

u    Shutting Down a Physical Standby Database

To shut down a physical standby database:

1. 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;

2. Cancel managed recovery operations.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

3. Shut down the standby database.

SQL> SHUTDOWN IMMEDIATE;

 

u    Opening a Standby Database for Read-Only Access

Having a physical standby database open for read-only access makes it unavailable for managed recovery operations.

 

To open a standby database for read-only access when it is currently

shut down:

1. Start the Oracle instance for the standby database without mounting it:

SQL> STARTUP NOMOUNT;

2. Mount the standby database:

SQL> ALTER DATABASE MOUNT STANDBY DATABASE;

3. Open the database for read-only access:

SQL> ALTER DATABASE OPEN READ ONLY;

To open a standby database for read-only access when it is currently

performing managed recovery:

1. Cancel log apply services:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

2. Open the database for read-only access:

SQL> ALTER DATABASE OPEN READ ONLY;

To change the standby database from being open for read-only access

to performing managed recovery:

1. Terminate all active user sessions on the standby database.

2. Restart log apply services:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-924/,如需轉載,請註明出處,否則將追究法律責任。

相關文章