JDBC Driver for SybaseIQ

Build 23.0.8839

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for SybaseIQ consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.sybaseiq.SybaseIQDriver
  • Provide the JDBC URL. For example:
    jdbc:sybaseiq:user=myuser;password=mypassword;Server=localhost;Database=Northwind
    
    or
    
    jdbc:cdata:sybaseiq:user=myuser;password=mypassword;Server=localhost;Database=Northwind

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:sybaseiq:" or "jdbc:cdata:sybaseiq:" and can include any of the connection properties in name-value pairs separated with semicolons.

Connecting to SybaseIQ

To connect to the SybaseIQ, specify the following connection properties:

  • Server: Set this to the name or network address of the SybaseIQ or SAP SQL Anywhere database instance.
  • Database: Set this to the name of the SybaseIQ or SAP SQL Anywhere database running on the specified Server.

Note: It is also possible to connect to an instance of SAP SQL Anywhere with the above driver configuration.

Authenticating to SybaseIQ

SybaseIQ supports several methods for authentication including basic, Kerberos, and, LDAP.

Basic

Set the AuthScheme to Basic and set the following connection properties to use SybaseIQ authentication.

  • User: Set this to the username of the authenticating SybaseIQ user.
  • Password: Set this to the username of the authenticating SybaseIQ user.

LDAP

To connect with LDAP authentication, you will need to configure SybaseIQ server-side to use the LDAP authentication mechanism.

After configuring SybaseIQ for LDAP, you can connect using the same credentials as basic authentication.

Kerberos

To leverage Kerberos authentication, begin by enabling it via the following connection property:

  • AuthScheme: Set to Kerberos will be used for authentication to SybaseIQ.
See Using Kerberos information regarding the connection properties that need to be set for Kerberos authentication.

You can find an example connection string below:

Server=MyServer;Port=MyPort;User=SampleUser;Password=SamplePassword;Database=MyDB;Kerberos=true;KerberosKDC=MyKDC;KerberosRealm=MYREALM.COM;KerberosSPN=server-name

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839