Suggestion for SQL Prompt and SQL Test (Red-Gate)

Recently I moved my job on ALM topics, focusing on Source Control Management and Testing, in order to reach Continuous Integration on database development. I evaluated some tools and Red-Gate was my first choice. In this post I’d like to share the suggestions I made on two of the most important tool I’m using atm:

  • SQL Prompt (productivity tool for code formatting, intellisense, code inspection, etc.)

suggestions: TODO highlights. I’d like to improve readability of TODO and HACK comments, like in the following picture:

todo
 For ReSharper user (and Visual Studio ones), this is very familiar.
 
  • SQL Test (addon for SQL Server Management Studio, unit testing utility)

suggestions:

“Expand/Collapse all” for avoiding clicks when you have lots of test procedures

Logical folders for grouping tests logically and not with the strict database schema names
If you think that those suggestions could help us, feel free to vote!
Stay Tuned!

Avoid nested INSERT EXEC (where possible)

Some days ago, I received a tedious error while executing a pipeline of nested stored procedures, which contains INSERT-EXEC statements. The issue is based on a SQL Server limitation, by design since SQL Server 2005. Actually, the INSERT-EXEC was supported in SQL Server 2000, but I’ve never tried that behavior on the older version. Let’s see the behavior. Continue reading “Avoid nested INSERT EXEC (where possible)”

How to mark SQL Server objects as deprecated with extended properties

I want to share a “trick” on how to mark SQL Server user objects as deprecated. But first, why we need to mark an object as deprecated?

  • code refactors
  • object schema refactors
  • mandatory backward compatibility in a multi customer scenario
We can use extended properties. They are a set of name/value properties in which you can specify custom value, with your own naming convention. Every SQL Server object can be, let’s say, extended using those properties. There are also three stored procedures which you can use in order to manage extended properties:

SSMS Boost another cool addin for SQL Server Management Studio

During my SQL Devlife I tried lots of SQL Server management studio add-ins. Some days ago I tried SSMSBoost. Since I’ve already spoken about SSMSToolsPack and SQLPrompt, I’d like to focus this post on the capabilities that SSMSBoost adds to Sql Server Management Studio. I’ll speak about some of the available features, in the following order:

  • UI/User experience capabilities
  • Connections management
  • Searches
  • Extended menu options
  • Grid commands

Continue reading “SSMS Boost another cool addin for SQL Server Management Studio”

Repeating rows based on a value in a different column

I’ve just replied to a question in dotnethell italian forum about the topic in the title. Actually it’s not the first time I got this kind of question:

“How can I repeat a row using a value that is stored in another column of the same table?”

 
Ok, let’s describe a solution step by step.

Share t-sql snippets to the team with SQL Prompt

Red-Gate SQL Prompt is a plugin for SQL Server Management Studio that makes the developers life easier when writing t-sql. It provides improved intellisense, indent and coding styles, and also a snippet manager feature that allows the developer to create a set of useful shortcuts. Those autocomplete items can be really useful for a team, let’s see how we can share them in a team.

Continue reading “Share t-sql snippets to the team with SQL Prompt”