Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oledb provider (9.2) from VB 6

Oledb provider (9.2) from VB 6

From: Fran?ois Bourdages <francois.bourdages_at_harfan.com>
Date: 18 Jan 2005 14:19:41 -0800
Message-ID: <92e05f1e.0501181419.3824f08d@posting.google.com>


Hi ,
Is there a way to pass the program name with the connect string, when a user log on to an application ussing this provider (from oracle)
within Visual basic ?

on the database , i want to have a "after logon on database" trigger, that will verify that the user who logs in use the good application. so the program field in v$session would be use., But how to fill it from
the connection in VB.. ?

Example of the trigger :
CREATE OR REPLACE TRIGGER logon_allow_trigger AFTER LOGON ON DATABASE
DECLARE
   CURSOR LOGON_ALLOWED (P_USERNAME VARCHAR2) IS

      SELECT LOGON_ALLOWED
      FROM   MSP.USER_ALLOWED_TEST
      WHERE USERNAME = P_USERNAME;

 CURSOR INFO_SESSION IS 
    	SELECT OSUSER, MACHINE , SID , SERIAL# , PROGRAM 
        FROM V$SESSION 
       WHERE AUDSID = USERENV( 'sessionid' );       
   --
   ENR_LOGON_ALLOWED	LOGON_ALLOWED%ROWTYPE; 
   ENR_INFO_SESSION	INFO_SESSION%ROWTYPE; 
   

BEGIN

		END IF;	   		
	   END IF;
	END IF;

END;
/
SHOW ERRORS the reason why I am asking this is that the application :

so my idea was to restrict acces to database instead of granting role to user, and instaling row level filtering via fine grain acces control.  

It is easy to restrict database acces to user, but how can i restrict all programm except THEONE for certain users ? Received on Tue Jan 18 2005 - 16:19:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US