SQL Prompt glitch when SQL Server contains an invalid SYNONYM reference.
EnrightMcC
Posts: 14 Bronze 2
in SQL Prompt
I had a SYNONYM defined in SQL Server that pointed to a server that no longer exists. SQL Prompt couldn't load suggestions (Error loading master) because the internal query
"SELECT object_id, OBJECTPROPERTYEX(object_id, 'BaseType') from [sys].[synonyms] WITH(NOLOCK);"
After I dropped the invalid synonym it worked fine. None of my SQL code referenced the dead server;
"SELECT object_id, OBJECTPROPERTYEX(object_id, 'BaseType') from [sys].[synonyms] WITH(NOLOCK);"
After I dropped the invalid synonym it worked fine. None of my SQL code referenced the dead server;
Tagged:
Comments
Thanks for your post on this!
This is a known issue as SQL Prompt unfortunately doesn't check for synonym validity at the moment. It would definitely make sense for SQL Prompt to do this though- can you please post a request for this on our UserVoice forum here: https://redgate.uservoice.com/forums/94413-sql-prompt
That will allow us to keep track of requests for this and also keep you updated on any progress.
Thank you!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?