This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing an ALTER command to change the recovery model of a SQL Server Database.
We can also change this recovery model using database properties of SQL Server Management Studio (SSMS).
I always prefer to use T-SQL script to perform any database administrator related task because I tried to change the recovery model using database properties of SSMS, and my database crashed, and I don’t know the reason.
We can do using ALTER DATABASE option and most importantly, we should provide WITH NO_WAIT option.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
USE [master] GO -- FULL Recovery Model ALTER DATABASE [Database_Name] SET RECOVERY FULL WITH NO_WAIT GO -- SIMPLE Recovery Model ALTER DATABASE [Database_Name] SET RECOVERY SIMPLE WITH NO_WAIT GO -- Bulk Logged Recovery Model ALTER DATABASE [Database_Name] SET RECOVERY BULK_LOGGED WITH NO_WAIT GO |