Unix Technical Forum

alias/synonym on user/schema

This is a discussion on alias/synonym on user/schema within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi all, is there a way to have an alias on an oracle user/schema. I want to redirect a ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 11:59 AM
=?ISO-8859-1?Q?Bj=F6rn_W=E4chter?=
 
Posts: n/a
Default alias/synonym on user/schema

Hi all,

is there a way to have an alias on an oracle user/schema.
I want to redirect a user that is logging into the DB with
the same user name password every time, into a different
schema. Any Ideas?

Thanks Björn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 11:59 AM
Michel Cadot
 
Posts: n/a
Default Re: alias/synonym on user/schema


"Björn Wächter" <bwc@p3-solutionsKILL_SPAM.de> a écrit dans le message de news: 4ushsvF19h3ehU1@mid.dfncis.de...
| Hi all,
|
| is there a way to have an alias on an oracle user/schema.
| I want to redirect a user that is logging into the DB with
| the same user name password every time, into a different
| schema. Any Ideas?
|
| Thanks Björn

alter session set current_schema ...

Regards
Michel Cadot


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 11:59 AM
=?ISO-8859-1?Q?Bj=F6rn_W=E4chter?=
 
Posts: n/a
Default Re: alias/synonym on user/schema

Michel Cadot wrote:
> "Björn Wächter" <bwc@p3-solutionsKILL_SPAM.de> a écrit dans le message de news: 4ushsvF19h3ehU1@mid.dfncis.de...
> | Hi all,
> |
> | is there a way to have an alias on an oracle user/schema.
> | I want to redirect a user that is logging into the DB with
> | the same user name password every time, into a different
> | schema. Any Ideas?
> |
> | Thanks Björn
>
> alter session set current_schema ...
>
> Regards
> Michel Cadot
>
>

Is there a way to execute the "alter session" command for
the user every time he logs in. So that I can change the
current_schema without any changes on the client code.

Björn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 11:59 AM
=?ISO-8859-1?Q?Bj=F6rn_W=E4chter?=
 
Posts: n/a
Default Re: alias/synonym on user/schema

Björn Wächter wrote:
> Michel Cadot wrote:
>> "Björn Wächter" <bwc@p3-solutionsKILL_SPAM.de> a écrit dans le message de news: 4ushsvF19h3ehU1@mid.dfncis.de...
>> | Hi all,
>> |
>> | is there a way to have an alias on an oracle user/schema.
>> | I want to redirect a user that is logging into the DB with
>> | the same user name password every time, into a different
>> | schema. Any Ideas?
>> |
>> | Thanks Björn
>>
>> alter session set current_schema ...
>>
>> Regards
>> Michel Cadot
>>
>>

> Is there a way to execute the "alter session" command for
> the user every time he logs in. So that I can change the
> current_schema without any changes on the client code.
>
> Björn



CREATE OR REPLACE TRIGGER ON_LOGON
AFTER LOGON
ON DATABASE
DECLARE

BEGIN

EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = DEVELOP';

END;
/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 11:59 AM
Michel Cadot
 
Posts: n/a
Default Re: alias/synonym on user/schema


"Björn Wächter" <bwc@p3-solutionsKILL_SPAM.de> a écrit dans le message de news: 4ut1jhF19pl2mU1@mid.dfncis.de...
| Björn Wächter wrote:
| > Michel Cadot wrote:
| >> "Björn Wächter" <bwc@p3-solutionsKILL_SPAM.de> a écrit dans le message de news: 4ushsvF19h3ehU1@mid.dfncis.de...
| >> | Hi all,
| >> |
| >> | is there a way to have an alias on an oracle user/schema.
| >> | I want to redirect a user that is logging into the DB with
| >> | the same user name password every time, into a different
| >> | schema. Any Ideas?
| >> |
| >> | Thanks Björn
| >>
| >> alter session set current_schema ...
| >>
| >> Regards
| >> Michel Cadot
| >>
| >>
| > Is there a way to execute the "alter session" command for
| > the user every time he logs in. So that I can change the
| > current_schema without any changes on the client code.
| >
| > Björn
|
|
| CREATE OR REPLACE TRIGGER ON_LOGON
| AFTER LOGON
| ON DATABASE
| DECLARE
|
| BEGIN
|
| EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = DEVELOP';
|
| END;
| /

You get it.

Regards
Michel Cadot


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com