Tuesday, March 27, 2012

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?

|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

No comments:

Post a Comment