Full documentation on the Undercover Catalogue can be found HERE It's been a while since the Undercover Catalogue last received an update but having had a few of those moments recently when I thought to myself 'I really wish I was capturing that data', so I decided to roll a few changes into the Catalogue.... Continue Reading →
When was my SQL Server Database Last Accessed?
Your boss walks up to you one morning and says, "Hey, I wanna list of all of our databases and when they were last accessed". If you've got some sort of auditing switched on or a trace or xevent catching this sort of info you might be ok, but I'm betting you don't have any... Continue Reading →
sp_snapshot – The easy way to take database snapshots of one or more databases – Version 2.0
Presenting you with an updated version of our sp_snapshot procedure, to easily create database snapshots. This new version adds more flexibility to the procedure, allowing you to specify the snapshot's suffix, add a timestamp and alter the path that the snapshot files are taken to. Parameters @DatabaseList – a comma delimited string of database names,... Continue Reading →
Write to backup block blob device failed. Device has reached its limit of allowed blocks.
Picture this, you're happily backing up your database to a Azure blob storage until suddenly it starts mysteriously failing with the error... Write to backup block blob device https://****** failed. Device has reached its limit of allowed blocks. What's going on, nothing's changed?! Well, it has, the database has grown and the issue that you're... Continue Reading →
Penetration Testing your SQL Server, Part 1 – The Recon Mission
Since witnessing a rather nasty cyber attack around a year ago, I've been thinking quite a bit about security. Do we really know how secure our SQL Servers are? Penetration testing is a great way to find out where our weaknesses and vulnerabilities are. Ideally you probably want to be getting regular pen tests conducted... Continue Reading →
Finding a History of Database Snapshots, Taken and Restored
All code in this post can be found in our GitHub repo https://github.com/SQLUndercover/UndercoverToolbox This is a question that's come up twice this morning, firstly where can we find a history of database snapshots and secondly where can we find a history of restores from snapshot? Frustratingly, SQL doesn't make this at all easy for us... Continue Reading →
I’ve Got 99 Problems But xp_cmdshell Ain’t One
xp_cmdshell is an extended SQL stored proc that allows users to run Windows command prompt commands from within SQL. Sound scary? It might, but is xp_cmdshell really a security risk? Well a lot of people think so, many DBAs and IT departments will insist that it's always disabled and many auditors and pen testers will... Continue Reading →
Using SQL Alerts to Spot Suspicious Activity in SQL
SQL doesn't really give us too many tools out of the box to allow us to spot when someone may be up to no good. We can look at the number of failed login attempts in SQL's error log. If you start seeing multiple login attempts, especially for SA or any other suspicious looking user... Continue Reading →
Encryption, Comparing your Options in SQL Server
The question of encryption seems to be coming up a lot recently. I've had a number of people asking me about how to go about encrypting SQL Server. SQL can encrypt our data at a number of different levels and gives us a quite a few options when doing so. I want to use this... Continue Reading →
Database Mirroring login attempt failed with error: ‘Connection handshake failed. An OS call failed: (80090302) 0x80090302(The function requested is not supported).
Photo by Pixabay on Pexels.com Here's a quick one for today and is an issue that had me stumped for a while. It's not one that I'd come across before and there isn't really all that much out there on the internet about it. The Issue as I Saw It So, what was the issue?... Continue Reading →