Set Default Schema after login

CREATE OR REPLACE TRIGGER SYS.set_default_schema

after logon on <user_name>.schema

begin

  execute immediate 'alter session set current_schema=<Schema_Name>';

end;

/

Example:

Here the user name is munna and schema name is scott

CREATE OR REPLACE TRIGGER SYS.set_default_schema

after logon on munna.schema

begin

  execute immediate 'alter session set current_schema=SCOTT';

end;

/

Comments