T-SQL Tuesday #57 – SQL Family and community

T-SQL Tuesday is a recurring blog party, that is started by Adam Machanic (Blog | @AdamMachanic). Each month a blog will host the party, and everyone that want’s to can write a blog about a specific subject.

This month the subject is “SQLFamily and community”. If you want to read the opening post, please click the image below to go to the party-starter: Jeffrey Verheul (Blog | @DevJef).

This months topic is SQL Family and community. The reason I chose this topic is the great SQL Server community. As I mentioned in my opening post, at first I didn’t know what to expect from the community, when I first started working with SQL Server. But it didn’t take long to notice the reason why everyone was to enthusiastic about it. They say the SQL Server community is friendlier and more helpful than all other communities. But it is?

It’s all about helping
A few years back, I attended a developer conference in the Netherlands called TechDays. One of the session I got to see was a session about spatial data by Bob Beauchemin (Blog | @bobbeauch). And yes, here is where the obsession for spatial data started I think. After the conference I started to play around with spatial data, and eventually I ran into a problem. At that moment I couldn’t find any useful resources online, and I knew Bob would know the answer.

After thinking about it a day or 2, I finally decided to mail Bob. This was a big step for me, because I was about to email one of the people I highly respect and look up to. The expectancy wasn’t too high, because he couldn’t possibly have the time to answer my stupid email. So I took the bull by the horns anyway and pressed send.. But to my surprise, it didn’t even take an hour before I received an answer. From Bob. THE Bob. I couldn’t believe it! The big Bob Beauchemin took the time to not only read my email, but even provide me with an answer to my question. And of course the answer was spot on, and precisely I needed to overcome my problem.

After that, I regularly emailed Bob about questions, interesting cases I came across, and many more things. But I didn’t send him an email for too long now, and I still hope I get to thank him for this in person one day. But this is where the community-vibe hit me.

From knowledge base to blog
When you get to work on all different kinds of projects, you end up with notepad files all over your desktop, USB hard drives, etc. At least, in my case that’s where it started. In order to create a structure in all these small solutions and notes, I decided to put them online. So basically I wanted to create a small knowledge base and one location where I could save scripts for myself, that I wrote before and might need in the future again. But after a few months, people started to thank me for my posts. I couldn’t understand why, because the posts were so basic, and sometimes totally gibberish in my opinion.

But after a while, I started to like the “blogging” (which was just brain-dumping until then). The blog posts became more coherent, written for a broader audience, and they were easier to follow and implement for readers. So the brain dumps grew into something new: useful information that other people could actually use! One of the things I’m most proud of until now is the spatial data series I wrote (yes, again spatial data). It grew from just 1 post (the basics of spatial data) to a series of 11 posts where I guide readers from the basics to building their own reports. This series was inspired by readers and colleagues that asked questions, and questions I had myself.

Online community
One of the greatest discoveries for me was the community on Twitter. Anyone you can imagine from the community is on Twitter, and available within a few clicks. And they all take the time to answer questions! This came as a big surprise to me at first. There are so much interesting people you can follow, interact with, and that can help you with technical challenges you have. In most cases, when you post a question with the hashtag #SQLHelp, you’ll get an answer within minutes. And you answer could come from anybody: An MCM from the UK, MVP from Australia, DBA from the US, a BI guy from South Africa, etc. All kinds of people with different skill sets and technical interests. And the variety of people make it worth while to follow and interact with them.

When strangers become friends
After being “active” in the community for a while, I started talking to some people of the SQL Server community online. At one moment I asked one of them to review a blog post, to see what she thought. That was the start of a friendship that brought me a lot the last couple of years. She introduced me to some other SQL Server professionals, that I consider close friends now. These friends support me, push me to do stuff when I need it, and help me in any way possible. They inspire me to do better, and take the extra step to achieve the goals I set myself. They are there when I need them, and that is the most important thing. And all of that because of SQL Family and the community! The community that I couldn’t believe to be more than a bunch of people with the same job and technical interests.

Being involved in the community is really cool, and there are benefits of that. For example, Red Gate gave me the opportunity to become a member of the Friends of Red Gate program, which was and is a great honor for me. I’ve loved using their tools for years, and now they gave me the opportunity to help make these tools better, by being part of this program. And hopefully there are a lot of cool things coming up, because I still have a lot of dreams and goals I set myself when I became a part of this program.

If you’re not involved yet, get involved!
The reason you should get involved in the community, is the fact that it’s really nice to help people, and you get so much in return. Getting help from someone is great, but helping other people makes you feel even better. At least, that’s my experience. So if you’re not already involved, start visiting local events like SQL Saturdays or online events like virtual users groups. It’ll give you insight in other SQL Server subjects, and show you that other people struggle with the same problems you do!

Become a T-SQL Hero with SQL Prompt

Since 1999, Red Gate Software has produced ingeniously simple and effective tools for over 500,000 technology professionals worldwide. From their HQ in Cambridge UK, they create a number of great tools for MS SQL Server, .NET, and Oracle. The philosophy of Red Gate is to design highly usable, reliable tools that solve the problems of DBAs and developers.

Every year Red Gate selects a number of active and influential community members (such as popular blog writers and community site owners) as well as SQL and .NET MVPs who are experts in their respective fields, to be part of the Friends of Red Gate (FORG) program. I’m proud to announce that I’m part of the 2014 FORG selection. This post is a part of a series of post, in which I try to explain and show you why the tools of Red Gate are so loved by the community.

What SSMS misses
The tool that Microsoft provides you with when you install SQL Server is pretty nice. It’s nicely designed (even though I’ve heard other opinions), it’s stable, and it does what it should do: it allows you to administer your servers. But that’s not the only thing that it should do in my opinion. If you take a look at Visual Studio as an example, that studio contains more options that helps developers do their job. And remember, SQL Server Management Studio (SSMS) is actually a Visual Studio instance with a different layout (just check the Ssms.exe.config)…

So why doesn’t SSMS have a schema compare option, like Visual Studio has? Visual Studio is no longer the environment that is used only by developers that work with ASP.NET and C#, but it evolved to much more the last few years. It’s now the tool for working with Data Quality Services (DQS) and SQL Server Integration Services (SSIS). So let’s talk about some other features that SSMS misses in my opinion, and let’s see how SQL Prompt can fill that gap.

SSMS ships with a default intelliSense, but this isn’t an implementation that I would like to see. It misses a few vital features. For example, the fact that SSMS IntelliSense doesn’t take relations between objects into account, is one of the biggest shortcomings. One of the companies that created a tool to fix that is Red Gate. If you install SQL Prompt, you get IntelliSense 2.0, or IntelliSense on steroids if you like.

When you installed SQL Prompt, it gives you suggestions when you write a JOIN clause. This means that it scans column names, and traces primary- and foreign key relationships on the tables you are joining. The join suggestion based on keys can be recognized by the little key symbol in front of it:

Object discovery
Whenever you’re working in a database, and you’re writing your queries, there comes a point that you can’t remember a column name or datatype. In SSMS you need to navigate the object explorer to the object (let’s say a table), and generate a create script, or click on the table to get to the column list. SQL Prompt allows you to hover your mouse over an object, and see some extra information:

If you click on the popup, you’ll get another popup window with the creation script (by default), or a summary of the object:

Scripting options
Whenever you need to script an object, or want to see the contents of for example a Stored Procedure, you need to navigate to the object in your object explorer. With SQL Prompt, you can also use the mouse context menu to script objects. Just right-click an object you referenced in your query, and choose the “Script Object as ALTER” option:

This will generate an alter script for the object you selected. This makes it a lot easier to see the contents of a Stored Procedure or View, and change it when needed.

Useful functions
The last feature I want to show you is the menu of SQL Prompt. This shows you another set of useful tools and functions. For example, how do you format your T-SQL query? SQL Prompt can do that for you with a few mouse clicks, or if you press the hotkey combination. Another great feature is the “Find Unused Variables and Parameters”. This saves you time when you try to find out which declared variables you don’t use anymore, in a very large query. All of these options can be found in the SQL Prompt menu:

If you want, you can also create a style-export for all your colleagues, so your entire department or company formats queries according to the same layout. You can find out more about this in the SQL Prompt menu, under Options -> Format -> Styles. You can export your formatting options as a .sqlpromptstyle file, or import one.

Is it worth it?
If you would ask me, my answer would be: yes! Even though it’ll cost you about €285,- (or $390,-), it’s definitely worth it. It saves you a lot of time, and it adds a lot of useful (and needed) features to SSMS.

If you want to try it out, just go to Red-Gate.com, or the product site for SQL Prompt. You can download a trial there that contains all features, for a limited time.

If you want to read more about this topic, don’t forget to check out these blog posts:

Julie Koesmarno: Clean And Tidy SQL With SQL Prompt
Mickey Stuewe: Becoming a SQL Prompt Power User
Chris Yates: SQL Prompt – The Power Within