[英]full recovery with huge log file
In a sql server database with a full model backup with tran logs backed up every 15 minutes, but ,still, the log file is huge. 在具有完整模型备份且每15分钟备份一次tran日志的sql服务器数据库中,但是,日志文件仍然很大。 I suspect I should act on the target recovery time parameter (60 sec actually) perhaps ..
我怀疑我应该对目标恢复时间参数(实际上是60秒)采取行动。
[
[
recently I found a method to shrink it :
最近我找到了一种缩小它的方法:
shrink the DB after doing the following task : 完成以下任务后,收缩数据库:
/* Perform a full backup of your database. / *执行数据库的完整备份。
Change the backup method of your database to "Simple" 将数据库的备份方法更改为“简单”
Open a query window and enter "checkpoint" and execute 打开查询窗口并输入“检查点”并执行
Perform another backup of the database 执行数据库的另一个备份
Perform a final full backup of the database. 对数据库执行最终的完整备份。 */
* /
The transaction log backup will not shrink the files. 事务日志备份不会缩小文件。 If they grew, after backup the space will be marked as available and reused, but the file size will not be reduced.
如果它们增大了,则备份后该空间将被标记为可用并可以重复使用,但是文件大小不会减小。 However, if you tried to shrink it and it didn't, then probably the log is still in use.
但是,如果您尝试缩小它而没有缩小它,则该日志可能仍在使用中。 Is anything else that uses the transaction log, which prevents if from truncating?
还有其他使用事务日志的东西,可以防止被截断吗? Check the result of this command:
检查此命令的结果:
SELECT log_reuse_wait_desc FROM sys.databases where name = N'<database_name>';
It it shows anything other than NOTHING or LOG_BACKUP, you can't shrink it, because something else is using it. 它显示除NOTHING或LOG_BACKUP之外的任何内容,您无法缩小它,因为其他东西正在使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.