English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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)

2006-07-14 18:20:17 · 3 answers · asked by clearmind 1 in Computers & Internet Programming & Design

3 answers

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.

2006-07-17 09:40:24 · answer #1 · answered by Jeremy S 1 · 0 0

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.

2016-10-14 11:46:17 · answer #2 · answered by xie 4 · 0 0

Just make a backup, with the option truncate log. Nothing gets lost.

Helmut

2006-07-14 23:35:32 · answer #3 · answered by hswes 2 · 0 0

fedest.com, questions and answers