利用外部表查询alert日志中的ora错误

SQL> show parameter dump

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /oracle/oracle/diag/rdbms/orcldb/orcldb1/trace
core_dump_dest                       string      /oracle/oracle/diag/rdbms/orcldb/orcldb1/cdump
max_dump_file_size                   string      unlimited
shadow_core_dump                     string      partial
user_dump_dest                       string      /oracle/oracle/diag/rdbms/orcldb/orcldb1/trace

SQL> create directory alert as‘/oracle/oracle/diag/rdbms/orcldb/orcldb1/trace‘;
SQL> grant read,write on directory alert to public;
Grant succeeded.

SQL> desc dba_directories
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 OWNER                                                 NOT NULL VARCHAR2(30)
 DIRECTORY_NAME                                        NOT NULL VARCHAR2(30)
 DIRECTORY_PATH                                                 VARCHAR2(4000)

SQL> col OWNER for a30
SQL> col DIRECTORY_NAME for a30
SQL> col DIRECTORY_PATH for a100
SQL> select * from dba_directories where DIRECTORY_NAME=‘ALERT‘;

OWNER                          DIRECTORY_NAME                 DIRECTORY_PATH

SYS                            ALERT                          /oracle/oracle/diag/rdbms/orcldb/orcldb1/trace

SQL> !
[[email protected] ~]$ cd /oracle/oracle/diag/rdbms/orcldb/orcldb1/trace
[[email protected] trace]$ ls
alert_orcldb1.log             orcldb1_gen0_4646.trc   orcldb1_lms0_4701.trm  orcldb1_p000_4882.trc  orcldb1_rsmn_4802.trm
orcldb1_asmb_4737.trc         orcldb1_gen0_4646.trm   orcldb1_lms1_4666.trc  orcldb1_p000_4882.trm  orcldb1_vkrm_10819.trc
orcldb1_asmb_4737.trm         orcldb1_j000_22025.trc  orcldb1_lms1_4666.trm  orcldb1_p001_4884.trc  orcldb1_vkrm_10819.trm
orcldb1_cjq0_4949.trc         orcldb1_j000_22025.trm  orcldb1_lms1_4705.trc  orcldb1_p001_4884.trm  orcldb1_vkrm_18720.trc
orcldb1_cjq0_4949.trm         orcldb1_j005_4968.trc   orcldb1_lms1_4705.trm  orcldb1_p002_4886.trc  orcldb1_vkrm_18720.trm
orcldb1_dbrm_4650.trc         orcldb1_j005_4968.trm   orcldb1_mark_4747.trc  orcldb1_p002_4886.trm  orcldb1_vkrm_18893.trc
orcldb1_dbrm_4650.trm         orcldb1_lck0_4787.trc   orcldb1_mark_4747.trm  orcldb1_ping_4685.trc  orcldb1_vkrm_18893.trm
orcldb1_dbrm_4683.trc         orcldb1_lck0_4787.trm   orcldb1_mman_4715.trc  orcldb1_ping_4685.trm  orcldb1_vktm_4675.trc
orcldb1_dbrm_4683.trm         orcldb1_lmd0_4695.trc   orcldb1_mman_4715.trm  orcldb1_q001_4912.trc  orcldb1_vktm_4675.trm
orcldb1_dbw0_4717.trc         orcldb1_lmd0_4695.trm   orcldb1_mmon_4690.trc  orcldb1_q001_4912.trm  orcldb1_w000_17178.trc
orcldb1_dbw0_4717.trm         orcldb1_lmhb_4711.trc   orcldb1_mmon_4690.trm  orcldb1_qmnc_4908.trc  orcldb1_w000_17178.trm
orcldb1_dia0_4691_base_1.trc  orcldb1_lmhb_4711.trm   orcldb1_mmon_4739.trc  orcldb1_qmnc_4908.trm  orcldb1_w001_20637.trc
orcldb1_dia0_4691_base_1.trm  orcldb1_lmon_4693.trc   orcldb1_mmon_4739.trm  orcldb1_rcbg_4906.trc  orcldb1_w001_20637.trm
orcldb1_dia0_4691.trc         orcldb1_lmon_4693.trm   orcldb1_ora_4610.trc   orcldb1_rcbg_4906.trm
orcldb1_dia0_4691.trm         orcldb1_lms0_4662.trc   orcldb1_ora_4610.trm   orcldb1_rms0_4709.trc
orcldb1_diag_4681.trc         orcldb1_lms0_4662.trm   orcldb1_ora_4804.trc   orcldb1_rms0_4709.trm
orcldb1_diag_4681.trm         orcldb1_lms0_4701.trc   orcldb1_ora_4804.trm   orcldb1_rsmn_4802.trc

[[email protected] trace]$ exit
SQL> create table db_alert
  2  (log varchar2(4000))
  3  organization external
  4  (type oracle_loader
  5   default directory alert
  6  access parameters
  7  (records delimited by newline
  8  nobadfile
  9  nodiscardfile
 10  nologfile
 11  )
 12  location (‘alert_orcldb1.log‘))
 13   reject limit unlimited;

Table created.
SQL>  select * from db_alert where log like ‘%ORA-%‘;

LOG

ORA-1109 signalled during: ALTER DATABASE CLOSE NORMAL...
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00313: open failed for members of log group 2 of thread 1
Non critical error ORA-48113 caught while writing to trace file "/oracle/oracle/diag/rdbms/orcldb/orcldb1/trace/orcldb1_dbrm_7968.trc"
Non critical error ORA-48181 caught while writing to trace file "/oracle/oracle/diag/rdbms/orcldb/orcldb1/trace/orcldb1_ora_32461.trc"
Non critical error ORA-48181 caught while writing to trace file "/oracle/oracle/diag/rdbms/orcldb/orclMon Mar 21 21:59:57 2016

10 rows selected.

时间: 2024-10-15 14:55:48

利用外部表查询alert日志中的ora错误的相关文章

ALERT日志中常见监听相关报错之三:ORA-609 TNS-12537 and TNS-12547 or TNS-12170 TNS-12535错误的排查

1.11G中ALERT日志中有报错ORA-609 TNS-12537 and TNS-12547 or TNS-12170  12170, 'TNS-12535等问题的解决方法: Troubleshooting Guide for TNS-12535 or ORA-12535 or ORA-12170 Errors (文档 ID 119706.1) TNS-12535 / ORA-12535 on Connection to Database (文档 ID 214122.1) 11g: ORA-

【翻译自mos文章】升级到11.2.0.4之后在alert日志中出现 NUMA 警告信息

注:与本文有关的文章为:http://blog.csdn.net/msdnchina/article/details/43763927 升级到11.2.0.4之后在alert日志中出现 NUMA 警告信息 翻译自mos文章:NUMA warning message appear after upgrade to 11.2.0.4 (文档 ID 1600824.1)1 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.4 and

【转】asp.net 利用Global.asax 捕获整个解决方案中的异常错误

之前做项目的时候都是在每个页面中处理这不同的异常信息,一个页面数下来,很多个try{}catch{}语句块,令整个代码结构有些不够美观. 今天看到一篇帖子,是关于利用全局应用程序类来帮忙获取异常信息,利用 server.Transfer('''')指定接受错误的页面:加上在接受错误页面中利用 server.GetLastError() 获取前一个异常源. Global.asax 中的Application_Error 函数如下: protected void Application_Error(

通过外部表读取alert警告文件

--查看alert日志所在目录 select value from v$diag_info where name='Diag Trace'; VALUE --------------------------------------------------- /home/oracle/app/oracle/diag/rdbms/ecom/ecom/trace --查到alert文件的名称(alert文件命名原则:alert_dbname.log) select 'alert_'||lower(na

oracle 外部表查alter日志

--创建文件夹,路径是alter日志的路径 create or replace directory data_dir as '/u01/app/oracle/diag/rdbms/orcl/orcl/trace'; --创建外部表 create table alert_log( text_line varchar2(225) ) organization external ( TYPE ORACLE_LOADER DEFAULT DIRECTORY DATA_DIR ACCESS PARAMET

alert日志中出现Private Strand Flush Not Complete的处理方法

还是南京那个客户的库,alert.log日志还报了如下的错误: Fri Oct 17 19:59:51 2014 Thread 1 cannot allocate new log, sequence 4722 Private strand flush not complete Current log# 1 seq# 4721 mem# 0: /oradata/sgomp5/redo01.log Thread 1 advanced to log sequence 4722 (LGWR switch

ALERT日志中常见监听相关报错之一:ORA-609错误的排查

参考MOS文档有: Troubleshooting Guide ORA-609 : Opiodr aborting process unknown ospid (文档 ID 1121357.1) Alert.log shows ORA-609 with TNS-12537: TNS:connection closed (文档 ID 1538717.1) Fatal NI Connect 12560' And 'ORA-609 Opiodr Aborting Process' Errors In

利用SQL语句查询一个数据库中的所有表

SQL  :  select * from information_schema.tables ORACLE: select table_name from user_tables ACCESS: select    name    from    MSysObjects    where    type=1    and    flags=0

在hibernate3中如何利用HQL语句查询出对象中的部分数据并且返回该对象?

例如现在有一个Customer对象 public class Customer{ private Integer cid; private String cname; private Integer cage; } 现在说在hibernate中利用HQL查找出了cname一列值,然后将其封装成一个对象,问HQL要怎么写(投影操作)? 解决:1.在Customer实体类中添加一个带参的构造方法 public class Customer{ public Customer(){ super(); }