alert.log mysql_Oracle告警日志文件太大 alert.log 如何清理 压缩

数据库正在运行着,如何清理太大的alert.log文件?

不能用mv方法.

官方建议:

How Do You Reduce The Size Of An Alert Log That Is Too Large To Edit while the DB is running? (Doc ID 296354.1)

GOAL:

How do you reduce the size of the alert log while the database is still running and is too large to edit?

SOLUTION:

There really is no way to reduce the size other than start a new file

1) COPY the alert log to a new name

EXAMPLE:

cp ALERT_MYSID.LOG ALERT_MYSID.2004 首先保障2倍空间,但是如果很大会不会?

2) Delete the existing alert log

EXAMPLE:

rm ALERT_MYSID.LOG

After this the database should recreate an empty file and continue logging to it.

If the log will not delete due to file locking ... you will need to delete the copy and try steps

1 and 2 again until it succeeds ... if you continue to fail ... you will need to shutdown to do

the process.

你看,最后一段说明,多麻烦,还是定期重启数据库大 法好,重启时趁机改名字或rm岂不简单。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值