ORACLE 報(bào)警日志如何查看?
2. 使用外部表查看oracle報(bào)警日志
由于在上面實(shí)驗(yàn)中已建立了一個(gè)用戶,并賦相應(yīng)的權(quán)限,而且也有了OS文件(即報(bào)警文件alert_SID.log),所以在此直接建立目錄對(duì)象并建立外部表就可以了。
1.建立目錄對(duì)象
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. |
測(cè)試成功
然后我們測(cè)試查報(bào)警信息'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 |
測(cè)試成功,
可見我們可以使用外部表來方便的查看ORACLE的報(bào)警信息.
相關(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ì)過程,對(duì)Oracle?dblink訪問PostgreSQL相關(guān)知識(shí)感興趣的朋友一起看看吧2022-03-03
Oracle數(shù)據(jù)庫"記錄被另一個(gè)用戶鎖住"解決方法(推薦)
數(shù)據(jù)庫是一個(gè)多用戶使用的共享資源。當(dāng)多個(gè)用戶并發(fā)地存取數(shù)據(jù)時(shí),在數(shù)據(jù)庫中就會(huì)產(chǎn)生多個(gè)事務(wù)同時(shí)存取同一數(shù)據(jù)的情況。這篇文章主要介紹了Oracle數(shù)據(jù)庫"記錄被另一個(gè)用戶鎖住"解決方法
Oracle中手動(dòng)刪除數(shù)據(jù)庫教程
這篇文章主要介紹了Oracle中手動(dòng)刪除數(shù)據(jù)庫教程,本文給出了詳細(xì)步驟以及清除ASM數(shù)據(jù)庫的步驟,需要的朋友可以參考下2014-10-10
oracle數(shù)據(jù)庫id自增及生成uuid問題
這篇文章主要介紹了oracle數(shù)據(jù)庫id自增及生成uuid問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-05-05
Oracle?數(shù)據(jù)庫中的全文搜索整體流程分析
Oracle 是一種功能強(qiáng)大的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),它提供了各種功能來處理和管理大量的數(shù)據(jù),這篇文章主要介紹了Oracle?數(shù)據(jù)庫中的全文搜索功能,需要的朋友可以參考下2024-04-04

