Results 1 to 3 of 3

Thread: Old Stored Procedures

  1. #1
    Join Date
    May 2003
    Posts
    43

    Old Stored Procedures

    We have a data entry program that uses lots of stored procedures. I'm to the point now where I would like to do some clean up on unused stored procs.

    My only idea right now to find out what is not being used is to place code in each stored proc to write to a table that its been used and compare that list to the sys tables to get a list of stored procs not being used. Is there a better way(yes the application is kind of large for me to go through and figure out what is calling what stored proc...don't you love the lack of documentation ) ?

    Thanks ahead of time for any help.

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    SQL Profiler can do that. You can find what procedures are being used.

    then you can delete the remaining procedures by comparing it with sysobjects

    select name from sysobjects where type ="P" and name not in (sp used and executed during a week)

  3. #3
    Join Date
    May 2003
    Posts
    43
    Thanks man!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •