Tags

Not sure where I was headed with this one…

http://social.msdn.microsoft.com/forums/en-US/sqlgetstarted/thread/e02df6ff-624c-48e1-aab3-99e46ead349a/ 

error like

Alter failed for Database (Microsoft.SqlServer.Smo) The transaction log for database is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases (Microsoft SQL Server, Error: 9002)

you can refer this thread it will answer your questions,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2728787&SiteID=1

When your log file has grown enormously you have 2 options to curtail the growth,

  1. Take a transaction log backup which will truncate the log file and then perform shrinking of log file using DBCC SHRINKFILE statement it will be successful.
  2. You can execute the command Backup log your database name with truncate_only (or backup log your database name with no_log) and shrink the log file. But running those commands (backup log with truncate_only or no_log) will truncate the log file but will break the log chain and hence it should NEVER BE USED. The ONLY case it can be used is when the disk in which the transaction log resides is completely FULL and there is no way to clear the disk space.

– Deepak