简体   繁体   中英

Simple space recovery question - removing tables entirely sql server

I'm removing several large tables from my SQL Server database. What's the simplest way to reduce the space/file space used by the database? Everything I read online feels complicated. I hope there's a simple way to do this assuming the database isn't going to grow to the levels it was before with those files. Sql 2005.

There are a lot of options, but none of them are probably what you would call "simple".

Simplest: You'll have to shrink the database after removing the tables. You may also want to shrink the logs. Note that you don't want to be doing this on a regular basis (http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/06/13/629059.aspx) and when you shrink the logs, you need to have taken backups.

Other options include adding files to the database and moving data to only those files, or moving the tables to be kept to another new database with appropriate growth limits.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM