Categories:

Your database's LDF file, that is, the LOG file, has grown, you are trying to SHRINK, but if it doesn't work:
  1. First of all, if the Recovery Mode of your database is FULL, you need to do it SIMPLE. Of course, is there another subsystem that will be affected by changing the Recoverey Mode, which you should definitely check? If a feature such as Log Shipping or AlwaysOn is active, mode change will cause an error. if Mode change is not possible, you can keep on reading and apply all without any risk.
  2. Perform a backup.
  3. If SHRINK process still did not work, It means there is still an active connection on the server. You need to detect it and Kill it somehow. If there is nothing visible, you canrun CHECKPOINT to save all committed transactions.

After all SHRINK operation should be succced. But if still you are fail:

  • Run with a size parameter: DBCC SHRINKFILE (N’xxxx_log’ , 100)
  • Run with TRUNCATEONLY parameter: DBCC SHRINKFILE (N’xxx_log’ , 0, TRUNCATEONLY)
  • Run FULL or TRANSACTIONAL BACKUP to force all transactions written on disk.

Last choise ise restarting your SQL SERVER. Restart operation will close/rollback all open transactions.

Good Luck With.

Tags:

No responses yet

Bir cevap yazın

E-posta hesabınız yayımlanmayacak.