FAQ
Hi!

When I try to compile the trigger below, I get the error message:

PLS-00201: identifier 'SYS.V_$SESSION' must be declared

Why???? v$session is nothing but a synonym for v$_session.
The user trying to compile this trigger has DBA privileges.

CREATE OR REPLACE TRIGGER TBREVENUECAT_TRIGGER_DEL AFTER DELETE

ON VIVOUSER.TBREVENUECAT

FOR EACH ROW

BEGIN

DECLARE myApplName varchar2(50);
BEGIN

SELECT PROGRAM into myApplName
FROM v$session WHERE audsid = userenv('sessionid');
IF Trim(Upper(myApplName))<>Trim('VIVOCLIENT.EXE') THEN
INSERT INTO OM_TBREVENUECAT (OM_TRANSID, OM_TRANSTYPE,
OM_TRANSSTATUS, COMPANYID, STORELOCID, REVCATID, DEPTID, STATUS)
VALUES (OM_IDS.NextVal, 'D', 'N', :OLD.COMPANYID, :OLD.STORELOCID,
:OLD.REVCATID, :OLD.DEPTID, :OLD.STATUS);
END IF;

END;

END;

Any ideas?

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouporacle-l @
categoriesoracle
postedAug 24, '00 at 6:37p
activeAug 24, '00 at 8:44p
posts2
users2
websiteoracle.com

2 users in discussion

Jared Still: 1 post Helmut Daiminger: 1 post

People

Translate

site design / logo © 2023 Grokbase