• I like using sp_msforeachtable for certain quick and dirty works.

    sp_msforeachtable as you know is a base function / sp that overloads some requests, meaning you can run other functions thru this sp.

    You are absolutely right, there are times that you don't want to make and push the server do silly things and waste the system resouces.

    One of the usages for this sp would be something in the line of indexing all the table at 2:00 am and I have tried that with couple of hundred tables and two or three indexes on each table and an average of few 10s of thousands records in 25 seconds.

    Your experience shows that you have dealt with many great databases and obviously I can learn few things from you.

    thx for the reply and looking forward in learning more cool things from you in SQL Server Central.

    John Esraelo

    Cheers,
    John Esraelo