forked from vincent/notebook
13 lines
247 B
MySQL
13 lines
247 B
MySQL
|
DECLARE @SQL NVARCHAR(max) = N'';
|
||
|
SELECT @SQL = @SQL + 'DBCC CHECKDB ([' + name + ']) WITH NO_INFOMSGS;'
|
||
|
FROM sys.databases
|
||
|
WHERE state = 0
|
||
|
AND source_database_id IS NULL
|
||
|
AND name NOT IN ('tempdb', 'model');
|
||
|
EXEC (@SQL);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|