Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily create database snapshots. This new version fixes a bug that we've found in version 2 where snapshots will fail for databases with multiple data files. We've also added the @STMTOnly parameter, allowing you to generate the scripts for creating the required... Continue Reading →
Time to Revive our YouTube Channel
It's been forgotten about and neglected for few years but I've decided to dust off the cobwebs and revive our YouTube channel. Keep an eye on it, every new blog post will now also include a video demonstration as well as there being regular SQL news bulletins and other content. We'll also be going back... Continue Reading →
Why Not Just Use VARCHAR(MAX)?
A while ago I was looking into some odd errors that were cropping up in an application, when I spotted that all the columns in a table were defined as VARCHAR(MAX). I'm sure that we've all seen instances of when that's been done before? When I mentioned to the developer that it's probably not the... Continue Reading →
Distributed Availability Group Dashboard
The Distributed Availability Group Dashboard can be downloaded from our GitHub repo. https://github.com/SQLUndercover/UndercoverToolbox/blob/master/DAG%20Dashboard.pbix. This comes off of the back of my last post looking at using a distributed availability group (DAG) to help facilitate a SQL server migration. SQL Server Migration Using a Distributed Availability Group One thing that I mentioned in that post was that,... Continue Reading →
SQL Server Migration Using a Distributed Availability Group
SQL Server migrations are a headache, ask anyone who's been through the pain of moving a reasonably large server and I'm sure they will agree. There are all sorts of methods out there for getting the data over to our new server. We can simply backup the databases and restore them to their new home.... Continue Reading →
Explicitly Defining Values in an IN Clause VS Putting Them into a Temp Table and Use a Semi-Join
This post comes off the back of my last, where I looked at issues caused by explicitly declaring a large number of values in an IN clause. The query processor ran out of internal resources and could not produce a query plan – When You’ve Managed to Confuse SQL With a Crazy IN Clause. My... Continue Reading →
The query processor ran out of internal resources and could not produce a query plan – When You’ve Managed to Confuse SQL With a Crazy IN Clause.
Recently I received a cry for help over Teams. The issue was that an application was throwing up the following SQL error, The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very... Continue Reading →
Rebuilding a SQL Server Database Transaction Log
"Could you help me, we deleted the database's transaction log file and now that database is stuck in 'Recovery Pending'?" This was a panicked call that I received a few weeks ago. "Sure, no problem" said I, "we'll have to restore back to your last backup" And then things went silent for a while before... Continue Reading →
Undercover Catalogue 0.4.5 Released – Database Module Bug Fix
Full documentation on the Undercover Catalogue can be found HERE We've spotted a bug in the Databases module where an unprintable ASCII character was being inserted at the beginning of the file paths. This has caused a few problems when generating reports on that field. This is was likely only a problem if you don't use... Continue Reading →
Backup SQL Server to AWS S3 Bucket (2022 Update)
Way back in the mists of time I wrote a post on how to backup SQL server to an S3 bucket using TNTDrive, https://sqlundercover.com/2018/06/18/backup-your-on-premise-sql-server-directly-to-an-aws-s3-bucket/. Back then, if we wanted to backup SQL to S3 we needed to use a third party tool. Since SQL 2022 things have changed and we've now got the option to... Continue Reading →
