I thought I'd give you all a little preview of our latest offering, the Undercover Catalogue which should be available in Preview version very soon. So what actually is it? The Undercover Catalogue will help you to build up a picture of your entire SQL infrastructure. It'll go out, discover and interrogate all of your... Continue Reading →
Resend an email sent from SQL Server using TSQL
Sometimes emails from SQL Server go missing, especially when you share an inbox with colleagues. On most occasions it doesn't always matter as the job that generated the email can simply be re ran to produce the email once again, but what about those emails that contain time specific information? we cannot simple just kick... 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 →
sp_AGReconfigure 1.1 is now available
sp_AGReconfigure 1.1 is now available HERE and on GitHub V1.1 includes a new Parameter and some minor bug fixes: @Readable NULL - DEFAULT: Ignore Readable secondary check (acts as though you are using V1) 0 - Produce a statement to switch readable secondary off if switched on 1 - Produce a statement to switch readable... 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 TOOLBOX: sp_AGReconfigure – Manage Always on Sync & Failover settings from a single stored procedure.
08 Jan 2018 - V1.1 released - Details here Most of the time the goto is to use the GUI which is a nice graphical way of doing it which can make configuring the settings somewhat easier , but this comes with a cost - the cost being time! I have lost count of the... Continue Reading →
UNDERCOVER TOOLBOX: Using Python To Copy A SQL Login From One Server To Another
Recently I've been thinking about Python and whether it can be useful to the DBA as well as the data scientist. One good use that I have found for it is to copy logins from one server to another. There are plenty of times when you might want to copy your SQL logins (including the... Continue Reading →
UNDERCOVER TOOLBOX: Find Untrusted Foreign Keys and Orphaned Key data
SQL Server tracks untrusted Foreign keys in sys.Foreign keys with a column called is_not_trusted, there may be a number of reasons why a Foreign key may have become untrusted below are a couple of examples: Foreign key was disabled using the 'NOCHECK' option then re-enabled using 'CHECK' (not to be confused with 'WITH CHECK') Foreign key was... Continue Reading →
How Far Has My Update Got? Finding Out How Many Rows Your Long Running Insert, Update or Delete Has Actually Modified So Far
I'm pretty sure that we've all found ourselves in the situation where we've run an INSERT, UPDATE or DELETE script and it seems to be taking an age to run. We've done all the usual checks, there's no blocking going on, things are happening but it just seems to be taking an age to finish. ... Continue Reading →
UNDERCOVER TOOLBOX: sp_Snapshot – The Easy Way To Create Database Snapshots for One or Many Database
This post refers to an older version of this procedure. Please see HERE for the latest version. sp_Snapshot is a procedure that we've written to quickly and easily create a database snapshot of one or multiple databases. Prerequisites sp_Snapshot uses STRING_SPLIT, if you're running on a version of SQL Server prior to 2016 or have... Continue Reading →
