If you need to keep the system online, you can also do some TRUNCATE LOG statements, and then DBCC ShrinkFile (yourlogfile)...
BTW, if you have set your transaction log to be AUTOGROW, i recommend to give it a fixed size of approx 20-30% of the size of the data files, and then:
# either set the Truncate Log on Checkpoint to true
# use Transacation Log Backup regulary (every hour)
Cheers
Main Topics
Browse All Topics





by: angelIIIPosted on 2001-09-11 at 03:01:33ID: 6473883
SQL:
se.mdf'
exec sp_detachdb 'yourdatabase'
OS:
delete the .ldf file(s)
SQL:
exec sp_attachdb 'yourdatabase', 'c:\mssql7\data\yourdataba
If you database has more than 1 datafile (*.mdf), you should make the list (select * from yourdatabase..sysfiles)
Cheers