Zopilote
asked on
Cannot select V$SESSION in before LOGOFF trigger
Do you know why I cannot compile this trigger?
CREATE OR REPLACE TRIGGER LOGOFF_TRIGGER
BEFORE LOGOFF ON DATABASE
DECLARE
BEGIN
insert into TEST
(USERNAME)
select distinct USERNAME
from V$SESSION;
END;
/
CREATE OR REPLACE TRIGGER LOGOFF_TRIGGER
BEFORE LOGOFF ON DATABASE
DECLARE
BEGIN
insert into TEST
(USERNAME)
select distinct USERNAME
from V$SESSION;
END;
/
ASKER
Problem solved. No direct grant.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sorry, didn't see your post. yes, you are correct, that's "why"
sys_context is a good workaround too
sys_context is a good workaround too
create trigger logoff_trigger
before logoff on database
begin
insert into test values(sys_context('useren
end;
/