Towards the end of last year I was writing .net core AWS Lambda. I was super impressed with how .net core (and even PowerShell) works on Linux. I would have to say C# is by far my favorite programming language, the only exception might be T-SQL and the idea of being about to write code and get it to run on Linux is amazing. Mainly because Linux servers are, to be blunt, cheaper....

June 8, 2018 · 2 min · matt40k

Renaming a SQL Server

So you’ve renamed your SQL Server, but something isn’t right. Returns the old name. The fix is simple. You just need to restart the SQL instance and @@servername will return the correct name. More info on the Microsoft Docs. On a similar note, Octopus Deploy has similar annoyance, the server name doesn’t update for the server node. Again simple fix for this simple annoyance: The other thing that can get missed is the SQL Jobs....

May 7, 2018 · 1 min · matt40k

SSRS Error - There is an error in XML document (2, 2)

I got this error when opening an SSRS project in Visual Studio. The solution. Upgrade SSDT. Turns out my colleague had a higher version of SSRS component - if you go, within Visual Studio, Help > About it will give you the version number of Visual Studio then the individual component versions.

March 20, 2018 · 1 min · matt40k


Here are a few of my predictions based on my experiences over the last few months. First. Azure Data Catalog is going to be massive in the near future (18 months). The (hopefully) future integration with the new SQL Data Discovery and Classification is going to help massively with GDPR. Secondly, Chris Webb is going to become very popular. With Azure Analysis Service, the big question is optimize or scale. The killer feature for any monitoring tool aimed at the BI market is going to have to answer that question....

February 27, 2018 · 1 min · matt40k

Bye bye Startcom

In the old days, you would have to throw money at a trusted Certificate Authority (CA) who would sell you a SSL certificate. The alternative was to self-sign or use someone like cacert, the problem is out-of-the-box, no browser\OS supports this so you get a security warning, which isn’t something you want when your trying to be secure. StartCom, was a trusted CA who issued free SSL certificates. Microsoft Internet Explorer, Google Chrome, Mozilla Firefox all trusted StartCom which means you could get a free SSL certificate without the warnings....

December 3, 2017 · 3 min · matt40k

Troublesome CSV

Another day, another source of bad data. This time, it was a CSV. As you can see, the format changes mid file. This makes importing tricky. The way I tend to handle importing into SQL is to create staging tables with all the columns defined as varchar, then, once its imported into SQL, then convert it. The problem occurs when you try to determine the number of columns required. Traditionally, we let the system auto determine how many columns we have, and if we have headers, define the names, unfortunately because the format changes we can’t do this otherwise it will ignore the additional columns - assuming the first row doesn’t contain all the columns....

December 3, 2017 · 1 min · matt40k


Serverless doesn’t somehow make your code run without physical servers. You still need servers, it’s just your treating your servers like you would code. However, it goes beyond just infrastructure as code (IaaS), it’s utilizing the cloud. Let’s get something clear, the cloud is nothing more than someone else’s server and for this post, I’m defining the cloud as any service provider who allows you run compute by the millisecond. The reason the cloud is such a major thing is that it allows you to treat commodity hardware as a commodity....

November 23, 2017 · 4 min · matt40k

Turbo SQL 2017 backups

Another day, another Twitter awesome moment, Parikshit Savjani was explaining how backups are now faster in SQL Server 2017. How we made backups faster with SQL Server 2017 https://t.co/NNf5cLuBJx — Parikshit Savjani (@talktosavjani) November 23, 2017 For more info on how, read his post. TD;LR - The wait time before data is actually copied is reduced because the amount of buffers to scan is massively reduced. “…requires only 250 buffers to scan as opposed to 500 Million buffers with former algorithm…”...

November 23, 2017 · 1 min · matt40k

AWS S3 errors

One of the annoying things about AWS S3 is the error messages. Below is an error, see if you can figure out what it’s saying. I’ll give you a hint. We’ve connected and authenticated. Here is another hint, we can read from that bucket. Give up? It’s permissions. Incorrect AWS keys returns a helpful message, so does invalid bucket, as does no access to read bucket

September 30, 2017 · 1 min · matt40k

Nice idea, but pretty holely

So the NHS Hack Day retweet this We're a UK non-profit dedicated to open source in Healthcare. Can anyone help us with some VPS instances? @rackspaceUK @digitalocean @linode — NHoS (@_nhos_) April 30, 2017 Which made me think why is Ubuntu creating a NHS specific distro (OS) and why are they begging for some VPS instances? Turns out, it has nothing to do with either Ubuntu or the NHS. Its a group of people building on-top of Ubuntu, aimed at the NHS....

September 21, 2017 · 2 min · matt40k


Idempotent – something that is repeatable, that remains unchanged in value when repeatedly executed either independently or on by itself. SSRS – SQL Server Reporting Services part of Microsoft SQL Server. Used to deliver static reports that can be viewed via a web browser and exported to a number of formats including Excel, PDF and CSV. SSAS – SQL Server Analysis Services part of Microsoft SQL Server. SSIS – SQL Server Integration Services part of Microsoft SQL Server....

September 21, 2017 · 2 min · matt40k

Cyber Security Insurance

I’ve been thinking lately about how the web industry needs to change in order to improve. Cyber attacks appears to be on the rise and alot of the time they appear to be caused by someone doing something silly. Perhaps this is because everyone is a web developer, it certainly isn’t down to lack of available resources on the matter. Thinking positively about cyber security, the card companies banded together to form PCI-DSS – Payment Card Industry Data Security Standard, with the goal to help businesses process card payments securely and reduce card fraud....

July 5, 2017 · 3 min · matt40k

SSRS support for both US Letter and UK A4

One of those annoying things about the US is they use different paper sizes to us Brits. US Letter is 215.9 by 279.4 mm (8.5 by 11.0 inches) The UK equivalent, A4, is 210 by 297 mm (8.26 by 11.69 inches) One of our customers is based in the UK but has remote sales offices in the US, so their SSRS report are set to A4 and when they printed them in the US offices, the footer is cut off....

June 13, 2017 · 1 min · matt40k

Windows Insider – new features

Today’s Windows Insider email included a few new cool features, here are my Top 3 Do more at once with the new Compact Overlay window. Keep watching a movie or video chat on one corner of your screen — even when switching apps to check email or browse the web. When an app window enters compact overlay mode, it’ll be shown above other windows so it won’t get blocked. Look for updates to the Movies & TV app and Skype Preview app to take advantage of this feature in the near future....

March 13, 2017 · 1 min · matt40k

Rosetta@Home DNS Issue

If you ever need a lesson in the importance of picking a good domain registrar, then read about Rosetta@Home recent problems. Dear Rosetta@Home participants, We — like many of you who have contacted us — have been extremely frustrated by the long project downtime. We (bakerlab.org) had a domain name registration verification lapse, and our registrar (dotster.com) and ICANN turned off DNS for bakerlab.org. We went through the steps to...

March 12, 2017 · 2 min · matt40k

Automating WordPress maintenance

WordPress is an amazing blogging platform. However it does require a fair amount of love. Despite Mythic Beasts managing a large portion of my stack (hardware, OS, Apache, PHP, MySQL) and WordPress having automatic background updates I still find myself logging in and finding pending updates for WordPress. The solution was WP-CLI. With the shell add-on, I SSH onto my account, then What the above script does is download WP-CLI, grant it execute permission, then downloads my script and again, gives it execute permission....

March 9, 2017 · 1 min · matt40k

MSSQL server failed on Ubuntu on Windows 10

I’ve been getting errors with MSSQL server on Ubuntu on Windows 10. The error, Failed to connect to bus: No such file or directory dpkg: error processing package mssql-server (–remove): subprocess installed post-removal script returned error exit status 1 Processing triggers for libc-bin (2.23-0ubuntu5) … E: Sub-process /usr/bin/dpkg returned an error code (1) I managed to fix it in the end by Of course, you should try uninstalling correctly first, which is latter of the two...

March 5, 2017 · 1 min · matt40k

Resident parking

Been trying to find out the following from my local council: How many resident parking permits have been issued How many resident parking bays are available What exactly has the money been spent on in terms of fines issued. To say they are being evasive is an understatement. So far, I’ve got, the response of: _This info is fluid as it is not only static residents who can apply for waivers within a given zone but also agencies who provide medical needs and other statutory services....

March 1, 2017 · 2 min · matt40k

Cloudflare parser bug

So once again we have another major security leak. You can read about it, here and below is the email CEO Matthew Prince wrote to customers: Dear Cloudflare Customer: Thursday afternoon, we published a blog post describing a memory leak caused by a serious bug that impacted Cloudflare’s systems. If you haven’t yet, I encourage you to read that post on the bug: https://blog.cloudflare.com/incident-report-on-memory-leak-caused-by-cloudflare-parser-bug/ While we resolved the bug within hours of it being reported to us, there was an ongoing risk that some of our customers’ sensitive information could still be available through third party caches, such as the Google search cache....

February 24, 2017 · 3 min · matt40k

Caching woes

Caching always seems to cause problems, still, we can’t have it all. Today’s caching problem was to do with Redgate SQL Prompt, a really amazing plugin that helps you write better SQL code. The problem with it is the cache of database object metadata was out-of-date. I had updated a table so when I typed select * then press TAB to expand the * into a list of columns, I got the old names....

February 24, 2017 · 1 min · matt40k

Date Format

I’ve had a problem recently when it can to formatting a datetime as just date where FormatDateTime didn’t work The fix was to change it to Format. Oddly, despite the parameter being a datetime, I found I still had to cast it as a date. FormatDateTime was introduced in Vs 2008. I’m not 100% sure why this didn’t work.

February 22, 2017 · 1 min · matt40k


Another error I hit Warning 1 [rsRuntimeErrorInExpression] The Value expression for the textrun ‘Textbox28.Paragraphs[0].TextRuns[0]’ contains an error: Overload resolution failed because no Public ‘/’ can be called with these arguments: ‘Public Shared Operator /(d1 As Decimal, d2 As Decimal) As Decimal’: Argument matching parameter ‘d2’ cannot convert from ‘TextBoxImpl’ to ‘Decimal’. C:\Projects\Reports\1. Report.rdl Thankfully Google found Qiuyun answer. I was missing the .Value at the end. So (wrong) =ReportItems!Textbox1 Fixed (working)...

February 9, 2017 · 1 min · matt40k

SSRS copy and paste fail

In case you haven’t heard, I’ve started a new job and one of my first tasks was to speed up a SSRS report. One of the first issues I stumbled across was this: An error occurred during local report processing. The definition of the report ‘/1. Report’ is invalid. The Value expression for the textrun ‘Tx412.Paragraphs[0].TextRuns[0]’ contains an error: [BC30456] ‘RdlObjectModel’ is not a member of ‘ReportingServices’ Looking into it the issue it appears its expanded expressions when it got copied – it’s basically making the it fully qualified....

February 9, 2017 · 1 min · matt40k

SSRS 2016 by default

For the past 4 months I’ve been using Visual Studio 2015 rather then Visual Studio 2013 and yesterday, I hit a bug with SSRS (shows how much I love SSRS). The bug appeared when it came to deployment The error was deploying SSRS report Exception calling “CreateCatalogItem” with “7” argument(s): “The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting...

January 10, 2017 · 2 min · matt40k

Swollen SSISDB caused by Continuous Deployment

I recently had incident logged where the drive that hosted SSISDB database filled up on the UAT environment. We had SSISDB set to only keep 2 copies of the projects, however the additional copies are only removed when the SQL job is run – SSIS Server Maintenance job. The SQL job is scheduled to run at 00:00 (midnight) every day, which is the default, which runs two steps SSIS Server Operation Records Maintenance...

January 10, 2017 · 1 min · matt40k