Stored prosedure last run
Stored prosedure last run
От:
pkasimov@yahoo.com (Pasha)
Дата:
Hello to Every1. I'm trying to find if anyone knows how to find out when the stored procedure was used last time (not created). Thank You.
Re: Stored prosedure last run
От:
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Дата:
On 17 Sep 2001, Pasha wrote: > Hello to Every1. > I'm trying to find if anyone knows how to find out when the stored > procedure was used last time (not created). I don't think there's any real way to do that apart from having your procedure keep track of that itself.
Re: Stored prosedure last run
От:
"Josh Berkus" <josh@agliodbs.com>
Дата:
Pasha, > I'm trying to find if anyone knows how to find out when the stored > procedure was used last time (not created). If you want to do this, you'd need to create your own log table, and write to it at the beginning of your function: CREATE TABLE function_log ( run_id SERIAL NOT NULL PRIMARY KEY, function_name VARCHAR(100) NOT NULL, run_date TIMESTAMP NOT NULL DEFAULT current_timestamp); CREATE FUNCTION my_function ( ... ... BEGIN INSERT INTO function_log ( function_name ) VALUES ( 'my_function' ); ... Got it? -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco