Login failed for user '<user name>' in mirroring

Last Post 05 Jun 2011 06:31 PM by rm. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
e90fleet
New Member
New Member

--
03 Jun 2011 09:10 AM
Hi all,

Please correct me if this is a wrong forum for this question.

i am not sure if this is a sql problem or it is by design but this is what we are currently having:
We have a database mirroring setup (between server1 and server2) and all works fine when the database runs on the server1. The original intend was to always run this database as a Prin***l on server1.
But, when the database fail over to server2 we are seeing lot's of errors (Msg 18456, Level 14, State 1, Server , Line 1 Login failed for user '' ) on server1 but not on server2 (now Prin***l) and the application continue to work without any problems.
The question is why we are seeing the login failed errors on the server1?
Is this by design that application still think that this database is still located on server1, then tried to connect to server1 and if it can't connect then it tries to connect to server2?
gunneyk
New Member
New Member

--
03 Jun 2011 11:07 AM
That depends on how you are connecting. If you are usign the SQL Native Client then it has the ability to store both IP addresses for the principle and mirror. If it can't connect to the principle it will eventually try the mirror. It doesn't know that the switch has occured until it can't connect any longer. If your apps are not using the native client they need to have a way to switch over to the mirror.
e90fleet
New Member
New Member

--
03 Jun 2011 04:30 PM
What is the preffered method? SQL Native client or using a switch by application.

it's not like i see the errors for 1 day only. if the mirror become a prin***l and stays there for a week then we see errors on the current mirror (was an original prin***l) instance everyday.
gunneyk
New Member
New Member

--
04 Jun 2011 01:52 PM
There is no preferred way. It's up to each to decide based on their needs and enviorment. As for the logins on the mirror I would see what apps / machines are loggin those errors and see whey they are accessing the mirror. My guess is an app not mirror aware.
rm
New Member
New Member

--
05 Jun 2011 06:31 PM
When you use failover partner in connection string, new connection always goes to prin***l first. If failed, will go to failover partner. That's why you see many logon failures in original prin***l.
You are not authorized to post a reply.

Acceptable Use Policy