If you executed the below query then you will get the output of
another query which you need to execute to change the Recovery model
from Full to Simple.
Query:
set nocount on go select 'ALTER DATABASE [' + name + '] SET RECOVERY SIMPLE' from sys.databases where database_id > 6 and recovery_model_desc = 'FULL'
Output:
ALTER DATABASE [DB1] SET RECOVERY SIMPLE
ALTER DATABASE [DB3] SET RECOVERY SIMPLE
ALTER DATABASE [DB6] SET RECOVERY SIMPLE
ALTER DATABASE [DB7] SET RECOVERY SIMPLE
ALTER DATABASE [DB9] SET RECOVERY SIMPLE
Note: The SQL Server have around 15 database and the DB 1,3,6,7,9 only running in Full recovery model. So that you will got the above output copy it and executed like the below.
Query:
Use Master
ALTER DATABASE [DB1] SET RECOVERY SIMPLE
ALTER DATABASE [DB3] SET RECOVERY SIMPLE
ALTER DATABASE [DB6] SET RECOVERY SIMPLE
ALTER DATABASE [DB7] SET RECOVERY SIMPLE
ALTER DATABASE [DB9] SET RECOVERY SIMPLE
Once the above executed successfully please cross verify it randomly by manual check. Now all the database in the SQL server will set to Simple recovery model.
Note:
If the recovery model is in Simple mode then you can't recover the database fully.
Thanks!!!
Query:
set nocount on go select 'ALTER DATABASE [' + name + '] SET RECOVERY SIMPLE' from sys.databases where database_id > 6 and recovery_model_desc = 'FULL'
Output:
ALTER DATABASE [DB1] SET RECOVERY SIMPLE
ALTER DATABASE [DB3] SET RECOVERY SIMPLE
ALTER DATABASE [DB6] SET RECOVERY SIMPLE
ALTER DATABASE [DB7] SET RECOVERY SIMPLE
ALTER DATABASE [DB9] SET RECOVERY SIMPLE
Note: The SQL Server have around 15 database and the DB 1,3,6,7,9 only running in Full recovery model. So that you will got the above output copy it and executed like the below.
Query:
Use Master
ALTER DATABASE [DB1] SET RECOVERY SIMPLE
ALTER DATABASE [DB3] SET RECOVERY SIMPLE
ALTER DATABASE [DB6] SET RECOVERY SIMPLE
ALTER DATABASE [DB7] SET RECOVERY SIMPLE
ALTER DATABASE [DB9] SET RECOVERY SIMPLE
Once the above executed successfully please cross verify it randomly by manual check. Now all the database in the SQL server will set to Simple recovery model.
Note:
If the recovery model is in Simple mode then you can't recover the database fully.
Thanks!!!