- Backup the database
- Stop the database service
- Shrink the .ldf file
SELECT name, physical_name AS current_file_location
FROM sys.master_files
Following is the output of files used by my SQL Server instance.
-------
Best Answer
Sep 14, 2012 at 1:01 AM
In Server Management Studio Right click on the database in question and go to Properties:
- Go to "Options" on the left
- Change the line "Recovery Model:" from Full to "Simple" and hit OK
- Right click on the database again, go to Tasks - Shrink - Files
- Under File Type: select Log and click OK
This will temporarily free up space for you, make sure that your database is set to back up and that its configured to empty the log after back up. Once you have resolved the space issue and made sure your log file is set to flush after backups, I recommend you put the recovery model back on Full. If it was already set to flush the log after backup, check to see why the backups aren't being done...
Sep 14, 2012 at 1:02 AM
Do you NEED that log? If so, you've certainly got a problem.
Otherwise, you can go the ghetto solution that will take care of it in the short-term: change the database recovery model to simple, then change it back and set a new log size. (Right click database, properties, options, recovery model).
Let me know if you need more detailed instructions than this. You'll lose all that transaction log, but this will do it.
EDIT: Bill beat me to it