Uneven Technology

Friday, January 9, 2015

MSSQL - Shrink All DBs


-- Don’t do this unless you have to.
EXEC sp_MSForEachDB 'DBCC SHRINKDATABASE (''?'' , 0)'

 
Posted by Sean T. at 3:58 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2019 (2)
    • ►  Dec (1)
    • ►  Jul (1)
  • ►  2016 (2)
    • ►  May (1)
    • ►  Jan (1)
  • ▼  2015 (80)
    • ►  Dec (52)
    • ►  May (1)
    • ►  Apr (1)
    • ►  Mar (10)
    • ►  Feb (1)
    • ▼  Jan (15)
      • MSSQL - Permission Issue on OPENROWSET
      • MSSQL - View SQL Server Execution History
      • MSSQL - Sotred Procedure Template
      • MSSQL - Shrink All DBs
      • MSSQL - Shrink TempDB
      • MSSQL - List Running SQL Process
      • MSSQL - Read and Sort Column Names
      • MSSQL - Run SQL and Email Result as HTML
      • SSRS - Windows Command to Run Report
      • MSSQL - Addhoc Select from An Excel File
      • MSSQL - Using Excel File as A LinkedServer
      • SSRS - Adding Page Break
      • MSSQL - Find Blocking SQL
      • MSSQL - Rebuild DB Index
      • MSSQL - User Account Maintenance
  • ►  2013 (10)
    • ►  Nov (2)
    • ►  Jul (8)
  • ►  2012 (7)
    • ►  Aug (1)
    • ►  May (6)
Simple theme. Powered by Blogger.