Sql server 2005:我有200gb数据库和数据库的日志大小超过300gb,很难对主日志。 [英] Sql server 2005 : I have 200gb databse and the log size of the databse more than 300gb its very difficult to maintian log .

查看:69
本文介绍了Sql server 2005:我有200gb数据库和数据库的日志大小超过300gb,很难对主日志。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生,



我使用sql server 2005,我的数据库大小为200gb,日志大小继续在另一个驱动器上扩展超过300gb很多次磁盘已满。



我在两天内收缩了日志。



i无法追查原因日志大小扩展如此之快,什么都出错。



i通常采用数据库的完整备份,它包含事务日志,我的数据库使用完全恢复模式。



我尝试过:



USE mydb



GO - 将数据库恢复模式设置为SIMPLE。



ALTER DATABASE SPARCIM SET RECOVERY SIMPLE



GO



- 将截断的日志文件缩小到4 MB。



DBCC SHRINKFILE(mydb_Log,4)

DBCC SHRINKFILE(mydb_Log2,4)



GO



- 将数据库恢复模型设置为FULL。



ALTER数据库mydb SET RECOVERY FULL

Dear sir,

I am using sql server 2005 and my database size is 200gb and the log size goes on expand more than 300gb on the other drive many time disk gets full.

I have shrink the log within two days .

i am unable to trace why the log size expand so fast whats goes wrong.

i usually take the full backup of the databse it contains transaction log too my database using full recover mode.

What I have tried:

USE mydb

GO -- Set database recovery model to SIMPLE.

ALTER DATABASE SPARCIM SET RECOVERY SIMPLE

GO

-- Shrink the truncated log file to 4 MB.

DBCC SHRINKFILE (mydb_Log, 4)
DBCC SHRINKFILE (mydb_Log2, 4)

GO

-- Set database recovery model to FULL.

ALTER DATABASE mydb SET RECOVERY FULL

推荐答案

这是由于您的恢复模式已满。您可以正确完成(也可以备份日志)或更改为简单。但是使用此信息做出决定,恢复模型(SQL Server) [ ^ ]
It is due to your recovery mode being full. You can either do full correctly (also backup the log) or change to simple. But use this info to make your decision, Recovery Models (SQL Server)[^]


这篇关于Sql server 2005:我有200gb数据库和数据库的日志大小超过300gb,很难对主日志。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆