4.2.6.  Pilote JDBC

[Remarque]Remarque

Le logiciel CADENAS nécessaire à l'utilisation des connexions JDBC à la base de données de liens est soumis à une licence et est payant.

Vous avez besoin d'une licence supplémentaire (CNS20059*DATABASE*JDBC) !

[Remarque]Remarque

Avantage de l'utilisation de pilotes JDBC:

L'installation et la configuration du pilote se font sur le serveur ! Il n'est pas nécessaire d'installer le pilote sur chaque client, comme c'est le cas avec ODBC !

Si l'on utilise PARTapplicationServer, l'avantage est relatif, car le pilote n'est installé que sur le serveur.

[Remarque]Remarque

Pilote JDBC

Les pilotes JDBC standard sont disponibles à l’adresse suivante : libs/all/java/jar.

D’autres doivent être contactés par le fabricant respectif (Oracle, Microsoft) et stocké dans l’annuaire libs/all/java/jar être copié. Ils ne sont PAS installés du côté de CADENAS.

Veuillez les télécharger à l'une des adresses suivantes :

Pour plus de détails, voir Section 4.7.2, «  Connexion à la base de données  ».

jdbc.cfg fichier de configuration

Le Le fichier de configuration jdbc.cfg enregistre le données de connexion à la base de données, c’est-à-dire le serveur, la base de données et en particulier le et l’URL du pilote JDBC pour créer la classe Connexion à la base de données.

# [PLINKDB]
#   #IP-adress or server name
# Server=
#   #Database name
# ServerDB=
#   #the jdbc driver class
# DriverClass=com.sap.dbtech.jdbc.DriverSapDB
#   #the complete URL for the jdbc driver
# URL=jdbc:sapdb://catia2.cadenas/PLINKDB

#Examples for different databases:
#---------------------------------

#MSSQL with JTDS
#[PLINKDB_MSSQLJDBC]
#Server=136.230.230.214
#ServerDB=DB-test
#DriverClass=net.sourceforge.jtds.jdbc.Driver
#URL=jdbc:jtds:sqlserver://136.230.230.214:1433/PLINKDB

#:HELP;MSSQL with sqljdbc 4.1. You can download the driver from the microsoft homepage. 
 section_75_1154427696031The file sqljdbc41.jar has to be copied into the folder software
 \libs\all\java\jar. The file sqljdbc_auth.dll has to be copied into the directory software\
 libs\x86\32\java\lib and software\libs\x86\64\java\lib
#[PLINKDB_MSSQLJDBC_41]
#Server=servername
#ServerDB=SQLEXPRESS
#DriverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
#URL=jdbc:sqlserver://servername:1433;databaseName=plinkdb;integratedSecurity=true

#:HELP;Oracle You can download the driver from https://www.oracle.com/database/technologies
/appdev/jdbc-downloads.html. The jar file (f.e. ojdbc8.jar) has to be copied into the folder 
software\libs\all\java\jar.
#[PLINKDB_ORACLEJDBC]
#DriverClass=oracle.jdbc.driver.OracleDriver
#URL=jdbc:oracle:thin:@servername:1521/PLINKDB

#SAP-DB:
#[PLINKDB_SAPDBJDBC]
#DriverClass=com.sap.dbtech.jdbc.DriverSapDB
#URL=jdbc:sapdb://servername/PLINKDB

#:HELP;MySQL You can download the driver from mysql.com. The jar file (f.e. mysql-connector
 -java-8.0.17.jar) has to be copied into the folder software\libs\all\java\jar.
  
#[PLINKDB_MYSQLJDBC]
#DriverClass=com.mysql.jdbc.Driver
#URL=jdbc:mysql://servername:3306/PLINKDB

#Derby (local)    (Experimental!):
#[PLINKDB_DERBYJDBC]
#DriverClass=org.apache.derby.jdbc.EmbeddedDriver
#URL=jdbc:derby:C:\data\derby\plinkdb

#Derby (net)   (Experimental!):
#[PLINKDB_DERBYJDBC]
#DriverClass=org.apache.derby.jdbc.ClientDriver
#URL=jdbc:derby://localhost:1527/plinkdb

#SQ-Lite (pldbdemo)
[PLDBDEMO_SQLITEJDBC]
#:VALS_S
#:HELP;IP-adress or server name, on which the database is installed
Server=localhost
#:VALS_S
#:HELP;The instance name of the database. Oracle: SID
ServerDB=pldbdemo
#:VALS_S
#:HELP;The jdbc driver class.
DriverClass=SQLite.JDBCDriver
#:VALS_S
#:HELP;The complete URL for the jdbc driver.
Url=jdbc:sqlite:/$CADENAS_USER/sqlite/pldbdemo.db3