Oracle 11g Data Guard: How to start and stop Redo Apply
1 Starting Redo Apply To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement. You
1 Starting Redo Apply
To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement.
You can specify that Redo Apply runs as a foreground session or as abackground 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;
alterdatabase recover managed standby database disconnect from session;
- 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;
alterdatabase recover managed standby database using current logfile disconnect fromsession;
2 Stopping Redo Apply
To stop Redo Apply, issue the following SQL statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
3 Advanced Configuration
3.1 Using Real-Time Apply to ApplyRedo Data Immediately
If the real-time apply feature is enabled, apply services can applyredo data as it is received, without waiting for the current standby redo logfile to be archived. This results in faster switchover and failover timesbecause the standby redo log files have been applied already to the standbydatabase by the time the failover or switchover begins.
Use the ALTER DATABASE statement to enable the real-time applyfeature, 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.
Real-time apply requires a standbydatabase that is configured with a standby redo log and that is in ARCHIVELOGmode.
The figure belowshowsa Data Guard configuration with a local destination and a standby destination.As the remote file server (RFS) process writes the redo data to standby redolog files on the standby database, apply services can recover redo from standbyredo log files as they are being filled.
3.2 Specifying a Time Delay for theApplication of Archived Redo Log Files
In some cases, you may want to create a time lag between the timewhen redo data is received from the primary site and when it is applied to thestandby database. You can specify a time interval (in minutes) to protectagainst 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 datato the standby database. Instead, the time lag you specify begins when the redodata is completely archived at the standby destination.
Note:
If you define a delay for a destination that has real-time applyenabled, the delay is ignored.
Specifying a Time Delay
You can set a time delay on primary and standby databases using theDELAY=minutes attribute of theLOG_ARCHIVE_DEST_n initializationparameter to delay applying archived redo log files to the standby database. Bydefault, there is no time delay. If you specify the DELAY attribute withoutspecifying a value, then the default delay interval is 30 minutes.
Canceling a Time Delay
You can cancel a specified delay interval as follows:
-
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;
These commands result in apply services immediately beginning toapply archived redo log files to the standby database, before the time intervalexpires.
Using Flashback Database as anAlternative to Setting a Time Delay
As an alternative to setting an apply delay, you can use FlashbackDatabase to recover from the application of corrupted or erroneous data to thestandby database. Flashback Database can quickly and easily flash back astandby database to an arbitrary point in time.
作者:xiangsir
QQ:444367417
MSN:xiangsir@hotmail.com

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

熱門話題

要查詢 Oracle 表空間大小,請遵循以下步驟:確定表空間名稱,方法是運行查詢:SELECT tablespace_name FROM dba_tablespaces;查詢表空間大小,方法是運行查詢:SELECT sum(bytes) AS total_size, sum(bytes_free) AS available_space, sum(bytes) - sum(bytes_free) AS used_space FROM dba_data_files WHERE tablespace_

在 Oracle 中獲取時間有以下方法:CURRENT_TIMESTAMP:返回當前系統時間,精確到秒。 SYSTIMESTAMP:比 CURRENT_TIMESTAMP 更準確,精確到納秒。 SYSDATE:返回當前系統日期,不含時間部分。 TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS'): 將當前系統日期和時間轉換為特定格式。 EXTRACT:從時間值中提取特定部分,如年份、月份或小時。

在 Oracle 中查看實例名的方法有三種:命令行中使用 "sqlplus" 和 "select instance_name from v$instance;" 命令。在 SQL*Plus 中使用 "show instance_name;" 命令。通過操作系統的任務管理器、Oracle Enterprise Manager 或檢查環境變量 (Linux 上的 ORACLE_SID)。

Oracle 視圖加密允許您加密視圖中的數據,從而增強敏感信息安全性。步驟包括:1) 創建主加密密鑰 (MEk);2) 創建加密視圖,指定要加密的視圖和 MEk;3) 授權用戶訪問加密視圖。加密視圖工作原理:當用戶查詢加密視圖時,Oracle 使用 MEk 解密數據,確保只有授權用戶可以訪問可讀數據。

Oracle 安裝失敗的卸載方法:關閉 Oracle 服務,刪除 Oracle 程序文件和註冊表項,卸載 Oracle 環境變量,重新啟動計算機。若卸載失敗,可使用 Oracle 通用卸載工具手動卸載。

數據導入方法:1. 使用 SQLLoader 實用程序:準備數據文件、創建控製文件、運行 SQLLoader;2. 使用 IMP/EXP 工具:導出數據、導入數據。提示:1. 大數據集推薦 SQL*Loader;2. 目標表應存在,列定義匹配;3. 導入後需驗證數據完整性。

在 Oracle 中創建用戶需遵循以下步驟:使用 CREATE USER 語句創建新用戶。使用 GRANT 語句授予必要權限。可選:使用 RESOURCE 語句設置配額。配置其他選項,如默認角色和臨時表空間。

Oracle 無效數字錯誤可能由數據類型不匹配、數字溢出、數據轉換錯誤或數據損壞引起。排查步驟包括檢查數據類型、檢測數字溢出、檢查數據轉換、排查數據損壞,並探索其他可能的解決方案,如配置 NLS_NUMERIC_CHARACTERS 參數和啟用數據驗證日誌記錄。
