SQL Prompt doesn't do anything on Visual Studio 2015

It works fine on SSMS but I can't get it to prompt with any database object names in Visual Studio.

There are errors like this in the log:

19 Sep 2017 08:57:18,109 [1] ERROR UniversalAuthenticationAccessTokenCache - No tokens found in the token cache
Tagged:

Answers

  • Hi @PaulF1 , thanks for your post.

    Can you give me some more information to help me fix this issue?
    • What version of SQL Prompt are you running?
    • What type of connection are you using to connect to your database?
    • What version of SQL Server are you connecting to?

    If possible, can you also attach the log file from Visual studio where you are seeing these errors?

    Thanks!
    James
    Software Engineer
    Redgate Software
  • PaulF1PaulF1 Posts: 6 New member
    SQL Prompt 8.1.0.2354
    Type of connection - I'm not sure what you mean
    SQL Server is Microsoft SQL Server 2008 R2 (SP2) - 10.50.4339.0 (X64)
  • Sorry for the confusion, by type of connection I mean is it SQL Server authentication, windows authentication or any of the azure authentications?
    Software Engineer
    Redgate Software
  • PaulF1PaulF1 Posts: 6 New member
    Ah, it's Windows Auth.
  • PaulF1PaulF1 Posts: 6 New member
    No solution then?
  • Jessica RJessica R Posts: 1,172 Rose Gold 4
    Hi @PaulF1,

    Apologies for the delay!

    There was actually a bug where "No tokens found in the token cache" would fill up the log file, but it's resolved in the latest version. Can you please update from SQL Prompt>Help>Check for updates?

    As far as I'm aware though, that error shouldn't have caused any problems aside from filling up the log, so I'm unfortunately not sure if resolving those errors will resolve the suggestions issue. If this is the case, can I just confirm- does the suggestions box still come up for SQL keywords and snippets (just not your database objects)? Or it doesn't come up at all?

    Does toggling "enable suggestions" or clicking "refresh suggestions" have any effect?

    Is it failing for all databases and servers?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • PaulF1PaulF1 Posts: 6 New member
    I uninstalled SQL Prompt and installed the latest version on Friday. I have the same problem. In fact I have a new problem in SSMS now where if I try to Format SQL with "Insert semicolons" ticked under Styles, I get an error: "Error inserting semicolons. SQL Prompt encountered problems while processing this script." And this is for a piece of SQL like "SELECT 0".

    Back to Visual Studio. The suggestions box does appear, but no schemas or tables or columns are listed in it. SQLCMD variables are listed.

    This behaviour seems consistent across different Visual Studio database solutions. You ask if it's failing for all databases and servers, but what does this mean? If I create a new database solution that hasn't been deployed to a server yet it should still work, right?
  • Jessica RJessica R Posts: 1,172 Rose Gold 4
    So sorry about the formatting issue! We haven't been able to repro this, but we've gotten a few other reports of similar issues, so there appears to be a bug. We're in the middle of investigating this, and I'll post here once we have an update. (If you want to revert back to the previous release, you can get it here.)

    Regarding the original issue though, can I just confirm if you are using SSDT projects? I'm afraid that SQL Prompt doesn't support suggestions for SSDT projects at the moment, which would explain the issues you're experiencing.

    We still don't have an exact date, but support for SSDT projects is on our roadmap. To help add more priority to this, could you please vote on the request for it here and comment with any feedback you have, if any?

    So sorry as I know this is not the answer you were hoping for but I hope this helps clarify things. Please let us know if you have any other questions at the moment!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • krzysztofkroczakkrzysztofkroczak Posts: 55 Silver 2
    edited October 11, 2017 10:57AM
    Hi @PaulF1,

    We released a new version (8.2.2.2657) with fix SQL grammar. It possibly resolves the problem of preventing you from formatting simple SQL as `SELECT 0`. Can you try it?

    Best regards,
    Krzysztof
Sign In or Register to comment.