Query to check recovery model in database excluding 'master','model','tempdb','msdb'
select [name], DATABASEPROPERTYEX([name],'recovery')
from sysdatabases
where name not in ('master','model','tempdb','msdb')

Recovery model query to simple below:
select [name], DATABASEPROPERTYEX([name],'recovery')
from sysdatabases
where name not in ('master','model','tempdb','msdb')
Recovery model query to simple below:
--Change
the recovery mode:
USE
master;
GO
--
Set recovery model to SIMPLE
ALTER
DATABASE smrmindev SET RECOVERY SIMPLE;
GO
Recovery model query to full mode below:
--
Set recovery model to FULL
--Change the recovery mode:
USE master;
GO
-- Set recovery model to FULL
ALTER DATABASE smrmindev SET RECOVERY FULL;
-- Set recovery model to FULL
ALTER DATABASE smrtest SET RECOVERY FULL;
GO
No comments:
Post a Comment