Wednesday, March 28, 2012

Newbie Question - Shrinking DB & Physical Database Size

Hi! I'm new to SQL Server 2K and have a very basic question. Will the
"Shrink Database" function reduce the physical size of the database
file (as seen in Windows) after records have been deleted?

The physical database size is currently 1.2 GB but even after deleting
all the records, its still 1.2 GB.

Thanks in advance for any assistance.

Jason"Jaosn S" <jason_sweet@.earthlink.net> wrote in message
news:8976695f.0312151650.5dd48fea@.posting.google.c om...
> Hi! I'm new to SQL Server 2K and have a very basic question. Will the
> "Shrink Database" function reduce the physical size of the database
> file (as seen in Windows) after records have been deleted?

"maybe"

It's not exactly analogous to say Access where there is a "compact" command.

And generally you do not want to keep changing the size of your DB. (it can
cause fragmentation at the disk level).

> The physical database size is currently 1.2 GB but even after deleting
> all the records, its still 1.2 GB.

In this case, you should be able to shrink it.

> Thanks in advance for any assistance.
> Jasonsql

No comments:

Post a Comment