1

I have to shrink and backup a database every week which is about 100+ GB of size.

Normally it takes 2-3 hours to shrink. This is quite frustrating especially when management wants this database to be deployed quickly.

My question is

1-Is there some way to shrink a huge database quickly. 2-Instead of shrinking, if I do a backup with shrink option enabled, does it do the same, like removing unnecessary pages.

Thanks

2
  • 1
    Why do you need to shrink at all? Commented Jan 21, 2013 at 4:57
  • Why do you shrink the database? When the released space is used later again, you may run into serious fragmentation problems. Commented Jan 21, 2013 at 7:27

1 Answer 1

4

1: no, in generally you do not shrink "real" databases (of size). specially given that SQL Server backup will not back up pages in the database not used, so a backup of an empty 1000gb database is VERY small, it makes no sense to shrink. How you think people do real backups of IMPORTANT stuff (where you run a delta backup like every 15 minutes)? Generally do not use autogrow, do not use shrink on anything that has a large size.

2: moot as per 1. Do not shrink.

Why do you think you need to shrink the database in the first place? Btw., 100gb is quite small - things get runny once you hit 1000gb and larger.

Sign up to request clarification or add additional context in comments.

2 Comments

Actually I need to ftp this database, that's the reason I want to shrink as much as possible.
@MuhammadSharjeelAhsan Sorry, that is a non reason at all. Take backup, compressed, ship it. No need to shrink the database.

Your Answer

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.