Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
292 B
4
Indexable
Never
IF EXISTS
(
SELECT *
FROM master.dbo.sysdatabases
WHERE [NAME] = 'DatabaseName'
)
BEGIN
--ALTER DATABASE [DatabaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
;
--ALTER DATABASE [DatabaseName] SET RECOVERY FULL
;
--ALTER DATABASE [DatabaseName] SET MULTI_USER WITH NO_WAIT
;
END
Leave a Comment