tags:

views:

701

answers:

3

First, thank you all for your help.

I'm trying to locate something similar to MSSQL's sys.procedures.Modify_date in oracle(10g).

A little context:

We design many stored procedures for use in both oracle and mssql. it's simple enough in mssql to see which stored procedures have been updated (as modify_date will be newer). I've heard there was something similar for oracle but have found precious little on the intertubes. I also heard a rumor that there was something close, but it contains the last compilation date for the sproc. As i'm looking for "the last time someone altered the text of the sproc", this won't quite work.

Is this possible? is there some trick? Right now we maintain a text comment within the stored procedure and one of the devs wrote a routine to go pull out the date from that comment. It's klunky and easy to forget to do and i'd like to find a better way.

Again, thanks for your help.

+2  A: 
SELECT  LAST_DDL_TIME, TIMESTAMP
FROM    DBA_OBJECTS
WHERE   OBJECT_TYPE = 'PROCEDURE'
        AND OBJECT_NAME = 'PRC_MINE'
Quassnoi
@beta033 - you'll probably be interested mostly in the TIMESTAMP column from the above result set - Oracle will update the LAST_DDL_TIME information every time a grant is made that involves the object even if the object code is not changed.
dpbradley
+1  A: 

If you are interested in actual changes to the code, look into the AUDIT statement or a DDL trigger

Gary
Very interesting. I will have a look.
Beta033
+2  A: 

Maybe it is better to use something like sub version or team system to handle source control.

tuinstoel
I agree completely. Unfortunately they've been doing it this way for some time and converting to SVN or TFS will be a painful process for some of the users that like their rut.
Beta033