在一次处理数据库日志已满的过程中,发现有的时候数据库日志不能清除,经实验,可以通过以下方式来完成。
使用exec sp_cycle_errorlog 来清除sql系统本身的临时日志。
dump transaction hisdb with no_log --清除日志
backup log hisdb with no_log –截断日志
backuplog hisdb to disk='d:\hisdb_log.bak'
dbccshrinkfile('hisdb_log',1)
dbccshrinkfile('hisdb1_log',1)
使用如上命令,可以清空日志。

本文介绍了一种解决SQL Server数据库日志已满的问题的方法,包括如何清除和截断日志,以及通过调整日志文件大小来释放空间的具体步骤。

1万+

被折叠的 条评论
为什么被折叠?



