SQL SERVER 2005 Database Size

I recently made a copy of a huge database and then truncated about half the tables.  For some reason though I can not get the file size to shrink it is stuck at 17 gigs and should be more like 6.  I tried using both shrink database and shrink files but neither one has given me any measure of success, I even tried setting the free space down to 0% and stripping that, this gave me maybe 500 mb.

Any help is appreciated.
DIVINELOGICAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris MangusDatabase AdministratorCommented:
Try using DBCC ShrinkFile instead of using the GUI
0
DIVINELOGICAuthor Commented:
Unfortunately this only removed a few megabytes from the size of the db.
USE db;
GO
DBCC SHRINKFILE ('db_file', 1 ) ;
GO

Open in new window

0
Chris MangusDatabase AdministratorCommented:
Can you review this KB to make sure we don't have a problem with this:

http://support.microsoft.com/default.aspx?scid=kb;en-us;324432
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Chris MangusDatabase AdministratorCommented:
Also, try a more realistic DBCC like:

DBCC SHRINKFILE ('db_file', 8000)

You're probably trying to shrink it under it's minimum size.
0
DIVINELOGICAuthor Commented:
I ran it with 15000, no change, I am reviewing the link to the article.
USE db;
GO
DBCC SHRINKFILE ('db_file', 15000) ;
GO

Open in new window

0
DIVINELOGICAuthor Commented:
Yup, i changed the text files to varch and now the size shrunk all the way
0
Chris MangusDatabase AdministratorCommented:
Glad to hear it's working.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.