One of the annoying things about working with multiple languages is they each have their differences – obviously, otherwise there would only be 1 language! Although there is good reason to have these differences they still have elements that are a pain. One of the most annoying things, other then “do you require a semicolon at the end of the statement?” is comments. Comments aren’t executed or complied but they help developers read code....

October 16, 2016 · 2 min · matt40k


So oneof the really nice sponsorsat SQL Saturdayhad a vending machine that was rigged up to release a treat when you sent a tweet. Like so I'm at #sqlsatcambridge home of @redgate #redgatetreat #red668 — Matt Smith (@matt40k) September 10, 2016 and give you… In mine had a SQL Promptlicense. At first I was a bit disappointed, I hoping for SQL Testlicense or a full blown SQL toolbeltbut the more I’ve been using it, the more I’m loving it....

October 1, 2016 · 1 min · matt40k

SQL Compare failed

Another day, another problem. Todays problem was incorrect column length which was causing a SSIS package to fail. Historically I use a freeware tool to compare the different environments schema, but lately I just don’t bother, I have continuous deployment so its easier just to hit the deploy button then it is to try and figure it out. Well today I decided I wanted to it old school – although I’ve been using the SSDT SQL compare in my deployments, I’ve not actually used it in terms of viewing the differences....

May 12, 2016 · 2 min · matt40k

Auditing – SSAS

There are various types of Auditing in the Microsoft BI stack. There is auditing in SSRS, SharePoint, SSAS and not forgetting SQL has its own auditing. Today I am looking at the SSAS auditing – you can find out more about it on TechNet. Olaf Helperhas published some TSQL code for querying the audit data -on the Script Center. But first, we need a table to store the data, here is a TSQL script for creating the table:...

March 26, 2016 · 1 min · matt40k


So I’ve been playing wit mapping data, one of the nice things about GitHubis that it supports GeoJSON and automatically renders it With the mapping data already imported into Geographyin SQL Server it was easy enough to convert to GeoJSON (Stackoverflowto the rescue again!)

December 10, 2015 · 1 min · matt40k

Getting collation descriptions

Just an updateas I noticed I forgot to say how to get the names and descriptions of the collations your SQL Server supports

December 10, 2015 · 1 min · matt40k

Problem with ISNUMERIC

Todays problem was brought to you by a highly customizable system with poor user validation and a user who doesn’t know the difference between data and formatting. First the system. The supplier has created a highly user customizable system, they can for example create a web form with zero coding – 100% user config. The problem is, technically, it creates a mess. So your nice new form with a number of questions stores all its answers in a single table with the data going into a nvarchar(max) column – which is fine for free-text columns, but not so good for integer fields....

October 27, 2015 · 2 min · matt40k

Swollen Business Objects database

Our new HR system uses SAP Business Objects for transactional reporting, as this was setup by our HR supplier we haven’t really got involved with it beyond writing a few custom reports, turns out we’ve written quite a few, so much so that the Business Objects CMS database has swollen to over 30 GBs. This, as you might have guessed, is causing a few performance problems. After a discussion with the supplier, we found out it was storing all the reports, even the ad-hoc one-off reports and we should have set a parameter to limit it....

July 19, 2015 · 2 min · matt40k

Created new user is disabled

I’ve created a new SQL user along with a new role in our warehouse db project using Visual Studio 2012. CREATE LOGIN [newuser] WITHPASSWORD='{{ RANDOM PASSWORD }}’,DEFAULT_DATABASE=[Database] GO CREATE USER [newuser] FORLOGIN [newuser] WITHDEFAULT_SCHEMA=[dbo] GO ALTER ROLE [newrole] ADD MEMBER [newuser] GO  Problem is, the user is disabled. When you do it manually via SQL Management Studio, it’s enabled and working. Manually enabling the account doesn’t allow it connect either....

July 14, 2014 · 1 min · matt40k