SqlSmash – Faster navigation in SQL Management Studio

If you find a good part of your working day within SQL Management Studio, (SSMS)  you’ll know the pain that comes with using the built in editor and sub-par Intellisense. It’s not quite up to scratch if you compare it with other editors released by Microsoft. Because of this gap in functionality, naturally, products have been developed which make working with SSMS much more enjoyable.

A few months ago I changed jobs and since then I’ve been trying to find a replacement for a tool which I had been using called SQL Prompt by Redgate. It’s got slick Intellisense and code navigation features and gives you that “IDE-feel”. Unfortunately it’s expensive. Since my new employer doesn’t have a license for this tool I set out and tried to find alternatives. One I came across is called SqlSmash and it’s a side-project by a developer called Latish Sehgal.

Be aware that this tool does not provide any Intellisense features but is more of a code navigation and code utility-like plugin. It’s a plugin which will contribute to my replacement of SQL Prompt. It comes in two flavours, free and commercial and the free version alone will save you loads of time navigating database objects. It’s hard to believe the free version contains so many features.

My Favourites

I thought I’d show you a few features which I find add the most value and which save me the most time.

Search all objects (Free Version)

Similar to Visual Studio, if you press CTRL + , you’ll see a dialog where you can type the name of an object and be presented with a list of possibilities.

sql-smash-find-objects

Selecting the entry Customer will open up Object Explorer, expand and highlight that object.

sql-smash-select-in-object-explorer

If you press SHIFT + ENTER it will open up a scripted version of that object

Data protection (Free Version)

Have you ever left out the WHERE clause on a DELETE statement? I have, and it caused me many hours of downtime on a production system. Here’s a feature which might save you one day.

sql-smash-data-protection

Find related data (Licensed Version)

The second most useful feature for me, especially when I’m debugging, is finding related data. It does this with the relationships which are defined with those tables.

sql-smash-show-related-data

Right clicking on a result in the grid gives you an SQL Smash menu which you can then click to bring up related data.

sql-smash-show-related-data-results

Recent Tabs and Queries (Licensed Version)

This would have to be my favourite feature of all. Showing tabs and queries which were executed recently. You’ll be glad you have this history when your manager asks you to run that query you did for her last month and that you thought would never be needed again. For me this list stretches back 3 months and considering how little space text occupies on disk (especially if it’s compressed), I wouldn’t be surprised if it keeps all queries ever executed.  There’s no way of knowing for sure as you can’t configure this time period.

Pressing CTRL + ALT + Q will bring up recent queries. Pressing CTRL + ALT + T will bring up recent tabs which might consist of multiple queries. The good thing is that these lists are searchable so you can put in a fragment of text and it will bring up queries containing the text and as a bonus, also connect to the same server (be careful with that).

sql-smash-recent-queries

Conclusion

SQL Smash is a great utility with lots of features found in more expensive products. I haven’t listed all of them as I’d just be duplicating the documented features found on their website. I encourage you to take a look at their product and at the very least, give the free version a try or take a look at their licensed offering.