Oracle建完庫後必須先設好的三個參數

來源:互聯網
上載者:User

無論我們是用dbca建庫,還是手工建。在完成了建庫的任務後,有三個參數在以後的生產運用中非常重要,通常,我們是需要將其開啟的。
  第一個是log_checkpoints_to_alert。
  SQL> show parameter checkpoint

  NAME                                 TYPE        VALUE
  ------------------------------------ ----------- ------------------------------
  log_checkpoint_interval              integer     0
  log_checkpoint_timeout               integer     1800
  log_checkpoints_to_alert             boolean     FALSE
  SQL> alter system set log_checkpoints_to_alert=true;

  System altered.
 
  第二個是archivelog mode
  SQL> shutdown immediate
  Database closed.
  Database dismounted.
  Oracle instance shut down.
  SQL> startup mount
  ORACLE instance started.

  Total System Global Area  243269632 bytes
  Fixed Size                  1218748 bytes
  Variable Size              79693636 bytes
  Database Buffers          159383552 bytes
  Redo Buffers                2973696 bytes
  Database mounted.
  SQL> alter database noarchivelog;

  Database altered.

  SQL> alter database open;

  Database altered.

  SQL> archive log list      
  Database log mode              No Archive Mode
  Automatic archival             Disabled
  Archive destination            USE_DB_RECOVERY_FILE_DEST
  Oldest online log sequence     16
  Current log sequence           19
  SQL> shutdown immediate
  Database closed.
  Database dismounted.
  ORACLE instance shut down.
  SQL> shutdown mount
  SP2-0717: illegal SHUTDOWN option
  SQL> startup mount
  ORACLE instance started.

  Total System Global Area  243269632 bytes
  Fixed Size                  1218748 bytes
  Variable Size              79693636 bytes
  Database Buffers          159383552 bytes
  Redo Buffers                2973696 bytes
  Database mounted.
  SQL> alter database archivelog;

  Database altered.

  SQL> alter database open;

  Database altered.

  SQL> archive log list;
  Database log mode              Archive Mode
  Automatic archival             Enabled
  Archive destination            USE_DB_RECOVERY_FILE_DEST
  Oldest online log sequence     16
  Next log sequence to archive   19
  Current log sequence           19

  第三個是fast_start_mttr_target
  這個參數的調整可能比較麻煩。具體請參見: 
  下面簡單做一下操作說明:
  SQL> show parameter fast_start_mttr_target

  NAME                                 TYPE        VALUE
  ------------------------------------ ----------- ------------------------------
  fast_start_mttr_target               integer     0
  SQL> alter system set fast_start_mttr_target=24;

  System altered.

  SQL> show parameter fast_start_mttr_target

  NAME                                 TYPE        VALUE
  ------------------------------------ ----------- ------------------------------
  fast_start_mttr_target               integer     24

  這裡的24秒是個比較靠譜的做法。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.