Home » SQL & PL/SQL » SQL & PL/SQL » How can I find any change on source code whatever packages or types???
How can I find any change on source code whatever packages or types??? [message #188392] Fri, 18 August 2006 06:29 Go to next message
linyumin
Messages: 13
Registered: August 2006
Location: Taiwan Taipei
Junior Member

Hi everybody~~

I need a solution to detect any change on source code whatever packages or types~~

Please give me an idea to implement this solution~~thx a lot~~

ex.PL/SQL utility or data dictionary..etc~~

Re: How can I find any change on source code whatever packages or types??? [message #188397 is a reply to message #188392] Fri, 18 August 2006 06:39 Go to previous messageGo to next message
gbarbisan
Messages: 67
Registered: August 2006
Location: Treviso - Italy
Member
You can try with:

SELECT OBJECT_NAME, OBJECT_TYPE, CREATED, LAST_DDL_TIME
  FROM USER_OBJECTS;


and then you can compare column "CREATED" and "LAST_DDL_TIME".
Re: How can I find any change on source code whatever packages or types??? [message #188402 is a reply to message #188397] Fri, 18 August 2006 06:58 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
A recompile would also change the last-ddl time.
Re: How can I find any change on source code whatever packages or types??? [message #188403 is a reply to message #188402] Fri, 18 August 2006 07:23 Go to previous messageGo to next message
gbarbisan
Messages: 67
Registered: August 2006
Location: Treviso - Italy
Member
Frank wrote on Fri, 18 August 2006 13:58

A recompile would also change the last-ddl time.


Gosh, forgot the "recompile"... Embarassed
Re: How can I find any change on source code whatever packages or types??? [message #188417 is a reply to message #188397] Fri, 18 August 2006 08:16 Go to previous messageGo to next message
linyumin
Messages: 13
Registered: August 2006
Location: Taiwan Taipei
Junior Member

thx~~

I will try this~~

My situation's sometimes to generate all sqlj for all source code,but there're a lot of packages or types~~it takes about forty minutes!!

I hope to get the packages or types changed now,and I just generate sqlj of these packages or types to "make&rebuild" with old package or types~~


[Updated on: Fri, 18 August 2006 08:17]

Report message to a moderator

Re: How can I find any change on source code whatever packages or types??? [message #188420 is a reply to message #188417] Fri, 18 August 2006 08:34 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If you want to be apply a bit of overkill, you could try this solution.

CREATE TABLE source_code_hash AS
SELECT NAME,TYPE,SUM(DBMS_UTILITY.GET_HASH_VALUE(text,10000000,32768)) HASH,sysdate  HASH_DATE
FROM   USER_SOURCE
GROUP BY NAME,TYPE;

If you rerun the query later, any table that has actually had it's source code altered will show up as having a different hash value.
Re: How can I find any change on source code whatever packages or types??? [message #188471 is a reply to message #188420] Fri, 18 August 2006 12:57 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
I don't know whether it is you who asked, but Tom Kyte answered this today.

He provides a method to keep track of old versions of the source. Better use a good version control system if you'd ask me..
Previous Topic: Date Question
Next Topic: Assign select value to variable?
Goto Forum:
  


Current Time: Fri Dec 09 00:28:44 CST 2016

Total time taken to generate the page: 0.35058 seconds