Adding tables of static data to an SSDT project

Quite often when creating a database you will need tables of static data.  These range from simple lookups to date dimensions in a data warehouse.  You can easily create these in an SSDT project.Presuming you have already designed your tables and they are present in your project;Create a folder in your project called StaticData then add a sql script...

Continue reading →

Adding database references to a sql server project

If you are creating a sql server project with SSDT (see here) and your sql refers to another database you will need to add a database reference to allow the project to build. You can do this by right clicking your references folder and selecting 'Add Database Reference' If the database you are referring to is also a part of the...

Continue reading →

Visual Studio SSDT and TeamCity – Using Publishing Profiles and TeamCity integration

Database DevOps - SSDT and TeamCityUsing Visual Studio and SSDT you can immediately publish a fresh database or update an existing one by simply right clicking the database project and choosing 'Publish'. This will bring up a dialog that lets you edit the connection string to your database and set various options related to the publish.At this point you have a choice...

Continue reading →

Creating a Visual Studio SQL Project from an existing database

There are all sorts of reasons why this is a good idea.  Not least because you can version control, unit test and tie into your CI system any existing database. How many times have you found inconsistencies between a test and live database, not known which one is right and been unsure who to ask on your team?  In my...

Continue reading →

Visual Studio SSDT and TeamCity – What you need to do.

I have just spent the last few days trying to get a SQL Project to build, deploy, run unit tests and create a dacpac on our build server which uses TeamCity. It wasn't a simple process and I had to accept a few conditions that I wasn't overly keen on but the upshot is that it works now and...

Continue reading →