oracle中的記錄檔模式,oracle記錄檔模式

來源:互聯網
上載者:User

oracle中的記錄檔模式,oracle記錄檔模式

           在oracle資料庫中有兩種記錄模式,分別是:非歸檔記錄模式和歸檔記錄模式。

           在oracle資料庫系統中,為了避免記錄檔中的內容在迴圈使用時被覆蓋,oracle系統

將已經寫滿的記錄檔通過檔案複製儲存到指定的地方,這個過程叫做”歸檔“,複製儲存下來

的記錄檔叫做”歸檔日誌“。在歸檔記錄檔中記錄了使用者對資料庫的所有的修改操作,通過

歸檔記錄檔,資料庫管理員可以對資料庫進行恢複操作。

          記錄檔的歸檔操作主要由後台進程ARCn自動完成。在必要的情況下,資料庫管理員

可以手動完成歸檔的操作,當需要提高日誌的歸檔操作效率時,可以啟動多個的歸檔進程AR

Cn。最多啟動進程ARCn的個數取決於參數log_archive_processes,該參數的範圍是1-10,通

過資料字典V$PARAMETER可以瞭解該參數的資訊。

SQL> columnname format a30

SQL> columnvalue format a20

SQL> selectname,value from v$parameter

  2 where name='log_archive_max_processes';

NAME                           VALUE

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

log_archive_max_processes      4

SQL>

             從上述的結果可以看出,參數log_archive_processes的值為4,說明最多可以啟動4

個ARCn進程。通過ALTER SYSTEM命令可以將log_archive_processes參數的值修改為10,

如下:SQL> ALTERSYSTEM SET log_archive_max_processes=10

  2  scope= both;

系統已更改。

                   在上述命令中使用了參數scope,該參數有三個可選的值,分別是:memory,

spfile和both。其中memory表示知識更改當前執行個體啟動並執行參數;spfile表示修改伺服器參數

檔案spfile中的設定;both表示既修改當前啟動並執行執行個體的參數,又修改了伺服器檔案spfile

中的設定。重新查詢如下:

SQL> selectname,value from v$parameter

  2 where name='log_archive_max_processes';

NAME                           VALUE

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

log_archive_max_processes      10

相關文章

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.