/* This will script output the needed commands for you */
/* Execute it in query analyzer, which will generates all the commands */
/* do a Select All, Copy, then Paste into query analyzer and execute */
SELECT 'ALTER DATABASE' + QUOTENAME(name) + 'SET AUTO_SHRINK OFF WITH NO_WAIT;' AS [To Execute]
FROM sys.databases
WHERE is_auto_shrink_on = 1;
GO
https://enterpriseit.co/ms-sql/disable-auto-shrink-all-databases/
/* Execute it in query analyzer, which will generates all the commands */
/* do a Select All, Copy, then Paste into query analyzer and execute */
SELECT 'ALTER DATABASE' + QUOTENAME(name) + 'SET AUTO_SHRINK OFF WITH NO_WAIT;' AS [To Execute]
FROM sys.databases
WHERE is_auto_shrink_on = 1;
GO
https://enterpriseit.co/ms-sql/disable-auto-shrink-all-databases/
Комментариев нет:
Отправить комментарий