SQL DBA Blog: Home

  • DBA Scripts: Blocking and Locking

    Part of the DBA-Tools Project, in the Performance and Troubleshooting area. “The database is slow” and “the database is blocked” look identical from the outside, timeouts, a frozen application, users complaining, and the fix is completely different depending on which one it actually is. Four scripts on this site cover the full picture: finding the…

    read more

  • DBA Scripts: Generate Backup and Restore Scripts

    Part of the DBA-Tools Project. Stop Hand-Typing Database Names Into Backup Commands Writing a one-off BACKUP DATABASE or RESTORE DATABASE command for a single database is trivial. Doing it correctly for every database on an instance, with a consistent naming convention, the right options, and none typed by hand, is where mistakes creep in: a…

    read more

  • DBA Scripts: Backups and Recovery

    Part of the DBA-Tools Project. Backup and recovery is the one area of SQL Server administration where “probably fine” isn’t good enough, a backup you haven’t verified restores is a belief, not a backup. Nine scripts across this site cover the whole lifecycle: what recovery model each database should be in, whether backups are actually…

    read more

  • DBA Scripts: Get Open Transactions

    Part of the DBA-Tools Project. The Transaction Nobody Remembered to Close An open transaction that never commits or rolls back is one of the quietest ways SQL Server gets into trouble: it holds locks other sessions wait on, it stops the transaction log from truncating, and none of that shows up as an error anywhere,…

    read more

  • DBA Scripts: Get Recovery Model Audit

    Part of the DBA-Tools Project. The Mismatch That Fills a Disk A database’s recovery model is a promise about what kind of restore is possible, FULL and BULK_LOGGED promise point-in-time recovery, backed by log backups; SIMPLE promises none, and truncates the log on its own. The incident happens when reality doesn’t match the promise: a…

    read more

  • PARALLEL_REDO_TRAN_TURN Wait Type in SQL Server

    PARALLEL_REDO_TRAN_TURN is recorded on an Availability Group readable secondary when a parallel redo thread must redo a log record, but a prerequisite log record has not yet been redone by another thread. Some operations demand strict ordering, page splits and the creation of forwarded records in heaps are the documented ones, and when their log…

    read more

  • PARALLEL_REDO_TRAN_LIST Wait Type in SQL Server

    PARALLEL_REDO_TRAN_LIST is recorded when the main parallel redo thread on an Availability Group replica needs access to the shared list of transactions currently being redone. That list is mostly the working territory of the parallel redo worker threads, so the main thread’s occasional visits usually get straight in, and this wait stays rare. Another of…

    read more

  • PARALLEL_REDO_LOG_CACHE Wait Type in SQL Server

    PARALLEL_REDO_LOG_CACHE is recorded infrequently on an Availability Group replica after the main redo thread has hit a bottleneck, that is, following episodes of PARALLEL_REDO_FLOW_CONTROL. It relates to the log cache the redo pipeline reads from, and it appears as an occasional after-effect of the pipeline having been throttled. It is one of the minor bookkeeping…

    read more

  • PARALLEL_REDO_FLOW_CONTROL Wait Type in SQL Server

    PARALLEL_REDO_FLOW_CONTROL is recorded on an Availability Group secondary when the main redo thread has dispatched as much log as it is allowed to the parallel redo worker threads and must wait for one of them to finish before dispatching more. The same wait can also appear during crash recovery of a standalone database, which uses…

    read more

  • DBA Scripts: Get Log Reuse Waits

    Part of the DBA-Tools Project. The One Question That Actually Matters A transaction log that won’t stop growing, or a log backup job that suddenly can’t keep up, always comes back to the same underlying question: what is this database’s log actually waiting on before it can reuse space? SQL Server tracks the answer directly,…

    read more