Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: creating ALTER SESSION SET CURRENT_SCHEMA trigger on logon to Db on 8i or 9i
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