The following are two ways to configure the SQL Server database recovery model.
Set recovery mode with T-SQL
You can modify the recovery mode of the database by using the "ALTER database" command plus the "SET RECOVERY" statement. For example, the following query statement sets the recovery mode for the "AdventureWorks" database to the full recovery model.
ALTER DATABASE AdventureWorks SET RECOVERY full ;
You can query the "sys.databases" catalog view to verify the recovery mode status of the database. Statement as follows:
SELECT name, Recovery_model, recovery_model_desc from sys.databases WHERE name = ' AdventureWorks ' ;
You can use the following statement to set the database to bulk operation mode or simple recovery mode, only to be replaced by the "" Location of your own database name on it.
--changing recovery model to Bulk-loggedalter DATABASE AdventureWorks SET recovery bulk_logged Recovery model to simplealter the DATABASE AdventureWorks SET recovery simple ;
When a new database is created, it inherits the recovery model from the model database, which defaults to the full recovery model. To modify the default recovery mode, you can use thealterDATABASE statement to modify the recovery mode of the model databases.
Note that if you plan to maintain a consistent transaction log backup, you cannot switch to the simple recovery model or from the simple recovery model to the other.
Using SQL Server Administration Tool (SSMS) to modify the recovery model
You can modify the recovery mode of the database in SQL Server Administration tools. In the Object Browser, right-click your database (under the Database node), and click Properties. In the Database Properties dialog box, click the Options tab, and then modify the recovery mode as follows:
The above two methods of configuring the SQL Server database recovery model are not mastered, and later encountered similar situation can try to configure, I hope this article for everyone's learning help.