I have imported full database from 10g to 11g. However i am not able to compile Triggers, function & procedure. For triggers i m getting the following error(ORA-00942). Also i am providing the trigger script too.
Please guide me as i have not much of experience.
Error:
Line Column | Error |
8 57 | PL/SQL: ORA-00942: table or view does not exist | |
DROP TRIGGER PRDB_PM.INS_B_ADCO_ADAPT;
CREATE OR REPLACE TRIGGER PRDB_PM.INS_B_ADCO_ADAPT
BEFORE INSERT ON prdb_pm.ADCO_ADAPT FOR EACH ROW
DECLARE
programm VARCHAR(120);
user VARCHAR(30);
session_id NUMBER;--This is line8
BEGIN
SELECT userenv('SESSIONID') INTO session_id FROM dual;
BEGIN
SELECT program,username INTO programm,user FROM V$SESSION
WHERE audsid = session_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN
programm := 'UNKNOWN';
user := 'UNKNOWN';
WHEN OTHERS THEN
IF (session_id = 0) THEN
programm := 'JOB';
ELSE
programm := 'UNKNOWN';
END IF;
END;
:new.toc := sysdate;
:new.tom := sysdate;
:new.mop := substr( programm ,1 ,60);
END;
/