Post Configuration steps for MS SQL SERVER Part 2 | Back up compression | Auto close

Опубликовано: 30 Июль 2023
на канале: MS SQL DBA Tech Support
856
24

Join this channel to get access to perks:
   / @mssqldbatechsupport  

Join the whats app Group for the scripts and assistance:
https://chat.whatsapp.com/LBDdY1UA0Sn...

========================
--select name, is_auto_close_on FROM sys.databases

-- Generate the script to set AUTO_CLOSE to OFF for all databases
USE master;
Go
DECLARE @sql NVARCHAR(MAX) = N'';
SELECT @sql += N'ALTER DATABASE [' + name + N'] SET AUTO_CLOSE OFF;' + CHAR(13)
FROM sys.databases where is_auto_close_on = 1

EXEC(@sql);

--=====================================
--Enabling the compression at server level
IF EXISTS(select * from sys.configurations where name = 'backup compression default' AND value = 0)
BEGIN
EXEC sp_configure 'backup compression default', 1 ;
RECONFIGURE;
END

======================================
You Can Also Download the scripts from below folder
https://drive.google.com/drive/folder...
We strongly believe there is always chance of betterment, so suggestions are most welcome.

Happy learning, and best of luck in your professional journey!

The journey of improvement is ongoing and never be an end.

Thank you!
MS SQL DBA Tech Support


Смотрите видео Post Configuration steps for MS SQL SERVER Part 2 | Back up compression | Auto close онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь MS SQL DBA Tech Support 30 Июль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 856 раз и оно понравилось 24 людям.