USE MASTER
GO
EXEC master..sp_MSForeachdb '
USE [?]
IF ''?'' <> ''tempdb''
BEGIN
DBCC
CHECKCATALOG (''?'')
END'
Scripts, Articles, Relevant for DBAs, Consultants, BI, Data Scientists and Developers
USE MASTER
GO
EXEC master..sp_MSForeachdb '
USE [?]
IF ''?'' <> ''tempdb''
BEGIN
DBCC
CHECKCATALOG (''?'')
END'