Production operations
Backup, restore, RPO and RTO
A backup is insufficient until recovery is tested.
Understand the concept
Full backups provide a base copy; differential backups capture changes since the applicable full base; log backups preserve log-chain changes. Recovery model determines available log-backup and point-in-time scenarios. Copying live database files is not a reliable backup strategy.
RPO is tolerated data-loss time; RTO is the target recovery duration. Backup frequency, off-site storage, encryption and restore drills must support these goals. RESTORE VERIFYONLY alone does not prove application recovery; isolated restoration and data/application checks are necessary. These examples neither write backup files nor overwrite databases. Real restoration belongs in a separate environment under an operational procedure.
Plan measurable disaster recovery.
Treating a successful backup message as a tested recovery.
One topic. Three levels of depth.
SELECT name, recovery_model_desc FROM sys.databases WHERE name = DB_NAME();Reads the recovery model.
This page does not execute SQL. Practise in the downloadable SqlStudioLab using SSMS. Before rerunning temporary-table examples, remove only the relevant #table. Views, procedures and functions create persistent lab objects; never use a production connection.
Try it yourself first.
Report the lab recovery model and access state.
Show the solution and explanation
SELECT name, recovery_model_desc, state_desc, user_access_desc FROM sys.databases WHERE name = DB_NAME();This is input to a backup plan, not creation of a backup.