Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

create or replace function whoami return varchar2 IS v varchar2(31); begin select username into v from v$session where instr(osuser,'$')

= 0 and username is not null and status = 'ACTIVE' and username != 'DBSNMP'; return (v); end whoami; / select username,status,osuser from v$session where username is not null; select username from v$session where instr(osuser,'$') = 0 and username is not null and status = 'ACTIVE' and username != 'DBSNMP'; select username,status,osuser from v$session where instr(osuser,'$') = 0 and us ername is not null and status = 'ACTIVE' and username != 'DBSNMP'; select * from SYS.sysauth$; grant select on v$session to SYSTEM; begin whoami; end; /

You might also like