SQL Code Guard Review
Pro Tip: Don't Trust YourselfI had not used this product for a while but recently installed it again. When I'm focused on frontend work and other developers are handling the backend, I don't write any SQL. It's nice to work on teams that have brilliant database developers that you can count on to use best practices.
I'm currently back to being a full stack developer on a project and the database is not my own. I don't want to make mistakes that might slow up the team. So I need all the help I can get. I'm not saying that I'm a bad developer. In fact, I get a lot of props from other developers on my SQL skills. But I'm not perfect.
SQL Code Guard is a free add-in for SQL Server Management Studio and Visual Studio. Sorry, there isn't a VS 2015 build yet that I can find. That could change by the time you read this. I use it with SSMS the most. ( You should also install Red Gates SQL Search. I like it also. )
What does SQL Code Guard do?The add-in does four different things:
- Code issues - my favorite feature
- Object dependencies - helps solve that oops when Visual Studio missed it
- Code complexity - Bad SQL is not job security. It's what should get you fired.
- Code outline - great for understanding complex stored procedures
"I have Visual Studio, I don't need anything more."Visual Studio database projects use msbuild when you build them. Building your database, parsing it and making sure certain dependencies are checked, is wonderful. It's probably not enough. Just take one of your databases that builds fine in VS and use the Code Issues tool in SQL Code Guard once. I bet it will find something you forgot. Maybe there is a SELECT *, or a missing ELSE?
You can also add SQL Code Guard to your build. It even has a Check-in Policy so databases don't get into Team Foundation Server without at least a minimum standard to quality.
My Humble OpinionThe tool is free and is light weight. I don't see any reason why you shouldn't try it out or give it to other developers. You might be good enough that the supported issues are just second nature, but maybe a free tool could help. If it does, then the developers like me who have to work in your database later will thank you for using something.
Whatever you do, please don't leave BP017 out there in your databases. It's a killer. See what I did there? I just dropped a teaser. Now you have to go and find out what BP017 is. :-)