ITPub博客

首页 > 数据库 > Oracle > ????Oracle dataguard enabling real time apply

????Oracle dataguard enabling real time apply

原创 Oracle 作者:lovehewenyu 时间:2013-08-14 13:35:54 0 删除 编辑

????Oracle dataguard enabling real time apply

 

总结:

    物理DGalter database recover managed standby database using current logfile disconnect;

    逻辑DGalter database start logical standby apply immediate;

 

physical standby database

 

开启redo apply

To start Redo Apply in the foreground, issue the following SQL statement:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;

To start Redo Apply in the background, include the DISCONNECT keyword on the SQL statement. For example:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;

To start real-time apply, include the USING CURRENT LOGFILE clause on the SQL statement. For example:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;

关闭redo apply

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

 

logical standby database

开启sql apply

To start SQL Apply, start the logical standby database and issue the following statement:

·         SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;

To start real-time apply on the logical standby database to immediately apply redo data from the standby redo log files on the logical standby database, include the IMMEDIATE keyword as shown in the following statement:

·         SQL>  ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;

关闭sql apply

To stop SQL Apply, issue the following statement on the logical standby database:

·         SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;

 

 

 

 

官档解释如下:

 

Oracle 10g

6.3.1 Starting Redo Apply

To start log apply services on a physical standby database, ensure the physical standby database is started and mounted and then start Redo Apply using the SQLALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement.

You can specify that Redo Apply runs as a foreground session or as a background process, and enable it with real-time apply.

·         To start Redo Apply in the foreground, issue the following SQL statement:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;

If you start a foreground session, control is not returned to the command prompt until recovery is canceled by another session.

·         To start Redo Apply in the background, include the DISCONNECT keyword on the SQL statement. For example:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;

This statement starts a detached server process and immediately returns control to the user. While the managed recovery process is performing recovery in the background, the foreground process that issued the RECOVER statement can continue performing other tasks. This does not disconnect the current SQL session.

·         To start real-time apply, include the USING CURRENT LOGFILE clause on the SQL statement. For example:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;

6.3.2 Stopping Redo Apply

To stop Redo Apply, issue the following SQL statement in another window:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

 

6.4.1 Starting SQL Apply

To start SQL Apply, start the logical standby database and issue the following statement:

SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;

To start real-time apply on the logical standby database to immediately apply redo data from the standby redo log files on the logical standby database, include theIMMEDIATE keyword as shown in the following statement:

SQL>  ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;

6.4.2 Stopping SQL Apply on a Logical Standby Database

To stop SQL Apply, issue the following statement on the logical standby database:

SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;

When you issue this statement, SQL Apply waits until it has committed all complete transactions that were in the process of being applied. Thus, this command may not stop the SQL Apply processes immediately.

If you want to stop SQL Apply immediately, issue the following statement:

SQL> ALTER DATABASE ABORT LOGICAL STANDBY APPLY;

Oracle 11g

7.3.1 Starting Redo Apply

To start apply services on a physical standby database, ensure the physical standby database is started and mounted and then start Redo Apply using the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement.

You can specify that Redo Apply runs as a foreground session or as a background process, and enable it with real-time apply.

·         To start Redo Apply in the foreground, issue the following SQL statement:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;

If you start a foreground session, control is not returned to the command prompt until recovery is canceled by another session.

·         To start Redo Apply in the background, include the DISCONNECT keyword on the SQL statement. For example:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;

This statement starts a detached server process and immediately returns control to the user. While the managed recovery process is performing recovery in the background, the foreground process that issued the RECOVER statement can continue performing other tasks. This does not disconnect the current SQL session.

·         To start real-time apply, include the USING CURRENT LOGFILE clause on the SQL statement. For example:

·         SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;

7.3.2 Stopping Redo Apply

To stop Redo Apply, issue the following SQL statement:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

 

 

7.4.1 Starting SQL Apply

To start SQL Apply, start the logical standby database and issue the following statement:

SQL> ALTER DATABASE START LOGICAL STANDBY APPLY;

To start real-time apply on the logical standby database to immediately apply redo data from the standby redo log files on the logical standby database, include the IMMEDIATE keyword as shown in the following statement:

SQL>  ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;

7.4.2 Stopping SQL Apply on a Logical Standby Database

To stop SQL Apply, issue the following statement on the logical standby database:

SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;

When you issue this statement, SQL Apply waits until it has committed all complete transactions that were in the process of being applied. Thus, this command may not stop the SQL Apply processes immediately.

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26442936/viewspace-768473/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
10年老鸟,Oracle,Mysql,EMC 存储,NBU备份

注册时间:2012-02-03

  • 博文量
    268
  • 访问量
    1296836