Blocked When Dropping Databases

By Greg No comments

We have a database that we refresh every night with data from our production system. This is so that we can do a final test with real data when required. The first step of the job kills all of the users connections, however one of the applications that our developers runs tries to reconnect again […]

Updating Let’s Encrypt SSL Cert on Synology NAS

By Greg No comments

I have a Synology NAS at home and it’s awesome. With access to most things now done over a secure channel (e.g. HTTPS) it’s really annoying to not have a valid certificate issued by an authorised authority. Synology is aware of the problem and so have made it super simple to get a certificate from Let’s […]

Asking for Help

By Greg No comments

I always think it’s a great idea to ask for help. When I was a kid, my parents taught me that it’s always a good idea to ask for help – the worst that will happen is they’ll say no. In IT there is too much to learn so I always think it’s a great idea […]

Dangers Patching Reporting Services in a Scale Out Environment

By Greg No comments

Recently, I did regular patching of SQL Server, upgrading to SQL 2014 SP2 CU3. Normally this goes without any problems and we had tested it out in our test environments, but this time it took all reporting services offline. What happened? We upgraded the DR server like normal, but in doing so it upgraded the SQL […]

Can you use a case statement as part of a join?

By Greg No comments

I had a question yesterday about whether or not you can use a case statement as part of a join condition. I was pretty sure the answer was yes, but we can always just run a simple test to prove it. It’s a pretty simple test to setup, I’m going to create 2 tables, populate them […]

GitLab Data Loss

By Greg No comments

Overnight (at least in Australia) GitLab had a little problem: We accidentally deleted production data and might have to restore from backup. Google Doc with live notes https://t.co/EVRbHzYlk8 — GitLab.com Status (@gitlabstatus) February 1, 2017 At the time of writing this, it looks like GitLab has lost about 6 hours of data that it will […]

Run SSMS as a domain user on a different domain

By Greg 5 comments

Like a lot of companies that use Windows, my PC is connected to a domain and this is great when I’m connecting to the companies SQL Servers using Windows Credentials in SSMS because it “just works”™. But sometimes I need to VPN to another domain and connect to SQL Servers on the other domain using Windows Credentials. […]

Cleanup Backup History

By Greg No comments

While looking at long running queries today I noticed that one of our worst performing queries was a monitoring tool that checked when the last backup ran. SELECT database_name = DB_NAME(DB_ID([database_name])) ,         type = [type] ,         backup_start_date = MAX([backup_start_date]) ,         backup_finish_date = MAX([backup_finish_date]) FROM    msdb..backupset WHERE   DB_ID([database_name]) IS NOT NULL GROUP BY DB_NAME(DB_ID([database_name])) ,[type] I had […]

CDC Jobs missing after Database Restore

By Greg No comments

We use Change Data Capture (cdc) in our production environment on a few tables so we can do some asynchronous processing of data. Our developers have a pre-deployment environment which is a nightly restore of our nightly backups (this has an added bonus of testing our nightly backups). Usually the testers don’t care about testing the CDC […]

Failing Mirror Backups

By Greg No comments

Failing Backups! Is there anything more worrying for a DBA? Recently we have been having multiple failures a week for our full and differential backups. We use Ola Hallengren’s backup scripts, and unless you are using a 3rd party product, you should be using Ola’s scripts as they are amazing and so simple to use. We […]