Note, there is no "guaranteed" way to block applications like that. You can simply rename executables to other names to bypass your check.
Main Topics
Browse All Topicsi have 1 username, for example user 'a' , if someone logon username 'a' but he use program like toad.exe or plsqldev.exe,i want he can't logon for that username(block to logon in database),but if he use program like vb6.exe he can logon in username 'a',how to create some trigger to protect username 'a' from toad.exe or plsqldev.exe?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I did some searching on restricting certain users from the full set of SQL*PLUS commands, but I think the metalink article 281229.1 is your answer -- if you do not have access let us know. But for instance, the article addresses:
"This bulletin explains how to prohibit users from connecting to a database when
using predefined applications, thus accessing the application tables directly
with (third party) tools such as ODBC / JDBC clients, TOAD or even Sql*Plus."
and:
<QUOTE>
Use VPD for further restrict access to application tables
==========================
Expanding the example banning TOAD access, you can protect the important
application tables by checking the MODULE attribute from the sys_context
namespace, but only in Oracle Database 10g:
create or replace function no_toad_access (schema in varchar2,
object in varchar2)
return varchar2
as
begin
return
'upper(substr(sys_context(
end;
/
Example
-------
SCOTT.EMP is the table to be protected. Add a policy like:
begin
dbms_rls.add_policy
(OBJECT_SCHEMA => 'SCOTT',
OBJECT_NAME => 'EMP',
POLICY_NAME => 'BAN_TOAD',
FUNCTION_SCHEMA => 'SYS',
POLICY_FUNCTION => 'NO_TOAD_ACCESS',
statement_types => 'select,insert,delete,upda
UPDATE_CHECK => TRUE,
ENABLE => TRUE,
STATIC_POLICY => FALSE);
end;
/
With this in place, nobody can select rows from SCOTT.EMP with TOAD.
DBAs still have access thanks to the EXEMPT ACCESS POLICY system privilege.
More attributes can be used : refer Note 120797.1
'How to Determine Client IP-address,Language & Territory and Username for
Current Session'
<END QUOTE>
I agree there, if the server-side security is solid, then it shouldn't matter what means are used to connect.
On the other hand, extended, but legitimate privileges allow for greater mistakes and a powerful gui like Toad does allow some mistakes to be made even easier.
So, I can understand why people would want to try, in fact, the effort to achieve that same goal myself is how I learned it wasn't actually possible. :)
Business Accounts
Answer for Membership
by: paquicubaPosted on 2009-10-11 at 19:23:28ID: 25548294
Raise an application error in an ON LOGON TRIGGER, you'll find a lot of examples on this site, just search.
APPLICATIO N_ERROR(-2 0001,'Sorr y You are not Authorise to logon from this tool');
Here is an example:
Create or replace trigger you_cannot_logon
after logon on database
begin
FOR REC IN (SELECT USERNAME, PROGRAM FROM V$SESSION WHERE AUDSID = USERENV('SESSIONID'))
LOOP
if rec.username not in ('SYS','SYSTEM') and (upper(rec.program) like '%TOAD.EXE' or upper(rec.program) like '%PLSQLDEV.EXE')
then
RAISE_
end if;
end loop;
END;