Because the things that I want to summarize are messy, it's a problem.
1. When restoring a database, no tail-log backup is selected, an exception occurs:
This is because for databases that use the full recovery model or the bulk-logged recovery model, in most cases, you must back up the end of the log before you restore the database. If you want to not throw this error
You will need to choose to overwrite the existing database (with Replace).
When you use the REPLACE option, several important security checks that are typically performed during restore are ignored. The ignored checks are as follows:
A restore overwrites an existing database with a backup of another database. With the REPLACE option, even if the specified database name differs from the database name recorded in the backup set,
Restore also allows you to overwrite an existing database with any one of the databases in the backup set. This causes one database to accidentally overwrite another database.
Second, use the full or bulk-logged recovery model to restore the database without obtaining a tail-log backup and without using the STOPAT option.
With the REPLACE option, you lose the submitted job because there is no backup of the most recently written log.
Three overwrites the existing file.
For example, you may mistakenly overwrite files that are of the wrong type, such as. xls files or other databases that are not online, that are in use, and so on. If you overwrite an existing file, you may lose some data even if the restored database is complete.
SQL Server restores those things