Here are the steps use to truncate transaction log in a database:
BACKUP LOG <databasename> TO DISK = '<backupfile>'
DBCC SHRINKFILE (<filename>, <targetsize>) WITH NO_INFOMSGS
e.g.:
BACKUP LOG NORTHWND TO DISK = 'C:\NorthwindLog.bak'
DBCC SHRINKFILE (Northwind_log, 100) WITH NO_INFOMSGS
To check your logical file name of your log file, you can run the query as below to get the logical file name something like
'xxx_log'
:sp_helpdb '<databasename>'
More information:
http://msdn.microsoft.com/en-us/library/ms189493.aspx
http://support.microsoft.com/kb/907511
1 comments:
Nice dispatch and this fill someone in on helped me alot in my college assignement. Thank you on your information.
Post a Comment