2

I have a database with a table that has about 10 000 records. One of the columns in this table is a VARBINERY(MAX) that is used to store images. A backup of this database is about 1.2GB. It's size as shown in SQL Server Management Studio is about 3.5GB.

Working on the assumption that the images make up the bulk of this size, I dropped the column. This did not alter the database's size at all. The backup and database size is still the same. How is this possible?

asked Dec 14, 2016 at 11:40
1
  • 1
    Did you reorganize the indexes/table after dropping the column? What happened after a second backup? When you write the database size is 3.5 GB what are the individual sizes for the DATA and LOG portions of the database (Right-click database | Reports | Standard Reports | Disk Usage)? You might find a nice report their that shows the top tables. Commented Dec 14, 2016 at 12:32

2 Answers 2

3

When you drop a table, it will free the space in the database, but not back to the O.S. because your database has this space allocated. You need to shrink your database. but it's not a good Idea, because it's good to have free space in the database , so it can grow without the need to ask the o.s. to grow your file and then use it. this can cause fragmentation.

answered Dec 14, 2016 at 13:07
0

If you decide to shrink the database i'd recommend rebuilding the indexes or re-organise to avoid any fragmentation.

answered Dec 14, 2016 at 16:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.