What is Snippets Generator?
Snippets Generator is a tool that enables database developers to generate T-SQL snippets for SQL Server 2012 or later. It supports templates and carries out tasks very fast.
How to Use Snippets Generator
Creating a Snippet
You can generate T-SQL snippets in five ways:
- By writing the T-SQL script from scratch.
- By pasting the script from the clipboard.
- By dragging and dropping a text or sql file onto the T-SQL text box.
- By using an existing T-SQL snippet template from Snippet Templates Library and complete the script based on the template.
- By modifying an existing script.
Importing a Snippet in SQL Server Management Studio (SSMS)
After you generate the snippet, you can import it in SQL Server Management Studio 2012 or later using the following procedure:
- Create a new folder and save the generated snippet file(s) there.
- In SSMS, click on “Tools” and then select “Code Snippet Manager”.
- Click on the “Add” button and select to add the folder you earlier created and which contains the generated snippet file(s).
- Click on the “OK” button.
- That’s it! You can now start using your own T-SQL code snippets!
Modifying an Existing Snippet
You can modify snippets by navigating to File –> Open Snippet. When you open a snippet, its data is automatically retrieved and imported into the relevant fields. Then you can modify the snippet and re-generate it.
Formatting the Snippet Text and Basic Syntax Highlighting
You can format the snippet text and apply basic syntax highlighting by using the shortcuts just right below the snippet code’s box. Available actions:
- Parse
- Word Wrap
- Basic Syntax Highlighting
- Increase/Decrease Font Size
Explanation of Fields
- Title: The title of your snippet as it will appear in SSMS snippet manager.
- Description: A short description of what your snippet does.
- Author: Name of the person who authored the snippet.
- Snippet Type: The type of the snippet.
- Expansion: A new block of T-SQL statements.
- SurroundsWith: A T-SQL statement which surrounds other statements i.e. Begin..End.
- – T-SQL Script: The snippet code.
How to Activate the Ultimate Edition of Snippets Generator
Procedure
You can easily activate the Ultimate Edition by following the below procedure:
- Within the program, click on the “Help” menu, and then click on “Activate Ultimate Edition”.
- In Step 1 on the “Activate Ultimate Edition” dialog, enter the serial key provided to you via email right after you purchased the license.
- In Step 2 on the “Activate Ultimate Edition” dialog, click on “Get Activation Code” in order to generate the activation code.
- Click on the “Request License File” button, and preferably, visit the SQLNetHub License Activation Service in order to activate your license following the online activation method.
- On the SQLNetHub License Activation Service website, select the software tool for which you would like to activate the license, in this case “Snippets Generator Ultimate”, then enter the serial key and activation code, and click on the “Get License File” button. If the information you entered is correct, the SQLNetHub License Activation Service will generate the license file and make it available for you in order to download it.
- Right after you download the license file, within Snippets Generator, click on the “Help” menu, then click on “Activate Ultimate Edition”, and finally click on the “Load License File” button. Next, select the license file generated by the SQLNetHub License Activation Service (or received via the offline activation process) and click “Open”. If everything is OK, you will get a message that activation was successful.
- If activation was successful, please restart the program in order for all activation changes to take place.
Screenshot of the Process for Generating/Requesting the License File
After navigating to “Help” – “Activate Ultimate Edition“:
Once you generated the license file, you can load it into the program by clicking on “Load License File” button and specifying the location of the license file.
For any issues or further assistance, you can contact us via our Contact Form.