Home > Storage > Data Storage Essentials > AppSync > Dell AppSync Integration with Microsoft SQL Server > Restoring damaged databases
Damaged databases may have a datafile missing or damaged with their log files still intact. Tail log backups capture the tail of the log even if the database is offline, damaged, or has a missing datafile. AppSync can take tail log backups for damaged databases. A damaged database must not contain bulk-logged changes, and it must not be in an OFFLINE state.
If the production database is damaged and the Database is damaged check box is selected, AppSync backs up the tail log of the damaged database before proceeding with the restore. A damaged database can be in a RECOVERY_PENDING or SUSPECT state. AppSync first tries to detach the database by setting EMERGENCY mode. If AppSync fails to set the EMERGENCY mode on the database, it drops the database, and then proceeds with the restore. Once the restore operation is successful, continue to recover the database manually using the tail log backup.
For this case, the BACKUP LOG statement is run with either NO_TRUNCATE or with CONTINUE_AFTER_ERROR option. The Truncate the transaction logs and Overwrite existing backup files options are not available when you select the Database is damaged option.
For cases where there are other ONLINE affected databases that were protected along with the damaged database, AppSync does not apply the damaged database scenario on any of them. Instead, they are taken offline, detached, and then restored. The BACKUP LOG statement is run with the NO_TRUNCATE option for all such databases.