Oracle動態顯示日誌

來源:互聯網
上載者:User

標籤:rac   位置   系統   動態   default   nbsp   article   pwd   ace   

 

1.查看記錄檔位置。

[email protected]>select inst_id,name,value from v$diag_info;

   INST_ID NAME                 VALUE
---------- -------------------- --------------------------------------------------
         1 Diag Enabled         TRUE
         1 ADR Base             /u01/app/oracle
         1 ADR Home             /u01/app/oracle/diag/rdbms/prod/PROD
         1 Diag Trace           /u01/app/oracle/diag/rdbms/prod/PROD/trace
         1 Diag Alert           /u01/app/oracle/diag/rdbms/prod/PROD/alert
         1 Diag Incident        /u01/app/oracle/diag/rdbms/prod/PROD/incident
         1 Diag Cdump           /u01/app/oracle/diag/rdbms/prod/PROD/cdump
         1 Health Monitor       /u01/app/oracle/diag/rdbms/prod/PROD/hm
         1 Default Trace File   /u01/app/oracle/diag/rdbms/prod/PROD/trace/PROD_or
                                a_4873.trc

         1 Active Problem Count 0
         1 Active Incident Coun 0
           t

 --alert檔案夾為一個xml檔案;

 --trace檔案夾中為文字檔;

[[email protected] trace]$ pwd
/u01/app/oracle/diag/rdbms/prod/PROD/trace
[[email protected] trace]$ ll -atl|grep alert*
-rw-r-----  1 oracle oinstall 99797 Sep 29 14:54 alert_PROD.log
[[email protected] trace]$ tail -f alert_PROD.log
Mon Sep 29 14:43:34 2014
Starting background process SMCO
Mon Sep 29 14:43:34 2014
SMCO started with pid=28, OS id=4709
Mon Sep 29 14:54:57 2014
Thread 1 advanced to log sequence 12 (LGWR switch)
  Current log# 3 seq# 12 mem# 0: /u01/app/oracle/oradata/PROD/onlinelog/o1_mf_3_b22567o2_.log
  Current log# 3 seq# 12 mem# 1: /u01/app/oracle/fast_recovery_area/PROD/onlinelog/o1_mf_3_b2256827_.log
Mon Sep 29 14:54:58 2014
Archived Log entry 7 added for thread 1 sequence 11 ID 0x102473b1 dest 1:

 

--作業系統下查看alert日誌。用tail指令;

資料庫有什麼修改,記錄檔就會產生對應的記錄

用於查看學習測試最好只是

Oracle動態顯示日誌

聯繫我們

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