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: Changing default schema at logon

Re: Changing default schema at logon

From: Andrey Goryunov <goryunov_at_braz.ru>
Date: 30 Jun 2001 00:50:48 -0700
Message-ID: <cae34277.0106292350.3b2ca6a@posting.google.com>

SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK (Brian Tkatch) wrote in message news:<3b3ce8a6.603072921_at_news.alt.net>...
> I have one user with no quotas. The user's single purpose is to use a
> specific schema. While testing as that user, it becomes quite
> cumbersome to type in the schema name all the time.
>
> I created a trigger to change the current schema at logon time.
>
> The user is "MOO" and the schema to be used is "COW".
>
> CREATE OR REPLACE TRIGGER Moo.Change_Default_Schema_To_Cow
> AFTER LOGON ON Moo.SCHEMA
> BEGIN
> EXECUTE IMMEDIATE 'ALTER SESSION SET Current_Schema = Cow';
> END Change_Default_Schema_To_Cow;
> /
>
> This seems to work. That is, when Moo logs on he can do a DESC on an
> object in Cow without the schema qualifier. When logging on as another
> user, the schema is not changed. So, I'll assume that I got this part
> correct.
>
> This all works when I log in via SQL*Plus. However, when I log in via
> some other GUI (E.G. PL/SQL Developer or TOAD), doing a DESC on the
> same object fails.
>
> Obviously, I would like it to work there as well, but I am not sure
> how to proceed.
>
> Brian

Hi,
Desc command is SQLPlus command. I don't think it supported in third-party tools, execute select ... from table_name where rownum < 3 (for example) in Developer to evaluate your trigger.

HTH,
Andrey Goryunov Received on Sat Jun 30 2001 - 02:50:48 CDT

Original text of this message

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