Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: ALTER SESSION in a system event trigger?
"Rosy" <rolf.sydnes_at_gard.no> wrote in message news:<9gvb6d$lk$1_at_oslo-nntp.eunet.no>...
> I'm trying to do a 'ALTER SESSION SET NLS_DATE_LANGUAGE=.....' in an 'AFTER
> LOGON ON DATABASE' system event trigger . Gets error PLS-00103 from the
> parser ('..found ALTER but expected one of the following:....').
> Is this operation illegal in triggers on system events?
>
> Any help would be appreciated.
>
> Rolf
How are you executing the command. Are you using execute immediate or did you just code the statement like a line f pl/sql code, which would be illegal syntax. DDL and session alterration has to be done using dynamic SQL (execute immediate or dbms_sql package) or via a packaged call such as dbms_session.set_role.
I hope this helps.