ITPub博客

Standby数据库常用操作说明

原创 Linux操作系统 作者:paulyibinyi 时间:2007-12-20 10:23:25 0 删除 编辑

 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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
oracle 10g ocm oracle 10g/11g/12c ocp aix 6.1 administrator,ogg expert,ITSS 技术交流群 201703254 微信公众号 paulyibin 探讨技术,开心工作 电话 13719354869 ,深入研究数据库和开始研究big data

注册时间:2007-12-11

  • 博文量
    905
  • 访问量
    6485092