DefaultDataPath

VSDB uses the the ($DefaultDataPath) SQLCMD variable to represent the location where you would place your data and log file of your database. The deployment engine sets the value of SQLCMD variable by querying SQL Server using the following query: 1: DECLARE @value nvarchar(512), 2: @rc int; 3: EXEC @rc = [master].[dbo].[xp_instance_regread] N’HKEY_LOCAL_MACHINE’,N’Software\Microsoft\MSSQLServer\MSSQLServer’,N’DefaultData’, @value output–…

1

Pre and Post Deployment Events

Visual Studio makes it relatively easy to hook in to pre and post build events, by using the Project properties tab named Build Events. However when using Database Projects (.dbproj) you more often need to do something at deployment time. The good news is that the standard MSBuild framework, already defines these events, the bad…

1

SqlCmdVars.exe

This post announces the availability of a small helper utility that will allow you to maintain your database.sqlcmdvars files from a command line tool. Description: What is the scenario? If you are using vsdbcmd.exe to deploy your schema, you include the Database.sqlcmdvars, however vsdbcmd.exe does not have an option to override the values of the…

1

VSDB 2008 Version Numbers

We frequently get asked how to identify the version a user is running with, so here is the list of Visual Studio Team System 2008 Database Edition releases. The information is retrieved using Help => About Microsoft Visual Studio inside the Visual Studio shell (devenv.exe). Alternatively you can copy the information to the clipboard using…

0

VSDBCMD.EXE Return Codes

Quick one based on a forum question where somebody asked how to detect if VSDBCMD.EXE failed or succeeded inside a batch file. VSDBCMD.EXE does not return a very elaborate amount of information, there are just two return values 0 and 1, where zero indicates success and 1 failure. So in order to test for this…

2

Assigning MSBuild Properties to SQLCMD Variables

I am receiving the following question a lot: How do I propagate MSBuild properties to SQLCMD variables. In order to make the Visual Studio 2008 Team System Database Edition GDR release use the data from an MSBuild property inside a SQLCMD variable you need to do three things: Add the variable to the Database.sqlcmdvars file…

7

DBSchema file for SQL LiteSpeed XP’s

Based on a customer request I created a .dbschema file which contains the definitions of all the extended stored procedures used by SQL LiteSpeed 5.0 that live inside the master database. Since schema import does not import the definition of extended stored procedures, the user could no resolve the reference to the extended stored procedures….

2

Declarative Database Development

Define What You Want, Not How You Get There!   If Not Exists… Database development is many aspects behind in comparison to regular application development. If you look how database development is integrated with regular application development or development processes it becomes even more obvious that there is room for improvement in this area. When…

10

DBProj.com

Some of you already know or noticed through sites like LinkedIn or Facebook that per the beginning of this month I started in a new role inside Microsoft. I moved in to an Software Architect role, working on the new Directory Services stack. Hence I needed a new place to publish my DataDude contributions to…

2