Home Forums SQL Server 2012 SQL 2012 - General How to check the size of the database after implemeting data compression across all tables RE: How to check the size of the database after implemeting data compression across all tables

  • Hi, I guess everyone's suggesting be careful before using compression but no one's answering your question.

    Yes, it will show the database size same as it was before you compressed all the tables inside it- as you have not reclaimed the space released by your data compression.

    Run following: e.g. if your database name is 'Staging', it will be as follows

    DBCC SHRINKDATABASE (Staging)

    GO

    Right click the database and check under properties to see the updated DB size.

    Please note: Shrinking the database will severely fragment its contents. This is single threaded operation and might take long time to complete depending on how big your database is.

    Took me 1 min 20 secs for DB size of 25 GB DB (All the tables inside the DB were already compressed)

    Hope that helps!!