DB mirroring and Snaphot
-
Thursday, August 30, 2012 3:26 PM
Hi Friends,
I'm using DB mirroring and have a snapshot DB of that mirror DB to be able to report off of that. My challenge is to be able to find a better way to define when refreshed are needed for snapshot DB. currently it's based on a schedule, like every 4 hours, but my goal is to set a process that it be smart enough to detect when mirroring has enough transactions going on and it needs to refresh the snapshot.
Any idea ?
Thanks in advance,
-Patrick
Patrick Alexander
All Replies
-
Friday, August 31, 2012 6:37 AMModerator
Hi, Patrick
->"but my goal is to set a process that it be smart enough to detect when mirroring has enough transactions going on and it needs to refresh the snapshot.Any idea ?"
How about create using a Sql agent job to keep monitoring the mirroring database and run a T-Sql when some metrics are met. so that you can create the snapshot dynamically.TechNet Subscriber Support
If you are TechNet Subscriptionuser and have any feedback on our support quality, please send your feedback here.Hope it helps.
Maggie
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
- Edited by Maggie LuoMicrosoft Contingent Staff, Moderator Friday, August 31, 2012 6:54 AM
- Proposed As Answer by vr.babu Friday, August 31, 2012 12:24 PM
- Unproposed As Answer by vr.babu Friday, August 31, 2012 12:25 PM
-
Friday, August 31, 2012 1:53 PM
that's the goal, but what matrix should be monitored and how ?
Patrick Alexander
-
Sunday, September 02, 2012 7:41 AMCan you explain what did you mean by " has enough transactions going "? You know since SQL Server 2012 you can use AlwaysOn AG to be able report on the "mirror" database.
Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Blog: Large scale of database and data cleansing
MS SQL Consultants: Improves MS SQL Database Performance
-
Monday, September 03, 2012 5:52 AMModerator
Hi, Patrick
->"but what matrix should be monitored and how ?"
It would depend on your requirement, for example: you wish to refresh snapshot after 1000 row updates. then you can refresh snapshot by counting the number of updated row.Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
- Marked As Answer by Maggie LuoMicrosoft Contingent Staff, Moderator Sunday, September 09, 2012 1:11 PM
-
Monday, September 03, 2012 4:43 PM
The only thing you really can go on is the LSN, which gives you a rough idea of how much has been going on... But unfortunately the LSN will also advance if transactions are rolled back, so it's not an exact science...- Marked As Answer by Maggie LuoMicrosoft Contingent Staff, Moderator Sunday, September 09, 2012 1:12 PM

