• One time I was faced with an old database system and had to figure out which SPs are not being used.

    There is no easy and nice way of getting this information so I decided to create my own way of gathering this information.

    I created log table which held the names of the stored procedures in my system, number of times used and the time last used. I also created the SP that updated this table whenever called. This SP took one parameter - the name of the SP it was called from and updated the proper record in the log table.

    Then the messy part kicks in. Each SP in the database has to be modified to call the log SP. You can do it by hand if your database does not have many SPs or script all SPs and write simple code in VB or C# to modify the sripts to include the call to the log SP.

    I don't know if this is going to work for you but I figured a suggestion can not hurt.

    The database access was limited to SP calls only so I did not have to deal with the table usage directly.

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]