Home » RDBMS Server » Server Administration » Default schema for a User
Default schema for a User [message #63037] Fri, 03 September 2004 07:38 Go to next message
alok
Messages: 12
Registered: December 2000
Junior Member
Is there a more permanent solution in Oracle than having to do a
ALTER SESSION SET CURRENT_SCHEMA = "DEVELOPMENT"

I want a user to be associated to the "DEVELOPMENT" schema everytime he logs on rather than him having to do the above everytime he logs on.

Obviously, I am used to Sybase setup in which you can set default database for each user.

ThanX
-Alok
Re: Default schema for a User [message #63043 is a reply to message #63037] Sun, 05 September 2004 19:21 Go to previous messageGo to next message
jack
Messages: 123
Registered: September 2000
Senior Member
user should have the same name as the schema. If you want a person login as to always use a schema, just produce a user name as the schema you want to use and give the person the username. Hope it will figure out your problem.
Re: Default schema for a User [message #63453 is a reply to message #63037] Wed, 06 October 2004 13:46 Go to previous message
Chip Adams
Messages: 1
Registered: October 2004
Junior Member
I am assuming that you have other users other then "Develpment" that you wish to have access to that schema other wise you probably wouldn't be asking this question... The more permanent solution is to create a logon trigger... The following is an example... Hope this helps

create or replace trigger set_schema_trigger
after logon on database
begin
if sys_context(userenv,username) = - then
execute immediate 'alter session set current_schema = <schema_name>';
end if;
end;
Previous Topic: Rebuild non-partitioned PK index to partitioned?
Next Topic: Archive large table.
Goto Forum:
  


Current Time: Thu Jan 09 14:37:03 CST 2025