Posts filed under: sql server

Gaps and Islands – Determining Continuous Hours

T-SQL Master Itzik Ben-Gan covered different solutions in SQL Magazine quite a few years ago, and there are many other articles out there about it. I thought I would give a current example we were solving where this came into...
Continue Reading →

Linked Server Inconsistent Meta Data Error and Synonyms

* Featured image from In most of our more recent tools we have a single layer in the ETL Staging solution that understands all of the connections to other systems / databases that need to be made. This layer is...
Continue Reading →

Microsoft Levels Features in SQL 2016

With SQL 2016 SP1 Microsoft has started to level features out across the editions. Many options that were previously enterprise only, can now be used in other editions, such as standard. Each edition still has differences in the amount of...
Continue Reading →

Moving SET NOEXEC OFF in SQLCMD deployment scripts

Currently when we build deployment packages we try to validate that the deployment is properly configured for the customer site to reduce errors. We do this by validating the version number, the database it is pointed to, connections are working,...
Continue Reading →

Deployment FAQ: Oracle Driver and Linked Server Setup

For many of our tools we routinely need to pull data from an Oracle server.  In order to connect; SQL Server needs to understand how to talk to Oracle. This is true whether you are using a linked server to...
Continue Reading →

Deployment Variables Anti-Pattern and Site Configurations

This example has been in my list to post on for quite some time now and a recent conversation reminded me to bump it up the list. The number one benefit of database projects is definitely the compiler, or as...
Continue Reading →

Order Matters: Using select to set variables

A quick post today. SQL allows you to set many variables at the same time using a select statement. However, many people do not realize that when you do this the order the variables are set in the select statement...
Continue Reading →

Warning: RESEED Changed from SQL 2008 R2 to 2012

Recently, someone on my team had an issue with automated database tests failing and we discovered a change Microsoft made to the SQL engine.  If you use the DBCC CHECKIDENT command to RESEED a table it could impact you as well. Our...
Continue Reading →

Code Writing Code Round 1 – CRUD Statements

Unfortunately, things are not that easy for us mere mortals.  However, we can make many repeatable tasks much easier by automating them or supplying tools to simplify them. I was having a conversation with someone the other day who saw...
Continue Reading →

Trying to Resolve “Failed to deploy database project:..” when running Database Tests

On certain occasions when you try to run the database tests you will receive the dreaded “Failed to deploy database project:” message and then many of your tests will fail. We speculated that this was primarily due to the test...
Continue Reading →