how to claim back space in sql server

hi,

We have deleted alot of data in a number of sql server tables - how do i now reorganise the tables to get the space back ?
i assume a shrink just reorganises the pages and will not release the space from the table ?

thanks
H
LVL 1
hraja77Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Scott PletcherSenior DBACommented:
A rebuild of the clustered index will get you the space back.

If you don't have a clustered index on the table, create one and then drop it.
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
venk_rCommented:
Or else try using the below command to  reclaim the space
DBCC CLEANTABLE('<database>', '<table>')
0
hraja77Author Commented:
the command below is only for dropped columns from what i can see

Or else try using the below command to  reclaim the space
DBCC CLEANTABLE('<database>', '<table>')
0
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.

Scott PletcherSenior DBACommented:
Yes, and I think a rebuild will also reclaim the space from dropped column(s).
0
Scott PletcherSenior DBACommented:
But CLEANTABLE will not help for deleted rows, which seems like the requestor's situation.
0
venk_rCommented:
Do you have any Blob or image text data type in the table?
0
hraja77Author Commented:
thanks
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.