We have an application in our organization that is based on Oracle Forms 11g (on Oracle Fusion Middleware/WLS). Users have access to the application through accounts created at the database (i.e. they exist in dba_users
). Each user is assigned a specific role based on their area of work and they use the user id to log on to the application. The user may have read/write access to certain functionality in the application and for this their roles have the following permissions-
EXECUTE ANY LIBRARY
SELECT ANY SEQUENCE
EXECUTE ANY TYPE
EXECUTE ANY PROCEDURE
UPDATE ANY TABLE
SELECT ANY TABLE
DELETE ANY TABLE
EXECUTE ANY INDEXTYPE
INSERT ANY TABLE
Now we have some users requesting for SQL Client access (i.e. TNS settings) so that they can connect to the DB and perform queries for their research. These business users are ofcourse knowledgeable in SQL but we want to restrict their access based on the type of client they use to log on to the database. Any client other than the application itself, should restrict them to "read only".
Is there a way to achieve this?
sqlplus
orsqldeveloper
orannjawan
. You have to restrict this through the user account, it's the only safe way.if not <app_client> then...
perhaps through aBEFORE LOGON
trigger? We also know theMachine Name
which will always be the Application server name if the user is using the Application, that can be used as well?<app_client>
without any problems. You can also change the value that shows up inmachine
inv$session
(those are simply connection properties for a JDBC connection for example). You might be able to check the IP address in a logon trigger, but I'm not sure about that. The only (really: the only) safe way to restrict access is through privileges on the user account.BEFORE LOGON
trigger withrevoke
command work?