July 11, 2005 at 3:54 am
On application, I am getting an error "Login Failed for user 'null'. Not Associated with a Trusted SQL Server connection" when connecting to SQL Server. This error occurs in the production environment, but not in the test environment, after getting this error, I have to restart SQL Server to resume its operations.
There is a bug with similar error, the following article explains more
http://support.microsoft.com/default.aspx?scid=kb;en-us;247641&sd=tech. This article says, the bug has been fixed in SQL SP2, since SP2 is no longer supported by Microsoft. But I am not sure whether this will resolve the issue, because I never got this error in the test environment. This error occurred even when one user is working on the production server.
I would appreciate if anyone give me some information about this error and how was it being resolved.
The Environment details as follows;
Production Environment:
O.S: Windows NT 4.0
SQL Server : SQL 7.0 SP1
No. of users: appr. 40
Front End: VB
Test Environment:
O.S: Windows NT 4.0
SQL Server: SQL 7.0 SP1
No. of users: appr. 5
Connection Information:
There are two connection strings used in the application:
Client side connection string: "Persist Security Info=False;User ID=%UID%;Password=%PWD%;Initial Catalog=%DATABASE%;Data Source=%SERVER%"
Server side connection string: "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=%DATABASE%;Data Source=%SERVER%"
July 12, 2005 at 2:11 am
I'm not sure I understand why you have two connection strings, client and server side if it's a VB client app ?
The only times I've encountered this error before are in a web application environment when an application tries to "double hop" across server boundaries i.e. user calls web app through browser, web server tries to connect using integrated security to a separate sql server. As a security measure this delegation of security credentials is prevented unless you explicitly enable it through Active Directory.
Here are a couple of good articles which relate to ASP.NET applications with similar symptoms but should hopefully help you shed some light on your problem.
July 12, 2005 at 2:35 am
This error occurs when you are using Windows Authentication (your "Server side" connect string) when the user connecting is not authenticated with the domain scenarios I have seen this in are:
1. Win XP clients not logged into domain connecting to SQL Server on the domain with Win Auth - here if you run:
rundll32.exe keymgr.dll, KRShowKeyMgr
you can set a user/password for the domain and SQL server
e.g. if SQL Server was SVRSQL on domain MyDomain and your Windows User account on MyDomain was Fred you would set user MyDomain\Fred, password whatever it is for server SVRSQL
2. You have a service running as a "local" user trying to access a SQL server that is using Windows Authentication - make sure the servie is runnign as a domain user with appropriate permissions
James Horsley
Workflow Consulting Limited
July 12, 2005 at 7:30 am
Is the SQL Server in production set up in Windows authentication mode or Mixed Mode security? If it's in Windows authentication mode, the client side connection string will always fail. That's because unless SQL Server is set to mixed mode, it won't accept the SQL Server login. You could attempt to login with sa and it would fail.
K. Brian Kelley
@kbriankelley
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply