You either use the code supplied by Tom, OR, you can use mine. Both will work well for testing if a database is "primary" on node. Main difference is that mine tests that the database is primary AND database is writeable.I understood thanksRegards,
Mark Broadbent.
Microsoft Certified Master | Microsoft Data Platform MVP
Contact me through twitter | blog | sqlcloud
Please click "Propose as answer" if a post solves your problem
or/and vote the post up if it has been helpful.
Interested in attending a free training? Why not attend SQLSaturday Cambridge and SharePoint Saturday Cambridge? And why not check out my Ultimate Training Resources Page?
↧
AlwaysON job active-Passive
↧