Re: Last DDL Time for packages

From: <rgravens_at_gmail.com>
Date: Tue, 28 Jul 2009 17:04:20 -0400
Message-ID: <4a6f67b8.0707d00a.10e9.0530_at_mx.google.com>



one note on this.  A recompile updates the last ddl column.  Recompiles can happen silently with an update to an underlyiing object.  In short be sure you understand what it is you are viewing.
  • Sent from my Palm Pre Stephane Faroult 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-l








--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jul 28 2009 - 16:04:20 CDT

Original text of this message