Showing posts with label addins. Show all posts
Showing posts with label addins. Show all posts

Monday, 9 January 2012

Sql Server Management Studio tuning: T-Sql Formatter and SSMS Tools Pack


I think Microsoft Sql Server Management Studio is a great tool for managing Sql Server, writing and optimizing Transact Sql code and for anything with Sql Server but I have always missed some functions:
  • Formatting Sql code
  • Code Snippets (Like in Visual Studio)
  • CRUD Stored Procedure generation
I had to reinstall my working machine last week and started searching for some free Sql Server Management Studio addins for these functions and finally I found a solution:
Poor Man’s T-SQL Formatter for formatting Sql code.
SSMS Tools Pack for the others.

Poor Man’s T-SQL Formatter is a free add in that formats Sql scripts with a single hotkey. As Visual Studio, we can format the whole document or just the selected part of it.
After the installation it puts two entries into the SSMS Tools menu: Format T-SQL Code and T-SQL Formatting Options.
PoorMansTSqlFormatterOptions
These are my personal settings. I have changed the default hotkey to CTRL+K, CTRL+D and unchecked all the extras, because the default settings were uncomfortable for me (This hotkey is the same as the debugging hotkey in SSMS Tools Pack but I disabled this function because I think I wont use it).
It also has a free web service for testing at poorsql.com.
SSMS Tools Pack is also a free add-in created by Mladen Prajdić SQL Server MVP. It has a lot of features but for me the most importants are:
  • Execution Plan Analyzer!!!!!!! (Verry important)
    SSMSToolsPack_QueryPlanAnalyzer
  • SQL Snippets (Fires on Enter – as default – or Tab key)
    SSMSToolsPack_Snippets
  • Search Results in Grid Mode
    SSMSToolsPack_SearchGridResults
  • CRUD (Create, Read, Update, Delete) stored procedure generationSSMSToolsPack_CRUDGeneration

  • And a lot of other good stuff Mosolygó arc.
I also have to mention the Format SQL feature that I think is a Fake Function. It only makes keywords uppercase or lowercase, doesn’t format anything in my code.

Summary: I recommend installing these to everybody who uses SQL Server. SSMS Tools Pack works with every version of SQL Server from SQL Server 2005 (as the install shows), and unfortunately I don’t have any information about Poor Mans T-SQL Formatter but I tried it with SQL Server 2008 and it worked fine for me.
Note: EVERYBODY has to try the Execution Plan Analyzer, it is really-really worth it.

The download links are:

Happy Coding!
Morzel

Saturday, 8 January 2011

C#: throwable exceptions and Visual Studio Productivity Power Tools

 

There is a really great add-on for Visual Studio named Productivity Power Tools. It helps a lot during my work but hides some information that so important for me: the list of throwable exceptions.

At the university I didn’t have a choice. I had to learn Java. Java is a great language and has a restriction that I like so: you must specify the list of the throwable exceptions at the specification of each method. I work with C# nowadays. It doesn’t has this rule but Visual Studio tries to help us on a simple way: it shows us this list when we hover on the name of the given method with the mouse like this:
originalLook

As we can se, we now a bit closer to the Java restrictions. We can find out fast the given list but the language still don’t force us into handle all exceptions. It smart or not – I don’t know. But in fact I’m happy to see this list.

There is a bit problem with the power tools: It gives us a new window for our Visual Studio, named Solution Navigator. It has a lot of functions among others coloring the hints that I shown before:

withSolutionNavigator

Ops! As we can see, the list of throwable exceptions has disappeared. We have an other function instead of this, every can try this out by clicking on the triangle at the right side of the popup.

At this time we have two choice. We can use our Visual Studio with these settings or we can disable this function by setting of on the Visual Studio menu –> Tools –> Options –> Productivity Power Tools –> Solution Navigator. We got the original function after restarting our development environment.

powerToolsSettings

 

Remarks: Solution Navigator is so slow. Sometimes useful but the most part of my times it only slows down my work without any benefits.