You cannot delete the (primary) .ldf file, you MUST have at least 1.
You CAN shrink the file(s) of a database, including the transaction log files
-> refer to DBCC SHRINKFILE
-> search EE for this topic
You SHOULD remove the Autogrow option from the transaction log file, or put at least a reasonable Maximum size for the transaction log file(s)
--> of course, AFTER you shrinked the files
To MOVE a file, you have to backup & restore the database, during the restore you can profile alternate file locations.
To MOVE a file, you can also DETACH the database, move the files where you want them, and attach the database using sp_attach_db stored procedure providing all the database file path
Main Topics
Browse All Topics





by: OtanaPosted on 2005-07-05 at 07:04:28ID: 14369150
You could use:
BACKUP DATABASE db1 WITH TRUNCATE_ONLY
Or, you could detach your database, delete the ldf file, and attach your database again. This will create a new ldf file. However, if you do not have enough disk space left, this could cause your detach to fail, leaving you with a corrupt mdf file, so be careful when using this.