Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3546599
  • 博文数量: 715
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(715)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客

分类: Oracle

2020-05-06 11:26:33


数据库正在运行着,如何清理太大的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岂不简单。


阅读(5346) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~