The Problem You have lost or forgotten the SA password for you SQL Server box!! The solution This is really easy to fix. On the […]
Grant Connect SQL Server – TSQL
The issue You are having connection problems to the database and all the permissions look correct but you cannot login. Fire up the SSMS and […]
SQL Server Script user with SID
The Problem When you move sql logins around servers the logins are created with an SID that uniquely identifies the login. Assume you setup two […]
T-SQL Drop temp table if it exists
The Problem I often work in SQL Server with temp tables and they can be a pain when developing as you may have code like […]
Terrible Performance of SQL Server Linked Server query over WAN
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 […]