How to configure the connection to an Oracle database when LDAP is in use?
Question
We would like to use JobScheduler to start frequently occurring PL/SQL processes in an Oracle database.
We use LDAP authentication with the database and would like to know how we can configure the connection string.
Answer
We have a PL/SQL job and a SQL*Plus job in our JITL library of job templates.
Use the following example string to connect to Oracle using LDAP:
String url = "jdbc:oracle:thin:@ldap://ldap-server:389/CN=Admin,O=COHERIS,C=FR";
Alternatives would be:
String url = "jdbc:oracle:thin:@ldap://" + ldapHost + "/" + instance + ldap_context;
and:
String url = "jdbc:oracle:thin:@ldap://ldap-server:389/mts-a-de-grid,CN=Admin,O=COHERIS,C=FR";
The user ID, password and the URL are entered in the JITL jobs as parameters and the strings can be used in both the PL/SQLand the SQL*Plus job.