forked from vincent/notebook
13 lines
247 B
Transact-SQL
13 lines
247 B
Transact-SQL
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);
|
|
|
|
|
|
|
|
|
|
|