How to set OS_USER for in order to use VPD
Posted: Tue 28 Apr 2015 12:58
We are working in .NET4.5 against Oracle 12.1 and would like to utilize Oracle virtual private database to control data access. We are having difficulty finding the proper way to pass the User ID to Oracle in order to set OS_USER using the dotConnect driver.
We have a working example to set the OS_USER of an Oracle v$session using Java as seen below:
Properties props = new Properties();
props.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_VSESSION_OSUSER, “user1”);
OracleConnection oConn = (OracleConnection) DriverManager.getConnection(sharedUrl, props);
Reference: http://docs.oracle.com/cd/E18283_01/app ... ION_OSUSER
We were not able to determine if it is possible or how to implement it from the dotConnect documentation. Do you have any sample code using VPD or can you provide any insight on how to set the OS_USER parameter during connection?
We have a working example to set the OS_USER of an Oracle v$session using Java as seen below:
Properties props = new Properties();
props.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_VSESSION_OSUSER, “user1”);
OracleConnection oConn = (OracleConnection) DriverManager.getConnection(sharedUrl, props);
Reference: http://docs.oracle.com/cd/E18283_01/app ... ION_OSUSER
We were not able to determine if it is possible or how to implement it from the dotConnect documentation. Do you have any sample code using VPD or can you provide any insight on how to set the OS_USER parameter during connection?