Snippets not importing
SimonR
Posts: 6 New member
V0.2.1
I cannot seem to get Prompt to import my snippets from SSMS, I have tried changing the defaults but still no luck
I cannot seem to get Prompt to import my snippets from SSMS, I have tried changing the defaults but still no luck
Tagged:
Best Answers
-
AdrianB Posts: 46 Silver 1@hlattanzio What you have done sounds correct.
The AdsSnippets file should be the path to the file that ADS stores its user-specific SQL snippets in (usually C:\Users\hlattanzio\AppData\Roaming\azuredatastudio\User\snippets\sql.json). You can check this path by running Command palette -> Configure user snippets -> sql.json and then look at the path of the file that opens.
The SSMSSnippetsFolder is the path to the folder that contains your snippets for SQL Prompt in SSMS (usually %localappdata%\Red Gate\SQL Prompt 10\Snippets).
For both of these, you should be able to leave them as Default and the extension should still find them. If that isn't working, check what both paths are and set them explicitly in the ADS settings.
If that still isn't working, can you drop us an email to sqlprompt.in.ads@red-gate.com?Software Engineer
Redgate Software -
AdrianB Posts: 46 Silver 1@SzymonOs
We have just released a new version (v0.2.2) of the extension. Could you install that and see if it works?
If not, there should be a log file in the following directory:C:\Users\[username]\.azuredatastudio\extensions\redgate.sql-prompt-0.2.2\logs\
Could you send that log file (or all of them is there are more than one) to sqlprompt.in.ads@red-gate.com and we'll investigate it further?
Software Engineer
Redgate Software
Answers
Adrian
Redgate Software
That's probably the SQL Prompt setting. There is a snippets file already within ADS for sql snippets. Could you check the path to that file using the the command palette:
Adrian
Redgate Software
If that doesn't work, can you drop us an email to sqlprompt.in.ads@red-gate.com?
Redgate Software
I'm not getting my SSMS SQL Prompt snippets to import either. I updated the SSMS Snippets folder setting, restarted ADS, and it still doesn't work
AdsSnippetsFile = Default -> but that is working. My ADS snippets show
Ssms Snippets Folder = C:\Users\hlattanzio\AppData\Local\Red Gate\SQL Prompt 10\Snippets
. I even tried taking the Snippets folder off of the path and just using C:\Users\hlattanzio\AppData\Local\Red Gate\SQL Prompt 10 but it still doesnt' seem to import any of my snippets from SSMS
Redgate Software
It also triggers a system log warning event ID 10016.
To do so, find the directory in which the extension is installed (usually C:\Users\<username>\.azuredatastudio\extensions\redgate.sql-prompt-0.2.6\out\SnippetConverter) and run:
Do you get the same error?
Redgate Software
Given the error you are getting, it seems to be more of an environment issue relating to users/permissions. I'd suggest checking that the user you are running the converter as has access to both paths you are giving it. It might also be worth checking that the SSMS path is to a directory containing snippet files, and the ADS path is a file path of the sql.json file of ADS.
Redgate Software
I understand this product is in preview and I will receive limited support through this forum, but I hope this can be resolved in a future release. I would migrate from SSMS to ADS permanently if SQL Prompt works properly, but your product is not quite there yet.