When deleting data from many tables, foreign key constraints can force you to specifically order your DELETE commands. This can take tons of time, especially if you have many tables. Here's a technique I use to delete data in the correct order during the restaging of test databases.
It makes use of the system stored procedure sp_MSdependencies which does the work of finding the hierarchy of table dependencies.
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