create or replace trigger logon_trg
after logon on database
begin
if user in ('A','B') then
execute immediate 'alter session set current_schema=X';
end if;
end;
/
----------------------
create or replace trigger logon_trg
after logon on database
declare
usr varchar2(1000);
begin
select wm_concat(''''|| username || '''') into usr from dba_users;
if user in (usr) then
execute immediate 'alter session set current_schema=LDBO';
end if;
end;
/
SYS@NBS11G> select wm_concat(''''|| username || '''') from dba_users;
select wm_concat(''''|| username || '''') from dba_users
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "WMSYS.WM_CONCAT_IMPL", line 30
No comments:
Post a Comment