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: creating ALTER SESSION SET CURRENT_SCHEMA trigger on logon to Db on 8i or 9i

Re: creating ALTER SESSION SET CURRENT_SCHEMA trigger on logon to Db on 8i or 9i

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Wed, 11 Jun 2003 00:46:24 +0200
Message-ID: <3rncev43kmmvovqosscj7mjdbvahfdk8fl@4ax.com>


On 10 Jun 2003 13:31:31 -0700, doron_almog_at_msn.com (Doron) wrote:

>hi,
>trying to create a trigger on logon to the db to change a users
>current_schema but getting invalid trigger specification error.
>
>CREATE TRIGGER "JOE"."DEF_SCHEMA" AFTER
>LOGON ON DATABASE 'ALTER SESSION SET CURRENT_SCHEMA = SCOTT';
>
>was anybody able to get this to work

I doubt whether you can't better use synonyms.

Anyway, your syntax is incorrect after the database keyword begin
execute immediate 'alter session set current_schema=scott'; end;
/

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Tue Jun 10 2003 - 17:46:24 CDT

Original text of this message

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