TPKTG


As an 'SA' I thought that you have permission to do anything on the server. Running an update command from Query Analyzer is throwing this error:

SQL Server 2000 SP3

Server: Msg 18456, Level 14, State 1, Line 1
Login failed for user 'sa'.

The table is in the dbo schema.

Has anyone seen this error before




Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

Xinwei Hong - MSFT


Check this post to get more details about the failure!

http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

 

 







Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

TPKTG

There are no errors in the SQL Server Error Log and Event Viewer. I am not sure how to resolve this error.

When I logged in as a user with permissions to the specific table I was able to execute the Update Statement successfully.

I am just curious as to what is causing the error. And would like to have it resolved.

The post did not contain any resolutions useful to SQL Server 2000.

Thanks!






Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

Laurentiu Cristofor

You failed to connect to the server. Have a look at your ERRORLOG file and post here the error number and state from that file. That should provide us with more information on why the login failed.

Thanks
Laurentiu






Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

Laurentiu Cristofor

Actually, scratch my comment above - you're using SQL Server 2000 and the information I requested is only available in SQL Server 2005.

Instead of the above, check that the connection is made with the proper credentials for sa - verify the password and verify you can connect with it using osql or Query Analyzer.

Thanks
Laurentiu






Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

TPKTG

The connection can be made correctly with Query Analyzer. And there are NO errors in the ErrorLog or Event Viewer.

This one intrigues me and I would like to know why login fails for 'SA'.

Thanks!





Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

Laurentiu Cristofor

So, you can connect to the server using QA and the sa account, and then the update fails How does the update statement look - are you by any chance running an update on a linked server

Thanks
Laurentiu






Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

TPKTG

It is a basic update statement. And there is no linked server involved.

UPDATE tmp
SET MaxID = 8
WHERE TableName = 'tbl'





Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

Laurentiu Cristofor

If you execute some other query (for example, "select @@version"), do you get the same error You mentioned that you connected successfully - how did you verify that

Thanks
Laurentiu






Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

Anonymous

Windows 2003 R2

SQL Server 8.0.2039

I am having the same problem described above:

I am trying to update a stored proc on one of our boxes.

I have logged in as SA.

I have logged in as Myself (windows, sysadmin).

I have logged in as a newly created ID with Sysadmin rights.

I have logged in with a newly created ID mapped to the database in question.

Even after trying all of the above I am still getting the same error when I try to "alter proc".

I can select @@servername or @@version just fine...

error:

Msg 18456, Level 14, State 1, Procedure Booked, Line 6

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

when I log in as SA the error is:

Msg 18456, Level 14, State 1, Procedure Booked, Line 6

Login failed for user 'SA'.

There is nothing in the logs. (agent,sql,system,security,application)

There are no linked servers involved.

has anyone fixed this type error before






Re: SQL Server 2000 Server: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'sa'.

Laurentiu Cristofor

What is the procedure Booked doing on line 6 Whatever operation is attempted there is what fails.

Thanks

Laurentiu