Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ALTER SESSION in system event trigger ?

Re: ALTER SESSION in system event trigger ?

From: Bhooshan S. Prabhu <bhooshan.prabhu_at_citicorp.com>
Date: 25 Jun 2001 22:11:18 -0700
Message-ID: <2cf4efe2.0106252111.21b69d57@posting.google.com>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US