Share via

Does shrinking a SQL Server datafile will cause temporary outage?

techresearch7777777 1,981 Reputation points
2022-09-12T23:10:25.273+00:00

Hello, does shrinking a SQL Server datafile will cause temporary outage?

I heard it's not good practice to do in general in causing fragmentation but other than that anything else to be aware of?

Thanks in advance.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Answer accepted by question author

CathyJi-MSFT 22,431 Reputation points Microsoft External Staff
2022-09-13T02:48:12.18+00:00

Hi @techresearch7777777 ,

No, it will not cause outage but can cause performance issues.

Quote from MS document.

>Other users can work in the database during file shrinking - the database doesn't have to be in single-user mode.

Please also check if below similar thread could help you.

Does Shrinking a database create downtime?

Before shrinking a SQL Server database or database files, it is very important to understand how the process works and what are the immediate consequences of the shrinking process. Please refer to this blog SQL Server database shrink – How and when to schedule and perform shrinking of database files. or read the MS document I offered above.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. techresearch7777777 1,981 Reputation points
    2022-09-16T06:15:48.547+00:00

    Thanks for all the replies.

    Was this answer helpful?

    0 comments No comments

  2. Olaf Helper 47,621 Reputation points
    2022-09-13T05:00:32.863+00:00

    It don't cause an outtake of the database, but high I/O workload, index fragmentation and so poor performance.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.