SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to Shring Data and Log file of Mirrored SQL Database?


How to Shring Data and Log file of Mirrored SQL Database?

Author
Message
logicinside22
logicinside22
SSC Eights!
SSC Eights! (806 reputation)SSC Eights! (806 reputation)SSC Eights! (806 reputation)SSC Eights! (806 reputation)SSC Eights! (806 reputation)SSC Eights! (806 reputation)SSC Eights! (806 reputation)SSC Eights! (806 reputation)

Group: General Forum Members
Points: 806 Visits: 1403
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
Steve Jones
Steve Jones
SSC Guru
SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)SSC Guru (61K reputation)

Group: Administrators
Points: 61641 Visits: 19099
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
My Blog: www.voiceofthedba.com
Perry Whittle
Perry Whittle
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19730 Visits: 17239
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" ;-)
arnipetursson
arnipetursson
Mr or Mrs. 500
Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)Mr or Mrs. 500 (519 reputation)

Group: General Forum Members
Points: 519 Visits: 1019
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search