Have you ever had the need to give elevated permissions via a stored procedure above that what the user calling the procedure might have? Perhaps you've got a table in your database that contains top secret information and you only want that information to be accessed by via a proc, you're users are denied access... Continue Reading →
Encrypting SQL Server Database Backups
We all go to great lengths to make sure that our databases are secure (or at least I really hope that we do), we make sure that only authorised users have access and then only to the databases and levels that they need. We're careful that all our passwords conform to crazy complexity rules. We're... Continue Reading →
‘Object Reference Not Set to an Instance of an Object’ When Failing Over an Availability Group Using SSMS <= 17.5
Here's a quickie that I've just stumbled across. I've just tried to initiate a manual failover of an availability group and received the following error. After a spot of head scratching and thinking that there was something wrong with my AG setup, it turns out that there's a bug in SSMS. I was running SSMS... Continue Reading →
TempDB Filling Up On Secondary Replicas
Have you ever had an issue where TempDB was filling up on your secondary replicas? Do those secondaries happen to be read only replicas? When I have an issue with tempdb filling up the first thing that I usually do is try to figure out exactly what the space has been allocated to. You can... Continue Reading →
TSQL Tuesday #100: A Look To The Future
So for this month's TSQL Tuesday, Adam Mechanic has asked us to take a look into the future and think about what things might look like when TSQL Tuesday #200 comes around (apparently that'll be June 2026). So I thought I'd have a little bit of fun with this by going all sci-fi on you,... Continue Reading →
UNDERCOVER TOOLBOX: sp_WhatsMyAG
Here's a quick one for you. If you happen to be managing SQL Servers with a large number of databases and availability groups, it can sometimes be difficult to keep track of which database belongs to which availability group. sp_WhatsMyAG will tell you just that. You can either provide it with the database name and... Continue Reading →
Log Shipping – Error: Failed to update database “DATABASE NAME” because the database is read-only
Here's a strange one that I've recently come across. I had a customer report that their log shipping restore jobs were chock a block of errors. Now, the logs seem to have been restoring just fine but before every restore attempt, the job is reporting the error, Error: Failed to update database "DATABASE NAME" because... Continue Reading →
T-SQL Tuesday #99 : Getting Decked Out in Rubber and Lycra, My Non-techy Passion #TSQL2sday
So this month's T-SQL Tuesday invitation comes from Aaron Bertrand. It's a non-technical post this month as he asks us to write about a non-SQL or tech related passion. For me, my passion is Triathlon. I first got hooked on the sport back in around 1998 when I got into it as a way of... Continue Reading →
UNDERCOVER TOOLBOX: Get Details of All Open Transactions
It was 3am in the morning and I was asleep and enjoying a delightful dream (I knew it was a dream because I was surrounded by drifting clouds, singing angels and hundreds of softly humming SQL Servers where the hardware had been sensibly provisioned and all code carefully optimised) when I was rudely awoken by... Continue Reading →
Undercover TV – We’ve got a YouTube channel!
We've now got ourselves a shiny new YouTube channel at UndercoverTV. We'll be using this to host our monthly podcasts as well as the occasional tutorial video and anything else that we might decide to throw together, so pop over there, subscribe and watch out for new content as it gets added. A link can also... Continue Reading →
