Posts Tagged ‘clear’

Clear MS SQL log file

Monday, August 17th, 2009

SP_helpfile

–DBCC ShrinkFile(infocont_apoteca3_log, 50)

To clear a log file, first I suggest to back-up the database and then execute this script, witch will shrink your logfile to 50 MB:

DBCC ShrinkFile(mydatabase_log, 50)

where mydatabase_log is the name of the logfile. You can obtain the name of the log by executing:

SP_helpfile