ORACLE 報警日志如何查看?第2/2頁
2. 使用外部表查看oracle報警日志
由于在上面實(shí)驗(yàn)中已建立了一個用戶,并賦相應(yīng)的權(quán)限,而且也有了OS文件(即報警文件alert_SID.log),所以在此直接建立目錄對象并建立外部表就可以了。
1.建立目錄對象
SQL> conn test / 123 Connected. SQL> create directory bdump as '/oracle/u01/app/oracle/admin/db2/bdump'; Directory created. |
2.建立外部表
SQL> create table alert_log( text varchar2(400) )organization external (type oracle_loader default directory bdump access parameters (records delimited by newline )location('alert_db2.log') ); |
首先查看能否查到alert_db2.log的內(nèi)容
SQL> select * from alert_log where rownum < 10; TEXT -------------------------------------------------------------------------------- Thu Jun 11 00:51:46 2009 Starting ORACLE instance (normal) Cannot determine all dependent dynamic libraries for /proc/self/exe Unable to find dynamic library libocr10.so in search paths RPATH = /ade/aime1_build2101/oracle/has/lib/:/ade/aime1_build2101/oracle/lib/:/a de/aime1_build2101/oracle/has/lib/: LD_LIBRARY_PATH is not set! The default library directories are /lib and /usr/lib Unable to find dynamic library libocrb10.so in search paths Unable to find dynamic library libocrutl10.so in search paths 9 rows selected. |
測試成功
然后我們測試查報警信息'ORA-%'
SQL> select * from alert_log where text like 'ORA-%'; TEXT -------------------------------------------------------------------------------- ORA-00202: control file: '/oracle/u01/app/oracle/product/10.2.0/db2/dbs/cntrldb2 .dbf' ORA-27037: unable to obtain file status ORA-205 signalled during: ALTER DATABASE MOUNT... ORA-00301: error in adding log file '/home/oracle/oracle/oradata/testdb/redo01.l og' - file cannot be created ORA-27040: file create error ORA-1501 signalled during: CREATE DATABASE db2 ORA-00200: control file could not be created TEXT -------------------------------------------------------------------------------- ORA-00202: control file: '/oracle/u01/app/oracle/product/10.2.0/db2/dbs/cntrldb2 .dbf' ORA-27038: created file already exists ORA-1501 signalled during: CREATE DATABASE db2 ORA-00200: control file could not be created ORA-00202: control file: '/oracle/u01/app/oracle/product/10.2.0/db2/dbs/cntrldb2 .dbf' ORA-27038: created file already exists ORA-1501 signalled during: CREATE DATABASE db2 |
測試成功,
可見我們可以使用外部表來方便的查看ORACLE的報警信息.
相關(guān)文章
Oracle數(shù)據(jù)泵EXPDP/IMPDP導(dǎo)出導(dǎo)入功能詳細(xì)深入解析
這篇文章主要給大家介紹了關(guān)于Oracle數(shù)據(jù)泵EXPDP/IMPDP導(dǎo)出導(dǎo)入功能的相關(guān)資料,數(shù)據(jù)泵導(dǎo)出/導(dǎo)入屬于邏輯備份,熱備份與冷備份都屬于物理備份,文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下2023-12-12
Oracle配置dblink訪問PostgreSQL的操作方法
本文給大家介紹下Oracle配置dblink訪問PostgreSQL的操作方法,通過dblink訪問PostgreSQL的詳細(xì)過程,對Oracle?dblink訪問PostgreSQL相關(guān)知識感興趣的朋友一起看看吧2022-03-03
Oracle數(shù)據(jù)庫"記錄被另一個用戶鎖住"解決方法(推薦)
數(shù)據(jù)庫是一個多用戶使用的共享資源。當(dāng)多個用戶并發(fā)地存取數(shù)據(jù)時,在數(shù)據(jù)庫中就會產(chǎn)生多個事務(wù)同時存取同一數(shù)據(jù)的情況。這篇文章主要介紹了Oracle數(shù)據(jù)庫"記錄被另一個用戶鎖住"解決方法2018-03-03
oracle數(shù)據(jù)庫id自增及生成uuid問題
這篇文章主要介紹了oracle數(shù)據(jù)庫id自增及生成uuid問題,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-05-05
Oracle?數(shù)據(jù)庫中的全文搜索整體流程分析
Oracle 是一種功能強(qiáng)大的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),它提供了各種功能來處理和管理大量的數(shù)據(jù),這篇文章主要介紹了Oracle?數(shù)據(jù)庫中的全文搜索功能,需要的朋友可以參考下2024-04-04

