locked
Mirroring issue RRS feed

  • Question

  • Hi,

    In mirroring after fail over  occurs users cannot connect to the mirrorserver database?how to trouble shoot this issue?


    Please click the Mark as Answer or Vote As Helpful button if a post solves your problem or is helpful!

    Friday, December 21, 2012 4:44 PM

Answers

  • yes first look at the error log and what is the error you are getting when attempting to connect to the mirror database that will gives the starting hint to resolve or analyze the issue.

    the other issue it might be as Ram said, also might be the way called is incorrect for their connection string from the application prospective.

    Orphaned Users with Database Mirroring and Log Shipping
    http://blogs.msdn.com/b/sqlserverfaq/archive/2009/04/13/orphaned-users-with-database-mirroring-and-log-shipping.aspx


    Thanks, Rama Udaya.K (http://rama38udaya.wordpress.com) ---------------------------------------- Please remember to mark the replies as answers if they help and UN-mark them if they provide no help,Vote if they gives you information.


    • Edited by Rama Udaya Sunday, December 23, 2012 3:46 AM
    • Marked as answer by Maggie Luo Sunday, December 30, 2012 4:28 PM
    Sunday, December 23, 2012 3:46 AM
  • Apart from this, there could be some Logins which are missing at mirroring server.

    Also check if your application is capable of handling mirroring at DB Level --> Means make sure you application code can detect that the principal server is down and now it has to try to connect to mirror server at a different Hostname\IP and Port.


    Sarabpreet Singh Anand

    Blog , Personal website

    This posting is provided , "AS IS" with no warranties, and confers no rights.

    Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    • Marked as answer by Maggie Luo Sunday, December 30, 2012 4:28 PM
    Sunday, December 23, 2012 8:30 AM
  • Even after resolving the login sync issues and the issue is still not resolved then you may refer following .

    To connect to a database mirroring session, a client can use either SQL Server Native Client or .NET Framework Data Provider for SQL Server. When configured for a SQL Server 2008 database, these data access providers both fully support database mirroring. For information about programming considerations for using a mirrored database, see Using Database Mirroring. In addition, the current principal server instance must be available and the login of the client must have been created on the server instance. For more information, see Troubleshooting Orphaned Users. Client connections to a database mirroring session do not involve the witness server instance, if one exists.

    Refer to following article :

    "Connecting Clients to a Database Mirroring Session (SQL Server)"
    http://msdn.microsoft.com/en-us/library/ms175484(v=sql.105).aspx 

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

    Thanks,Suhas Vallala

    • Marked as answer by Maggie Luo Sunday, December 30, 2012 4:28 PM
    Wednesday, December 26, 2012 1:11 PM

All replies

  • Hello,

    What error are you getting? Start by testing whether or not you can connect to the mirror database, does the instance have anything in the errorlog? Is this a networking issue? Look at it from the perspective of the error and try to troubleshoot what is happening.

    -Sean


    Sean Gallardy | Blog | Twitter

    Friday, December 21, 2012 11:41 PM
    Answerer
  • This could be Login SID's on principal and mirroring db servers may be out of sink?

    http://uk.linkedin.com/in/ramjaddu

    Saturday, December 22, 2012 9:34 PM
  • yes first look at the error log and what is the error you are getting when attempting to connect to the mirror database that will gives the starting hint to resolve or analyze the issue.

    the other issue it might be as Ram said, also might be the way called is incorrect for their connection string from the application prospective.

    Orphaned Users with Database Mirroring and Log Shipping
    http://blogs.msdn.com/b/sqlserverfaq/archive/2009/04/13/orphaned-users-with-database-mirroring-and-log-shipping.aspx


    Thanks, Rama Udaya.K (http://rama38udaya.wordpress.com) ---------------------------------------- Please remember to mark the replies as answers if they help and UN-mark them if they provide no help,Vote if they gives you information.


    • Edited by Rama Udaya Sunday, December 23, 2012 3:46 AM
    • Marked as answer by Maggie Luo Sunday, December 30, 2012 4:28 PM
    Sunday, December 23, 2012 3:46 AM
  • Apart from this, there could be some Logins which are missing at mirroring server.

    Also check if your application is capable of handling mirroring at DB Level --> Means make sure you application code can detect that the principal server is down and now it has to try to connect to mirror server at a different Hostname\IP and Port.


    Sarabpreet Singh Anand

    Blog , Personal website

    This posting is provided , "AS IS" with no warranties, and confers no rights.

    Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    • Marked as answer by Maggie Luo Sunday, December 30, 2012 4:28 PM
    Sunday, December 23, 2012 8:30 AM
  • Even after resolving the login sync issues and the issue is still not resolved then you may refer following .

    To connect to a database mirroring session, a client can use either SQL Server Native Client or .NET Framework Data Provider for SQL Server. When configured for a SQL Server 2008 database, these data access providers both fully support database mirroring. For information about programming considerations for using a mirrored database, see Using Database Mirroring. In addition, the current principal server instance must be available and the login of the client must have been created on the server instance. For more information, see Troubleshooting Orphaned Users. Client connections to a database mirroring session do not involve the witness server instance, if one exists.

    Refer to following article :

    "Connecting Clients to a Database Mirroring Session (SQL Server)"
    http://msdn.microsoft.com/en-us/library/ms175484(v=sql.105).aspx 

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

    Thanks,Suhas Vallala

    • Marked as answer by Maggie Luo Sunday, December 30, 2012 4:28 PM
    Wednesday, December 26, 2012 1:11 PM