The problem I have a linked server connection between 2 SQL servers approx half the world away. One server resides in Sydney, Australia and the […]
SSIS Convert between datetimeoffset and datetime
The Problem I had a sql table that was storing data in a DateTimeOffset(7) datatype, DateDeleted. I was trying to use SSIS to sync the […]
SQL Server Enable User
The problem You have a SQL Login created for your account usr_test Everything appears fine, but you cannot connect. When you look in the users […]
SQL Sever DB Mail Logs
If you use SQL Server Database mail sometimes you will have trouble and you want to see a log of all the emails that have […]
Visual Studio SQLCompare does not Compare SQLCMD Variables correctly
The problem When using the Visual Studio SQL Compare to compare your database schema to your physical database it returns heaps of false positives, where […]
exec sp_executesql nvarchar(max) truncating at 4000 characters
The Problem Sometimes you may need to write dynamic SQL. One example is writing query for running over linked server connections. You might write something […]
SSIS 2012 Project Deployment – Set CheckpointFile with Parameters
The Problem SSIS in SQL Server 2012 now supports a “Project Deployment” model. Adding things like Connection Strings is relatively intuitive. I want to use […]
Post Deployment Script, 72006: Fatal scripting error: Incorrect syntax was encountered while parsing
The Problem You create a post deployment script, with a statement like; [sql] :r .\Static Data\Insert Seed Values.sql [/sql] The system throws an error and […]
SSDT generate script throws an “object not set to an instance of an object” error
The Issue I created a Visual Studio Database project by scripting the code directly off the server in question. When I then try to publish […]
How to use SQLCMD variables for a Linked Server Connection with Intellisense
The Problem For a long time I have struggled with how to correctly setup a SQL Server Database project. The main sticking point is to […]