zoukankan      html  css  js  c++  java
  • Oracle动态显示日志

    1.查看日志文件位置。

    IND_USER@PROD>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文件夹中为文本文件;

    [oracle@jibo trace]$ pwd
    /u01/app/oracle/diag/rdbms/prod/PROD/trace
    [oracle@jibo trace]$ ll -atl|grep alert*
    -rw-r-----  1 oracle oinstall 99797 Sep 29 14:54 alert_PROD.log
    [oracle@jibo 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解决连接池不足
    ORA-12537:TNS连接已关闭
    oracle 11g 大量废连接占满数据库连接问题处理
    oracle: 浅谈sqlnet.ora文件的作用,及SQLNET.AUTHENTICATION_SERVICES设置
    查询oracle数据库的数据库名、实例名、ORACLE_SID
    工程:有价值的事物的创建过程,及依赖的资源与知识
    工程学
    并发的本质是任务空间与执行空间
    异步的本质是不确定性
    聊一聊 redux 异步流之 redux-saga
  • 原文地址:https://www.cnblogs.com/cxchanpin/p/7093213.html
Copyright © 2011-2022 走看看