JDBC connectivity to SAP ASE (Adaptive Server Enterprise, formerly Sybase ASE) is achieved in much the same way as is connectivity to other databases - via a JDBC driver. There are two drivers that may be used to connect to SAP ASE: the SAP jConnect driver (which also is used to connect to SAP IQ and SAP SQL Anywhere) and the open-source jTDS driver. This article describes how to connect to SAP ASE using the jConnect driver.
Setting up a QuerySurge Connection with the SAP jConnect JDBC Driver
A QuerySurge Connection to SAP ASE (Adaptive Server Enterprise, formerly Sybase ASE) using the jConnect driver is set up using the Connection Extensibility feature of QuerySurge.
- Obtain the jConnect JDBC driver (jconn4.jar) from a DBA or other administrative resource.
- Deploy the jConnect JDBC driver jar to your Agent(s). The procedure for deploying a new driver to a QuerySurge Agent is here (for Agents on Windows) and here (for Agents on Linux).
- Log into QuerySurge as a QuerySurge Admin user, and navigate to the Admin view. Steps for using the Connection Extensibility feature can be found here. To use the Connection Extensibility option in the Connection Wizard with the jConnect driver, you'll need the following information:
Driver Class:com.sybase.jdbc4.jdbc.SybDriver
Connection URL template:jdbc:sybase:Tds:<server-or-IP>:<port>/<database>
Note: The default JDBC port for this driver is 5000 (your port number may differ).
Note: There are no forward slashes separating the protocol from the host, as there are in other driver URLs .
Sample Connection URL:
jdbc:sybase:Tds:192.168.0.11:5000/pubs
- After you've launched the Connection Wizard, given your Connection a name, and selected the Extensibility option, click the Next button and enter the Driver Class:
- Click the Next button to enter your ASE Connection URL and authentication information:
- You may enter an optional Test Query in order to verify that your Connection parameters are correct. A SELECT 1 query is valid in SAP ASE. However, any standard query that returns a small amount of information is appropriate - one row/one column is enough. You can use the Test Connection button if you've entered a Test Query:
- The Connection test shows a popup indicating whether the Connection was successful:
- Once you have the information entered and (optionally) verified, close the popup and click the Save button to save the Connection. You're ready to use the Connection in a QueryPair.
Comments
0 comments
Article is closed for comments.