Almost forgot... don't forget that sp_MsForEachDB is nothing but a big ol' cursor. Look at the code if you don't believe me. Also, in SQL Server 2005, you don't even need a While loop for this type of stuff anymore... here's the same thing using a "pseudo-cursor" to build all of the SQL for all of the databases all at once...
DECLARE @SQL NVARCHAR(MAX)
SELECT @SQL = COALESCE(@SQL+CHAR(10),'') + 'DBCC CheckDB(' + QUOTENAME(Name) + ')'
FROM Master.sys.Databases
WHERE Database_ID > 4
PRINT @SQL
EXEC (@SQL)
--Jeff Moden
Change is inevitable... Change for the better is not.