`
zjliu
  • 浏览: 48700 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Oracle's alert.log

阅读更多



Oracle's alert.log chronologically records messages and errors arising from the daily database operation. Also, there are pointers to trace files and dump files.
These messages include
alert.log is a text file that can be opened with any text editor. The directory where it is found can be determined by the background_dump_dest initialization parameter:
select value from v$parameter where name = 'background_dump_dest

';
If the background_dump_dest parameter is not specified, Oracle will write the alert.log into the $ORACLE_HOME /RDBMS/trace directory.
Here's a shell/awk script to analyze alert logs .

Common messages in the alert log

ARCx: Media recovery disabled

This message will be written into the alert.log if the arch process is started with the database being in noarchive log mode .
It's unfortunately possible for ARCH to be sitting around doing nothing apart from just taking up memory when the database is in noarchive log mode.
The archiver can be stopped dynamically: alter system archive log stop .

Ignoring SIGALARM

Such a message is written into the alert log when a process that waited for a semaphore gets the semaphore shortly befor the timeout expires and doesn't have the time to switch the timeout mechanism off.

Thread 1 cannot allocate new log, sequence 1558 Checkpoint not complete

This error message is written into the alert.log if a checkpoint cannot write all dirty db blocks to the online redo log .
Usually, this message is a sign that the size of the redo logs is to small or that there should be more of them.

Rotating the alert logs

Within Oracle, it is perfectly possible to delete, or rename, the alert.log, if desired (for example, if it reaches a certain size). Oracle simply recreates a new alert.log the next time it writes to it.
Linux (and other Unixes?) has an utility called logrotate to automate that task.

Writing own messages into the alert log

The undocumented procedure kdswrt in dbms_system allows to write own messages in the alert log.
begin
  sys.dbms_system

.ksdwrt(2, 'My own message');
end;
/

Reading the alert log through an external table

Here is a procedure which creates an external table that can be used to read the alert.log.
There is also a script to read the alert log which doesn't require a procedure such as the previous link.
分享到:
评论

相关推荐

    oracle日志分析工具LogMiner使用.

    SQL> EXEC DBMS_LOGMNR.ADD_LOGFILE('/oracle/log/redo.log'); ``` 这将将 redo.log 文件添加到 LogMiner 中。 2. 选择日志文件 可以使用以下命令选择要分析的日志文件: ``` SQL> EXEC DBMS_LOGMNR.SELECT_LOG...

    alertlog.sh

    ORACLE ALERT日志备份shell.自动获取alert日志路径。实现按月分类 加上crontab,可以实现每天备份

    Oracle的日志管理攻略

    ORACLE数据库的日志文件$ORACLE_BASE/admin/orasid/bdump/alert_orasid.log记录了重作日志的转换,数据库启动和关闭,数据库结构的改变,回退段的修改,死锁,内部错误等信息.  数据库管理员需要检查这个文件有无...

    提取oralce当天的alert log的shell脚本代码

    代码如下:#/bin/sh#get alert of everyday#then name of file is everyday_alert.shdir=”/oracle/admin/bbdz/bdump”num=$(cat -n ${dir}/alert_bbdz.log | grep “`date|cut -c 1-10`”|head -n 1 |awk ‘{print ...

    监控Oracle数据库的常用shell脚本

    alert.log文件记录了Oracle数据库的所有错误信息。使用以下命令可以检查alert.log文件中的错误信息: $ grep ORA-* alert.log 这条命令将显示alert.log文件中的所有错误信息。例如: ORA-00600: internal error ...

    oracle中记录用户登录信息的触发器的例子

    oracle中记录用户登录信息的触发器的例子,有具体操作过程,包括错误信息及解释,这个例子是自己为某企业的oracle安全管理的具体例子

    关于oracle日志文件.docx

    日志文件详解 Oracle数据库中的日志常用的有: Redo log files 联机日志或重做日志 ...Alert log files 告警日志 Trace files user_dump_dest 用户信息日志(如跟踪会话日志) Backupground_dump_dest 进程日志

    ORACLE OSB开发指南

    ORACLE OSB开发指南,英文版。 目录: Part I IDE Help for Oracle Service Bus 1 Introduction to Oracle Service Bus 2 Tasks Working with Projects, Folders, Resources, and Configurations .....................

    p7331323_10204_AIX5L

    Additionally they may be reported in the alert.log. The symptoms can include: - process failure - startup failure - processes spinning in function sskgxp_select with high CPU usage Work...

    oracle 11g的警告日志和监听日志的删除方法

    oracle 11g的监听日志和警告日志都是在/u01/oracle/diag/tnslsnr/oracle/listener目录和/u01/oracle/diag/rdbms/db1/db1目录下都有以下分别简称listener目录和db1目录。这两目录下都有如下目录:alert cdump hm ...

    DataGuard物理standby管理_主备切换

    alert.log 是 Oracle 数据库的日志文件,记录着数据库的所有操作。在 DataGuard 中,alert.log 记录着数据库的切换过程,可以通过查看 alert.log 来了解数据库的切换细节。 8. V$database 视图 V$database 视图是 ...

    Oracle巡检报告XXXX年XX月XX日

    Alert.log 是否有故障: □有 ■无 说明:日志正常无ORA报错 表空间自动扩展 ■有 □无 说明: 表空间已开启自动扩展 表空间有否超出80%使用率 □有 ■无 说明 :空间充足 归档日志是否打开 ■有 □无 说明:数据库...

    教你怎样用Oracle方便地查看报警日志错误

    按日期备份alert_ORACLE_你的实例名.LOG这个文件,如:alert_ORACLE_orcl_201408111639_bak.LOG。 2:清除日志内容 打开报警日志文件,用true > 文件名 可清除掉里面的内容 具体示例: 假如,我现在第一次进行该设置,...

    Oracle9i的init.ora参数中文说明

    Oracle9i初始化参数中文说明 Blank_trimming: 说明: 如果值为TRUE, 即使源长度比目标长度 (SQL92 兼容) 更长, 也允许分配数据。 值范围: TRUE | FALSE 默认值: FALSE serializable: 说明: 确定查询是否获取表级...

    数据库日常检查.doc

    特别是存放归 " " "档日志的文件系统 " " " " " "检查结果 " " " 正常 异常 " " " " " "备注 " " " " " " " " " " " " " " "内容 " " "alert_SID.log文件 " " " " " "检查方法 " " "检查alert_SID.log有无报错信息...

    linux中oracle的日常维护命令

    1 检查Oracle的进程 2 查看数据库的实例: 3 查看数据库的日志模式,打开模式 4 查看数据库alert_SID.log 中的ora-的错误信息: 5 检查控制文件状态: 6 查询日志状态 7 查询数据状态: 8 查询表空间状态: 等等

    深入解析Oracle.DBA入门进阶与诊断案例

    2.3.3 LOG_CHECKPOINT_TO_ALERT参数 63 2.3.4 控制文件与数据文件头信息 64 2.3.5 数据库的启动验证 66 2.3.6 使用备份的控制文件 70 2.3.7 FAST_START_MTTR_TARGET 71 2.3.8 关于检查点执行的案例 74 ...

    oracle高级面试50问

     解答:alert log.  7. 比较truncate和delete 命令  解答:两者都可以用来删除表中所有的记录。区别在于:truncate是DDL操作,它移动HWK,不需要 rollback segment .而Delete是DML操作, 需要rollback segment...

    ORACLE9i_优化设计与系统调整

    第一部分 ORACLE系统优化基本知识 23 第1章 ORACLE结构回顾 23 §1.1 Oracle数据库结构 23 §1.1.1 Oracle数据字典 23 §1.1.2 表空间与数据文件 24 §1.1.3 Oracle实例(Instance) 24 §1.2 Oracle文件 26 §1.2.1...

    Oracle 数据库 9i/10g/11g 扫描,优化提示,安全提示

    2,数据库alert.log日志分析,,,,(提示,日志不要太大了,6000行以下很快。) 3,数据库性能报告:事件,等待,TOP-SQL,TOP-SESSION,RATIO(太传统)等 4,数据库安全报告:用户,密码,权限,角色,目录,版本...

Global site tag (gtag.js) - Google Analytics