Thor Logo dbatools

RecoveryModel

Get-DbaDbRecoveryModel

Viorel Ciucu (@viorelciucu), cviorel.com

Get-DbaDbRecoveryModel View Source Viorel Ciucu (@viorelciucu), cviorel.com Windows, Linux, macOS Synopsis Retrieves database recovery model settings and backup history information from SQL Server instances. Description Retrieves recovery model configuration for databases along with their last backup dates, which is essential for backup strategy planning and compliance auditing. DBAs use this to identify databases with inappropriate recovery models for their business requirements, troubleshoot transaction log growth issues, and ensure backup policies align with recovery model settings.

Read more

Set-DbaDbRecoveryModel

Viorel Ciucu (@viorelciucu), cviorel.com

Set-DbaDbRecoveryModel View Source Viorel Ciucu (@viorelciucu), cviorel.com Windows, Linux, macOS Synopsis Changes the recovery model for specified databases on SQL Server instances. Description Changes the recovery model setting for one or more databases, allowing you to switch between Simple, Full, and BulkLogged recovery modes. This is commonly used when preparing databases for different backup strategies, reducing transaction log growth in development environments, or configuring production databases for point-in-time recovery. The function excludes tempdb and database snapshots automatically, and requires explicit database specification for safety.

Read more