Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Oracle (https://www.clubdelphi.com/foros/forumdisplay.php?f=22)
-   -   Bloquear Toad, Access, Odbc (https://www.clubdelphi.com/foros/showthread.php?t=31500)

Andrea Martinez 09-05-2006 20:57:11

Bloquear Toad, Access, Odbc
 
hola..

tengo oracle 8i server..
necesito desactivar o negar la entrada a los usuarioS
que utilizar conexiones ODBC Y QUERY BUILDER, TOAD
como hago. SOLAMNENTE LOS SQLPLUS Y DEVELOPERS
TENGO ESTO PERO ME BLOQUEA TODA LAS ENTRADAS INCLUSIVE EL SYSTEM

CREATE OR REPLACE TRIGGER block_tools_from_prod
AFTER LOGON ON DATABASE
DECLARE
v_prog sys.v_$session.program%TYPE;
BEGIN
SELECT program INTO v_prog
FROM sys.v_$session
WHERE audsid = USERENV('SESSIONID')
AND audsid != 0 -- Don't Check SYS Connections
AND rownum = 1; -- Parallel processes will have the same AUDSID's
IF UPPER(v_prog) LIKE '%TOAD%' OR UPPER(v_prog) LIKE '%T.O.A.D%' OR -- Toad
UPPER(v_prog) LIKE '%SQLNAV%' OR -- SQL Navigator
UPPER(v_prog) LIKE '%PLSQLDEV%' OR -- PLSQL Developer
UPPER(v_prog) LIKE '%BUSOBJ%' OR -- Business Objects
UPPER(v_prog) LIKE '%EXCEL%' -- MS-Excel plug-in
THEN
RAISE_APPLICATION_ERROR(-20000, 'Development tools are not allowed on PROD DB!');
END IF;
END;
/
SHOW ERRORS

carriagada 09-05-2006 22:25:39

Hoa, por que no probas filtrando el los usuarios/esquemas por el campo schemaname de la tabla v_$session. quizas de esa forma puedas excluir los usuarios que no quieras controlar

.
.
.
and schemaname not in ('SYS','SYSTEM',....)
.
.
.


Saludos, y mucha suerte.
Claudio


La franja horaria es GMT +2. Ahora son las 09:22:21.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi