HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

DBCC SHRINKFILE on the distribution database

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thedbccdatabasedistributionshrinkfile

Problem

I have an .mdf file from distribution database which is growing.
I know the advantages and disadvantages of shrinking database/files.
Is it okay to shrink the .mdf file to some a smaller size.
Is there any data loss during this time and does this affect the replication.?

Solution

It is ok to shink the datafile, there WON'T be any data loss.

The "issues" when shrinking could be performance, during the rellocation of data pages. Also if you know that your DF will grow again to the same size, shrink is not recommended. If it was because a one time only operation, or other stuff where the DF won't grow at the same big size again, it is ok to perform your shrink operation.

Context

StackExchange Database Administrators Q#240384, answer score: 4

Revisions (0)

No revisions yet.