Wednesday, March 7, 2012

Removing Extra Transaction Logs

I created some extra transaction logs for a database because of a lack of space however I want to now get rid of those and only have one primary transaction log. I cannot move data into other files like you can with a filegroup, how do I get rid of the files ?Originally posted by yorkie
Q1 I created some extra transaction logs for a database because of a lack of space however I want to now get rid of those and only have one primary transaction log. I cannot move data into other files like you can with a filegroup, how do I get rid of the files ?

-- A1 First empty the TL file(s) then remove it (them) from the DB. For example:

dbcc ShrinkFile('TL_FileName', EmptyFile)
Go

-- Then alter the DB to remove it

Alter Database DBName
Remove File TL_FileName
Go|||Thanks, worked a treat.

No comments:

Post a Comment