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 →
Connecting to a Remote Instance of SQL Server Using Python
SQL Server's integration of Python has been heavily marketed towards the machine learning and BI guys, but does it offer anything for the DBA? All the attention has been on machine learning, so much so that for a while I didn't pay it any attention at all, but then I got thinking to myself. DBAs... 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 →
Failed to perform AlwaysOn Manual Failover using the wizard – Availability-group DDL Operations are permitted only when you are using the master database .
Routine maintenance rolls around and it's time to failover your AG's to new Primary's to allow for patching and restarts... the weapon of choice will be the SSMS Failover wizard - and why not its does the job nicely and give us some nice visuals as it progresses through each failover. On this... Continue Reading →