在修改package的时候,无意中用旧版本覆盖了新版本,导致了package编译错误。下面记录下大概的过程:
首先查询对象的obj#号是多少
SELECT obj#
FROM obj$ AS OF TIMESTAMP TO_TIMESTAMP('2011-09-08 15:25:00', 'YYYY-MM-DD HH24:MI:SS')
WHERE NAME = 'TEST_PACKAGE';
SQL> SELECT obj#
2 FROM obj$ AS OF TIMESTAMP TO_TIMESTAMP('2011-09-08 15:25:00', 'YYYY-MM-DD HH24:MI:SS')
3 WHERE NAME = 'DATA_SYNC';
OBJ#
----------
76389
76390
有两个值,一个是包头,一个是包体;然后再用如下的sql查询有正确值时间点的数据
SELECT source
FROM source$ AS OF TIMESTAMP TO_TIMESTAMP('2011-09-08 15:25:00', 'YYYY-MM-DD HH24:MI:SS')
where obj# = 76390;
SELECT source
FROM source$ AS OF TIMESTAMP TO_TIMESTAMP('2011-09-08 15:25:00', 'YYYY-MM-DD HH24:MI:SS')
where obj# = 76389;
通过如上两个sql结果内容就可以恢复了
-----------------------end-----------------
--转自