多语言展示
当前在线:1632今日阅读:113今日分享:31

7 Apply Services

DataGuard  Apply Services1:Introduction to Apply Services --Apply Services  简介2:Apply Services Configuration Options--Apply Services配置选项3:Applying Redo Data to Physical Standby Databases  apply redo  data物理备库
方法/步骤
1

1:Introduction to Apply Services --Apply Services  简介    Apply services automatically apply redo to standby databases to maintain synchronization with the primary database and allow transactionally consistent access to the data.    Apply services自动apply redo到备库来确保和主库同步并且允许事务一致性的数据访问。    By default, apply services waits for a standby redo log file to be archived before applying the redo that it contains. However, you can enable real-time apply, which allows apply services to apply the redo in the current standby redo log file as it is being filled.    默认情况下,apply services在applying 日志之前需要等待备库日志文件被归档。然后,你可以使用real-time apply,它允许apply services apply刚刚被填充满的当前备库日志文件。Apply services 使用以下方法来保持物理和逻辑备库和主库一致:Redo Apply (physical standby databases only)SQL Apply (logical standby databases only)这里主要介绍:Redo Apply, SQL Apply, real-time apply, and delayed apply

2

2:Apply Services Configuration Options--Apply Services配置选项1、Using Real-Time Apply to Apply Redo Data Immediately使用Real-Time Apply进程来实时Apply日志数据     If the real-time apply feature is enabled, apply services can apply redo data as it is received, without waiting for the current standby redo log file to be archived    如果使用real-time apply 进程, apply services可以在接收到redo data之后立即apply,无需等待当前备库日志文件被填充满。使用 ALTER DATABASE 语句打开 real-time apply :物理备库: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE逻辑备库:ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE2、Specifying a Time Delay for the Application of Archived Redo Log Files  使用一个时间间隔延迟归档日志的applyIn 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.某些时候,你可能需要延迟从接收后开始与apply到备库时间。可以指定一些时间(分钟)来减少出现中断和错误带来的麻烦。设置DELAY  ,不是延迟从主库到备库的日志数据传输,而是接收到的redo data在备库日志完全归档的时间。注意:如果使用Real-Time Apply,延迟设置无效设置Time Delay:set a time delay on primary and standby databases using the DELAY=minutes attribute of the LOG_ARCHIVE_DEST_n initialization parameter to delay applying archived redo log files to the standby database.默认是没有延迟时间的,如果你在参数中写了DELAY但是没有指定具体时间,默认是30分钟解除Time Delay:在物理备库:ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY;逻辑备库:ALTER DATABASE START LOGICAL STANDBY APPLY NODELAY;

3

3:Applying Redo Data to Physical Standby DatabasesBy default, the redo data is applied from archived redo log files. When performing Redo Apply, a physical standby database can use the real-time apply feature to apply redo directly from the standby redo log files as they are being written by the RFS process.默认,redo data被apply进程从传输过来的归档日志apply。当想加快Redo Apply进程性能,物理备库能够使用real-time apply实时特性直接从通过RFS写进备库日志文件中进行 apply redo。1、Starting Redo Apply 启动Redo Apply 想在物理备库启动apply services 需要确保备库启动或者启动到mounted状态,然后才能使用ALTER DATABASE RECOVER MANAGED STANDBY DATABASE 语句启动。当然你也可以指定apply services运行在前台会话或者后台进程,在启动的时候也可以加上 real-time apply特细。启动apply进到前台会话:(启动后会话不会返回任何信息,知道进程被其他会话关闭)ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;启动apply进程到后台:(启动后直接返回启动成功信息)ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;启动real-time apply进程到前台会话:ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;启动real-time apply进程到后台:ALTER DATABASE RECOVER MANAGED STANDBY DATABASE  DISCONNECT  USING CURRENT LOGFILE;2、Stopping Redo Apply 停止Apply进程ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

推荐信息