olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

Diff backup of new database created fom another database is not being converted to full. #800

Closed DBAFaiz closed 2 weeks ago

DBAFaiz commented 7 months ago

We have a 3rd party app that creates a database from another database backup. Even though the @ChangeBackupType = 'Y' , maintenance script is not running a full backup for this database as "differential_base_lsn" is not null for the newly created database.

olahallengren commented 3 weeks ago

This is by design. The database backup that the database was restored from counts as a full backup in this case.

The logic in the script only works if the database was created using CREATE DATABASE.