Shrinking is not good practice. If you really want your log database smaller the best and safest way to do that is to simply restart sql server at a time when there is no production — GuidoG.
Show 5 more comments. Active Oldest Votes. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Related 1. Active Oldest Votes. Add a comment. However if space is your primary concern the above method should work.
I'll let you know what happens when it's done. Right now we need to get the size down to something manageable for backups. I'll break it up into filegroups as we see fit then partition off big tables and I think we'll be good to go.
So it worked. Titan - happy to help. Watch out for performance hits, though. Right now we need to get the size down to something manageable for backups This is completely the wrong way to go about it. You're correct. But we're moving indexes to a different file group s and we're going to back up the primary data group only. Titan - I understand that but this question is about "removing free space from primary".
This step is not necessary for that purpose, and sometimes not really required for a growing db that will eventually reclaim the space. If we move indexes to file groups we will eat up another GB which totals GB. We don't have that much space.
DForck42 DForck42 Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Shrink database when it grows beyond Specify the size in megabytes that causes the task to execute. Amount of free space to remain after shrink Stop shrinking when free space in database files reaches this size. When the number of objects affected is large, this display can take a considerable amount of time.
Select or enter a server name Select a server to connect to when performing this task. Enter information to log on to the server Specify how to authenticate against the server. This option is not available. Password Provide a password to use when authenticating. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Please rate your experience Yes No.
Any additional feedback? Warning Data that is moved to shrink a file can be scattered to any available location in the file.
0コメント