Synonyms wildcard not expanding
Maurice
Posts: 14 Bronze 2
Hi,
I am using SQL Prompt 7.2.3.283 in management studio 2014 and I have the following issue.
Sometimes when using as select * from synonym (witch is based on a view in the other database) the wildcard is not expanding into the available fields.
The preview screen with the content of the synonym is also empty:
Not all synonyms have this behavior, just some of them do.
Any ideas how this is possible?
Kind regards,
Maurice
I am using SQL Prompt 7.2.3.283 in management studio 2014 and I have the following issue.
Sometimes when using as select * from synonym (witch is based on a view in the other database) the wildcard is not expanding into the available fields.
The preview screen with the content of the synonym is also empty:
Not all synonyms have this behavior, just some of them do.
Any ideas how this is possible?
Kind regards,
Maurice
Comments
It sounds like suggestions haven’t been loaded for the referenced database (which is turned off by default). You can turn this feature on by going to SQL Prompt > Options > Suggestions > Connections and checking “Load referenced databasesâ€.
If loading referenced databases is enabled and the suggestions still aren't being shown then please let me know.
Thanks
Ali
That option is enabled on my machine.
And as I mentioned before, not all synonyms have this behavior, most of them work just fine.
If I use the base view that is used for the synonym in the other database, the fields are present if I expand the wildcard. (select * from ViewUsedForSynonym)
Maurice
Can you think of anything special about the affected synonyms? For example were the underlying objects/views newly created?
Thanks
Ali
It look like its a cache thing, it was indeed a new view.
I refreshed the suggestions, but it was not directly refreshed, after closing the query that has made the view and a refresh of the suggestions the fields popped up.
Maybe it's something to look into, that the refresh not always really refreshes.
For now my problem is fixed, thanks for your time and support.
Maurice
It’s good to hear you’ve made some progress. Refreshing the suggestions (Ctrl + Shift + D) updates objects for the current database connection.
To clear out and refresh all suggestions you can disable suggestions (Ctrl + Shift + P) and enable them again (using the same shortcut).
Thanks
Ali