oracle 10g data guard log apply services

1
Footnote 1: The managed recovery process (MRP) applies archived redo log files to the physical standby database,
and automatically determines the optimal number of parallel recovery processes at the time it starts.
The number of parallel recovery slaves spawned is based on the number of CPUs available on the standby server.
Footnote 2: The logical standby process (LSP) uses parallel execution (Pnnn) processes to
apply archived redo log files to the logical standby database, using SQL interfaces.

2
You can also open a physical standby database in read-only mode to allow users to query the standby database for reporting purposes.
While open, redo data is still received; however,
Redo Apply stops and the physical standby database is not kept synchronized with the primary database.

3
If the real-time apply feature is enabled, log apply services can apply redo data as it is received, without waiting
for the current standby redo log file to be archived.

4
Use the ALTER DATABASE statement to enable the real-time apply feature, as follows:

    *

      For physical standby databases, issue the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE statement.
    *

      For logical standby databases, issue the ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE statement.

5,
If you define a delay for a destination that has real-time apply enabled, the delay is ignored.

6,
In some cases, you may want to create a time lag between the time when redo data is received from the
primary site and when it is applied to the standby database. You can specify a time interval (in minutes)
to protect against the application of corrupted or erroneous data to the standby database.
When you set a DELAY interval, it does not delay the transport of the redo data to the standby database. Instead,
the time lag you specify begins when the redo data is completely archived at the standby destination.

7 ---delay用于防止在备库应用错误事务或重作日志的机率,值为秒;若delay不加值,默认为20秒
alter system set log_archive_dest_2='SERVICE=rhel async valid_for=(online_logfiles,primary_role) db_unique_name=rhel delay=40';

8,取消以上delay配置
    *

      For physical standby databases, use the NODELAY keyword of the RECOVER MANAGED STANDBY DATABASE clause:

      SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY;

    *

      For logical standby databases, specify the following SQL statement:

      SQL> ALTER DATABASE START LOGICAL STANDBY APPLY NODELAY;


9
 取消逻辑备库日志应用
.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;



10  ---物理备库应用(实时应用)
 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 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;---开启物理备库实时应用

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

转载于:http://blog.itpub.net/9240380/viewspace-625719/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值