Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to Forbid sqlplus connecting to ORACLE
Brian Peasland wrote:
> > Does anyone know how to forbid sqlplus connecting to ORACLE Server?
> > I don't want somebody using my DB Server via sqlplus in Client, and I will
> > only permit the user using svrmgrl on the Host.
> >
> > The ORACLE Server version is 8.1.7 (another is 8.1.5), running on Solaris.
>
> Permitting only SVRMGR is not a good idea because once you upgrade to
> 9i, it is gone. SQL*Plus is the tool to replace SVRMGR in 9i, if you
> haven't already.
>
> To do what you wish, search Tom Kyte's web site
> (http://asktom.oracle.com) for 'logon trigger'. He gives examples of how
> to code a logon trigger to terminate a session based on certain
> conditions. You should be able to use these examples and have your
> condition be the application from V$SESSION.
>
> HTH,
> Brian
>
> --
> ===================================================================
>
> Brian Peasland
> oracle_dba_at_remove_spam.peasland.com
>
> Remove the "remove_spam." from the email address to email me.
>
> "I can give it to you cheap, quick, and good. Now pick two out of
> the three"
I agree with Brian but to answer your question ... put
select distinct program from v$session;
into an AFTER-LOGON trigger and look for the string 'sqlplusw.exe'.
It can be fooled ... but only by people that know what is happening. So if you
do it. Don't tell
the end-users. Just log who did it and kill their session.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Wed Jun 18 2003 - 12:58:54 CDT