Log files can sometimes get out of control and use up too much space.
This tends to be a problem when testing import scripts that do a lot of operations, then rollback, you can get crazy log file sizes. Here's how to clear them:
- Open up Query analyzer, connected as a user with admin priveleges.
- Run this query, substituting "db_name" with the proper database name:
BACKUP LOG db_name WITH NO_LOG
GO
DBCC SHRINKDATABASE( db_name, 0)
GO
- Check the size of the log file
Don't do this when the transaction log is important, though. Anyone know of a better way to do this?