> Schema  > Products  > SR·Transport  > Documentation  > Configuring JDBC

 
  Configuring JDBC

SR·Transport needs to be configured for each specific database/driver combination. This involves entering the location of the .jar, .zip or .class file for your JDBC driver and then specifying the name of the driver class. Every driver has two names associated with it: the Driver File Name and the Driver Class Name.

The simplest way to add a driver to SR·Transport is to choose JDBC Preferences from the 'Apple' menu (OSX) or from the 'Edit' menu (Windows). Then drag and drop the .jar/.zip/.class file into the icon well at the top right of the window. (You can also click 'Add' and navigate to the file in the 'Open' dialog.) Next, from your documentation, copy the name of the driver class into the 'Driver Name' column to the right of the file name. Click 'Save' and then close the window.

Note: On OSX/OSX Server you can put the .jar/.zip/.class files in /Library/Java/Home/lib/ext and they will be automatically found. However you still need to add them in the SR·Transport JDBC Preferences window or they won't appear in the Driver pop-up menu.

You must quit and restart SR·Transport before these changes take effect.

 

Driver Details

The three things need to be considered:

  1. The name and location of the .jar, .zip or .class file that contains the jdbc driver.
  2. The actual name of the driver class.
  3. The 'URL' for the database connection.

Examples:

OpenBase:
Driver File Name: OpenBaseJDBC.jar
Driver Class Name: com.openbase.jdbc.ObDriver
Typical URL: jdbc:openbase://localhost/mydatabase
Oracle:
Driver File Name: classes12.zip
Driver Class Name: oracle.jdbc.driver.OracleDriver
Typical URL: jdbc:oracle:thin:@myserver:1521:ORCL
Sybase:
Driver File Name: jconn2.jar
Driver Class Name: com.sybase.jdbc2.jdbc.SybDriver
Typical URL: jdbc:sybase:Tds:myserver:5000
MySQL:
Driver File Name: mysql_comp.jar
Driver Class Name: org.gjt.mm.mysql.Driver
Typical URL: jdbc: mysql://localhost/mydatabase
PostgreSQL:
Driver File Name: pgjdbc2.jar
Driver Class Name: org.postgresql.Driver
Typical URL: jdbc:postgresql://localhost/test
FrontBase:
Driver File Name: frontbasejdbc.jar
Driver Class Name: jdbc.FrontBase.FBJDriver
Typical URL: jdbc:FrontBase://myserver/mydatabase/user=myuser
SQLServer: using the Microsoft JDBC driver
Driver File Name: sqlserver.jar, msbase.jar, msutil.jar
Driver Class Name: com.microsoft.jdbc.sqlserver.SQLServerDriver
Typical URL: jdbc:sqlserver://myserver:1433
SQLServer: using the Merant JDBC driver
Driver File Name: sqlserver.jar (also needs base.jar and util.jar)
Driver Class Name: com.merant.datadirect.jdbc.sqlserver.SQLServerDriver
Typical URL: jdbc:sqlserver://myserver:1433
EasySoft JDBC-ODBC Bridge Driver
Driver File Name: EJOB.jar
Driver Class Name: easysoft.sql.jobDriver
Typical URL: jdbc:easysoft://host/DSN
The indicated host must be running the bridge server.

Making the Connection

Double click a data source or destination well (or select 'Choose Source' or 'Choose Destination' from the 'Transport' menu), and a 'Transport Type' dialog appears. Select JDBC and the 'Connection Info' dialog is presented.

Since you have already connfigured the drivers you can select the desired one from the popup menu.

Figuring out the format ot the 'URL' for your database is actually the trickiest part of JDBC. You will have to read the database documentation closely as each one is different. URLs usually start jdbc:[databaseName]:... but then become idiosyncratic. If the URL isn't exactly right you will fail to connect and the drivers aren't usually very verbose about errors.

Fill in the URL and your user name and password, click 'Connect' and if all goes well you'll go through a series of dialogs asking about what you want to connect to and finally which table you want.

See Also