Live registration reopens October 1, 2026, in 11d 18h 19mNotify me

Backup, Restore, and Database Integrity

Backup design, restore testing, integrity checks, and corruption response.

292 associated posts117 primary posts

Production DBA

Synchronous Always On Availability Groups Is Not Zero Data Loss

In theory, when you configure AlwaysOn Availability Groups with synchronous replication between multiple replicas, you won't lose data. When any transaction is committed, it's saved across multiple replicas.

That's the way it works, right? I mean, except when you restart your synchronous replicas, or patch them, or they just stop working for any number of reasons. The primary keeps right on trucking, accepting deletes/updates/inserts, without telling end users that all their eggs are in a single basket.

Read more about Synchronous Always On Availability Groups Is Not Zero Data Loss 29 comments — Join the discussion

The Easiest Way to Restore Transaction Logs to A Point In Time (Spoiler: Use AmazonRDS)

... is to use a SQL Server where a robot does it for you! Let's take a look at how you can do this in AmazonRDS's hosted SQL Server these days.  Normally, restoring transaction logs is super tedious. You've got to restore all the files in the right order, for every single database. Even if…

Read more about The Easiest Way to Restore Transaction Logs to A Point In Time (Spoiler: Use AmazonRDS) 28 comments — Join the discussion
T-SQL & Development

Replication Won’t Refresh Your Dev and Pre-Production Environments

At first glance, SQL Server's transactional replication seems like it's useful for moving data around in all sorts of situations: it works in Standard Edition, it's not synchronous, and you can have multiple subscribers.

Why People Want Replication to Test and Pre-Production Environments

Read more about Replication Won’t Refresh Your Dev and Pre-Production Environments 20 comments — Join the discussion
Production DBA

How to Configure Always On AG Backups with Ola Hallengren’s Scripts

With SQL Server AlwaysOn Availability Groups, you can offload backups to a replica rather than running them on the primary. Here's how to do it:

1. Install Ola Hallengren's utility scripts on all of the replicas. During the install, it creates a laundry list of SQL Agent jobs, but doesn't set up schedules for any of them. More on that in a couple of steps.

Read more about How to Configure Always On AG Backups with Ola Hallengren’s Scripts 91 comments — Join the discussion

Upgrading to SQL Server 2014: Frequently Asked Questions

Can I upgrade an existing instance without migrating?

This is nothing against SQL Server 2014, but I can't stand in-place upgrades. Over the years I've had in-place upgrades work flawlessly on a few instances, and then had an install issue cause it to fail in the middle on other instances. Usually the critical instances, just because I'm not always lucky. And when upgrade fails, it doesn't always roll back completely, or allow you to just re-run it. You may be down for a good long time.

Read more about Upgrading to SQL Server 2014: Frequently Asked Questions 36 comments — Join the discussion

Dropping an Offline Database in SQL Server

When you drop a database in SQL Server, the files are normally removed from the file system right away. POOF! Hope you had a backup if you ran DROP DATABASE against the wrong instance.

However, things are a little different if you take the database offline before you drop it. Consider the following code:
[crayon-6aae20384e8ff927616628/]
Here's what S:\MSSQL\Data looks like after I run the whole script, including DROP DATABASE...

Read more about Dropping an Offline Database in SQL Server 23 comments — Join the discussion
Production DBA

How Many Databases Can I Put on One SQL Server?

I've seen servers with thousands of databases on a single SQL Server, and it works. Sure, opening the databases list in SQL Server Management Studio is painful, and a lot of third party monitoring tools fall over, but it's not so bad once you know how to work around these issues.

But there's two issues you can't work around: our old archenemies, RPO and RTO. A quick reminder:

Read more about How Many Databases Can I Put on One SQL Server? 22 comments — Join the discussion

How to Configure Ola Hallengren’s IndexOptimize Maintenance Script

If you're a production database administrator responsible for backups, corruption checking, and index maintenance on SQL Server, try Ola Hallengren's free database maintenance scripts. They're better than yours (trust me), and they give you more flexibility than built-in maintenance plans.

However, the index maintenance defaults aren't good for everyone. Here's how they ship:
[crayon-6aae20384ff5c868587019/]
The defaults on some of these parameters are a little tricky:

Read more about How to Configure Ola Hallengren’s IndexOptimize Maintenance Script 138 comments — Join the discussion
News & Opinion

The Most Confusing Words, Phrases, and Acronyms in SQL Server

Words are hard. Acronyms are even harder. Here's the words that give me the most trouble when talking to people about SQL Server. And thanks to all my Twitter friends quoted here for their suggestions!
Replication
"I have a question about replication..."

"Which kind? Transactional? Merge? Peer to Peer?"

Read more about The Most Confusing Words, Phrases, and Acronyms in SQL Server 13 comments — Join the discussion