I need to empty an LDF file before sending to a colleague. How do I force SQL Server to truncate the log?
In management studio:
Properties
, then Options
.Tasks
-> Shrink
-> Files
Alternatively, the SQL to do it:
ALTER DATABASE mydatabase SET RECOVERY SIMPLE
DBCC SHRINKFILE (mydatabase_Log, 1)