Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to Shring Data and Log file of Mirrored SQL Database? Expand / Collapse
Author
Message
Posted Thursday, October 17, 2013 10:16 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 1:46 PM
Points: 321, Visits: 1,279
Hi Guys

Looking for Steps to perfrom for shrinking Data and log files for Mirrored Database. Can any one give insturction step by step . would be great if have script too

Thanks


--------------------------------------------------------------------------------


Aim to inspire rather than to teach.
SQL Server DBA
Post #1505803
Posted Thursday, October 17, 2013 10:40 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 12:38 AM
Points: 33,267, Visits: 15,436
Same as a non-mirrored database. What you do to the primary will be sent to the secondary. The big concern is load while this occurs.

Shrinking the log makes sense, but the size of your log needs to handle the peak size between log backups with a pad. Make sure you know what this is.

For data files, be careful. You need free space in these files, and the amount of space depends on data growth as well as the maintenance you need. Calculate the space you need for at least the next 3 months and size your data file there. Then if you need to shrink, after you're done, you will need to rebuild some indexes because you will have fragmented them. I'd look at the index maintenance script from www.sqlfool.com.

Other thoughts: http://wp.me/p14wgJ-di







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1505809
Posted Friday, October 18, 2013 5:22 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:39 AM
Points: 6,351, Visits: 13,679
logicinside22 (10/17/2013)
Hi Guys

Looking for Steps to perfrom for shrinking Data and log files for Mirrored Database. Can any one give insturction step by step . would be great if have script too

Thanks


--------------------------------------------------------------------------------

Is your mirror session synchronised, the transaction log will continue to grow if the mirror session is disconnected for example.


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1506088
Posted Friday, October 18, 2013 10:02 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, August 31, 2014 11:45 AM
Points: 275, Visits: 863
If you must shrink the data files, do that first.
The index rebuilds and the concomitant latency will require a lot of log file space.

Make sure you communicate to the system owners that the system may have latency during and after the index rebuilds.
Post #1506251
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse