PL/SQL: ORA-00904: "DICTIONARY_OBJ_NAME": invalid identifier (3 threads merged by bb) [message #379282] |
Mon, 05 January 2009 22:59  |
cherry
Messages: 56 Registered: December 2007
|
Member |
|
|
I got the error msg when I ran this piece of code from
http://www.orafaq.com/wiki/PL/SQL_FAQ#How_can_one_keep_a_history_of_PL.2FSQL_code_changes.3F
Im not able to figure out what the problem is!
I know the description of ORA-00904, but dont know how to fix.
Any help?
Thanks
SQL> select * from v$version
2 /
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bi
PL/SQL Release 10.1.0.4.0 - Production
SQL> CREATE OR REPLACE TRIGGER change_hist
2 AFTER CREATE ON APPS.SCHEMA
3 DECLARE
4 BEGIN
5 if DICTIONARY_OBJ_TYPE in ('PROCEDURE', 'FUNCTION',
6 'PACKAGE', 'PACKAGE BODY', 'TYPE') then
7
8 INSERT INTO SOURCE_HIST
9 SELECT sysdate, user_source.* FROM USER_SOURCE
10 WHERE TYPE = DICTIONARY_OBJ_TYPE
11 AND NAME = DICTIONARY_OBJ_NAME;
12 end if;
13 EXCEPTION
14 WHEN OTHERS THEN
15 raise_application_error(-20000, SQLERRM);
16 END;
17 /
Warning: Trigger created with compilation errors.
SQL> show err
Errors for TRIGGER CHANGE_HIST:
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/6 PL/SQL: SQL Statement ignored
9/28 PL/SQL: ORA-00904: "DICTIONARY_OBJ_NAME": invalid identifier
[Updated on: Mon, 05 January 2009 23:07] Report message to a moderator
|
|
|
|
|
|
|