Question:
Reduse size of PRIMARY LOG file of my SQL server database?
clearmind
2006-07-14 22:20:17 UTC
I've developed a project using VB 6 and SQL 2000 .
I had facing a problem that the PRIMARY LOG file of my SQL server database is too large(more than 12 GB) .Can any body help how to clear or reduce the LOG file size.
But my orginal database is normal size(45 M.B .MDF file)
Three answers:
Jeremy S
2006-07-17 13:40:24 UTC
Using the Microsoft SQL Server Enterprise Manager, right-click on the database in question. Now choose "Backup Database" from the "All Tasks" portion of the context menu. In the Backup window that opens, be sure to choose "Transaction Log" as the file to backup. Then select a destination and click OK. After the backup has completed, once again right-click on the database, this time choosing "Shrink Database" from the "All Tasks" menu. Click the "Files" button, and select your log file from the drop-down list. Be sure "compress pages and then truncate free space from the file" is marked as the action. Click OK. This should take care of things for you. I have also encountered places where the log file simply refuses to shrink. In that case, you can backup your lig file, then detatch your database, re-creating a new log fole when you re-attach the data file.
?
2016-10-14 15:46:17 UTC
bypass to houses on the database, techniques section, set the compatibility aspect to Server 2005. shrink decrease back up the database now and have a seem at restoring it decrease decrease back. outdoors of this, you ought to't fix or connect an 08 DB to an 05 server. Or fix it to an 08 server, replace this putting and re-shrink decrease back it as a lot as fix it on the 05 server.
hswes
2006-07-15 03:35:32 UTC
Just make a backup, with the option truncate log. Nothing gets lost.



Helmut


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...