As time goes by, the disk space requirements for your database may fluctuate greatly. You can set SQL Server to automatically expand a database when it requires more space; and you can also set it to "shrink" when it can reclaim allocated but unused space. Sometimes it makes sense to enable autogrow and autoshrink events, and sometimes it doesn't.

To reduce the database size on the file system just use following T-SQL:

BACKUP LOG tempdb with NO_LOG
dbcc shrinkdatabase(tempdb ,TRUNCATEONLY)
Tags
Comments
Write the first comment
Leave a trace
Name *
Email *
Website
Anti SPAM * Code (5 + 7) =
Leave me a comment *
 
All comments are subject to editorial review
Post being viewed right now
Item date: 01.08.2009
Views: 343
Item date: 19.07.2009
Views: 1340
Item date: 30.10.2009
Views: 6634
Item date: 07.03.2009
Views: 299
Item date: 05.10.2009
Views: 79297
Item date: 15.05.2009
Views: 1168
Item date: 03.01.2009
Views: 1983
Item date: 08.03.2009
Views: 1421
Item date: 01.01.2009
Views: 1876
Item date: 20.07.2009
Views: 2004