Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: accessing SQLPlus variables.................
I think you may be going about it the wrong way. Your concern should
be how to prevent users from accessing a particular schema directly,
or how to limit what they can do once they are in that schema, not
what TOOL they use for the access. There are as many ways users can
access a schema as there are database accessing tools. SQL*PLUS is but
one of them. Look up ORACLE DOC on the security issues. Pay special
attention to "role" manipulation, PRODUCT_USER_PROFILE (PUP) table.
parag_ch_at_yahoo.com (Parag) wrote in message news:<acea9170.0208061435.75722451_at_posting.google.com>...
> Hello All,
>
> I want to restrict users to use application instead of using sqlplus.
> To do that using logon trigger and some reading from various sites /
> groups I got it to work.
>
> The trigger is as follows:
>
> create or replace trigger connect_restriction after logon on database
> when (user != 'SYSTEM' and user != 'VVVVVV' and user != 'MMMMMM')
> declare v_username number;
> Begin
> select count(*) into v_username from v$session
> where upper(username) = user and status='ACTIVE' and upper(program)
> like 'SQLPLUS%' and appinfo like '%SQL%';
> if v_username > 0 then raise_application_error(-20002,'no sqlplus
> please'); end if;
> end connect_restriction;
> /
>
> If I rename my sqlplus.exe as test.exe, the trigger is fooled.
> Now if I could access sqlplus environment variable appinfo
> (sqlplus> show appinfo) in the PL/SQL block I could get the thing
> done.
>
> How do I ?
>
> Thanks in advance.
> Parag
Received on Wed Aug 07 2002 - 00:01:10 CDT