I am currently in a fairly mismanaged environment, where stored procs were introduced to the database over a few years and some versions became obsolete. Is there an easy way to figure out (preferably in Sybase) how many times a give stored proc was invoked so that we can gain some confidence in removing procs .that were never called recently.
Way to find out how many times a stored procedure was invoked since last DB start
countstored-proceduressybase
Related Question
- Mysql – way to tell your hostname within a stored procedure
- Sql-server – Find out what setting were used for a given stored procedure
- How to find where a stored procedure is used (in other stored procedures)
- Sql-server – Getting Machine name from where stored procedure was last executed
- SQL Server 2008 – How to Find the Stored Procedure Executing an Event
- How to Troubleshoot Oracle Stored Procedure Compilation Issues
- MySQL Stored Procedures – How to Find Which User Called a Stored Procedure
- Sybase ASE – Determine When a Stored Procedure Was Last Compiled
Best Answer
Sybase doesn't store execution counts for stored procedures, but you can use Sybase Central's activity monitors to track SP usage (but only from when you start the session). If you don't like Sybase Central, the other option is to add a line to each SP that increments a counter (i.e. create a table to keep track).