Oracle中缺少log_archive_config會導致歸檔路徑被禁用

來源:互聯網
上載者:User

10g的DATA GUARD的一個主要特點就是引入了log_archive_config參數,如果缺少這個參數,可能會導致歸檔路徑被禁用。

看別人建立DATA GUARD時碰到了這個問題,當時覺得比較有意思,於是特意重現一下。

當前是一個已經配置好的DATA GUARD,為了類比錯誤,先將這個參數設定為空白:

SQL> alter system set log_archive_config = '';

System altered.

SQL> alter system switch logfile;

System altered.

SQL> show parameter archive_dest_2

NAME                                 TYPE        VALUE

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

log_archive_dest_2                   string      SERVICE=standby LGWR SYNC VALI

D_FOR=(ONLINE_LOGFILES,PRIMARY

_ROLE) DB_UNIQUE_NAME=standby

SQL> alter system set log_archive_dest_2 = 'SERVICE=standby ARCH ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby';

System altered.

SQL> alter system switch logfile;

System altered.

日誌切換後,alert檔案中並沒有任何的錯誤,包含重新設定log_archive_dest_2參數後再次執行切換日誌,alert檔案中仍然看不到預期的錯誤。

導致問題無法重現的原因可能是由於系統中已經設定過log_archive_config參數了,雖然現在置為空白,但是這個參數的生效可能會一直保留,於是嘗試重啟資料庫:

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 2147483648 bytes

Fixed Size                  2074112 bytes

Variable Size             486541824 bytes

Database Buffers         1644167168 bytes

Redo Buffers               14700544 bytes

Database mounted.

Database opened.

SQL> alter system switch logfile;

System altered.

SQL> alter system set log_archive_dest_2 = 'SERVICE=standby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby';

System altered.

SQL> alter system switch logfile;

System altered.

這是從alert檔案中已經可以看到預期的錯誤了:

Thu Dec 23 21:42:48 2010

Completed: ALTER DATABASE OPEN

Thu Dec 23 21:42:51 2010

Thread 1 advanced to log sequence 11

Current log# 2 seq# 11 mem# 0: /data/oradata/primary/redo02.log

Thu Dec 23 21:42:51 2010

Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:

ORA-16057: DGID from server not in Data Guard configuration

Thu Dec 23 21:42:51 2010

FAL[server, ARC1]: Error 16057 creating remote archivelog file 'standby'

FAL[server, ARC1]: FAL archive failed, see trace file.

Thu Dec 23 21:42:51 2010

Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:

ORA-16055: FAL request rejected

ARCH: FAL archive failed. Archiver continuing

Thu Dec 23 21:42:51 2010

ORACLE Instance primary - Archival Error. Archiver continuing.

Thu Dec 23 21:43:46 2010

Shutting down archive processes

Thu Dec 23 21:43:51 2010

ARCH shutting down

ARC2: Archival stopped

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.