程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> 關於Oracle數據庫 >> OracleDataGuard_主庫添加或刪除在線重做日志文件

OracleDataGuard_主庫添加或刪除在線重做日志文件

編輯:關於Oracle數據庫

       8.3.5 Adding or Dropping Online Redo Log Files

      8.3.5 添加或刪除現在重做日志文件

      Changing the size and number of the online redo log files is sometimes done to tune the database. You can add or drop online redo log file groups or members to the primary database without affecting the standby database. Similarly, you can drop log file groups or members from the primary database without affecting your standby database. However, these changes do affect the performance of the standby database after switchover.

      改變在線重做日志文件大小和數量有時是優化數據庫。你可以在主庫添加或刪除在線重做日志組或者日志成員而不影響備庫。同樣的,你可以在主庫刪除日志文件組或成員而不影響你的備庫。但是,這邊變化在普通切換後會影響備庫的性能。

      Caution:

      注意:

      Whenever you add an online redo log file to the primary database, you should add corresponding online and standby redo log files to the standby database. 無論何時,你在主庫添加在線重做日志文件,你應該在備庫添加相應的在線重做日志和備用重做日志文件。

      For example, if the primary database has 10 online redo log files and the standby database has 2, and then you switch over to the standby database so that it functions as the new primary database, the new primary database is forced to archive more frequently than the original primary database.

      例如,如果主庫有10個在線重做日志,備庫有2個,那麼你切換到備庫時,變為主庫,新的主庫比原來的主庫會強制頻繁的歸檔。

      Consequently, when you add or drop an online redo log file at the primary site, it is important that you synchronize the changes in the standby database by following these steps:

      因此,當你在主庫添加或者刪除在線重做日志時,按照如下步驟將這些變化同步到備庫是很重要的,

      If Redo Apply is running, you must cancel Redo Apply before you can change the log files.

      1.如果重做應用正在運行,你必須在你改變日志文件錢取消重做應用。

      If the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO, change the value to MANUAL.

      如果STANDBY_FILE_MANAGEMENT初始化參數設置為AUTO,將它改變為MANUAL。

      Add or drop an online redo log file:

      3.添加或刪除在線重做日志文件:

      To add an online redo log file, use a SQL statement such as this:

      添加在線重做日志文件,使用如下SQL語句:

      SQL> ALTER DATABASE ADD LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log' SIZE 100M;

      To drop an online redo log file, use a SQL statement such as this:

      刪除在線重做日志文件,使用如下SQL語句:

      SQL> ALTER DATABASE DROP LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log';

      Repeat the statement you used in Step 3 on each standby database.

      在每個備庫上重復操作步驟3。

      Restore the STANDBY_FILE_MANAGEMENT initialization parameter and the Redo Apply options to their original states.

      還原STANDBY_FILE_MANAGEMENT初始化參數為AUTO,然後重做應用還原為原來的狀態。

    1. 上一頁:
    2. 下一頁:
    Copyright © 程式師世界 All Rights Reserved