ODBC Error: SQLState 28000 & Server Error 18452

We have an application that connects to SQL 2005 thru ODBC with the following string:

driver=SQL Server;server=server1;database=db2005;uid=serveruser;pwd=pwd1;

When our administrators login on the workstation the application works well. But when ordinary users login they get the following error. (We only have 1 domain)

SQLState: 28000

SQL Server Error: 18452

Login failed for user ". The user is not associated with a trusted SQL Server connection.

Then the standard SQL Server Login window pops up asking for the Login ID and Password. On the window the 'Use Trusted Connection' is checked and the name of the user on the workstation appears on the LoginID. What we do is uncheck the 'Use Trusted Connection' then login using the credentials above.

Need help on this one please. Thanks.

[847 byte] By [jessicalegazpi] at [2007-12-25]
# 1
Check whether server is configured to allow mixed authentication modes (SQL Server and Windows) (or) only Windows Authentication mode. You can do this by opening SQL Server Management Studio - Right Click on Server - Choose Properties - Security
RajKasi-MSFT at 2007-9-3 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 2

Checked the setting, it is on SQL Server ad Windows auth mode.

jessicalegazpi at 2007-9-3 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 3

Try sp_adduser to make sure that the login is identified as trusted by SQL Server.

Link for sp_adduser : http://msdn2.microsoft.com/en-us/library/ms181422.aspx

RajKasi-MSFT at 2007-9-3 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 4
Have you tried to stop and restart the database service after the changes took effect?
Ben_There at 2007-9-3 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 5

Hi ,

I am facing Same problem and it is as follows:-

There are two servers ‘A’ and ‘B’. At server ‘A’, there is installed Window server at server ‘B”, there

is installed Window Server2000. And both servers have SQL SERVER 2000. I have created link server from A to B. I have to insert data into table of server ‘B’ from server ‘A’. When I used directly insert command like

Insert into [server name (B)]. [Database]. [Owner].[table name]

Select * from [server name (A)]. [Database]. [Owner].[table name]

The data is inserted successfully.

But when I created trigger (for insertion) on table of server (A) (because I want as there is insertion in the table of server(A), rest

Records that are not in the table of server (B) , are automatically inserted into the table of server(B)).

The Insertion is not complete and there is shown system message which is as follows:-

Server: Msg 7391, Level 16, State 1, Procedure rms_trn_con_details_insertion, Line 6

The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.

[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]

I have searched in Google , I found that there are problems in heterogeneous system.

But till today, I have no solution for it. Temporary, I find solution through Job Scheduling.

Try to find out solution for this problem.

Regards,

Nikhil Chaturvedi

NikhilChaturvedi at 2007-9-3 > top of Msdn Tech,SQL Server,SQL Server Data Access...

SQL Server

Site Classified