Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Prevent somebody logging in with SQL/Plus?

Re: Prevent somebody logging in with SQL/Plus?

From: Nigel Rudgyard <nigel_at_rudgyard.demon.co.uk.nospam>
Date: 1998/02/23
Message-ID: <888261362.28384.0.nnrp-08.c1ed0cd9@news.demon.co.uk>#1/1

You can set up a SQL*Plus login script (I think that its referred to in the Oracle manuals as glogin.com) and then set the Oracle parameter ORA_??? (sorry, but I can't remember it off the top of my head) to point to it.

Either simply get it to do an 'exit' or, if want to be really clever, get it to query a table of valid users and only throught out those who are not authorised.

Because of the limitations of SQL*Plus, I suggest that this is done as follows (there may be other ways but this is the one that first spring to mind);

--
--  Open spool file.
--
spool tmp.sql

--
-- Close spool file.
--
spool off

--
-- Determine whether current user is authorised to use SQL*Plus.
--
select 'exit;'
from dual
where not exists (
        select 1 from authorised_users where username = user
    );

--
-- Execute temporary file.
--
@tmp


...or something to that effect.

Its not perfect since anyone with any Oracle experience can get around it
but it may be OK for your needs.

Hope it helps.

James Petts wrote in message <34f13917.259361810_at_firewall.celltech>...

>Hi
>
>Is it possible to prevent somebody getting access to a database with
>SQL/Plus? I'm looking for the sort of solution that will check all new
>sessions to the database and disallow connection if the program
>being used to connect is SQL/Plus. I know that the program is
>available in v$session(program) but I'm not sure about how I would
>go about terminating a session. I envisage having a table of those
>users authorised to used SQL/Plus which would be checked before
>a session would be terminated.
>
>Any help, anybody?
>
>James "I'd rather fall off Ilustrada than ride any other horse!" Petts
Received on Mon Feb 23 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US