成都创新互联网站制作重庆分公司

怎么进行清除alertlog

这篇文章给大家介绍怎么进行清除alert log,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

站在用户的角度思考问题,与客户深入沟通,找到谢通门网站设计与谢通门网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都做网站、网站设计、外贸营销网站建设、企业官网、英文网站、手机端网站、网站推广、申请域名虚拟主机、企业邮箱。业务覆盖谢通门地区。

1.手动删除log_××.xml,删除文件后oracle会自动创建一个新的log.xml文件。
2.使用ADRCI 工具也可以删除alert log。

1.在OS中手动删除log_××.xml
[oracle@dbserver alert]$ ll
total 4
-rw-r----- 1 oracle oinstall 307 Aug  9 08:59 log.xml
[oracle@dbserver alert]$ rm log.xml
[oracle@dbserver alert]$ ll
total 0

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

[oracle@dbserver alert]$ ll
total 12
-rw-r----- 1 oracle oinstall 10150 Aug  9 09:01 log.xml

2.使用ADRCI 工具也可以删除alert log。
[oracle@dbserver alert]$ ll
total 36
-rw-r----- 1 oracle oinstall 33420 Aug  8 16:23 log.xml

[oracle@dbserver ~]$ adrci

ADRCI: Release 11.2.0.2.0 - Production on Wed Aug 8 16:37:19 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/testcase/adr_test"
adrci> show homes
ADR Homes:
diag/rdbms/orcl/orcl
adrci> set homepath diag/rdbms/orcl/orcl
adrci> show alert -tail
2012-08-08 16:18:18.935000 +08:00
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=24, OS id=20503
2012-08-08 16:18:20.445000 +08:00
ARC2: Archival started
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
ARC0: Becoming the heartbeat ARCH
2012-08-08 16:18:23.428000 +08:00
db_recovery_file_dest_size of 4002 MB is 2.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Starting background process CJQ0
2012-08-08 16:18:24.451000 +08:00
CJQ0 started with pid=25, OS id=20519
Completed: ALTER DATABASE OPEN
2012-08-08 16:23:21.740000 +08:00
Starting background process SMCO
SMCO started with pid=26, OS id=20637

adrci> purge -age 1 -type alert
adrci> show alert -tail
adrci> exit
[oracle@dbserver alert]$ ll
total 0


 新的Oracle数据库的日志文件在$ORACLE_BASE/diag/rdbms下面,例如:/opt/oracle/oradb/diag/rdbms/ORACLE_SID/ORACLE_SID/trace.

Alert log XML文件位置:
SQL> select value from v$diag_info where name ='Diag Alert';
VALUE
--------------------------------------------------------------------------------
/opt/oracle/diag/rdbms/orcl/orcl/alert
SQL>

Alert log文本文件位置:
SQL> select value from v$diag_info where name ='Diag Trace';
VALUE
--------------------------------------------------------------------------------
/opt/oracle/diag/rdbms/orcl/orcl/trace

关于怎么进行清除alert log就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


文章题目:怎么进行清除alertlog
转载来于:http://cxhlcq.com/article/ijcsie.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部