Just a quick post this time , I was fumbling around the DMV's the other day looking for a specific Availability group DMV that I just couldn't remember the name of - I think we have all been there before with some of the DMV names! 🙂 Whilst I was combing through various combinations of... Continue Reading →
SSMS- Source Database ‘Restoring’ After Performing a Restore To a New Destination
"I just tried restoring a copy of my database but now the original's in recovery" That was the panicked question that I was asked earlier today and as it's something that I've seen come up more than a couple of times, I thought I'd write up a lunchtime quickie to explain the issue. If you... Continue Reading →
sp_RestoreScript v1.1 Now Available
Holy Database Restores Batman, sp_RestoreScript 1.1 is now available in the Undercover Toolbox and at UNDERCOVER TOOLBOX: sp_RestoreScript – A Painless way to generate SQL Server database restore scripts. This update fixes an issue that we've found when running on SQL Servers prior to 2016.
Secret Codes And SQL Server, Part 2: Pimp Your Encryption Algorithms.
We had a little play around writing our own encryption algorithms and cracking them in Secret Codes And SQL Server, Part 1: Writing Our Own Encryption Algorithm and Cracking it. I thought I'd see if we can go a step further and start having a look at how we could take those basic ideas and try... Continue Reading →
Scripting out SQL Server Objects without the GUI
I quite often find myself scripting objects out via T-SQL rather than using the GUI, it's not that I have anything against using the GUI to script out a Stored procedure, it's just that sometimes this can be time-consuming especially when there are alot of stored procedures in the Programmability folder. I know that... Continue Reading →
Using the SQL Error log to help log meaningful errors for your Automated Restore jobs.
In one of my previous posts I went over a scenario where an Auto restore job was logging Restore errors to a table and the error that was being inserted was '3013 - RESTORE LOG is terminating abnormally' and this was due to SQL Server only providing the Last most error produced which is stored... Continue Reading →
Secret Codes And SQL Server, Part 1: Writing Our Own Encryption Algorithm and Cracking it.
After my last post on  The Arcane Science of Bitwise Logic and SQL Server I was asked a couple of questions on where it's used so I thought I'd write a follow up post.  At first I was going to write something on bitmaps but then a thought of another area where bitwise logic is... Continue Reading →
The Arcane Science of Bitwise Logic and SQL Server
Bitwise logic, it seems is one of those ancient areas of computing that's only remembered by those old guys that have been kicking around for years. Â But what is it and how can we use it in SQL? Before we start looking at bitwise logic and the bitwise operators, we need to have a quick... Continue Reading →
Upgrading our Test lab from SQL 2016 to 2017 CTP with Always On Availability Groups
At SQLUndercover we decided it would be a good idea to not only upgrade our test lab but to treat it as if it were a live system carrying out an in place upgrade with minimal downtime, here's how we did it: Here is our very basic setup for this scenario, we have two availability... Continue Reading →
Joining Datasets Side by Side, in Their Natural Order When There’s No Common Key
Here's a little something that came up the other day, we've got a couple of tables which we need to join together but there's no common key to join on. Â How do we go about attacking this? As an example consider the following, we've got two comma delimited strings that we need to join together.... Continue Reading →
