新聞中心
Oracle數(shù)據(jù)庫是當(dāng)前企業(yè)級應(yīng)用最為廣泛的數(shù)據(jù)庫之一,無論是數(shù)據(jù)管理、數(shù)據(jù)倉庫、數(shù)據(jù)分析,亦或是大數(shù)據(jù)、云計算等領(lǐng)域,都有Oracle的應(yīng)用。

目前創(chuàng)新互聯(lián)公司已為超過千家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)絡(luò)空間、網(wǎng)站托管、服務(wù)器租用、企業(yè)網(wǎng)站設(shè)計、建華網(wǎng)站維護等服務(wù),公司將堅持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。
在使用Oracle數(shù)據(jù)庫時,我們難免會遇到一些問題,比如應(yīng)用程序連接不上、查詢速度慢等等,這些問題可能源于多種原因,而Oracle數(shù)據(jù)庫提供了告警日志,可以輔助我們排查問題,解決問題,保障Oracle數(shù)據(jù)庫的正常運行。本文將詳細(xì)講述Oracle數(shù)據(jù)庫10g的告警日志,包括告警日志的類型和常見告警信息的含義。
一、告警日志的類型
Oracle數(shù)據(jù)庫10g的告警日志分為系統(tǒng)告警日志、監(jiān)聽器日志、數(shù)據(jù)庫日志和備份日志。
1. 系統(tǒng)告警日志
系統(tǒng)告警日志包含了數(shù)據(jù)庫實例內(nèi)部的告警信息,如SGA內(nèi)存分配、控制文件的刷新、實例關(guān)閉等。當(dāng)Oracle數(shù)據(jù)庫在運行過程中發(fā)現(xiàn)異常情況時,會自動將告警信息寫入系統(tǒng)告警日志。
在Oracle 10g中,系統(tǒng)告警日志默認(rèn)被記錄在$ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log中。在數(shù)據(jù)庫實例啟動時,Oracle會自動創(chuàng)建該文件,并且每次啟動Oracle實例后,均會自動刷新該文件。
2. 監(jiān)聽器日志
監(jiān)聽器日志指的是監(jiān)聽器進程中的告警信息,如監(jiān)聽器啟動、連接事件和配置文件變更等。與系統(tǒng)告警日志一樣,當(dāng)監(jiān)聽器進程發(fā)現(xiàn)異常情況時,會自動將告警信息寫入監(jiān)聽器日志。
在Oracle 10g中,監(jiān)聽器日志默認(rèn)被記錄在$ORACLE_BASE/network/log/listener.log中。
3. 數(shù)據(jù)庫日志
數(shù)據(jù)庫日志包括了數(shù)據(jù)庫增量備份、歸檔日志、Flash恢復(fù)日志和重新應(yīng)用的日志等,這些日志記錄了數(shù)據(jù)庫的變化過程,可以用于恢復(fù)數(shù)據(jù)庫。
在Oracle 10g中,數(shù)據(jù)庫日志默認(rèn)被記錄在$ORACLE_HOME/rdbms/log目錄下的trace文件中。
4. 備份日志
備份日志包括了數(shù)據(jù)庫備份過程中的告警信息,如備份文件被占用而導(dǎo)致備份失敗,以及備份過程中的異常情況等。備份日志對于備份和恢復(fù)數(shù)據(jù)庫至關(guān)重要。
在Oracle 10g中,備份日志默認(rèn)被記錄在$ORACLE_BASE/admin/$ORACLE_SID/backup目錄下的trace文件中。
二、常見告警信息的含義
1. ORA-00020: maximum number of processes (%s) exceeded
這種告警信息表示Oracle實例中的進程數(shù)超過了更大值。可以通過修改參數(shù)processes增加更大進程數(shù),解決該問題。
2. ORA-00024: 超時在等待裂開鎖的資源,等待已取消
該告警信息表示等待某個資源的時間超過了超時時間。這種情況通常是由于鎖沖突造成的,可以通過增加服務(wù)器上的鎖資源來解決該問題。
3. ORA-00059: 更大數(shù)量的漂移表項(%s)超出
該告警信息表示Oracle實例中的漂移表項數(shù)目已達(dá)到更大值,阻止了新的連接請求。可以通過增加參數(shù)max_dispatchers和max_shared_servers以及連接池大小來解決該問題。
4. ORA-00600: internal error code, arguments: [string], [string], [string], [string], [string], [string], [string], [string]
該告警信息表示數(shù)據(jù)庫內(nèi)部出現(xiàn)了未知的錯誤,需要聯(lián)系Oracle Support。通常該錯誤碼建議提交至Oracle Support進行解決。
5. ORA-01578: ORACLE數(shù)據(jù)壩發(fā)生錯誤; 加載醫(yī)用系統(tǒng)管理員
該告警信息表示Oracle數(shù)據(jù)壩出現(xiàn)了錯誤,可能是由于硬件故障或磁盤出現(xiàn)問題所引起的。需要重新啟動實例并重建數(shù)據(jù)壩。
6. ORA-01653: 用戶定義表空間%s不足,可用:%s需要:%s
該告警信息表示某個表空間中的可用空間已經(jīng)不足??梢酝ㄟ^增加數(shù)據(jù)文件或定期清理數(shù)據(jù)來釋放表空間。另外,建議增加表空間空間預(yù)留系數(shù)(例:4倍),以防止該問題再次發(fā)生。
Oracle數(shù)據(jù)庫10g告警日志對于我們排查問題和維護數(shù)據(jù)庫有著不可替代的作用。本文介紹了Oracle數(shù)據(jù)庫10g告警日志的類型以及常見告警信息的含義,希望能夠為讀者們帶來幫助。在使用Oracle數(shù)據(jù)庫時,做好日志文件的監(jiān)控和管理,及時處理告警信息,能夠有效地保障數(shù)據(jù)庫的正常運行,保障企業(yè)的數(shù)據(jù)安全。
相關(guān)問題拓展閱讀:
- Oracle數(shù)據(jù)庫打不開了,看數(shù)據(jù)庫告警日志是ORA-00600:[2667]錯誤
- 如何查看數(shù)據(jù)庫alert日志文件
- 每天G的nginx日志,需要怎么分析
Oracle數(shù)據(jù)庫打不開了,看數(shù)據(jù)庫告警日志是ORA-00600:[2667]錯誤
套Power AIX上的9.2.0.1系統(tǒng)在數(shù)據(jù)庫打開過程中遇到ORA-00600:內(nèi)部錯誤,詳細(xì)日志如下:
Wed Mar 9 19:03:
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
RESETLOGS after incomplete recovery UNTIL CHANGE
Resetting resetlogs activation ID(0x)
Wed Mar 9 19:03:
LGWR: Primary database is in CLUSTER CONSISTENT mode
Assigning activation ID(0x88307c28)
Thread 1 opened at log sequence 1
Current log# 3 seq# 1 mem# 0: /s01/maclean/oradata/PROD/redo03.log
Successful open of redo thread 1.
Wed Mar 9 19:03:
ON: enabling cache recovery
Wed Mar 9 19:03:
Errors in file /s01/maclean/admin/PROD/udump/PROD_ora_585914.trc:
ORA-07445: exception encountered: core dump
Wed Mar 9 19:03:
Errors in file /s01/maclean/admin/PROD/bdump/PROD_pmon_602286.trc:
ORA-07445: exception encountered: core dump
Wed Mar 9 19:03:
Errors in file /s01/maclean/admin/PROD/bdump/PROD_lgwr_548884.trc:
ORA-00600: internal error code, arguments: , , , , , , ,
LGWR: terminating instance due to error 600
相關(guān)啟橋的初始化參數(shù)
fast_start_mttr_target = 300
_allow_resetlogs_corruption= TRUE
undo_management = AUTO
undo_tablespace = UNDOTBS1
以上可以看到lgwr關(guān)鍵進程在數(shù)據(jù)庫open后幾秒后遭遇了ORA-00600:內(nèi)部錯誤后終止了實例。
該數(shù)據(jù)庫在之前因為丟失當(dāng)前日志文搜旁念件進行了已經(jīng)實施了一系列的非常規(guī)恢復(fù)操作,包括設(shè)置一系列的underscore參數(shù):
Before I provide the steps to fix the oraerror, I want to tell you that this database is opened with the unsupported parameter
“allow_resetlogs_corruption”.
*************************************************************************
* By forcing open the database using this parameter, there is a strong *
* likelihood of logical corruption, possibly affecting the data *
* dictionary. Oracle does not guarantee that all of the data will be *
* accessible nor will it support a database that has been opened by *
* this method and that the database users will be allowed 世困to continue *
* work. All this does is provide a way to get at the contents of the *
* database for extraction, usually by export. It is up to you to *
* determine the amount of lost data and to correct any logical *
* corruption issues. *
* *
*************************************************************************
2) The steps to get rid of the oraare as follows:
+ Change UNDO_MANAGEMENT=AUTO to
UNDO_MANAGEMENT=MANUAL
+ Remove or comment out UNDO_TABLESPACE and UNDO_RETENTION.
+ Add
_CORRUPTED_ROLLBACK_SEGMENTS =(comma separated list of Automatic Undo segments)
Example:
_CORRUPTED_ROLLBACK_SEGMENTS = (_SYSU1$, _SYSU2$, _SYSU3$, _SYSU4$,
_SYSU5$, _SYSU6$, _SYSU7$, _SYSU8$, _SYSU9$, _SYSU10$)
Note, sometimes the alert log will tell you what Automatic Undo segments are in use.
Search the alert log for SYSS. If the alert log does not contain that information then use _SYSU1$
through _SYSU10$ as shown in the example above.
In UNIX you can issue this command to get the undo segment names:
$ strings system01.dbf | grep _SYSU | cut -d $ -f 1 | sort -u
From the output of the strings command above, add a $ to end of each _SYSU undo segment name.
++ Startup mount the database as follows:
SQL > startup mount
SQL > recover database;
SQl > alter database open;
*._corrupted_rollback_segments= (_SYSU730$, _SYSU731$, _SYSU732$, _SYSU733$, _SYSU734$,
_SYSU735$, _SYSU736$, _SYSU737$, _SYSU738$, _SYSU739$, _SYSU744$, _SYSU740$, _SYSU741$,
_SYSU742$, _SYSU743$, _SYSU744$, _SYSU745$, _SYSU746$, _SYSU747$, _SYSU748$, _SYSU749$, _SYSU74t$,
_SYSU75$, _SYSU750$, _SYSU751$, _SYSU752$, _SYSU753$, _SYSU754$, _SYSU755$, _SYSU756$, _SYSU757$,
_SYSU758$, _SYSU759$, _SYSU76$, _SYSU760$, _SYSU761$, _SYSU762$, _SYSU763$, _SYSU764$, _SYSU765$,
_SYSU766$, _SYSU767$, _SYSU768$)
如何查看數(shù)據(jù)庫alert日志文件
查看數(shù)據(jù)陪大庫的alert日志文件可以通過sq實現(xiàn)。
1、從X$DBGALERTEXT 視圖中讀取alert目錄內(nèi)容:
SQL> select message_text from X$DBGALERTEXT where rownum select lpad(‘ ‘,lvl,’ ‘)||logical_file file_name
from X$DBGDIREXT
where rownum 滲頌select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Prod
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
SQL>
2、查看預(yù)警日志文件(alert_sid.log)的位置
SQL> show parameter dump
NAME TYPE VALUE
background_core_dump string partial
background_dump_dest string /u01/oracle/admin/bdump
core_dump_dest string /u01/oracle/admin/cdump
max_dump_file_size string
shadow_core_dump string partial
user_dump_dest string /u01/oracle/admin/udump
3、創(chuàng)建目錄alert
注意:directory不是實體,只是一個指向,指向os中一個路徑
SQL> create or replace directory alert as ‘/u01/oracle/admin/bdump’;
Directory created.
SQL>
4、創(chuàng)建外部表alert
SQL> create table alert
1 (log varchar2(1000))
2 organization external
3 (type oracle_loader
4 default directory alert
5 access parameters
6 (records delimited by newline)
7 location (‘a(chǎn)lert_PROD.log’))
8 reject limit unlimited;
Table created.
5、查看alert中的內(nèi)容
SQL> select * from alert where rownum
6、看看數(shù)據(jù)庫有哪些 可愛的ORA- 錯誤吧
SQL> select * from alert where log like ‘%ORA-%’;
LOG
ORA-959 signalled during: alter database default tablespace users…
ORA-959 signalled during: drop tablespace uses…
ORAsignalled during: drop tablespace users…
ORA-1549 signalled during: drop tablespace users…
ORA-1505 signalled during: alter database add logfile group 1
ORA-1184 signalled during: alter database add logfile group 1
ORA-1013 signalled during: alter tablespace tts read only…
ORA-1013 signalled during: alter tablespace tts read only…
ORA-1013 signalled during: alter tablespace users read only…
ORA-1539 signalled during: alter tablespace users read only…
每天G的nginx日志,需要怎么分析
Linux系統(tǒng)下Nginx 日志可以查看系統(tǒng)運行記錄和出錯說明,對Nginx 日志的分析可以了解系統(tǒng)運行的狀態(tài)。那么Linux系統(tǒng)Nginx日志怎么分析呢?
Nginx 日志相關(guān)配置有 2 個地方:access_log 和 log_format 。
默認(rèn)的格式冊搏:
access_log /data/logs/nginx-access.log;
log_format old ‘$remote_addr [$time_local] $status $request_time $body_bytes_sent ’
‘“$request” “$http_referer” “$http_user_agent”’;
相信大部分用過 Nginx 的人對默認(rèn) Nginx 日志格式配置都很熟悉,對日志的內(nèi)容也很熟悉。但是默認(rèn)配置備稿和格式雖然可讀,但是難以計算。
Nginx 日志刷盤相關(guān)策略可配置:
比如,設(shè)置 buffer,buffer 滿 32k 才刷盤;假如 buffer 不滿 5s 鐘強仿姿孝制刷盤的配置如下:
access_log /data/logs/nginx-access.log buffer=32k flush=5s;
這決定了是否實時看到日志以及日志對磁盤 IO 的影響。
Nginx 日志能夠記錄的變量還有很多沒出現(xiàn)在默認(rèn)配置中:
關(guān)于數(shù)據(jù)庫10g告警日志的介紹到此就結(jié)束了,不知道你從中找到你需要的信息了嗎 ?如果你還想了解更多這方面的信息,記得收藏關(guān)注本站。
香港服務(wù)器選創(chuàng)新互聯(lián),2H2G首月10元開通。
創(chuàng)新互聯(lián)(www.cdcxhl.com)互聯(lián)網(wǎng)服務(wù)提供商,擁有超過10年的服務(wù)器租用、服務(wù)器托管、云服務(wù)器、虛擬主機、網(wǎng)站系統(tǒng)開發(fā)經(jīng)驗。專業(yè)提供云主機、虛擬主機、域名注冊、VPS主機、云服務(wù)器、香港云服務(wù)器、免備案服務(wù)器等。
網(wǎng)站欄目:Oracle數(shù)據(jù)庫10g的告警日志詳解(數(shù)據(jù)庫10g告警日志)
網(wǎng)站路徑:http://fisionsoft.com.cn/article/dhiedpc.html


咨詢
建站咨詢
