Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 How To Delete Transaction Log

Author  Topic 

mahendran.c
Starting Member

1 Post

Posted - 2014-12-15 : 01:20:12
HI,

My production database log file size has been increased to 62 gb in size, as a result the performance of my tool is affected.

I have tried to shrink the log using the shrink option, i could not shrink the database.

I stopped the sql server and moved the log file to a new location and started the sql server, but the database showed an error.

Someone please help me out in this...

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-12-15 : 02:58:21
what is the error

Javeed Ahmed
https://www.linkedin.com/pub/javeed-ahmed/25/5b/95
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2015-01-02 : 15:09:37
What is the recovery model of the database? If it is full recovery - then you need to perform a transaction log backup before you can shrink the log file. Use DBCC LOGINFO to see how many VLF's are contained in your log file and the status of each one. If the status = 2 - the VLF is in use and you cannot shrink past that point.

It may take several log backups to roll over to the beginning of the file.

Note: move the log file back to its original location and then bring that database back online. By moving the log - SQL Server cannot startup that database.
Go to Top of Page
   

- Advertisement -