I have developed a front end tool. I have given to them username and password to access my front end tool
I want to restrict them to access database using toad or any other tools like jdbc etc. using the same username and password
Could you please tell me how to do this?
check the below ask tom post it will be helpful
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 here.'); END IF; END;
user576726 wrote:As I said earlier, that will work until someone rename TOAD to your application name...
It's working fine but giving the following error when an user is trying to log in
ORA-20000: ORA-00027: cannot kill current sessionAgain, as I said earlier, you cannot kill your own session, and this is what your trigger is attempting to : kill the session of the user which is trying to connect.