Mirroring mystery - can't quite figure it out

  • We have two SQL servers: serverA (Live) and serverB (DR). A single database is being mirrored from serverA to serverB in 'High safety without automatic failover (synchronous)' mode.

    These two servers are being used with a particular web application. There is no client redirection configured, so the live environment app on serverA is pointing to the database on serverA and the DR environment app on serverB is pointing to the database on serverB.

    Normally, only the live database on serverA can be accessed. Any attempt to access the mirror database causes an error (as we'd expect).

    However, the mystery is that when the database is cleanly failed over from serverA to serverB, the database can still be read/write accessed from serverA (which now hosts the mirror database). It's as if there is some kind of clever re-direction going on, although I'm struggling to find out how.

    Am I correct in thinking that a mirror database should not be accessible at any time, not even as a read-only database?

    Thansk for the help πŸ™‚

  • I would check out the applications connection string.

    If it states the "failover partner=serverb" it will just be redirected without a problem.

    If it lacks the "failover partner" keywords, something is wrong if your db is still accessable.

    Check your instance default trace and errorlog to see what happened to the db.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution πŸ˜€

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Are you saying is the principal has been changed to mirror,it will be still accessible?

    β€œWhen I hear somebody sigh, β€˜Life is hard,’ I am always tempted to ask, β€˜Compared to what?’” - Sydney Harris

  • The Mirror database is never accessible. Test this by attempting to connect with SSMS to the Mirror. I suspect the Native Client is redirecting your application on the fly.

  • kapfundestanley (9/13/2011)


    Are you saying is the principal has been changed to mirror,it will be still accessible?

    Only "transparent" when you specify failover partner in the connection string !

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution πŸ˜€

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Right, Mirrored DB is not accessible at all times.

    Thank You,

    Best Regards,

    SQLBuddy

  • sqlbuddy123 (9/13/2011)


    Right, Mirrored DB is not accessible at all times.

    Thank You,

    Best Regards,

    SQLBuddy

    Unless you're using Enterprise edition of SQL Server and you snapshot the mirrored database πŸ˜‰

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

    "Ya can't make an omelette without breaking just a few eggs" πŸ˜‰

  • Perry Whittle (9/14/2011)


    sqlbuddy123 (9/13/2011)


    Right, Mirrored DB is not accessible at all times.

    Thank You,

    Best Regards,

    SQLBuddy

    Unless you're using Enterprise edition of SQL Server and you snapshot the mirrored database πŸ˜‰

    It's good to know the snapshot is read-only and can only function as a local database !

    If needed you'll have to (re-) create a snapshot db a both instances. (if it needs to be available post failover time)

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution πŸ˜€

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Perry Whittle (9/14/2011)


    sqlbuddy123 (9/13/2011)


    Right, Mirrored DB is not accessible at all times.

    Thank You,

    Best Regards,

    SQLBuddy

    Unless you're using Enterprise edition of SQL Server and you snapshot the mirrored database πŸ˜‰

    Right .. Wish I explained more.

    Thank You,

    Best Regards,

    SQLBuddy

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply