SQL 2000's sp_MSForEachDB and sp_MSForEachTable are useful procedures for performing operations against multiple objects; however, they aren't always extremely efficient, because internally they use cursors to do their work.
These 2 sprocs, sp_ForEachDB and sp_ForEachTable, perform many of the same tasks as their Microsoft-shipped twins, but run faster because they dynamically build the SQL string without using cursors. In addition, these two sprocs can also be used with SQL 7, which doesn't come with the sp_MSForEach sprocs.
Another script from DOS but shows alerts
Like the one posted before, the use of the SP is like this: proc_alerts 1,18. This will show the first 18 alerts on the system. OR proc_alerts 20,35 will show from 20 to 35. This lets you manage the list without letting go out of the screen.
2001-11-03
1,042 reads