12 lines
506 B
MySQL
12 lines
506 B
MySQL
|
-- connaitre les bases ayant une collation diff<66>rente de celle du serveur
|
|||
|
SELECT name, collation_name, SERVERPROPERTY('Collation') AS Server_collation
|
|||
|
FROM sys.databases
|
|||
|
WHERE collation_name <> SERVERPROPERTY('Collation')
|
|||
|
|
|||
|
-- bases ayant un AUTO close ou AUTO shrink
|
|||
|
SELECT name, N'ALTER DATABASE [' + name + '] SET AUTO_CLOSE OFF;ALTER DATABASE [' + name + '] SET AUTO_SHRINK OFF;'
|
|||
|
FROM sys.databases
|
|||
|
WHERE database_id > 4
|
|||
|
AND (is_auto_shrink_on = 1
|
|||
|
OR is_auto_close_on = 1);
|