You can translate the question and the replies:

Interpolation of function and variable.

I have a connection to an Oracle database. In the connection we set up several Driver Properties including the user name which the database uses to pull only the rows the user executing the query has access to (row security). That property is set up like this: v$session.osuser = @{USER_NAME} that would work just fine except that the user name variable value has the domain attached to it. For some users with longer names or service accounts this is breaking our code. In oracle, the variable v$session.osuser has a limit of 30 characters. So, if you have a user whose name plus the "@ourdomain.com" exceed the 30 characters, then Oracle responds with an error. What we are trying to do is to have a function truncate the "@ourdomain.com" and just pass the "name.lastname" to Oracle. But it does not work. we think is the way we interpolate the function call. Here is the code: v$session.osuser = REPLACE(@{USER_NAME},"@ourdomain.com","")
user
06-09-2018 12:12:45 -0400

1 Answer

Hi, In order to achieve this scenario, I would modify the LDAP configuration of the Virtual DataPort, to use the usernames without the domain (i.e.), I should modify the LDAP configuration such that it uses the** 'Attribute with user name' **which contains the username only and then, select** 'Avoid domain name for authorization' **checkbox of 'Kerberos configuration' which is available under the **'Server Configuration**' of the Virtual DataPort Administration Tool. So that, the attribute which I have entered in **'Attribute with user name'** only stores the user account of the users but not the domain name. Hence, Virtual DataPort will send only the username to Oracle database and then Oracle has to work with the username without the domain. Also, it is not possible to apply any function over the driver property. Hence, you will not be able to use any function over the** "v$session.osuser"** property to truncate the value of the username. You can also refer to the section [Setting-Up the Kerberos Authentication in the Virtual DataPort Server](https://community.denodo.com/docs/html/browse/6.0/vdp/administration/server_administration_-_configuring_the_server/kerberos_authentication/setting-up_the_kerberos_authentication_in_the_virtual_dataport_server#setting-up-the-kerberos-authentication-in-the-virtual-dataport-server) of Virtual DataPort Administration Guide for more information. Hope this helps!
Denodo Team
26-09-2018 08:27:23 -0400
You must sign in to add an answer. If you do not have an account, you can register here