Dear Friends ,
I have to block the users from using sqlplus, TOAD, PLsldev etc (Except SYSTEM user) from client end using the below trigger :
create or replace trigger check_logon
after logon on database
declare
cursor c_check is
select
sys_context('userenv','session_user')
username,
s.module,
s.program
from v$session s
where
sys_context('userenv','sessionid')=s.audsid;
lv_check c_check%rowtype;
begin
open c_check;
fetch c_check into lv_check;
if lv_check.username in ('SYSTEM')
then
null;
elsif upper(lv_check.module) like
('%SQL*PLUS%') or
upper(lv_check.program) like
('%SQLPLUS%') or
upper(lv_check.module) like
('%T.O.A.D%') or
upper(lv_check.program) like
('%TOAD%') or
upper(lv_check.program) like
('%PLSQLDEV%') or
upper(lv_check.program) like
('%BUSOBJ%') or
upper(lv_check.program) like
('%EXCEL%')
then
close c_check;
raise_application_error(-
20100,'Banned! Contact with Database Admin!');
end if;
close c_check;
end;
It works fine all normal user cannot access the database using above third party tools .
But the problem is , user with DBA privileges can access the database with generating an trace file . Is there any way to restrict DBA Privileged user ? or is there any mechanism to create a log/trace file so that If there any DBA Privilege user acess to the Database , then we can get the information from that specified log/trace file ?
Waiting your kind reply ... ...