Just some sample usage of sp_MSforeachtable.
--Check space used for each table in a database EXECUTE sp_MSforeachtable 'EXECUTE sp_spaceused [?]'; --Check for integrity of tables in a database EXECUTE sp_MSforeachtable 'DBCC CHECKTABLE ([?])'
Undocumented may mean it may not be supported in future versions. My last check is sp_MSforeachtable still works for SQL 2008.
Related reading:
No comments:
Post a Comment
Do provide your constructive comment. I appreciate that.