Old undocumented stuff – Recompiling with timestamp

Yesterday i was reading nice discussions on Asktom about the dual table. Afterwards somehow a “undocumented” Oracle feature popped into my mind again. Last time I used is at least in those days I worked with Oracle 7.0 /7.1. So I tried It out on Oracle database version 10.1.0.4 and it still works…

😉 Maybe it is (still) usefull to someone. See hence my example:

 
SQL> DROP PROCEDURE marco
PROCEDURE dropped.
 
SQL> CREATE PROCEDURE marco
  2  AS
  3  BEGIN
  4  NULL;
  5  END;
  6  /
PROCEDURE created.
 
SQL> SELECT TIMESTAMP 
  2  FROM user_objects
  3  WHERE object_name = 'MARCO';
 
TIMESTAMP
--------
2005-05-12:18:14:56
 
SQL> ALTER PROCEDURE marco compile TIMESTAMP '2005-01-17:15:32:17';
PROCEDURE altered.
 
SQL> SELECT TIMESTAMP 
  2  FROM user_objects
  3  WHERE object_name = 'MARCO';
 
TIMESTAMP
--------
2005-01-17:15:32:17
.

Btw Tom has also a very nice “The Tom Kyte Blog” site but you probably knew that…

Marco Gralike Written by: