Re: Last DDL Time for packages
Date: Tue, 28 Jul 2009 15:49:47 -0500
Message-ID: <eb64345d0907281349l2ee52d1ch7c17759b82d425d6_at_mail.gmail.com>
They claimed that both get changed when the package is called. Thus, I had this question. I guess that I cannot trust them anymore. Happy outsourcing ... Thanks
On Tue, Jul 28, 2009 at 3:13 PM, Stephane Faroult <sfaroult_at_roughsea.com>wrote:
> Roger,
>
> You have TWO objects in DBA_OBJECTS for a package, the package and
> the package body. If the interface doesn't change, LAST_DDL_TIME isn't
> updated for the package - but is for the package body.
>
> ORACLE-SQL> _at_foo
>
> Package created.
>
>
> Package body created.
>
> ORACLE-SQL> select object_name, object_type
> 2
> ORACLE-SQL>
> ORACLE-SQL> ed
> Wrote file afiedt.buf
>
> 1 select object_name, object_type, last_ddl_time
> 2 from user_objects
> 3* where object_name = 'FOO'
> ORACLE-SQL> /
>
> OBJECT_NAME
>
> --------------------------------------------------------------------------------
> OBJECT_TYPE LAST_DDL
> ------------------- --------
> FOO
> PACKAGE 22:10:05
>
> FOO
> PACKAGE BODY 22:10:06
>
>
> ORACLE-SQL> save pack
> Created file pack.sql
> ORACLE-SQL> ed foo
>
> [ some change to the package body]
>
> ORACLE-SQL> _at_foo
>
> Package created.
>
>
> Package body created.
>
> ORACLE-SQL> _at_pack
>
> OBJECT_NAME
>
> --------------------------------------------------------------------------------
> OBJECT_TYPE LAST_DDL
> ------------------- --------
> FOO
> PACKAGE 22:10:05
>
> FOO
> PACKAGE BODY 22:11:38
>
>
> ORACLE-SQL>
>
>
>
> Roger Xu wrote:
> > Hi List,
> >
> > We are trying to use below SQL to obtain the last time at which a
> > package/procedure/function being modified. It seems to be working for
> > procedure and functions, but not for the package.
> >
> > select to_char(LAST_DDL_TIME, 'YYYY MM DD HH:MI:SS')
> > from dba_OBJECTs
> > where OBJECT_NAME = 'MYPACKAGE';
> >
> > Is there any other way to find out a package's source code was
> > changed? Maybe I should look into the link between package and
> procedures?
> >
> > Thanks,
> >
> > Roger Xu
>
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Jul 28 2009 - 15:49:47 CDT