Saturday, January 8, 2011

Free Utility for SQL Server 2012 CTP1 - Snippets Generator v1.0

** [Update - Dec 12, 2011] Snippets Generator is now on CodePlex!

 T-SQL code snippets is a very handy new feature in SQL Server 2012 CTP1 (codenamed "Denali").

Using code snippets you can save time when you write code and you just need to enter code that does common tasks. Code reuse has always been useful and it really increases productivity!

In SQL Server 2012 CTP1 you can import your own snippets. However, prior to that, you need to create a snippet.

Each snippet is an XML file that specifies some header information regarding the snippet and then it includes the T-SQL code.

A sample T-SQL code snippet for SQL Server 2012 CTP1 is illustrated in the following image:

Yesterday while I was recording my Webcast on Denali, I thought to myself: "By the time the XML structure is common for all T-SQL code snippets for SQL Server Denali why not creating a Windows Forms Application that can server as T-SQL code snippets generator?"

Today I implemented my idea and the outcome is "Snippets Generator v1.0" :)

Using this tool you can generate T-SQL code snippets for SQL Server "Denali", save it into a directory and then add the directory, and consequently your custom snippets, into SQL Server "Denali" via the Code Snippets Manager! The directory's name will be the snippet category name in Code Snippet Manager and its contents will be the snippets!

You can download the tool from here:


  • .NET Framework 3.5 SP1
  • SQL Server 2012 CTP1 (for importing the generated snippets(s) :)

Drop me a line if you like the tool! Your valuable feedback is always welcome and much appreciated!

* Please note that this is a freeware. I will not be responsible for illegal actions or damage caused by the misuse of this software.

Check out my latest eBooks on SQL Server:
Administering SQL Server - Ebook Tuning SQL Server - Ebook

Easily secure your SQL Server instances! Try out DBA Security Advisor!
DBA Security Advisor for SQL Server by SQLArtBits
DBA Security Advisor was developed by SQLArtBits. The tool was being carefully developed for an entire year and it contains comprehensive security checks and recommendations based on proven SQL Server security best practices. Feel free to download and use the Community Edition which is free and if you find it useful, you can consider upgrading to the Enterprise Edition!

Artemakis Artemiou [MVP]

Author & Editor

Artemakis Artemiou is a Senior SQL Server Architect, Software Developer and Microsoft Data Platform MVP. He is also an author, regular blogger, president of Cyprus.NET User Group and CY Country leader of INETA-EU. He is also the creator of DBA Security Advisor and In-Memory OLTP Simulator. Artemakis is a frequent guest author of worldwide well-respected online journals where he writes articles focusing on many SQL Server topics.

Reference: The SQL Server and .NET Hub (


Demetris Christodoulou said...


Many thanks for sharing!!!


Artemakis Artemiou [MVP] said...

Thank you very much Demetris!

I am glad you found the tool useful!

It's a pleasure sharing technical knowledge with the community!