Cannot retrieve objects - Login failed

Provides intelligent code completion for SQL Server editors.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Paul Stephenson, Michelle Taylor, Mike Upton, justin.caldicott, Aaron Law

Cannot retrieve objects - Login failed

Postby r.kamali » Fri Jun 29, 2012 10:27 am

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
r.kamali
 
Posts: 2
Joined: Fri Jun 29, 2012 10:20 am

Postby Brian Donahue » Mon Jul 02, 2012 4:52 pm

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?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby r.kamali » Mon Jul 02, 2012 5:30 pm

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
r.kamali
 
Posts: 2
Joined: Fri Jun 29, 2012 10:20 am

Postby Brian Donahue » Wed Jul 04, 2012 5:14 pm

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Prompt 5

Who is online

Users browsing this forum: No registered users and 0 guests