Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ALTER SESSION in system event trigger ?
"Rosy" <rolf.sydnes_at_gard.no> wrote in message news:<9gvbdp$1vd$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
Alter session kind of statements can not be directly executed from
within pl/sql. You shall have to use dynamic SQL to do such a thing.
Take a look at
$ORACLE_HOME/rdbms/admin/dbmssql.sql to know more about dynamic SQL.
If you are using Oracle 8i, you can do similar by putting the
statement in a string and executing the statement using EXEC SQL
IMMEDIATE USING <stament>.
Hope this helps.
Bhooshan
Received on Tue Jun 26 2001 - 00:11:18 CDT