Date: Thu, 28 Mar 2024 19:04:45 +0000 (UTC) Message-ID: <377644752.11851.1711652685416@change.sos-berlin.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_11850_965939956.1711652685416" ------=_Part_11850_965939956.1711652685416 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Release Information
This article is provided for JS1 JobScheduler starting from branch 1.13<= /p>
For JS7 JobScheduler starting from branch 2.2 see JS7 - How to make JITL Jobs connect to an Oracle database using Wallet= =C2=AE
For both scenarios users might prefer not to provide a user account = and password for authentication with the DBMS from readable files.
The Oracle Wallet=C2=AE config= uration is explained with the Oracle documentation:
Except for use of the Jo= b SOSSQLPlusJob no Oracle Client installation is required at run-t= ime for use of a wallet with JS1 Agents.
However, users need an Oracle Client to set up and to configure the wall= et.
Typical commands to create a wallet include for example:
=
span>
# create = the wallet in an arbitrary location mkstore -wrl /home/js1/wallet -create # add credentials to the wallet; specify key, user account and password for= database access mkstore -wrl /home/js1/wallet/ -createCredential js1 some_account some_pass= word # check that the key has been added to the wallet mkstore -wrl /home/js1/wallet/ -listCredential
The Job JobSchedulerManagedDatabaseJobSOSHibernate and <= a href=3D"/display/PKB/Job+JobSchedulerPLSQLJob">Job JobSchedulerPLSQLJob= a> make use of the Oracle JDBC Driver.
SCHEDULER_HOME/lib/user_lib
directory of the Agent inst=
allation directory.The Job JobSchedulerManagedDatabaseJobSOSHibernate and <= a href=3D"/display/PKB/Job+JobSchedulerPLSQLJob">Job JobSchedulerPLSQLJob= a> make use of Oracle PKI Libraries.
ORACLE_HOME/jlib/oraclepki.jar
ORACLE_HOME/jlib/osdt_cert.jar
ORACLE_HOME/jlib/osdt_core.jar
The Job JobSchedulerManagedDatabaseJobSOSHibernate makes use = of a Hibernate configuration file.
The Job JobSchedu=
lerPLSQLJob does not use a Hibernate configuration file but uses t=
he job argument db_url
for the database URL.
jdbc:oracl=
e:thin:@/js1?tns_admin=3D/home/js1/wallet
similarly apply.db_user=
code> and db_password
are omitted.
A Hibernate configuration file by default is looked up from
. The Hi=
bernate configuration can look like this:SCHEDULER_DATA/config
/hibernat=
e.cfg.xml
<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"no"?> <hibernate-configuration> <session-factory> <property name=3D"hibernate.connection.driver_class">oracle.jdbc.Or= acleDriver</property> <property name=3D"hibernate.connection.password"></property> <property name=3D"hibernate.connection.url">jdbc:oracle:thin:@/js1?= tns_admin=3D/home/js1/wallet</property> <property name=3D"hibernate.connection.username"></property> <property name=3D"hibernate.dialect">org.hibernate.dialect.Oracle12= cDialect</property> <property name=3D"hibernate.show_sql">false</property> <property name=3D"hibernate.connection.autocommit">false</proper= ty> <property name=3D"hibernate.format_sql">true</property> <property name=3D"hibernate.temp.use_jdbc_metadata_defaults">false&= lt;/property> </session-factory> </hibernate-configuration>
js1
as the key to an ent=
ry in the wallet. tns_admin is used to specify the directory of the tnsnames.ora
 =
;configuration file. JDBC Connections usually do not need this configuratio=
n file as connection details (Listener, Service Name, Service ID) are speci=
fied with the URL. However, due to use of the js1
key to =
the wallet in the URL it is preferable to manage connection details from a =
tnsnames.ora
configuration file.
/home/js1/wallet
directory that in fact is t=
he directory where the wallet is located. This location is not authoritativ=
e as the file can reside in any directory that is accessible to JOC Cockpit=
.sqlnet.o=
ra
configuration file is not used with the above setup of a JDBC con=
nection.Use of the tnsnames.ora
file applies to all JITL Jobs.
The following example is not authoritative but is intended to explain a =
few basic settings:
# tnsnames.ora Network Configuration File: /home/js1/product/18.0.0= /dbhomeXE/NETWORK/ADMIN/tnsnames.ora # Generated by Oracle configuration tools. JS1 =3D (DESCRIPTION =3D (ADDRESS =3D (PROTOCOL =3D TCP)(HOST =3D 192.11.0.99)(PORT =3D 1521)) (CONNECT_DATA =3D (SERVER =3D DEDICATED) (SERVICE_NAME =3D JS1) ) ) LISTENER_JS1 =3D (ADDRESS =3D (PROTOCOL =3D TCP)(HOST =3D 192.11.0.99)(PORT =3D 1521)) ORACLR_CONNECTION_DATA =3D (DESCRIPTION =3D (ADDRESS_LIST =3D (ADDRESS =3D (PROTOCOL =3D IPC)(KEY =3D EXTPROC1521)) ) (CONNECT_DATA =3D (SID =3D CLRExtProc) (PRESENTATION =3D RO) ) )
Explanation:
JS1
of the first entry in =
this file corresponds to the key for which credentials have been stored to =
the wallet.The Job SOSSQLPlusJob identifies the wallet location from its sqlnet.ora
conf=
iguration file.
The Job JobSchedulerManagedDatabaseJobSOSHibernate and <= a href=3D"/display/PKB/Job+JobSchedulerPLSQLJob">Job JobSchedulerPLSQLJob= a> identify the wallet location from a Java define.
-Doracle.net.wallet_location=3D/home/js1<=
span style=3D"color: rgb(0,51,102);">/wallet
. This setting sh=
ould point to the directory where the wallet files are located. This settin=
g can be specified for an Agent with one of the following options:JAVA_OPTIONS environment variable before running the jobscheduler_agent_&l=
t;port>.sh|.cmd
Instance Start Script.
JAVA_OPTIONS<=
/code> environment variable to the systemd
service file.
JS1 offers the Job JobSchedulerManagedDatabaseJobSOSHibernate temp= late for use with Oracle Wallet=C2=AE.= span>
The job template is running with JS1 Agents and performs standard SQL op= erations for any DBMS including Oracle. This job template cannot be used to= execute PL/SQL code that is specific for Oracle.
All of the above explained Prerequisites apply.
All of the above explained Configuration items= apply.
JS1 offers the Jo= b JobSchedulerPLSQLJob template for use with Oracle Wallet=C2=AE.
The job template is running with JS1 Agents and can be used to execute P= L/SQL code that is specific for Oracle. This job template can be used for t= he Oracle DBMS only.
All of the above explained Prerequisites apply.
All of the above explained Configuration items= apply.
JS1 offers the Job SOSSQLPlus= Job template for use with Oracle Wallet=C2=AE.
The job template is running with JS1 Agents and makes use of the s=
qlplus
Command Line Client. This job template requires prior install=
ation of an Oracle Client that includes the SQL*Plus Command Line Clie=
nt.
Prerequisites to execute SQL*Plus with Oracle Wallet=C2=AE include that
ORACLE_HOME, LD_LIBRARY_PATH
=3D$ORACLE_HOME/lib
, TN=
S_ADMIN
The prerequisites for setting up the wallet are the same as explained ab= ove with chapter Prerequisites, Oracle Wallet=C2=AE.
sqlnet.ora
configuration file, for ex=
ample:WALLET_LOCATION =3D (SOURCE=3D(METHOD=3DFILE)(METHOD_DATA=3D(DIRE=
CTORY=3D/home/js1/wallet)))
sqlplus /@js1.
js1
is the key for the tnsnames.=
ora
configuration file to identify the database connection sett=
ings and for the wallet to identify the matching credentials.The prerequisites to set environment variables for use of SQL*Plus with = Oracle Wallet=C2=AE can be met
SCHEDULER_HOME/bin/jobscheduler_agent_<port>.sh
ORACLE_HOME=3D/some_location
LD_LIBRARY_PAT=
H=3D$ORACLE_HOME/lib
TNS_ADMIN=3D/some_location
export O=
RACLE_HOME LD_LIBRARY_PATH TNS_ADMIN
SCHEDULER_HOME\bin\jobscheduler_agent_<port>.cmd
set ORACLE_HOME=3DC:\some_location
set LD_L=
IBRARY_PATH=3D%ORACLE_HOME%\lib
set TNS_ADMIN=3DC:\some_location=
code>
This file is located in the directory specified by the TNS_ADMIN=
code> environment variable. The wallet location is identified fro=
m the
sqlnet.ora
configuration file.
The following example is not authoritative but is intended to explain a =
few basic settings:
# sqlnet.ora Network Configuration File: /home/js1/product/18.0.0/d= bhomeXE/NETWORK/ADMIN/sqlnet.ora # Generated by Oracle configuration tools. # This file is actually generated by netca. But if customers choose to # install "Software Only", this file wont exist and without the native # authentication, they will not be able to connect to the database on NT. SQLNET.AUTHENTICATION_SERVICES=3D (NTS) NAMES.DIRECTORY_PATH=3D (TNSNAMES, EZCONNECT) WALLET_LOCATION =3D (SOURCE=3D(METHOD=3DFILE)(METHOD_DATA=3D(DIRECTORY=3D/h= ome/js1/wallet))) SQLNET.WALLET_OVERRIDE =3D TRUE SSL_CLIENT_AUTHENTICATION =3D FALSE SSL_VERSION =3D 0
Explanation:
/home/js1/wallet
i=
s a possible location. Any location that is within reach of the JS1 Agent a=
nd that allows to read the wallet's files can be used.