Database mirroring login failure

  • I have configured database mirroring between two servers at a distance 40 miles away from each other.

    Server specifications: SQL Server 2008,Standard Edition 64-bit

    This is same for principal,mirror and witness. The configuration is high-safety with automatic failover

    Initially we tested our .net application(web application) on both the principal and mirror and made sure that the login is not orphaned.

    Things run fine generally.But sometimes on the mirror server,I see login failed attempts:

    Login failed for user 'd0main\user'. Reason: Failed to open the explicitly specified database. [CLIENT: xx.xx.x.x] Message Error: 18456, Severity: 14, State: 38.

    This error appears 3-4 times a day but not more than that.

    My question to the experts is:If the principal is alive so why the application tries to connect to mirror.The default time-out for a .net webpage is 30 seconds,so is it possible that the application tries to connect principal and after 30 seconds even if principal is alive,it assumes that it is dead and thus tries to open a connection to mirror where it fails.

    Please help me with this problem.

  • Is this domain user part of SYSADMIN or Local Administrator group of mirror server ?

    Verify if this user is part of WITNESS\PRINCIPAL not added to Mirror

    Cheers

    Sat

    Cheer Satish 🙂

  • TECHBABU (2/22/2011)


    Is this domain user part of SYSADMIN or Local Administrator group of mirror server ?

    Verify if this user is part of WITNESS\PRINCIPAL not added to Mirror

    Cheers

    Sat

    It is not a permission issue at all.It occurs intermittently.I think I figured it out.

    At times,my application server could not connect to my principal server due to loss of network or choked network.So from its cache it used the name of mirror server to connect.But as mirror server is in no-recovery mode,it is not accessible and hence the login failure

    I also figured out that the application server has nothing to do with which is principal or mirror at that moment.it will try to connect to both servers and will make a connection wherever it is successful.

  • Did the problem get resolved i'm having the same issue

  • alexdantepabilo 22561 (8/27/2012)


    Did the problem get resolved i'm having the same issue

    I increased the mirroring time-out property and made it to 30 seconds. So it covered some network hiccups. Please try this and let me know how it works for you.

    Another thing that I always do is to collect time stamps of that duration from principal, witness and mirror

    servers on the sql side plus eventviewer logs. Consolidating such informatill will help you form a case which can be sent to network admins to look into possible glitches.

    Thanks

    Chandan

Viewing 5 posts - 1 through 4 (of 4 total)

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