To determine which SQL Server database restore you need, you first have to answer three questions: what state must the database return to, what backups exist to get it there, and what recovery model the database used. The restore type follows from those answers, not the other way around. A full restore rewinds to the backup's moment; a log restore can stop at a specific point in time; a piecemeal or page restore targets a narrower problem. Getting this wrong usually surfaces late, when SQL Server reports that the log chain is broken or that the target recovery point isn't reachable. This guide walks through the decision in the order a DBA actually faces it, from reading the backup history to verifying the recovered database.
Start With the Question the Restore Must Answer
Restore planning begins with the failure, not with the backup files. SQL Server supports several restore scenarios, and each maps to a different kind of loss. A dropped table needs a point in time before the drop, recovered into a separate database. A corrupted data file on one volume may only need a page or file restore. A failed server needs a full rebuild from the latest full backup plus everything after it. A development refresh needs a copy of production but no recovery to a precise second. Naming the scenario first prevents the common mistake of restoring the newest full backup when the real requirement was the state twenty minutes before a bad deployment.
The second input is the recovery objective. Two numbers matter: how much data loss is acceptable, and how long the restore can take. Those tolerances determine whether a point-in-time log restore is mandatory or whether a nightly full is sufficient. Write both down before opening SQL Server Management Studio, because they constrain the option list. A restore that satisfies the data objective but misses the downtime window is a failed restore from the business's perspective.
Prerequisites Before You Choose a Restore Type
Several facts must be confirmed before selecting a restore. Skipping this lead-in is where most restores go wrong.
Permissions. Restoring requires membership in the sysadmin or dbcreator fixed server roles on the target instance, plus read access to the backup files. If the files sit on a network share, the SQL Server service account needs read permission on the share, and restores from UNC paths have their own constraints compared with local drives.
Edition and version. A database backup from a newer major version cannot be restored on an older instance. A backup from Enterprise Edition that used features unavailable in Standard Edition will restore but may fail during upgrade or leave the database unusable. Check the source version with SELECT @@VERSION on the original server if it still exists, or read the backup header as shown below.
Disk space. A restore needs free space for the data and log files the backup describes, and those files may be larger than the backup because backups compress data and skip empty pages. Estimate the target size from the backup header's backup size and check the destination volume before starting.
Log chain availability. If the plan involves a point-in-time restore, every log backup from the last full or differential through the target time must exist and be readable. A single missing log backup truncates the chain, and no amount of later log files will close the gap.
Exclusive access. The target database must not be in use during a restore. Users must be disconnected or the database placed in single-user mode for certain operations. A restore into a different database name avoids this conflict entirely and is often the safer path for investigation.
Read the Backup History First
Before choosing anything, inventory the backups. Two commands do most of the work.
RESTORE HEADERONLY FROM DISK = 'D:\backups\Sales_FULL_20261112.bak'; returns one row per backup set in a file or set of files, with the database name, backup type, backup start and finish times, server and database version, recovery model, and whether the backup is a copy-only backup. Backup type codes matter: 1 is full, 2 is transaction log, 5 is differential, and other codes cover file and filegroup backups.
RESTORE FILELISTONLY FROM DISK = '...'; lists the logical and physical data and log files the backup contains, which you need for WITH MOVE during a restore to different paths.
For a whole-server picture, msdb holds the history. The backupset, backupmediafamily, and backupfile tables join to show every backup recorded on that instance, with type, start and finish time, and the media path. Querying backupset directly answers the typical question: what is the most recent full backup whose finish time precedes the incident, and which log backups follow it? Note that msdb history exists only if the backups were taken by that instance or a server registered against it; a backup copied from another server won't appear until you read its header.
The key rule: the restore sequence is determined by the backup chain, and the chain is defined by log sequence numbers, not by file timestamps. The backup header records first_lsn, last_lsn, database_backup_lsn, and checkpoint_lsn. For log backups, the first_lsn of the next log must match the last_lsn of the previous one. If it doesn't, the chain is broken and the point-in-time objective is not achievable from those files.
Choose the Restore Type That Matches the Goal
With the scenario and the chain in hand, the restore type follows.
A full database restore restores a single full backup and recovers the database to the moment the backup finished. It's the right choice when the acceptable loss window covers everything after the full, or when no log backups exist, as with a database in SIMPLE recovery model at backup time.
A full plus differential restore restores the most recent full and then the newest differential after it. A differential captures every extent changed since the last full, regardless of intervening differentials, so only the latest differential is needed. This reduces the number of files and often the total restore time.
A full plus log sequence restores the full or differential, then each transaction log in LSN order. This is the only path to a point-in-time restore, which uses WITH STOPAT to recover to a specific datetime. In SIMPLE recovery, log backups aren't possible, so point-in-time recovery is unavailable; the recovery model recorded in the backup header tells you which world you're in. A marked transaction target (WITH STOPATMARK) is a variant for logically bracketed operations.
A tail-log backup captures the active log that hasn't been backed up yet. Taking one before restoring the existing chain preserves the ability to recover up to the failure moment, but it requires the database to be online or at least accessible; if the data files are damaged, use WITH CONTINUE_AFTER_ERROR with caution and understand it may produce an unrestorable backup. If a tail-log backup exists, it is the last file in the chain.
Piecemeal and file/page restores address narrower damage. A page restore repairs specific corrupt pages from a full or differential backup while the database stays online, if the filegroup containing those pages is online. File and filegroup restores bring back only part of the database and are usually combined with log restores to bring the restored portion forward. These are the right answer when the question is "one file is corrupt," not "the database is gone."
Copy-only backups don't reset the differential base and aren't part of the regular chain, which makes them useful for ad hoc copies but means they generally don't substitute for a scheduled full in a log restore plan.
Sequence the Files in LSN Order
Order matters more than anything else in a multi-file restore. SQL Server will refuse a log restore whose first_lsn doesn't match the last_lsn of the restored state, with an error stating the log cannot be restored because there is no prior log backup to restore or the log chain is broken. That message is a sequencing diagnosis, not a disk problem.
The practical sequence for a point-in-time recover is: restore the most recent full with NORECOVERY, restore the most recent differential after that full with NORECOVERY, restore each log backup in order with NORECOVERY, and make the last restore (often a tail-log backup) either WITH RECOVERY or WITH STOPAT. The NORECOVERY option leaves the database in a restoring state so subsequent files can be applied; RECOVERY, the default, brings it online and ends the sequence. Using RECOVERY too early is the most common cause of "the log or differential backup cannot be restored."
A worked sequence for a database called Sales, with an incident at 14:05 on November 13, 2026, and a nightly full at 01:00 plus log backups every 15 minutes:
1: RESTORE HEADERONLY on the full backup to confirm type and finish time. 2: RESTORE DATABASE Sales FROM DISK = '...\Sales_FULL_20261113.bak' WITH NORECOVERY, REPLACE; 3: Restore each log from 01:15 through 13:45 with NORECOVERY, in header finish-time order. 4: Optionally take a tail-log backup of the damaged Sales if accessible, then restore it; otherwise stop at 13:45. 5: RESTORE LOG Sales FROM DISK = '...\Sales_LOG_20261113_1345.trn' WITH RECOVERY, STOPAT = '2026-11-13T13:59:00';
STOPAT is inclusive of transactions committed at or before that second; the target time is a business decision that should sit just before the bad change. If the database recovers cleanly, the recovered state is the state as of the last applied transaction at or before the STOPAT time.
Point-in-Time Scenarios and the Limits of Each
A point-in-time restore is only as precise as the log chain and the recovery model allow. In FULL and BULK_LOGGED recovery, log backups preserve enough information to recover to a time for most operations, but BULK_LOGGED operations such as bulk inserts and index rebuilds are minimally logged, and a point-in-time restore that reaches a minimally logged transaction may not be able to rewind mid-transaction; the target time generally has to fall at a transaction boundary that the log supports. In SIMPLE recovery, no log backups exist, so the closest recoverable point is the last full or differential backup.
An edge case worth knowing: a named mark placed in a transaction lets you restore WITH STOPATMARK = 'mark_name', which stops just after that marked transaction instead of relying on the clock. This is more robust than a timestamp when the business can place the mark at a known safe moment.
A second edge: if a log backup was taken in COPY_ONLY, it's a valid backup but doesn't affect the chain; mixing it in is fine for investigation but the regular chain still needs to be intact for point-in-time recovery.
The practical limit is arithmetic: recovery point = finish time of the last applied log backup or the tail log, whichever applies, adjusted by STOPAT. If you lack a log that covers the target time, the achievable recovery point is earlier than the objective, and the honest answer is that a point-in-time restore to the desired second isn't possible with the available files. Say that explicitly rather than attempting RESTORE with a time beyond the chain.
Relocate Files With MOVE When the Target Layout Differs
RESTORE FILELISTONLY returns logical names and original physical paths. If the target instance stores data on different volumes or a different naming convention, a restore will attempt to write the original paths and fail if they don't exist or collide with a live database. WITH MOVE lets each logical file map to a new physical path, and the list of files must come from FILELISTONLY for the backup being restored.
A relocation restore resembles:
RESTORE DATABASE SalesTesting FROM DISK = '...\Sales_FULL_20261113.bak' WITH MOVE 'Sales_Data' TO 'E:\Data\SalesTesting.mdf', MOVE 'Sales_Log' TO 'L:\Log\SalesTesting_log.ldf', NORECOVERY, REPLACE;
Subsequent differentials and logs restore under the same database name and don't need MOVE repeated; they continue writing to the mapped paths. REPLACE is required when overwriting an existing database of the same name and should be treated as destructive. Restoring to a different database name (SalesTesting above) is the standard technique for investigating without touching the live copy, and it avoids the exclusive-access conflict entirely.
Restoring a Database Into a New Destination Safely
When the objective is forensic or comparative, restore into a separate database and then inspect it. This pattern avoids disrupting users, respects the four-eyes principle for production changes, and lets the original and recovered state be compared. Steps: restore under a distinct name with NORECOVERY through the chain, finish with RECOVERY, then query both databases. For a table-level recovery, a common approach is restoring to a point in time, copying the table's data into the live database with INSERT … SELECT, and dropping the recovery database afterward.
Check success of a completion restore by querying SELECT name, state_desc, recovery_model_desc FROM sys.databases WHERE name = 'Sales'; state_desc should read ONLINE. For a NORECOVERY staging restore, it reads RESTORING, which is the expected state between files. Querying the database in the RESTORING state fails, so a failed SELECT there is not an error in the restore.
Verify the Restored Database and Account for the Recovery Model
A restore is not finished until it's verified. Four checks catch most problems.
Online state. The sys.databases query above confirms ONLINE versus RESTORING. A database stuck in RESTORING usually means a restore sequence was abandoned; it can be brought online with RESTORE DATABASE ... WITH RECOVERY without re-restoring, provided no more files are wanted.
Consistency. DBCC CHECKDB on the recovered database confirms the pages the restore wrote are internally consistent; a hardware problem on the source can yield a backup that restores cleanly but fails CHECKDB. Run it after recovery, not during NORECOVERY.
Data spot-checks. Query row counts and recent transactions around the recovery point. Compare a known table's row count with expectations from the incident timeline. For STOPAT restores, confirm the bad change is absent and the last good change is present.
Recovery model of the recovered database. The restored database retains the recovery model recorded in the backup. A database restored for investigation may be in FULL recovery and start accumulating log if someone runs workload against it; a recovery database that's read-only or a good candidate for SIMPLE recovery should be handled deliberately. A restored copy used for testing doesn't need to inherit FULL logging.
Also confirm the file paths and sizes: a restore where a file was mapped too small on the destination NTFS volume can fail late with a disk-full error, and the recovery won't be complete.
Common Failures and Their Stop Conditions
"The log or differential backup cannot be restored because there is no prior log backup to restore." The sequence is wrong or a file is missing. Check the header's first_lsn against the previous file's last_lsn and reorder or locate the gap. If the file is genuinely missing from the chain, the point-in-time target is unreachable; decide whether an earlier recovery point is acceptable.
"The backup set holds a backup of a database other than the existing database." The database name doesn't match; use MOVE with a new name or REPLACE deliberately.
"Exclusive access could not be obtained." Another session holds the database. Take it offline, drop connections, or restore under a new name.
Disk-full during restore. Estimate target size from the header and check free space; increase the volume or map files elsewhere.
Version mismatch. A newer-version backup won't load on an older instance. Rebuild on an instance at the same or newer version.
Restore hangs or is very slow. Large databases and slow storage make restores long; instantaneous file initialization, if available, speeds file creation. A hanging restore with no progress should be checked for a storage problem before being killed. When a manual restore sequence has failed repeatedly because of suspected corruption in the backup media or the source storage, stop and involve the storage or backup administrator rather than attempting repeated restores with CONTINUE_AFTER_ERROR, which can return an unusable database.
A Decision Checklist to Confirm Before You Press Restore
Before executing, confirm each line: the business objective and acceptable loss; the recovery model of the source at backup time; the full backup's finish time and version; whether the chain includes all needed logs and a tail-log backup; the LSN continuity between files; the target instance's edition and version; disk space for the estimated size; the file mappings; whether the restore is to a new name; the STOPAT time, if point-in-time; and the verification plan. A restore that passes this checklist is a decision, not a guess.
The core discipline is simple: define the objective, read the header and history, follow the LSN chain, use NORECOVERY until the last file, and verify the state you got. Everything else is detail around that spine.