PROTECTION_MODE is UNPROTECTED at standby database 分析

lovehewenyu發表於2012-11-30

PROTECTION_MODE is UNPROTECTED at standby database 分析

 

資料庫版本

SQL> select * from v$version;

 

BANNER

--------------------------------------------------------------------------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi

PL/SQL Release 10.2.0.1.0 - Production

CORE    10.2.0.1.0      Production

TNS for Linux: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 – Production

 

1、問題描述(data guard採用最大效能模式,但是備庫的PROTECTION_MODE 竟是UNPROTECTED?)

主庫

SQL> select DATABASE_ROLE,OPEN_MODE,PROTECTION_MODE from v$database;

 

DATABASE_ROLE                    OPEN_MODE            PROTECTION_MODE

-------------------------------- -------------------- ----------------------------------------

PRIMARY                          READ WRITE           MAXIMUM PERFORMANCE

 

備庫

SQL> select DATABASE_ROLE,OPEN_MODE,PROTECTION_MODE from v$database;

 

DATABASE_ROLE                    OPEN_MODE            PROTECTION_MODE

-------------------------------- -------------------- ----------------------------------------

PHYSICAL STANDBY                 MOUNTED              UNPROTECTED

 

2、問題補充描述

備庫日誌正常應用,主庫做DML操作,備庫read only開啟也可以看到DML的結果。說明此data guard本身是沒有問題的。但是為什麼備庫的PROTECTION_MODE 會出現 UNPROTECTED呢?萬分不解,在朋友的幫助下找到了關於這個問題的描述如下:

 

maximize_standby_db_clause

Use this clause to specify the level of protection for the data in your database environment. You specify this clause from the primary database, which must be mounted but not open.

Note:

The PROTECTED and UNPROTECTED keywords have been replaced for clarity but are still supported. PROTECTED is equivalent to TO MAXIMIZE PROTECTION. UNPROTECTED is equivalent to TO MAXIMIZE PERFORMANCE.

官檔連結:http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_1004.htm#SQLRF00802

 

3、問題分析

根據官檔的解釋:

PROTECTED= TO MAXIMIZE PROTECTION

UNPROTECTED= TO MAXIMIZE PERFORMANCE

這樣就不難看出了,我們data guardPROTECTION_MODE =UNPROTECTED ,這根本就沒有任何問題,只不過是想當於MAXIMIZE PERFORMANCE的另一種叫法是 UNPROTECTED而已。

 

4、總結:

PROTECTED= TO MAXIMIZE PROTECTION

UNPROTECTED= TO MAXIMIZE PERFORMANCE

一些關鍵性引數的理解問題。最好的解決辦法就是找oracle官檔。

 

終於也可以安心睡覺了,每天解決一點問題就是進步

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-750323/,如需轉載,請註明出處,否則將追究法律責任。

相關文章