For one reason or another data security and encryption has been coming up quite a bit in my day to day work recently and I've started to realise that it seems to be one of those things that people aren't all that aware of. As I've been meaning to write a little series on encryption... Continue Reading →
Generate a Random Number for Each Row in a Query {a better way}
A couple of years ago I wrote a post on how to generate a random number in SQL Server. https://sqlundercover.com/2017/06/22/generating-random-numbers-for-each-row-over-a-specified-range-and-other-funky-stuff-you-can-do-with-them/ It's ok and it works, it's also a method that I used for quite a while. Why not use RAND() I've heard people say, well the issue with RAND() is that it will generate the... Continue Reading →
T-SQL Tuesday #135 – The Tools That Make My Job Awesome!
Blog posts have been few and far between from SQL Undercover lately but what better to try and get us back in the swing again than with T-SQL Tuesday. This month's invitation comes from Mikey Bronowski https://www.bronowski.it/blog/2021/02/t-sql-tuesday-135-the-outstanding-tools-of-the-trade-that-make-your-job-awesome/ There are so many tools that I use day in and day out to make my life easier... Continue Reading →
Undercover Academy – SQL Server Backup and Recovery – Module 1: Taking and Restoring a Backup
Welcome along to the first module in our Undercover Academy's SQL Server Backup and Recovery course. In this module we're going to look at how to take and restore a full and differential backup. https://youtu.be/rVUuXvJK8XY
sp_RestoreScript 1.7 Released
sp_RestoreScript 1.7 has been released. For information and documentation please visit https://sqlundercover.com/2017/06/29/undercover-toolbox-sp_restorescript-a-painless-way-to-generate-sql-server-database-restore-scripts/ Changes in 1.7 New Parameters @IncludeCopyOnly - 1 - Copy only backups are included0 - Copy only backups are excluded @SingleUser - Put the database into single user mode before restoring @StopAtMark - Append stopatmark clause to any log restores @StopBeforeMark - Append... Continue Reading →
Merry-Go-Round or Advanced Scan
The merry-go-round scan or advanced scan is something that I've seen mentioned a few times recently and it's a lovely little feature of Enterprise Edition that not all that many people seem to know about. The thing to remember here that this is only available in Enterprise Edition, so unfortunately those of you on Standard... Continue Reading →
Find All Heaps In Your Database
This is just going to be a quick post but I was asked the question the other day, how can I find all the tables in the database that don't have a clustered index? Tables without clustered indexes, known as heaps can give you quite a few different performance problems for various reasons. I don't... Continue Reading →
Backup On-Premise SQL Server to Azure BLOB Storage
SQL Server has given us the option to backup our databases directly to Azure BLOB storage for a while now but it's not something that I've had all that much call to use until recently. So this is just going to be a quick walk through on how you can backup your on premise SQL... Continue Reading →
T-SQL Tuesday #127 – Non SQL Tips and Tricks, Referencing Multiple PowerShell Array Elements
This month's T-SQL Tuesday invitation is from Ken Fisher and he's asking about non-SQL tips and tricks. This had me thinking for a bit and then something popped into my head, an accidental discovery that I made the other day. I apologise if this is common knowledge among the PoSH guys but it was a... Continue Reading →
A Bug in ‘Move All Your SQL Database and Log Files in Bulk’
It looks like we had a bug the in the SQL script in Move All Your SQL Database and Log Files in Bulk. No worries though, it's all been fixed now 🙂
