Cannot retrieve objects - Login failed

r.kamalir.kamali Posts: 3
edited July 4, 2012 12:14PM in SQL Prompt Previous Versions
Hi,

I'm on v5.3.2.2 of SQL Prompt using MS SQL Server Management Studio 2008 R2. In the last few days I have started getting an error refreshing suggestions which is bugging me with a dialog every few minutes (very annoying!):

SQL Prompt - Unable to show database object from <<dbname>>. Possible reasons:

...
...

Details:
Login failed for use <<my user name>>

Nothing has changed on the server to my knowledge, I can definitely login to the DB in question. The log shows the following:

29 Jun 2012 09:14:53,239 [1] WARN RedGate.SQLPrompt.CommonUI.Editor.EditorWindowBase - Cache had warnings
System.Data.SqlClient.SqlException: Login failed for user 'xxxxxxxxxxxxxxx'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at (Object )


Any suggestions?

Thanks,

Russell

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    If you can connect fine with SQL Prompt, then linked servers may be to blame. Do you still get the error if you turn off linked server support in the SQL Prompt options?
  • Hi Brian,

    Thanks for your reply. I disabled linked server support and that seems to have fixed it. Most of my stuff is within the one server so I can live without suggestions on linked servers for now.

    Let me know if more details about my server setup would be useful to assist in debugging this issue. Come to think of it the linked server setup may well have changed recently...

    Thanks,

    Russell
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Russell, I think that if the account you use doesn't have rights at the other end of the linked server, then you may have saved credentials in the linked server config that are invalid and need to be updated.
Sign In or Register to comment.