SQL Server 2005 Transaction Log too big

后端 未结 2 1377
南旧
南旧 2021-01-19 15:54

I am running SQL Server 2005.

My db backup scheme is:
Recovery model: FULL
Backup Type: Full
Backup component: Database
Backup set will expire: after

相关标签:
2条回答
  • 2021-01-19 16:30

    Are you backing up the transaction log at any time at all? If you are using the FULL recovery model, then you need to back up the transaction log in addition to backing up the main database, or if you don't want to back up the log (why would you then use the FULL recovery model?) then at least truncate the log at some regular interval.

    You should back up the transaction log before every full backup (and keep it as long as you keep the previous full backup) so you can restore to any point in time since the first full backup you've kept. Also, it might be worth backing up the transaction log more often (the total size is the same) in case something bad happens between two full backups.

    0 讨论(0)
  • 2021-01-19 16:32

    The best procedure is to regularly backup your log file. In the mean-time, for 'catastrofic' scenarios like the one you described, you may use this snippet to reduce the size of your log: http://www.snip2code.com/Snippet/12913/How-to-correctly-Shrink-Log-File-for-SQL

    0 讨论(0)
提交回复
热议问题