Synonyms wildcard not expanding

MauriceMaurice Posts: 14 Bronze 2
edited June 16, 2016 10:13AM in SQL Prompt
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:
LIBGxt0.png

Not all synonyms have this behavior, just some of them do.
Any ideas how this is possible?

Kind regards,

Maurice

Comments

  • Ali DAli D Posts: 56 New member
    Hi Maurice

    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”.

    gx6hU1I.png

    If loading referenced databases is enabled and the suggestions still aren't being shown then please let me know.

    Thanks
    Ali
  • MauriceMaurice Posts: 14 Bronze 2
    Hi Ali,

    That option is enabled on my machine.
    4qd52HS.png

    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
  • Ali DAli D Posts: 56 New member
    Hi Maurice

    Can you think of anything special about the affected synonyms? For example were the underlying objects/views newly created?

    Thanks
    Ali
  • MauriceMaurice Posts: 14 Bronze 2
    Hi 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
  • Ali DAli D Posts: 56 New member
    Hi 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
Sign In or Register to comment.