October 1, 2008 at 9:59 am
I have an application which connects to SQL Server 2005. Multiple users use the same login id to login to the application. All users are able to perform CRUD operations but at the background the application keeps trying to login to the server & keeps failing (but the other hand the users are able to do all CRUD operations successfully). Even though the users do not perform any operations & keep logged in the application, the application still trys to login to the server & fails.
But when I try to login to the database through SSMS I'm able to login sucessfully. Looks to me that the application is having some faulty code or something. Actually, the application keeps trying this action in-frequently that is there is no regular interval in making these attempts.
As this application keep trying to login to the server unsuccessfully the production DBA's (security) have send us a notification that they might have to revoke all users from attempting to perform this action.
As a development DBA I made an attempt to mock the situation in my development machine & found out that the application is trying to connect to the database even though there isn't any active operations perfomed by the users.
I see the following messages in the trace:
EventClass: Audit Login Failed
TextData: Login failed for user 'app1'. [CLIENT: ]
ApplicationName: .Net SqlClient Data Provider
LoginName: app1
Please help me find out if this is an error from the application & if so how would I explain this to the application support team?
Thanks.
October 1, 2008 at 10:11 am
Is app1 a valid login/user for your database?
what are the error numbers your are getting with failed login?
October 1, 2008 at 11:30 am
I dont see any error numbers from the trace as this login works fine when I try to login from SSMS & also from the application. But, I dont know why there is an background operation from the application which trys to login to the database & fails.
The message i get from the trace is "Login failed for user 'app1'. [CLIENT: ]".
October 1, 2008 at 11:39 am
If you have a look in the SQL server logs it should show the failed login with the error numbers to indicate why it failed (password, wrong user etc..)
as for why it is trying to contact the database, i can only guess that somewhere in the application there is a bit of legacy code that is still contacting the database. Have a look at the source code and do a search for database connections.
October 1, 2008 at 12:14 pm
I have the below message from the SQL Server Error Logs. And, I'm going to work with the application support to identity the reasons for these errors.
Date10/1/2008 2:04:09 PM
LogSQL Server (Current - 10/1/2008 2:03:00 PM)
SourceLogon
Message
Login failed for user 'app1'. [CLIENT: ]
Date10/1/2008 2:04:09 PM
LogSQL Server (Current - 10/1/2008 2:03:00 PM)
SourceLogon
Message
Error: 18456, Severity: 14, State: 16.
October 1, 2008 at 12:18 pm
Does the application have any APPLICATION / DATABASE Roles.
Are the users even able to login using their windows ID's apart form the SQL ID
Maninder
www.dbanation.com
October 1, 2008 at 12:28 pm
a State 16 error will be thrown if the database declared in the connection string is unavailable.
So it looks like a connection is being made in the application somewhere to a database that does not exist or the login does not have access to the database. Check the source code for connection strings.
October 1, 2008 at 2:48 pm
gotcha. There are two XML connection string present in the installation folder in program files. One of them is for the main application & the other for an icon in the system tray.
The main application connection string is having the right details whereas the connection for the other application (icon in system tray) doesn't.
Once I have the XML file corrected this error message have stopped. The XML file actually didn't had the database name correct & it was pointing to a database not available in the server.
I have asked the application support to tell me what is the purpose of the application in the system tray & why is it trying to connect the server in-frequently like 10 seconds, 1 minutes & so on.....
Thanks Steve.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply