Reclaim space after dropping a table

Lily June 101 Reputation points

I have a table in my DB that is 30GB in size.

The disk space is not change once I drop the table , how can I do.

Please help advice.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,299 questions
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,519 questions
0 comments No comments
{count} votes

Accepted answer
  1. Olaf Helper 39,026 Reputation points

    SQL Server never shrinks a database file on it's own, because it's an expensive I/O operation.
    You can shrink the database (file) manually with


    Note: Shrinking will cause index fragmentation and that effects query performance.

2 additional answers

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,411 Reputation points

    Hi @Lily June ,

    The drop table table will release the data space to the data file. That is, make part of the occupied data space free
    That requires shrinking the database or file.
    In order to reduce the shrink time, you can try DBCC SHRINKFILE first.
    After shrinking, you can rebuild the index for the fragmentation problem.

    Best regards,

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  2. Tom Phillips 17,711 Reputation points

    Just to be clear.

    When you delete data from the database, the space used by that data is flagged as "free" inside the database file and is available for use by new data rows. The physical file never gets reduced unless you manually shrink the file/database.