0% found this document useful (0 votes)
50 views

Java Ref

Uploaded by

mulyonosarpan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Java Ref

Uploaded by

mulyonosarpan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 141

Java Edition 2.

DataDirect ®
®

SequeLink JDBC Driver

Reference
© 1999 MERANT. All rights reserved. Printed in the U.S.A.

INTERSOLV, DataDirect, APS, Maintenance Workbench, PVCS, TechGnosis,


SequeLink, and Middleware are registered trademarks of MERANT. PVCS
SiteSync, INTERSOLV Messaging, DataDirect Connect ODBC, DataDirect
Connect OLE DB, DataDirect Reflector, WebDBLink, Client/Server MiddleWare,
PVCS VM Server, PVCS Dimensions, PVCS Process Manager, PVCS Version
Manager, PVCS Tracker, and PVCS TrackerLink are trademarks of MERANT.
Micro Focus is a registered trademark and Net Express is a trademark of
MERANT International Limited. Other company or product names mentioned
herein may be trademarks or registered trademarks of their respective
companies.

No part of this publication, with the exception of the software product user
documentation contained on a CD-ROM, may be copied, photocopied,
reproduced, transmitted, transcribed, or reduced to any electronic medium or
machine-readable form without prior written consent of MERANT.

Licensees may duplicate the software product user documentation contained


on a CD-ROM, but only to the extent necessary to support the users
authorized access to the software under the license agreement. Any
reproduction of the documentation, regardless of whether the
documentation is reproduced in whole or in part, must be accompanied by
this copyright statement in its entirety, without modification.

U.S. GOVERNMENT RESTRICTED RIGHTS. It is acknowledged that the Software


and the Documentation were developed at private expense, that no part is in
the public domain, and that the Software and Documentation are Commercial
Computer Software provided with RESTRICTED RIGHTS under Federal
Acquisition Regulations and agency supplements to them. Use, duplication or
disclosure by the U.S. Government is subject to restrictions as set forth in
subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software
clause at DFAR 252.227-7013 et. seq. or subparagraphs (c)(1) and (2) of the
Commercial Computer Software Restricted Rights at FAR 52.227-19, as
applicable. Contractor is MERANT, 701 East Middlefield Road, Mountain View,
California 94043. Rights are reserved under copyright laws of the United
States with respect to unpublished portions of the Software.

MERANT
701 East Middlefield Road
Mountain View, California 94043
3

Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
What Is DataDirect SequeLink Java Edition? . . . . . . . . . . . . . . 7
SequeLink ODBC Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
SequeLink OLE DB Edition. . . . . . . . . . . . . . . . . . . . . . . . . . 8
SequeLink Java Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Using This Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9


Other Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Conventions Used in This Book. . . . . . . . . . . . . . . . . . . . . . . . . 12
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 12
Mouse Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Keyboard Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Environment-Specific Information . . . . . . . . . . . . . . . . . . . 14

Contacting Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
About the SequeLink JDBC Driver . . . . . . . . . . . . . . . . . . . . . . 17
Installing the SequeLink JDBC Driver . . . . . . . . . . . . . . . . . . . . 18

2 Using the SequeLink JDBC Driver. . . . . . . . . . . . . . . 21


Specifying Connection URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Specifying Connection Properties. . . . . . . . . . . . . . . . . . . . . . . 25
Connection Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Service Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Client Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Testing Your Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SequeLink JDBC Driver Reference


4

Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
SequeLink JDBC Driver Errors . . . . . . . . . . . . . . . . . . . . . . 45
SequeLink Server Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Database Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

3 Using the SequeLink Proxy Server . . . . . . . . . . . . . . 49


Using the SequeLink JDBC Driver With Untrusted
Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Configuring the SequeLink Proxy Server . . . . . . . . . . . . . . . . 51
Starting the SequeLink Proxy Server . . . . . . . . . . . . . . . . . 52
Stopping the SequeLink Proxy Server . . . . . . . . . . . . . . . . 53
Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Using the SequeLink Proxy Server as a Windows NT
Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

4 Using SSL Encryption. . . . . . . . . . . . . . . . . . . . . . . . . 57


About SSL Encryption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Using SSL Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Specifying Which SSL Cipher Suites To Use . . . . . . . . . . . . 60
Supported SSL Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . 61

Enabling SSL Encryption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65


Using Private Keys with the SequeLink Proxy Server . . . . . . . 68
Providing the Pass Phrase for the SequeLink Proxy
Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Storing the Private Key in PKCS8 Format . . . . . . . . . . . . . 70
Using the Encryption Tool . . . . . . . . . . . . . . . . . . . . . . . . . 71
Using the Decryption Tool . . . . . . . . . . . . . . . . . . . . . . . . . 72

Verifying the SequeLink Proxy Server Certificate. . . . . . . . . . 73


Using RSA and RC4 Algorithms (Domestic Version Only) . . . 75

SequeLink JDBC Driver Reference


5

5 Using JDBCTest. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
About JDBCTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
JDBCTest Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Starting JDBCTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Configuring JDBCTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Making a JDBCTest Connection . . . . . . . . . . . . . . . . . . . . . 80
Executing a Simple Select Statement . . . . . . . . . . . . . . . . . 84
Executing a Prepared Statement . . . . . . . . . . . . . . . . . . . . 86
Retrieving Database Metadata . . . . . . . . . . . . . . . . . . . . . . 90
Scrolling Through a Result Set . . . . . . . . . . . . . . . . . . . . . . 93
Executing a Batch on a Prepared Statement . . . . . . . . . . . 97
Using Stored Procedures With Oracle . . . . . . . . . . . . . . . . 101

6 Tracking JDBC Calls . . . . . . . . . . . . . . . . . . . . . . . . . . 107


About Spy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Spy URL Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Spy URL Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Spy Log Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

A JDBC Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113


JDBC 1.22 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
JDBC 2.0 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Scrollable Cursors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Result Set Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Concurrency Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Using Scrollable Cursors with the SequeLink
JDBC Driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

JDBC Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120


Threading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

SequeLink JDBC Driver Reference


6

B Fine-Tuning JDBC Application Performance . . . . . . 123


Using SequeLink Shadow Data Dictionaries . . . . . . . . . . . . . . 123
Reducing Download Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Improving Character Set Conversion Performance . . . . . . . . 127
Fetching BigDecimal Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 128

C Frequently Asked Questions. . . . . . . . . . . . . . . . . . . 129

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

SequeLink JDBC Driver Reference


7

Preface

This book is your reference to using the SequeLink® JDBC Driver.


Read on to find out more about SequeLink Java Edition™ and
the SequeLink JDBC Driver.

What Is DataDirect SequeLink Java Edition?


DataDirect SequeLink is a series of standards-based client/server
middleware products that allow clients to access databases on
multiple servers using existing operating system and network
infrastructures.

The following SequeLink editions are available:

■ SequeLink ODBC Edition supports Open Database


Connectivity (ODBC) applications.

■ SequeLink OLE DB Edition supports OLE DB applications.

■ SequeLink Java Edition supports Java Database Connectivity


(JDBC) applications.

SequeLink ODBC Edition


SequeLink ODBC Edition Client
■ SequeLink ODBC Edition Client for Windows 9x/Windows NT
■ SequeLink ODBC Edition Client for Windows 3.1x
■ SequeLink ODBC Edition Client for UNIX
■ SequeLink ODBC Edition Client for Macintosh

SequeLink JDBC Driver Reference


8 Preface

SequeLink Server
■ SequeLink Server for Windows NT
■ SequeLink Server for UNIX
■ SequeLink Server for AS/400
■ SequeLink Server for OS/390

SequeLink OLE DB Edition


SequeLink OLE DB Edition Client
■ SequeLink OLE DB Edition Client for Windows 9x/Windows NT

SequeLink Server
■ SequeLink Server for Windows NT
■ SequeLink Server for UNIX
■ SequeLink Server for AS/400
■ SequeLink Server for OS/390

SequeLink Java Edition


SequeLink Java Edition Client
■ SequeLink JDBC Driver
■ SequeLink Proxy Server

SequeLink Server
■ SequeLink Server for Windows NT
■ SequeLink Server for UNIX
■ SequeLink Server for AS/400
■ SequeLink Server for OS/390

SequeLink JDBC Driver Reference


Using This Reference 9

Using This Reference


Audience and This reference assumes that you are familiar with the Java
Prerequisite language, JDBC API, and Structured Query Language (SQL).
knowledge Additionally, you should be familiar with SequeLink Server. For
more information about SequeLink, refer to your DataDirect
SequeLink documentation.
How this This reference contains the following information:
reference is
organized ■ Chapter 1, “Getting Started” introduces the SequeLink JDBC
Driver.

■ Chapter 2, “Using the SequeLink JDBC Driver” explains how


to connect using the SequeLink JDBC Driver, lists connection
attributes, and provides troubleshooting information for
connection problems.

■ Chapter 3, “Using the SequeLink Proxy Server” introduces


the SequeLink Proxy Server and describes how to
configure it.

■ Chapter 4, “Using SSL Encryption” provides an overview of


Secure Socket Layer (SSL) encryption and describes how to
use SSL with the SequeLink JDBC Driver.

■ Chapter 5, “Using JDBCTest” introduces JDBCTest, a tool that


allows you to test and learn the JDBC API, and contains a
tutorial that takes you through a working example of its use.

■ Chapter 6, “Tracking JDBC Calls” introduces Spy, a tool that


allows you to track JDBC calls, and describes how to use it.

■ Appendix A, “JDBC Support” describes the JDBC functionality


supported by the SequeLink JDBC Driver.

■ Appendix B, “Fine-Tuning JDBC Application Performance”


provides some tips for fine-tuning the performance of your
JDBC applications.

SequeLink JDBC Driver Reference


10 Preface

■ Appendix C, “Frequently Asked Questions” lists some


frequently-asked questions and answers about the SequeLink
JDBC Driver.

Other Documentation
SequeLink ODBC Edition:
■ SequeLink ODBC Edition Client Installation Guide
■ SequeLink Server Installation Guide
■ SequeLink ODBC Driver Reference for Windows 3.1x
■ SequeLink ODBC Driver Reference for Windows 9x,
Windows NT, UNIX, and Macintosh
■ SequeLink Administrator’s Guide
■ SequeLink Error Codes and Messages Reference

SequeLink OLE DB Edition:


■ SequeLink OLE DB Edition Client Installation Guide
■ SequeLink Server Installation Guide
■ SequeLink OLE DB Provider Reference
■ SequeLink Administrator’s Guide
■ SequeLink Error Codes and Messages Reference

Note: Getting Started with DataDirect for OLE DB is also


available.

SequeLink Java Edition:


■ SequeLink Java Edition Client Installation Guide
■ SequeLink Server Installation Guide
■ SequeLink JDBC Driver Reference
■ SequeLink Administrator’s Guide
■ SequeLink Error Codes and Messages Reference

SequeLink JDBC Driver Reference


Other Documentation 11

The following table provides a guide for finding the information


you need about SequeLink.

For information about… Go to…


Installing SequeLink Server SequeLink Server Installation Guide
Installing SequeLink Clients SequeLink ODBC Edition Client Installation Guide
SequeLink OLE DB Edition Client Installation Guide
SequeLink Java Edition Client Installation Guide
Installing the SequeLink Online Instructions are available on the DataDirect CD Insert and
Documents on the Web site.
Planning, configuring, and SequeLink Administrator’s Guide
administering your system and
network for SequeLink; creating
and managing data sources;
using SequeLink with your
database
Troubleshooting problems and SequeLink Error Codes and Messages Reference
referencing error codes
Using the SequeLink ODBC SequeLink ODBC Driver Reference for Windows 3.1x
Drivers SequeLink ODBC Driver Reference for Windows 9x,
Windows NT, UNIX, and Macintosh
Using the SequeLink OLE DB SequeLink OLE DB Provider Reference
Provider Getting Started with DataDirect for OLE DB
Using the SequeLink JDBC Driver SequeLink JDBC Driver Reference

Note: Occasionally, this book refers the reader to Web URLs for
more information about specific topics, including Web URLs not
maintained by MERANT. Because it is the nature of the Web and
Web documents to change frequently, we only can guarantee
that the URLs referenced in this book are correct at the time of
publishing.

SequeLink JDBC Driver Reference


12 Preface

Conventions Used in This Book


The following sections describe the typography, terminology, and
other conventions used in this reference.

Typographical Conventions
This reference uses the following typographical conventions:

Convention Explanation
italics Introduces new terms with which you may not be
familiar, and is used occasionally for emphasis.
bold Emphasizes important information. Also indicates
button, menu, and icon names on which you can
act. For example, click Next.
UPPERCASE Indicates the name of a file. For operating
environments that use case-sensitive filenames, the
correct capitalization is used in information specific
to those environments.
Also indicates keys or key combinations that you
can use. For example, press the ENTER key.
monospace Indicates syntax examples, values that you specify,
or results that you receive.
monospaced Indicates names that are placeholders for values
italics that you specify. For example, filename.
forward slash / Separates menus and their associated commands.
For example, Select File / Copy means that you
should select Copy from the File menu.
The slash also separates directory levels when
specifying locations under UNIX.
vertical rule | Indicates an “OR” separator used to delineate
items.

SequeLink JDBC Driver Reference


Conventions Used in This Book 13

Convention Explanation
brackets [ ] Indicates optional items. For example, in the
following statement: SELECT [DISTINCT], DISTINCT
is an optional keyword.
Also indicates sections of the Windows Registry.
braces { } Indicates that you must select one item. For
example, {yes | no} means that you must specify
either yes or no.
ellipsis . . . Indicates that the immediately preceding item can
be repeated any number of times in succession. An
ellipsis following a closing bracket indicates that all
information in that unit can be repeated.

Mouse Conventions
This action… Means to…
Click Point to an object with the mouse pointer and
momentarily press the left mouse button.
Double-click Press the left mouse button twice.
Right-click Momentarily press the right mouse button.
Drag Press and hold the left mouse button while
dragging item(s) to another part of the screen.
SHIFT+Click Click an object to select it; then, press and hold
the SHIFT key. Click another object to select the
intervening series of objects.
CTRL+Click Press and hold the CTRL key; then, click a
selection. This lets you select or deselect any
combination of objects.

Keyboard Conventions
Select menu items by using the mouse or pressing ALT+ the key
letter of the menu name or item.

SequeLink JDBC Driver Reference


14 Preface

Environment-Specific Information
This reference supports users of various operating environments.
Where it provides information that is not applicable to all
supported environments, the following symbols are used to
identify that information.

Symbol Environment
Windows 9x. Information specific to the Microsoft
Windows 95 or Windows 98 environment is identified by
the Windows symbol and the numbers “9x.”
Windows NT. Information specific to the Microsoft
Windows NT environment is identified by the Windows
symbol and the letters “NT.”
UNIX. Information specific to UNIX environments is
identified by this symbol, which applies to all UNIX
environments supported. UNIX is a registered trademark in
the United States and other countries, licensed exclusively
through X/Open Company Ltd.
Macintosh Power PC. Information specific to the
Macintosh Power PC environment is identified by the
MacOS symbol, which is a registered trademark of
Apple Computer, Inc., and the words “Power PC.”

Contacting Technical Support


MERANT provides technical support for all registered users of
SequeLink, including limited installation support, for the first 30
days. For support after that time, contact us using one of the
following methods or purchase further support by enrolling in
the SupportNet program. For more information about
SupportNet, contact your sales representative.

World Wide http://www.merant.com/datadirect/support


Web

SequeLink JDBC Driver Reference


Contacting Technical Support 15

The MERANT Web site provides the latest support information


through SupportNet Online, our global service network that
provides access to valuable tools and information. Our
SupportNet users access information using the Web, automatic
email notification, newsgroups, and regional user groups.
SupportNet Online includes a knowledge base that allows you to
search on keywords for technical bulletins and other
information. You also can download product fixes for your
DataDirect products.

Internet

Australia and New [email protected]


Zealand
EMEA [email protected]
Japan [email protected]
USA and Canada [email protected]

Telephone

Australia 1 800 335 664 or 8:30-5:30 p.m. Local Melbourne Time (LMT)
9816 9977 for
Melbourne Metro
Belgium 0800 724 61 9:00-6:30 p.m. CET
France 0800 91 56 07 9:00-6:30 p.m. CET
Germany 0130 822 496 or 9:00-6:30 p.m. CET
+44 1727 812898
Japan 81-3-5401-9660 9:00-12:00, 1:00-5:00 p.m. JST
The Netherlands 0800 022 1609 9:00-6:30 p.m. CET
New Zealand 1 800 335 664 8:30-5:30 p.m. LMT
United Kingdom +44 1727 811881 8:00-5:30 p.m. GMT
and Ireland
USA and Canada 1 800 443 1601 8:30-8:00 p.m. EST

SequeLink JDBC Driver Reference


16 Preface

Fax and Mail


Information

Fax US 1 919 461 4527


Fax International +32-15-320919
Mail 1500 Perimeter Park Drive, Suite 100, Morrisville, NC 27560 USA

When you contact us, make sure that you can provide the
following information:

■ The product serial number located on the Product


Registration Information card or on a product serial number
card in your package. The number will be checked to verify
your support eligibility. If you do not have a SupportNet
contract, we will ask you to speak with a sales representative.

■ Your name and organization. For a first-time call, you may be


asked for full customer information, including location and
contact details.

■ The version number of your DataDirect product.

■ The type and version of your operating system.

■ Any third-party software or other environment information


required to understand the problem.

■ A brief description of the problem, including any error


messages that you have received, and the steps preceding the
occurrence of the problem. Depending on the complexity of
the problem, you may be asked to submit an example so that
we can recreate the problem.

■ An assessment of the severity level of the problem.

SequeLink JDBC Driver Reference


17

1 Getting Started

This chapter introduces the SequeLink JDBC Driver, which


provides JDBC access through a Java-enabled applet, application,
or Web browser to any database supported by SequeLink Server.
For more information about supported databases, refer to the
SequeLink Server Installation Guide.

About the SequeLink JDBC Driver


The SequeLink JDBC Driver is optimized for the Java
environment, providing support for trusted and untrusted
environments. It is compliant with both the JDBC 1.22 and
JDBC 2.0 specifications. For details about the JDBC functionality
supported by the SequeLink JDBC Driver, see Appendix A, “JDBC
Support.”

The SequeLink JDBC Driver can be used with the SequeLink Proxy
Server to provide reliable transaction security for your JDBC
applications and applets using Secure Socket Layer (SSL)
encryption. For more information about the SequeLink Proxy
Server, see Chapter 3, “Using the SequeLink Proxy Server.” For
more information about SSL encryption, see Chapter 4, “Using
SSL Encryption.”

SequeLink JDBC Driver Reference


18 Chapter 1 Getting Started

In addition, you can use the following tools with the SequeLink
JDBC Driver:

■ JDBCTest is a menu-driven application that allows you to test


and learn the JDBC API.

■ Spy is a tracking tool for JDBC calls that passes calls issued by
an application to the underlying JDBC driver and logs detailed
information about those calls.

Installing the SequeLink JDBC Driver


The SequeLink JDBC Driver is installed when you install SequeLink
Java Edition Client. For instructions on installing SequeLink Java
Edition Client, refer to the SequeLink Java Edition Client
Installation Guide. After installing SequeLink Java Edition Client,
the directory structure should look like Figure 1-1 on page 19.

SequeLink JDBC Driver Reference


Installing the SequeLink JDBC Driver 19

Figure 1-1. SequeLink Java Edition Client Directory Structure

driver

classes
slje.jar Contains all the JDBC driver classes (JAR file). To load the driver, add this file to
your CLASSPATH variable.
crysec.jar Contains the SSL implementation (JAR file). To use SSL, add this file to your
CLASSPATH variable.

src Contains Java sources that extend the JDBC driver, including an example of
interfacing with JSafe (Domestic version only) and an example of a certificate
checker class.
jdbctest

classes Contains all the JDBCTest classes. To use JDBCTest, add this directory to your
CLASSPATH variable.
jdbctest.bat Starts JDBCTest (batch file).
jdbctest.html Starts JDBCTest as an applet (HTML file).
jdbctest.sh Starts JDBCTest (UNIX shell script).

install.idb Support file for the un-installer.

proxy

classes Contains all the Proxy Server classes.

proxyserver.jar Contains the Proxy Server (JAR file). To load the Proxy Server, add this file to
your CLASSPATH variable.
crysec.jar Contains the SSL implementation (JAR file). To use SSL, add this file to your
CLASSPATH variable.

proxyserver.bat Starts/Stops Proxy Server (batch file)


proxyserver.sh Starts/Stops Proxy Server (UNIX shell script)
cmdsrvc.exe Starts the Proxy Server as a Windows NT service
proxyserver.cfg Example Proxy Server configuration file
encrypt.bat Encrypts private key file (Windows NT)
encrypt.sh Encrypts private key file (UNIX)
decrypt.bat Decrypts private key file (Windows NT)
decrypt.sh Decrypts private key file (UNIX)

src Contains Java sources that extend the JDBC driver, including an example of
interfacing with JSafe (Domestic version only).
spy

classes
spy.jar Contains all the JDBCSpy classes (JAR file). To load Spy, add this file to your
CLASSPATH variable.
uninstall.class Un-installs SequeLink Java Edition Client.

SequeLink JDBC Driver Reference


20 Chapter 1 Getting Started

SequeLink JDBC Driver Reference


21

2 Using the SequeLink JDBC


Driver

This chapter explains how to connect using the SequeLink JDBC


Driver, lists connection attributes, and provides troubleshooting
information for connection problems.

Specifying Connection URLs


You open a JDBC connection to a SequeLink service by specifying
a connection URL. The connection URL format depends on
whether you are using SSL encryption. For more information
about SSL encryption, see Chapter 4, “Using SSL Encryption” on
page 57.

If not using SSL encryption, the connection URL format is:


jdbc:sequelink://hostname:port/[type][;<key>=<value>]...

or

jdbc:sequelink:socket://hostname:port/[type][;<key>=<value>]...

If using SSL encryption, the connection URL format is:


jdbc:sequelink:ssl://hostname:port/[type];ciphersuites=value
[;<key>=<value>]...

where:

SequeLink JDBC Driver Reference


22 Chapter 2 Using the SequeLink JDBC Driver

hostname is the Internet address, or name of the server or host to which


you want to connect.
Note: Untrusted applets cannot open a socket to a machine
other than the originating host. For more information about
untrusted applets, see “Using the SequeLink JDBC Driver With
Untrusted Applets” on page 49.
port is the TCP port on which the SequeLink server is listening. The
default port number depends on the SequeLink service type:
Service Type Port Number
DB2 on AS/400 4001 or 4002
DB2 on NT 4007
DB2 on OS/390 4007
DB2 on UNIX 4007
Informix 4004
Microsoft SQL Server 4006
ODBC Socket 4011
ODBC Btrieve 4011
ODBC dBASE 4011
ODBC Excel 4011
ODBC FoxPro 4011
ODBC Microsoft Access 4011
ODBC Paradox 4011
ODBC Text 4011
OpenINGRES 4010
Oracle 4003
Sybase 4005
Note: Although your SequeLink server may be configured to
use the default port, you still must specify the correct value for
the port in the connection URL.

SequeLink JDBC Driver Reference


Specifying Connection URLs 23

type is the type of SequeLink service you want to access:


Service Value
DB2 on AS/400 [DB2 on AS/400]
DB2 on NT [DB2 on NT]
DB2 on UNIX [DB2 on UNIX]
DB2 on OS/390 [DB2 on OS/390]
Informix [Informix]
Microsoft SQL Server [SQLServer]
ODBC Btrieve [ODBC Btrieve]
ODBC dBASE [ODBC dBASE]
ODBC Excel [ODBC Excel]
ODBC FoxPro [ODBC FoxPro]
ODBC Microsoft Access [ODBC MS Access]
ODBC Paradox [ODBC Paradox]
ODBC Socket [ODBC Socket]
ODBC Text [ODBC Text]
OpenINGRES [OpenINGRES]
Oracle [Oracle]
Sybase [Sybase]
Note: You must specify the open bracket ([) and close bracket
(]) characters.
<key>=<value> specifies connection attributes. For descriptions of connection
attributes, see “Connection Attributes” on page 25.
Notes:
■ Connection attributes can be specified through the
connection URL or connection properties. Attributes
specified using connection properties override equivalent
attributes specified in the URL.

■ Connection attribute keys are not case sensitive.

SequeLink JDBC Driver Reference


24 Chapter 2 Using the SequeLink JDBC Driver

Examples:

The following examples show some typical SequeLink JDBC Driver


URLs:

jdbc:sequelink://waterloo:4003/[Oracle];
jdbc:sequelink://189.23.5.25:4003/[Oracle];OSUser=john;
OSPassword=whatever
jdbc:sequelink://189.23.5.132:4004/[Informix];Database=stores7
jdbc:sequelink://189.23.5.132:4004/[Informix];Database=stores7;
OSUser= john;OSPassword=whatever
jdbc:sequelink://189.23.5.68:4005/[Sybase];Database=pubs;
OSUser=john;OSPassword=whatever
jdbc:sequelink://qant:4006/[SQLServer];Database=pubs;OSUser=john;
OSPassword=whatever
jdbc:sequelink:ssl://bryce:9500/[Oracle];ciphersuites=
SSL_DH_anon_WITH_RC4_128_MD5
jdbc:sequelink:ssl://bryce:9502/[Oracle];ciphersuites=
SSL_DHE_RSA_WITH_DES_CBC_SHA;certificatecheck=
intersolv.sequelink.qa.AcceptTestCert

The preceding examples do not show the user and password


connection attributes. Typically, these attributes are specified in
the connection properties stored in the java.util.Properties
object, which is supplied as a parameter to the Connect method.

For more information about connection attributes, see


“Connection Attributes” on page 25.

SequeLink JDBC Driver Reference


Specifying Connection Properties 25

Specifying Connection Properties


When you open a JDBC connection, a java.util.Properties object
is passed to the SequeLink JDBC Driver. This object holds a list of
string key-value connection attributes equivalent to those you
can specify in the SequeLink JDBC Driver connection URL.

Note: Connection properties override equivalent attributes


specified in the connection URL. For descriptions of connection
attributes, see “Connection Attributes” on page 25.

Connection Attributes
For a description of:

■ Connection attributes that depend on the database you


access, see “Service Attributes” on page 25

■ Connection attributes that are supported for all database


types, see “Client Attributes” on page 37

Note: Attributes specified in the connection properties will


override any equivalent attributes specified in the
connection URL.

Service Attributes
This section lists connection attributes that depend on the type
of database you want to access.

SequeLink JDBC Driver Reference


26 Chapter 2 Using the SequeLink JDBC Driver

DB2 on AS/400
user - password

These are the AS/400 user name and password required to log on
to an AS/400 server.

Library

This attribute specifies the library to be used. By default, the


library that will be used is specified by the library list configured
on the AS/400 for the user who issues the connection. This
parameter allows additional operations to be performed on the
library list. You can choose from the following values:

Empty string If an empty string is specified, no changes


are made to the library list.
SQADDLIBLE <Lib1> [<Lib2>] … The specified libraries are added to the top
of the library list of the server process.
SQRPLLIBLE <Lib1> [<Lib2>] … The current user library list is replaced by the
specified libraries.
SQAPPLIBL <Lib1> [<Lib2>] … The specified libraries are added to the
bottom of the user library list.
Application_name The SequeLink server process will call this
AS/400 program during connection setup.

DB2 on NT
user - password

These are the DB2 user name and user authorization required to
log on a DB2 on NT database.

Database

This identifies the DB2 database alias. For more information,


refer to your DB2 documentation.

SequeLink JDBC Driver Reference


Connection Attributes 27

OSUser - OSPassword

These attributes identify the host user account under which the
SequeLink Server process will run. If your server specifies the host
user ID and password or if no user authentication is required, do
not specify the OSUser and OSPassword attributes. For more
information about specifying user authentication levels, refer to
the SequeLink Administrator’s Guide.

DB2 on OS/390
user - password

These are the OS/390 user name and password required to log
on to your OS/390 system. The user name and password are
passed to the security system installed on OS/390. If no security
system is installed, dummy values must be supplied. SequeLink
supports the following security systems: RACF, CA-ACF2, and
CA-TOP SECRET.

DB2 on UNIX
user - password

These are the DB2 user name and user authorization required to
log on a DB2 on UNIX database.

Database

This identifies the DB2 database alias. For more information


about DB2 database aliases, refer to your DB2 documentation.

OSUser - OSPassword

These attributes identify the host user account under which the
SequeLink Server process will run. If your server specifies the host
user ID and password or if no user authentication is required, do
not specify the OSUser and OSPassword attributes. For more

SequeLink JDBC Driver Reference


28 Chapter 2 Using the SequeLink JDBC Driver

information about specifying user authentication levels, refer to


the SequeLink Administrator’s Guide.

Informix
user - password

These are the user name and user authorization required to log
on to an Informix database.

Database

For INFORMIX-OnLine databases and INFORMIX-SE databases,


this identifies the Informix database you want to access. For:

■ INFORMIX-OnLine databases, enter the name of the database


you want to access.

■ INFORMIX-SE databases, enter the full pathname and the


name of the database you want to access. For example, if your
database is called “production” and is located in the
/usr/informix directory, you would enter:

/usr/informix/production

OSUser - OSPassword

These attributes are required for Windows NT only. They specify


the Windows NT user account under which the SequeLink Server
process should run. If your server specifies the host user ID and
password or if no user authentication is required, do not specify
the OSUser and OSPassword attributes. For more information
about specifying user authentication levels, refer to the
SequeLink Administrator’s Guide.

BlockFetchForUpdate

SequeLink does not lock the expected row by default when a


Select For Update statement is issued against Informix with the
default isolation level (READ_COMMITTED). To lock the

SequeLink JDBC Driver Reference


Connection Attributes 29

appropriate row, this keyword must be set to off. The default


is on.

Note: If you set BlockFetchForUpdate to off, system


performance will be downgraded for Select For Update
statements, because the rows will be fetched one at a time.

Microsoft SQL Server


user - password

These are the Microsoft SQL Server user name and password
required to log on to a SQL Server database.

Database

This identifies the Microsoft SQL Server database you want to


access. If you do not specify a value for this attribute, the default
database will be used.

OSUser - OSPassword

If your server specifies the host user ID and password or if no


user authentication is required, do not specify the OSUser and
OSPassword attributes. For more information about specifying
user authentication levels, refer to the SequeLink
Administrator’s Guide.

These attributes specify the Windows NT user account under


which the SequeLink Server process should run. If the Microsoft
SQL Server Login Security Mode is set to Windows NT
Integrated, do not specify these attributes.

ODBC Btrieve
To use the SequeLink ODBC Socket with the MERANT Connect
ODBC for Btrieve driver, supply the following parameters.

SequeLink JDBC Driver Reference


30 Chapter 2 Using the SequeLink JDBC Driver

user - password

The user and password attributes identify the host user account
under which the SequeLink Server process should run.

If your server specifies the host user ID and password or if no user


authentication is required, do not specify the user and
password attributes. For more information about specifying user
authentication levels, refer to the SequeLink Administrator’s
Guide.

Database

The database name is the full pathname of the directory on the


host that contains the Btrieve files and data dictionary files
(.DDFs). DDFs describe the Btrieve data structure. These files must
be present for a successful connection.

ODBC dBASE
To use the SequeLink ODBC Socket with the MERANT Connect
ODBC for dBASE driver, supply the following parameters.

user - password

The user and password attributes identify the host user account
under which the SequeLink Server process should run.

If your server specifies the host user ID and password or if no user


authentication is required, do not specify the user and
password attributes. For more information about specifying user
authentication levels, refer to the SequeLink Administrator’s
Guide.

Database

The Database name is the full pathname of the directory on the


server that contains the dBASE files.

SequeLink JDBC Driver Reference


Connection Attributes 31

ODBC Excel
To use the SequeLink ODBC Socket with the MERANT Connect
ODBC for Excel driver, supply the following parameters.

user - password

The user and password attributes identify the host user account
under which the SequeLink Server process should run.

If your server specifies the host user ID and password or if no


user authentication is required, do not specify the user and
password attributes. For more information about specifying
user authentication levels, refer to the SequeLink
Administrator’s Guide.

Database

This database name is the full pathname of the .XLS workbook


filename on the server.

ODBC FoxPro
To use the SequeLink ODBC Socket with the MERANT Connect
ODBC for FoxPro driver, supply the following parameters.

user - password

The user and password attributes identify the host user account
under which the SequeLink Server process should run.

If your server specifies the host user ID and password or if no


user authentication is required, do not specify the user and
password attributes. For more information about specifying user
authentication levels, refer to SequeLink Administrator’s Guide.

SequeLink JDBC Driver Reference


32 Chapter 2 Using the SequeLink JDBC Driver

Database

The database name is the full pathname of the directory on the


server that contains the FoxPro files and data dictionary files
(DDFs).

ODBC Microsoft Access


To use the SequeLink ODBC Socket with the Microsoft Access
driver, supply the following parameters.

user - password

These attributes identify the host user account under which the
SequeLink Server process should run. If your server specifies the
host user ID and password or if no user authentication is
required, do not specify the user and password attributes. For
more information about specifying user authentication levels,
refer to the SequeLink Administrator’s Guide.

Database

The database name is the full pathname of the .MDB Microsoft


Access database file on the server.

ODBC Paradox
To use the SequeLink ODBC Socket with the MERANT Connect
ODBC for Paradox driver, supply the following parameters.

user - password

The user and password attributes identify the host user account
under which the SequeLink Server process should run. If your
server specifies the host user ID and password or if no user
authentication is required, do not specify the user and
password attributes. For more information about specifying user
authentication levels, refer to the SequeLink Administrator’s
Guide.

SequeLink JDBC Driver Reference


Connection Attributes 33

Database

The database name is the full pathname of the directory on the


server that contains the Paradox files.

ODBC Socket
To use the SequeLink ODBC Socket, supply the following
parameters:

user - password

These are the user and password authorizations required by the


data source, defined on the server. When connecting to a data
source, SequeLink will use these values as the values for the
UID= and PWD= parameters when executing the ODBC
SQLDriverConnect call.

OSUser - OSPassword

The OSUser and OSPassword attributes identify the host user


account under which the SequeLink Server process should run. If
your server specifies the host user ID and password or if no user
authentication is required, do not specify the OSUser and
OSPassword attributes. For more information about specifying
user authentication levels, refer to the SequeLink
Administrator’s Guide.

Datasource

This is the data source that will be used for this connection.
Specify this parameter using either of the following formats:

■ A value without equal signs (=). The value indicates the


ODBC data source name that will be used. This ODBC data
source must be defined on the server. If you are connecting
to a Windows NT server, the specified data source must be a
System data source (not a User data source).

SequeLink JDBC Driver Reference


34 Chapter 2 Using the SequeLink JDBC Driver

■ A value in the Keyword1=Value1;Keyword2=Value2;...


format. The value of this field is used to build the ODBC
SQLDriverConnect input string used by SequeLink Server to
establish an ODBC connection. The complete value SequeLink
Server will pass to the ODBC SQLDriverConnect call is
DB=database;UID=user;PWD=password;
Keyword1=Value1;Keyword2=Value2;... where
database, user, and password are the values of the
corresponding attributes.

For more information about defining ODBC data sources on your


server platform, refer to your ODBC documentation.

Database

The database name is the name of the database or data source as


defined on the server. When connecting to a data source,
SequeLink will use the value of this field as the DB= parameter
when executing the ODBC SQLDriverConnect call.

ODBC Text
To use the SequeLink ODBC Socket with the MERANT Connect
ODBC for Text driver, supply the following parameters.

user - password

These attributes identify the host user account under which the
SequeLink Server process should run. If your server specifies the
host user ID and password or if no user authentication is
required, do not specify the user and password attributes. For
more information about specifying user authentication levels,
refer to the SequeLink Administrator’s Guide.

Database

The database name is the full pathname of the directory on the


server that contains the Text files.

SequeLink JDBC Driver Reference


Connection Attributes 35

OpenINGRES
user - password

These are the user name and user authorization required to log
on to an OpenINGRES database.

Database

This identifies the OpenINGRES database you want to access.

Flags

These flags control OpenINGRES session behavior. Valid flags


include:

■ Empty string. If you specify an empty string, the client


connects to the database using the host user name specified
at connection.

■ Database user name. If you specify a database user name,


this name will be used to identify the user to the database. If
the host user name is an OpenINGRES superuser, this user
name may be different from the host user name.
OpenINGRES users can be created and viewed using the
OpenINGRES utility accessdb.

■ OpenINGRES command-line flags. These flags control the


database behavior for each session. Specify the flag,
separated by spaces. For a complete list of valid OpenINGRES
flags, refer to your OpenINGRES documentation.

Note: Some flags require the Knowledge Management


Extension.

Oracle
user - password

These are the Oracle user name and user authorization required
to log on to an Oracle database.

SequeLink JDBC Driver Reference


36 Chapter 2 Using the SequeLink JDBC Driver

OSUser - OSPassword

These attributes identify the host user account under which the
SequeLink Server process will run. If your server specifies the host
user ID and password or if no user authentication is required, do
not specify the OSUser and OSPassword attributes. For more
information about specifying user authentication levels, refer to
the SequeLink Administrator’s Guide.

Sybase
user - password

These are the Sybase user name and user authorization required
to log on to a Sybase database.

Database

This identifies the Sybase database you want to access. If a value


is not specified for this attribute, the default database will be
used.

ServerName

This identifies the Sybase server name (also known as DSQUERY).


It identifies the name of an entry in the Sybase interfaces file on
the host. Normally, you can leave this field empty, causing
SequeLink to connect to the default Sybase instance on the
server. If your server is running multiple Sybase instances, you can
specify a value for this field to connect to another Sybase
instance. For more information about DSQUERY, refer to your
Sybase documentation.

OSUser - OSPassword

These specify the host operating system user account under


which the SequeLink Server process should run. If your server
specifies the host user ID and password or if no user
authentication is required, do not specify the OSUser and
OSPassword attributes. For more information about specifying

SequeLink JDBC Driver Reference


Connection Attributes 37

user authentication levels, refer to the SequeLink


Administrator’s Guide.

Client Attributes
Certificatecheck

For all SSL cipher suites, except the anonymous Diffie-Hellman


cipher suites (DH_anon and DH_anon_EXPORT), you must specify
a class that implements the
intersolv.sequelink.net.CheckCertificateInterface interface. If you
do not specify this keyword, the default class,
intersolv.userdefined.CertificateChecker, is used. For more
information about SSL encryption and certificate verification,
see Chapter 4, “Using SSL Encryption” on page 57.

Ciphersuites

This is a list of cipher suites you want to use, in order of


preference, for SSL encryption. The listed cipher suites are
separated by commas with no blank spaces allowed. During the
SSL handshaking, this list is compared with the list specified in
the SequeLink Proxy Server. The first cipher suite in the list that is
commonly specified by the client and the proxy server will be
used as determined by the SSL handshake protocol. For more
information about SSL encryption, see Chapter 4, “Using SSL
Encryption” on page 57.

DataDictionary

The default setting is DBMS. This setting returns all data


dictionary information from the database’s native data
dictionary. To extract data dictionary information from the
SSDD, use the SQLNK setting. For more information about using
SequeLink Shadow Data Dictionaries (SSDDs), see “Using
SequeLink Shadow Data Dictionaries” on page 123.

SequeLink JDBC Driver Reference


38 Chapter 2 Using the SequeLink JDBC Driver

DataDictionaryCatalog

This attribute specifies the catalog (qualifier) name of the SSDD


that is used if the DataDictionary property is set to SQLNK. For
more information about using SSDDs, see “Using SequeLink
Shadow Data Dictionaries” on page 123.

DataDictionarySchema

This attribute specifies the schema (owner) name of the SSDD


that is used if the DataDictionary property is set to SQLNK. For
more information about using SSDDs, see “Using SequeLink
Shadow Data Dictionaries” on page 123.

ForcePasswordChange

This attribute applies to connections to DB2 and Oracle on OS/390


and cannot be used otherwise. It tells the SequeLink JDBC Driver
when to change the password. Possible values are:

■ NO, the SequeLink JDBC Driver changes the password only


when it is expired. This is the default value.

■ YES, the SequeLink JDBC Driver changes the password even


when the password is not expired.

NewPassword

This attribute applies to connections to DB2 and Oracle on OS/390


and is ignored otherwise. When a password is expired and
NewPassword is not specified (the default), the SequeLink JDBC
Driver will throw a “Password Expired” SQLException.

If a new password is specified through the NewPassword


attribute, the SequeLink JDBC Driver will attempt to update the
password when it is expired or when the ForcePasswordChange
attribute is set to YES.

If the password change operation fails, a “Password Change”


SQLException is thrown and the connection attempt fails.

SequeLink JDBC Driver Reference


Connection Attributes 39

Transliteration

Java uses Unicode as its native character encoding method;


however, most databases use a different character encoding
method. You can use the Transliteration attribute to specify
how encoded characters will be converted between the
SequeLink JDBC Driver and the database. For example:

jdbc:sequelink://qant:4003/[Oracle];transliteration=Cp850

Examples of values for the Transliteration attribute are


listed in Table 2-1.

Table 2-1. Transliteration Client Attribute Values

Value Description
8859_1 ISO Latin-1
8859_2 ISO Latin-2
8859_3 ISO Latin-3
8859_4 ISO Latin-4
8859_5 ISO Latin/Cyrillic
8859_6 ISO Latin/Arabic
8859_7 ISO Latin/Greek
8859_8 ISO Latin/Hebrew
8859_9 ISO Latin-5
Cp1250 Windows Eastern Europe/Latin-2
Cp1251 Windows Cyrillic
Cp1252 Windows Eastern Europe/Latin-1
Cp1253 Windows Greek
Cp1254 Windows Turkish
Cp1255 Windows Hebrew
Cp1256 Windows Arabic
Cp437 PC Original
Cp737 PC Greek
Cp850 PC Latin-1

SequeLink JDBC Driver Reference


40 Chapter 2 Using the SequeLink JDBC Driver

Table 2-1. Transliteration Client Attribute Values (cont.)

Value Description
Cp852 PC Latin-2
Cp857 PC Turkish
Cp860 PC Portuguese
Cp861 PC Icelandic
Cp862 PC Hebrew
Cp863 PC Canadian French
Cp864 PC Arabic
Cp865 PC Nordic
Cp866 PC Russian
Cp874 Windows Thai
EUCJIS Japanese EUC
GB2312 GB2312-80 Simplified Chinese
JIS JIS
KSC5601 KSC5601 Korean
SJIS PC and Windows Japanese

The values for this attribute depend on your Java Virtual


Machine. For information about which values are supported for
your Java Virtual Machine, refer to your Java Virtual Machine
documentation. For example:

■ If you are using the JDK 1.1.7, refer to:

http://java.sun.com/products/jdk/1.1/docs/guide/intl/
encoding.doc.html

■ If you are using the JDK 1.2, refer to:

http://java.sun.com/products/jdk/1.2/docs/guide/internat/
encoding.doc.html

SequeLink JDBC Driver Reference


Testing Your Connection 41

Note: To improve your driver performance, you can use the


Transliteration.class class located in
<installdir>/driver/src/intersolv/jdbc/sequelink. For more
information about using this class, refer to “Improving Character
Set Conversion Performance” on page 127.

Testing Your Connection


After installing SequeLink Java Edition Client, you will want to
test the driver by making a connection. This section describes
how to make a connection with the SequeLink JDBC Driver using
JDBCTest. If you experience problems making a connection, see
“Error Messages” on page 44 and “Troubleshooting” on
page 46.

To connect with the SequeLink JDBC Driver using JDBCTest:


1 Start JDBCTest as an application or applet.

■ As a Java application on Windows 9x or Windows NT: Run


the jdbctest.bat file located in the jdbctest directory.

■ As a Java application on Solaris: Run the jdbctest.sh shell


script located in the jdbctest directory.

■ As an applet: Start your applet viewer or Web browser


and open the HTML file jdbctest.html located in the
jdbctest directory.

For more information about using JDBCTest to test and learn


the JDBC API, see Chapter 5, “Using JDBCTest” on page 77.

2 From the JDBCTest Welcome window, click the Press Here To


Continue button. The JDBCTest window appears.

3 Select Driver / Register Driver. JDBCTest prompts you for the


JDBC Driver you want to load.

SequeLink JDBC Driver Reference


42 Chapter 2 Using the SequeLink JDBC Driver

4 In the Please Supply a Driver URL field, type:

intersolv.jdbc.sequelink.SequeLinkDriver
5 Click OK.

6 Select Connection / Connect To DB. The Select A Database


window appears with a list of default SequeLink JDBC Driver
URLs.

7 Select one of the default SequeLink JDBC Driver URLs, and


modify the default values appropriately for your
environment.

8 In the Database and User Name fields, type the required user
and password connection attributes. For information about
connection properties, see “Specifying Connection
Properties” on page 25.

SequeLink JDBC Driver Reference


Testing Your Connection 43

9 Click the Connect button. If the connection was successful,


the Connection window appears with the message
Connection Established in the JDBC/Database Output
scroll box.

If the connection was unsuccessful, you are returned to the


JDBCTest window. The message getConnection() Failed
appears in the JDBC/Database Output scroll box. If your

SequeLink JDBC Driver Reference


44 Chapter 2 Using the SequeLink JDBC Driver

connection failed, see “Error Messages” on page 44 and


“Troubleshooting” on page 46.

Error Messages
The SequeLink JDBC Driver reports errors to the calling
application by returning SQLExceptions. Each SQLException
contains the following information:

■ Description of the most probable cause of the error, prefixed


by the SequeLink component that generated the error

■ Native error code

■ String containing the XOPEN SQLstate

Errors can be generated by the following components:

■ SequeLink JDBC Driver


■ SequeLink Server
■ Database

SequeLink JDBC Driver Reference


Error Messages 45

SequeLink JDBC Driver Errors


An error generated by the SequeLink JDBC Driver has the
following format:

[INTERSOLV][SequeLink JDBC Driver]message

For example:

[INTERSOLV][SequeLink JDBC Driver]Timeout expired.

Use the native error code to look up details about the possible
cause of the error. For a list of all error codes and messages, refer
to the SequeLink Error Codes and Messages Reference.
Sometimes, you may need to check the last JDBC call your
application made and refer to the JDBC specification for
recommended action.

SequeLink Server Errors


An error generated by SequeLink Server has the following
format:

[INTERSOLV][SequeLink JDBC Driver][SequeLink


Server]message

For example:

[INTERSOLV][SequeLink JDBC Driver][SequeLink


Server]This SequeLink server service is not
active.

Use the native error code to look up details about the possible
cause of the error. For a list of all error codes and messages, refer
to the SequeLink Error Codes and Messages Reference.

SequeLink JDBC Driver Reference


46 Chapter 2 Using the SequeLink JDBC Driver

Database Errors
An error generated by the database has the following format:

[INTERSOLV][SequeLink JDBC Driver][...]message

For example:

[INTERSOLV][SequeLink JDBC Driver][Oracle]


ORA-00942:table or view does not exist.

Use the native error code to look up details about the possible
cause of the error. For these details, refer to your database
documentation.

Troubleshooting
Q: Why can't I register the SequeLink JDBC Driver?

A: You probably have received a


“java.lang.ClassNotFoundException:
intersolv.jdbc.sequelink.SequeLinkDriver” exception. First, make
sure that the file <installdir>/driver/classes/slje.jar is specified
in your CLASSPATH variable. If it is, make sure that you specified
the full pathname correctly:
intersolv.jdbc.sequelink.SequeLinkDriver. Note that the driver
name is case sensitive.

Q: I’m using Microsoft Internet Explorer, but receive a “No


suitable driver” exception. Why?

A: Because Microsoft Internet Explorer postpones class


initialization when classes are loaded, the code to register the
SequeLink JDBC Driver to DriverManager is not being run,
although your applet executed the correct
Class.forName(...). Explicitly create an instance of the
SequeLink JDBC Driver by using

SequeLink JDBC Driver Reference


Troubleshooting 47

Class.forName(...).newInstance() instead of
Class.forName(...).

Q: I’m downloading my applet from a Web server using


Microsoft Internet Explorer, but I get the following exception:

*** Security Exception: properties ***


com.ms.applet.AppletSecurityException: security.properties
at com/ms/applet/AppletSecurity.checkPropertyAccess
at java/lang/System.getProperty
at jdbc/sql/DriverManager.loadInitialDrivers
at jdbc/sql/DriverManager.getConnection

A: Because Microsoft Internet Explorer postpones class


initialization when classes are loaded, the code to register the
SequeLink JDBC Driver to DriverManager is not being run,
although your applet executed the correct
Class.forName(...) code. Because the SequeLink JDBC Driver
is not found in the list of loaded drivers, DriverManager
attempts to find an appropriate driver using
System.getProperty(...), which is not allowed by Microsoft
Internet Explorer.

To avoid this problem, the applet should explicitly create an


instance of the driver, executing
Class.forName(...).newInstance().

Q: I double-checked the specified user name and password; they


are correct. Why do I still get a “[INTERSOLV] [SequeLink JDBC
Driver] The host user name/password combination is not valid”
exception?

A: Some SequeLink services require database and operating


system security. Double-check the OSUser and OSPassword
attributes in the specified URL.

SequeLink JDBC Driver Reference


48 Chapter 2 Using the SequeLink JDBC Driver

Q: At connection, I get an “[INTERSOLV][SequeLink JDBC


Driver]Failed to load transliteration class.” exception. Why?

A: Your Java Virtual Machine does not support the character


conversion you specified. For character conversions supported by
your Java Virtual Machine, refer to your Java Virtual Machine
documentation.

Q: At connection, why do I sometimes get the


“[INTERSOLV][SequeLink JDBC Driver] Insufficient information to
connect.” exception?

A: You specified an incomplete URL. Make sure that the URL you
specified is compatible with the specifications explained in
“Connection Attributes” on page 25.

SequeLink JDBC Driver Reference


49

3 Using the SequeLink Proxy


Server

This chapter introduces the SequeLink Proxy Server and describes


how to configure it.

Using the SequeLink JDBC Driver With


Untrusted Applets
Untrusted applets cannot open a connection to a machine other
than the originating host. Therefore, if the SequeLink JDBC
Driver will be used by an untrusted applet, your SequeLink
Server software must be installed on the same machine as your
Web server software. This is a Java restriction.

To circumvent this restriction, SequeLink Java Edition provides


the SequeLink Proxy Server. The SequeLink Proxy Server is
written in Java and can be installed on your Web server host.
Installing the SequeLink Proxy Server on the Web server from
which your JDBC-enabled applets are downloaded allows
untrusted applets to connect to SequeLink servers on hosts other
than the Web server.

As shown in Figure 3-1 on page 50, the SequeLink Proxy Server


maps incoming TCP/IP connection requests from the SequeLink
JDBC Driver to outgoing TCP connections to other hosts.

The SequeLink Proxy Server listens on a particular TCP port for


incoming connection requests. When it receives a connection
request, the Proxy Server sets up a TCP connection to a remote

SequeLink JDBC Driver Reference


50 Chapter 3 Using the SequeLink Proxy Server

host and transfers data packets between the JDBC client and the
remote host.

Figure 3-1. SequeLink Proxy Server

Firewall
Web
Server
Internet

SequeLink SequeLink
Proxy Server JDBC Driver
Java
Applet

Other
Server

SequeLink
Server

SequeLink JDBC Driver Reference


Configuring the SequeLink Proxy Server 51

Configuring the SequeLink Proxy Server


Each remote SequeLink service is described in a configuration
file, service_name.cfg, where service_name is the name of
the service. These configuration files are stored in the proxy
server directory and use the following keyword=value pairs:

Port Is the incoming TCP port. The JDBC-enabled


applet must specify this TCP port (and the
IP address of the Proxy Server host) in the JDBC
connection string.
ServerPort Is the TCP port of the service to which the final
connection is made. This port must be the same
port that is defined in the service configuration
on the remote host. For a list of default ports for
SequeLink Server services, refer to the SequeLink
Administrator’s Guide.
Host Is the IP address of the remote host or a symbolic
host name.
AdminPort Is the TCP port to which administrator requests
are sent—for example, requests to stop the
SequeLink Proxy Server.

You can find a configuration file template (proxyserver.cfg) in


the proxy server directory. The configuration file must be located
in the directory from which you start or stop the SequeLink
Proxy Server.

Note: Keywords in the configuration file are case sensitive.

Configuration File Example:


Port=4000
ServerPort=4003
Host=189.23.5.132
AdminPort=5000

SequeLink JDBC Driver Reference


52 Chapter 3 Using the SequeLink Proxy Server

Note: Make sure that you use different port numbers for Port
and AdminPort. Also, the port numbers for Port and
AdminPort cannot be used by another TCP/IP service.
■ On Windows NT, you can use the SequeLink Server
Administrator to obtain a list of TCP ports that are used by
SequeLink Server services. In addition, verify the port numbers
in the system32\etc\drivers\services file.

■ On UNIX, you can verify the port numbers in /etc/services.

Starting the SequeLink Proxy Server


On Windows NT:

Open a Windows NT command line window and change the


working directory to the proxy server directory. Start the
SequeLink Proxy Server by running the command:

proxyserver -s [-v jview] configfile

where configfile is the name of the proxy server configuration


file without the .CFG extension. By default, this BAT file uses the
JDK Java Virtual Machine. If you want to use the Microsoft Java
Virtual Machine, specify the optional parameter -v jview as
shown in the preceding example.

On UNIX:

Start the SequeLink Proxy Server by running the shell script:

startproxyserver.sh -s configfile

where configfile is the name of the proxy server configuration


file without the .CFG extension. The configuration file must be
located in the directory from which you start or stop the
SequeLink Proxy Server.

SequeLink JDBC Driver Reference


Configuring the SequeLink Proxy Server 53

Stopping the SequeLink Proxy Server


On Windows NT:

Open a Windows NT command line window and change the


working directory to the proxy server directory. Stop the
SequeLink Proxy Server by running the command:

proxyserver -q [-v jview] configfile

where configfile is the name of the proxy server


configuration file without the .CFG extension. By default, this
BAT file uses the JDK Java Virtual Machine. If you want to use
the Microsoft Java Virtual Machine, specify the optional
parameter -v jview as shown in the preceding example.

On UNIX:

Stop the SequeLink Proxy Server by running the shell script:

proxyserver.sh -q configfile

where configfile is the name of the proxy server


configuration file without the .CFG extension. The configuration
file must be located in the directory from which you start or stop
the SequeLink Proxy Server.

Logging
All messages generated by the SequeLink Proxy Server are
written to a log file in the current working directory. The log file
name has the format:

Proxy_Server_Name.log

where Proxy_Server_Name is the name of the SequeLink Proxy


Server. Fatal errors and information, such as “server started” or
“server stopped” messages also display on the screen.

SequeLink JDBC Driver Reference


54 Chapter 3 Using the SequeLink Proxy Server

Using the SequeLink Proxy Server as a


Windows NT Service
Before you install the SequeLink Proxy Server as a Windows NT
service:
■ Make sure that you have administrator rights. Installing and
un-installing the SequeLink Proxy Server as a Windows NT
service requires making changes to the
HKEY_LOCAL_MACHINE key in the Windows NT Registry.

■ The SequeLink Proxy Server Windows NT service is configured


to run under the local system account, which does not provide
access to network resources. Make sure that the directory in
which the Java Virtual Machine is installed is in the correct
sequence in the system definition of the PATH environment
variable. If the system definition of the PATH environment
variable contains a network directory before the directory in
which the Java Virtual Machine is installed, you will not be
able to start the SequeLink Proxy Server. If this occurs, either:
• Redefine the system definition of the PATH environment
variable so that the network directory appears in the
system definition after the directory in which the Java
Virtual Machine is installed. Then, reboot to make your
changes effective for the local system account.
• Change the definition of the SequeLink Proxy Server
Windows NT service to run under an account that has
access to the specific network drive. In this case, no
console will appear when the SequeLink Proxy Server
starts.

SequeLink JDBC Driver Reference


Configuring the SequeLink Proxy Server 55

Installing the Proxy Server as a Windows NT


Service
1 Create a proxy server configuration file.

2 Open a Windows NT command window and change the


working directory to the proxy subdirectory of the SequeLink
Java Edition directory.

3 Issue the following command:

cmdsrvc -s service_name -c [-v jview]


where service_name is the name of the proxy server
configuration file. This command creates a Windows NT
service for the SequeLink Proxy Server. Use the Event Viewer
to verify that the service was created successfully (in the
Application log for the source cmdsrvc). By default, the JDK
Java Virtual Machine is used. If you want to use the Microsoft
Java Virtual Machine, specify the optional parameter -v
jview as shown in the preceding example.

The Windows NT service that you created has the following


attributes:

■ Automatic startup
■ Log on as System Account
■ Allow service to interact with the desktop

In addition, an Event Viewer source is defined with the name


of the SequeLink Proxy Server. The SequeLink Proxy Server
logs start and stop messages to this source.

4 Start the Windows NT service using the Windows NT Services


control panel. Because the service is configured for
automatic startup, it will also start when the Windows NT
machine is initialized.

Note: Make sure that both the proxyserver.jar and crysec.jar files
located in the proxy/classes directory are added to the
CLASSPATH definition of your Java Virtual Machine.

SequeLink JDBC Driver Reference


56 Chapter 3 Using the SequeLink Proxy Server

Un-Installing the Proxy Server as a


Windows NT Service
Before you un-install the SequeLink Proxy Server as a
Windows NT service, you must have administrator rights.

1 Stop the SequeLink Proxy Server Windows NT service using


the Windows NT Services control panel.

2 Open a Windows NT command window.

3 Change the working directory to the proxy server


subdirectory in the SequeLink Java Edition directory.

4 Issue the following command:

cmdsrvc -s service_name -d

SequeLink JDBC Driver Reference


57

4 Using SSL Encryption

This chapter provides an overview of Secure Socket Layer (SSL)


encryption and describes how to use SSL with the SequeLink
JDBC Driver, including:

■ Specifying cipher suites


■ Enabling SSL encryption
■ Using private keys with the SequeLink Proxy Server
■ Using the encryption and decryption tools
■ Verifying the Proxy Server certificate
■ Using RSA and RC4 algorithms (Domestic version only)

Note: Because US laws restrict the export of “strong”


cryptographic technology, SequeLink Java Edition provides two
functional versions—Domestic (for US and Canada) and Export
(for countries outside the US and Canada). For information
about obtaining the Domestic version, call your MERANT sales
representative. For more information about SequeLink Java
Edition and US export restrictions, refer to the READ.ME file.

About SSL Encryption


If your environment requires additional security beyond the
encryption of User ID and Password provided by SequeLink, you
can use SSL to encrypt data that is exchanged between the
SequeLink Java Edition Client and the SequeLink Proxy Server.
This assumes that the communication between the SequeLink
Proxy Server machine (for applets, the Web server from which
the applets are downloaded) and the SequeLink Server machine
is secure.

SequeLink JDBC Driver Reference


58 Chapter 4 Using SSL Encryption

“Secure” means that only authorized persons can:

■ Obtain login access to the Web server machine.

■ Eavesdrop on (or monitor) the communication (physical


communication lines and any intermediate routers) between
the Web server host and the database server host. Because
the data on your Intranet is not encrypted, you also must
ensure only authorized access to internal communication lines
and internal routers.

Using SSL with a Java application running on your Intranet, you


can secure your data over your entire network by installing the
SequeLink Proxy Server on the same machine as the SequeLink
server (as shown in Figure 4-1) and specifying localhost as the
host name of the SequeLInk server in the proxy server
configuration file. The cleartext messages that are sent between
the SequeLink Proxy Server and the SequeLink server do not leave
the machine.

Figure 4-1. Using SSL Encryption with the SequeLink Proxy


Server Installed on the SequeLink Server

SequeLink SequeLink
JDBC Driver Proxy Server

Java SequeLink
Application Server

SequeLink JDBC Driver Reference


Using SSL Cipher Suites 59

For more information about using SSL cipher suites, see “Using
SSL Cipher Suites” on page 59. For more information about
configuring the SequeLink Proxy Server to use SSL, see “Enabling
SSL Encryption” on page 65.

Using SSL Cipher Suites


SSL uses the following methods to ensure the privacy and
integrity of data transactions:

■ Asymmetric cryptographic algorithms to protect the


exchange of symmetric encryption keys. SSL specifies the
following algorithm classes for protecting the key exchange:
• None. No encryption is used for the data; therefore, no
symmetric keys need to be exchanged.
• Anonymous. The exchange of the symmetric key for the
data transfer is protected by a public key/private key
algorithm, but the client does not verify the identity of
the server. This mechanism provides a protection against
passive eavesdropping on communication lines. It
prevents someone who is monitoring the network traffic
from deciphering the data that is being exchanged.

It does not provide protection from “man-in-the-middle”


security infiltrations, in which intruders position
themselves between the client and the server. The
intruders pretend to the client to be the server and vice
versa, allowing them to intercept, inspect, and possibly
alter the data exchanged between the client and the
server.
• Server authentication. When communication begins, the
server identifies itself to the client, using a digital
certificate as proof of identity. The client verifies this
certificate to ensure that the server is really the party
with whom it wants to communicate.

SequeLink JDBC Driver Reference


60 Chapter 4 Using SSL Encryption

■ Symmetric cryptographic algorithms to encrypt and decrypt


the actual data.

■ Message digest algorithms to ensure message integrity.

The combination of all these algorithms is called a cipher suite.


The SSL standard defines the set of cipher suites that can be
specified. The actual availability of a cipher suite is determined by
the underlying implementation. For information about:

■ Specifying cipher suites, see “Specifying Which SSL Cipher


Suites To Use” on page 60

■ Supported cipher suites, see “Supported SSL Cipher Suites” on


page 61

Specifying Which SSL Cipher Suites


To Use
You can specify that you want to use SSL encryption in the JDBC
connection URL. For example:

jdbc:sequelink:ssl://hostname:port/[type];ciphersuites=value
[;<key>=<value>]...

For more information about specifying SSL encryption in the


JDBC connection URL, see “Specifying Connection URLs” on
page 21. For more information about how to specify SSL
encryption in the proxy server configuration file, see “Enabling
SSL Encryption” on page 65.

SequeLink JDBC Driver Reference


Using SSL Cipher Suites 61

Supported SSL Cipher Suites


SSL cipher suite definitions have the format:

SSL_KeyExchangeMethod_WITH_DataTranserCipher_DigestFunction

Because US laws restrict the export of ”strong” cryptographic


technology, some cipher suites cannot be exported from the US.
For a list of SSL cipher suites supported for:

■ US and Canada, see “For US and Canada (Domestic Version)”


on page 61

■ Countries outside the US and Canada, see “For Countries


Outside the US and Canada (Export Version)” on page 62

Note: For more information about SequeLink Java Edition and


US export restrictions, refer to the READ.ME file.

For US and Canada (Domestic Version)

Table 4-1. Supported SSL Cipher Suites for the US and


Canada

Cipher Suite Exportable?


SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 No
SSL_DH_anon_WITH_RC4_128_MD5 No
SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA Yes
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA No
SSL_DH_anon_WITH_DES_CBC_SHA No
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA Yes
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA No
SSL_DHE_DSS_WITH_DES_CBC_SHA No
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA No
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA No
Note: Because of US export restrictions, customers from outside US or
Canada cannot use non-exportable cipher suites.

SequeLink JDBC Driver Reference


62 Chapter 4 Using SSL Encryption

Table 4-1. Supported SSL Cipher Suites for the US and


Canada (cont.)

Cipher Suite Exportable?


SSL_DHE_RSA_WITH_DES_CBC_SHA No
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA No
SSL_RSA_EXPORT_WITH_RC4_40_MD5 No
SSL_RSA_WITH_3DES_EDE_CBC_SHA No
SSL_RSA_WITH_DES_CBC_SHA No
SSL_RSA_WITH_RC4_128_MD5 No
SSL_RSA_WITH_RC4_128_SHA No
Note: Because of US export restrictions, customers from outside US or
Canada cannot use non-exportable cipher suites.

For Countries Outside the US and Canada


(Export Version)

Table 4-2. Supported SSL Cipher Suites for Countries Outside


the US and Canada

Cipher Suite
SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA

SequeLink JDBC Driver Reference


Using SSL Cipher Suites 63

Cryptographic Characteristics of Key Exchange


Algorithms
Table 4-3 lists the cryptographic characteristics of SSL key
exchange algorithms, including a description, the key size limit,
and the type of situation for which specific algorithms are most
appropriate.

Table 4-3. Cryptographic Characteristics of Key Exchange Algorithms

Key Exchange Key Size


Algorithm Description Limit When to Use
DH_anon The Diffie-Hellman None When there is no risk of
parameters are man-in-the-middle
generated during session attacks.
establishment.
DH_anon_EXPORT The Diffie-Hellman 512 for the When there is no risk of
parameters are generated DH man-in-the-middle
generated during session parameters attacks.
establishment.
DHE_DSS The Diffie-Hellman None When the DSS certificate
parameters are of the server is for signing
generated during session only and cannot be used
establishment. They are for key exchange.
signed by the DSS
certificate.
DHE_DSS_EXPORT The Diffie-Hellman 512 for the When the DSS certificate
parameters are generated DH of the server is for signing
generated during session parameters only and cannot be used
establishment. They are for key exchange.
signed by the DSS
certificate.

SequeLink JDBC Driver Reference


64 Chapter 4 Using SSL Encryption

Table 4-3. Cryptographic Characteristics of Key Exchange Algorithms (cont.)

DHE_RSA The Diffie-Hellman None When the RSA certificate


parameters are of the server is for signing
generated during session only and cannot be used
establishment. They are for key exchange.
signed by the RSA
certificate.
RSA The public key from the none When the server has a RSA
RSA certificate is used for certificate.
key exchange.

Cryptographic Characteristics of Data Transfer


Ciphers
Table 4-4 lists the cryptographic characteristics of data transfer
ciphers, including the algorithm used and the effective key size.

Table 4-4. Cryptographic Characteristics of Data Transfer Ciphers

Data Transfer Cipher Algorithm Effective Key size


DES40_CBC DES in cipher block chaining mode 40
DES_CBC DES in cipher block chaining mode 56
3DES_EDE_CBC Triple DES in cipher block chaining mode 168
RC4 RC4 from RSA 128

SequeLink JDBC Driver Reference


Enabling SSL Encryption 65

Enabling SSL Encryption


You enable SSL encryption in the proxy server configuration file
by adding the keyword/value pairs:

Network=ssl
CipherSuites=value

Notes:

1 The Network and CipherSuites keywords in the proxy


server configuration file are case sensitive.

2 If you do not want to use SSL, specify Network=socket in


the proxy server configuration file.

3 The value of CipherSuites is a list of cipher suites you want


to use, in order of preference. The listed cipher suites are
separated by commas with no blank spaces allowed. You
must specify cipher suites that use the same type of
certificate, for example, DSS or RSA. You cannot specify a
combination of RSA cipher suites and DSS cipher suites.

Some cipher suites require additional input at the client and at


the SequeLink Proxy Server. For more information about what
you must specify at the client, see “Client Attributes” on
page 37.

Table 4-5 on page 66 lists the key exchange algorithms you can
use and the keyword/value pairs you can specify in the proxy

SequeLink JDBC Driver Reference


66 Chapter 4 Using SSL Encryption

server configuration file when using a particular key exchange


algorithm.

Table 4-5. Key Exchange Algorithms and Keyword/Value Pairs You Can Specify in the
Proxy Server Configuration File

Key Exchange
Algorithm Keyword Value
DHE_DSS DSSCertificate Name of the file with the DSS certificate in DER
format.
DSSPrivateKey Name of the file with the DSS private key in
PKCS8 encrypted format.
PassPhrase Pass phrase with which the private key file is
encrypted. If this keyword is unspecified, the
Proxy Server will prompt for the pass phrase.
UsePassPhraseDialog To be prompted for the pass phrase using the
standard input/output instead of a dialog box,
set this keyword to No. Remember that the pass
phrase will be shown on the screen as you type.
DHE_DSS_EXPORT DSSCertificate Name of the file with the DSS certificate in DER
format.
DSSPrivateKey Name of the file with the DSS private key in
PKCS8 encrypted format.
PassPhrase Pass phrase with which the private key file is
encrypted. If this keyword is unspecified, the
Proxy Server will prompt for the pass phrase.
UsePassPhraseDialog To be prompted for the pass phrase using the
standard input/output instead of a dialog box,
set this keyword to No. Remember that the pass
phrase will be shown on the screen as you type.
DHE_RSA RSACertificate Name of the file with the RSA certificate in DER
format.
RSAPrivateKey Name of the file with the RSA private key in
PKCS8 encrypted format.
PassPhrase Pass phrase with which the private key file is
encrypted. If this keyword is unspecified, the
Proxy Server will prompt for the pass phrase.

SequeLink JDBC Driver Reference


Enabling SSL Encryption 67

Table 4-5. Key Exchange Algorithms and Keyword/Value Pairs You Can Specify in the
Proxy Server Configuration File (cont.)

Key Exchange
Algorithm Keyword Value
UsePassPhraseDialog To be prompted for the pass phrase using the
standard input/output instead of a dialog box,
set this keyword to No. Remember that the pass
phrase will be shown on the screen as you type.
RSA RSACertificate Name of the file with the RSA certificate in DER
format.
RSAPrivateKey Name of the file with the RSA private key in
PKCS8 encrypted format.
PassPhrase Pass phrase with which the private key file is
encrypted. If this keyword is unspecified, the
Proxy Server will prompt for the pass phrase.
UsePassPhraseDialog To be prompted for the pass phrase using the
standard input/output instead of a dialog box,
set this keyword to No. Remember that the pass
phrase will be shown on the screen as you type.

SequeLink JDBC Driver Reference


68 Chapter 4 Using SSL Encryption

Using Private Keys with the SequeLink Proxy


Server
The SSL cipher suites that use server authentication require a
valid server certificate and associated private key. The SequeLink
Proxy Server must access the private key from a private key file.
Because it is not safe to store the private key as cleartext in a file,
the SequeLink Proxy Server expects the private key to be stored in
PKCS8 format, which is a standard method of storing encrypted
private keys where the encryption key is derived from a pass
phrase.

Providing the Pass Phrase for the


SequeLink Proxy Server
The SequeLink Proxy Server requires the pass phrase to start. The
private key can be retrieved in the following ways:

■ The SequeLink Proxy Server prompts for the private key when
it starts. In graphical user interface (GUI) environments, a
dialog box may appear. For example:

Type the pass phrase in the appropriate field of the dialog


box and click OK. The pass phrase is shown on the screen as
you type, so make sure that unauthorized persons cannot
view your screen.

SequeLink JDBC Driver Reference


Using Private Keys with the SequeLink Proxy Server 69

In environments without a GUI, such as the SequeLink Proxy


Server running in a terminal session on a UNIX machine,
define UsePassPhraseDialog=No in the proxy server
configuration file. The SequeLink Proxy Server will use the
standard input/output of your environment to prompt for
the private key. When you type the pass phrase and press
ENTER, the pass phrase displays on your standard output.
When you are finished, make sure to scroll the output
window so that unauthorized persons cannot see the pass
phrase on your screen.

■ You can code the pass phrase in the proxy server


configuration file. Add the keyword/value pair:

PassPhrase=your pass phrase


where your pass phrase is the pass phrase required to
access the private key. Leading and trailing blanks are
stripped from the value when the pass phrase is retrieved
from the configuration file; therefore, the pass phrase
cannot have leading or trailing blanks in the configuration
file. Make sure that only trusted accounts have access to the
configuration file.

Note: If the SequeLink Proxy Server will be started as a


Windows NT service, you must specify the pass phrase in the
configuration file because the SequeLink Proxy Server cannot
prompt for the pass phrase.

SequeLink JDBC Driver Reference


70 Chapter 4 Using SSL Encryption

Storing the Private Key in PKCS8


Format
If your private key is in cleartext format, you can use the
encrypt.bat utility (on Windows NT) or the encrypt.sh shell script
(on UNIX) to store the key in a file in PKCS8 format.

US and Canada (Domestic Version)


The private key is encrypted using triple DES with three 64-bit
keys (56 effective bits). The keys are derived from the pass phrase
using a one-way hash function (SHA).

To provide sufficient randomness in the generated keys, you must


provide sufficient randomness in the pass phrase. The English
language has approximately 1.3 bits of randomness for each
character; therefore, to provide 168 random bits for the two keys,
you must have 130 characters (conservatively) of English text.
Using punctuation characters and a mix of upper and lowercase
letters, you can construct pass phrases that have more
randomness with fewer characters.

Countries Outside the US and Canada (Export


Version)
The private key is encrypted using DES with a 40-bit key that is
derived from the pass phrase.

SequeLink JDBC Driver Reference


Using Private Keys with the SequeLink Proxy Server 71

Using the Encryption Tool


On Windows NT:
encrypt [-v virtual_machine] infile outfile

where

virtual_machine Is the executable name of the Java


Virtual Machine that is installed on the
machine where you encrypt the key. By
default, this BAT file uses the JDK Java
Virtual Machine. If you want to use the
Microsoft Java Virtual Machine, specify
the optional parameter -v jview.
infile Is the name of the cleartext file.
outfile Is the name of the encrypted file.

On UNIX:
encrypt.sh infile outfile

where

infile Is the name of the cleartext file.


outfile Is the name of the encrypted file.

You may want to run the encryption tool on a machine other


than the one running the SequeLink Proxy Server and transfer
the encrypted file to the SequeLink Proxy Server host to avoid
writing a copy of the private key in cleartext on the SequeLink
Proxy Server host. Make sure that you transfer the complete
proxy/classes directory to the machine on which you want to run
the encryption tool.

The proxy server installation directory also contains a decryption


tool that can be used to decrypt a file that has been encrypted
with the encryption tool.

SequeLink JDBC Driver Reference


72 Chapter 4 Using SSL Encryption

Using the Decryption Tool


On Windows NT:
decrypt [-v virtual_machine] infile outfile

where

virtual_machine Is the executable name of the Java


Virtual Machine that is installed on the
machine where you encrypt the key. By
default, this BAT file uses the JDK Java
Virtual Machine. If you want to use the
Microsoft Java Virtual Machine, specify
the optional parameter -v jview.
infile Is the name of the encrypted file.
outfile Is the name of the cleartext file.

On UNIX:
decrypt.sh infile outfile

where

infile Is the name of the encrypted file.


outfile Is the name of the cleartext file.

The encryption and decryption tools prompt for the pass phrase
and show it on the screen as you type, so make sure that you
close the terminal session window after you have encrypted or
decrypted the file to prevent unauthorized people from
viewing it.

SequeLink JDBC Driver Reference


Verifying the SequeLink Proxy Server Certificate 73

Verifying the SequeLink Proxy Server


Certificate
When you use a cipher suite that specifies server authentication,
the SSL handshake protocol ensures that the server knows the
private key that corresponds to the public key in the certificate.
Subsequently, the client application must verify that the server is
indeed the server with which it wants to communicate by
verifying that the received certificate is the certificate that it
expects from the server.

The JDBC application or applet provides the SequeLink JDBC


Driver with a class that implements the
intersolv.sequelink.net.CheckCertificateInterface interface. If you
do not supply a class that implements this interface, the
connection will be refused. This interface is defined as:

package intersolv.sequelink.net;
public interface CertificateCheckerInterface
{
public void CheckCertificate(byte[] berX509cert)
throws SecurityException;
}

The SequeLink JDBC Driver calls this method and passes the X509
certificate that it received during the SSL handshake to the
method. This method must verify that the received certificate is
indeed the certificate that is expected. If it proves not to be the
right certificate, the method must throw a SecurityException.
You specify the name of the class that implements this interface
in the certificatecheck keyword in the JDBC connection
URL.

SequeLink JDBC Driver Reference


74 Chapter 4 Using SSL Encryption

The driver/src subdirectory contains the Java source files listed in


Table 4-6 as examples of classes that implement
CertificateCheckerInterface.

Table 4-6. Java Source Files that Implement


CertificateCheckerInterface

Java Source File Description


CheckAgainstCertificateFromCab.java Adapt and use for
downloaded applets.
CheckAgainstCertificateFromJar.java Adapt and use for
downloaded applets.
CheckAgainstCertificateFromFile.java Adapt and use for Java
applications on a client
machine.

These classes retrieve the server certificate from a CAB file, JAR
file, or local file, and compare it with the certificate that is passed
as the berX509cert parameter to the CheckCertificate method.
You can change these files as appropriate for your environment.

Coding the certificate you want to compare other certificates


against in the downloaded applet is safe only if no one tampers
with the applet while it is downloaded from your Web server.
This means that you must use signed applets and that you must
configure your Web browser to explicitly check the signer of the
downloaded applets.

SequeLink JDBC Driver Reference


Using RSA and RC4 Algorithms (Domestic Version Only) 75

Using RSA and RC4 Algorithms (Domestic


Version Only)
To use a SSL cipher suite, you must have an underlying
cryptographic engine. Some SSL cipher suites require an
implementation of the RSA and RC4 algorithms. To use these
algorithms, you must have an authorized implementation of RSA
and RC4.

Note: The Export version of SequeLink Java Edition does not


support the RSA and RC4 algorithms.

SequeLink does not provide the routines for RSA and RC4. When
you use a cipher suite that specifies RSA or RC4 with the
standard installation of SequeLink Java Edition Client, you will
receive an exception telling you that the underlying
cryptographic engine is not available.

If you are using the JSafe library from RSA Data Security, Inc, you
can use the two Java source files, which provide support for RSA
and RC4, that are supplied with SequeLink:

src\crysec\RC4.java
src\crysec\RSA.java

in the driver or proxy server directory.

You must compile the Java source files and replace the default
implementation of crysec/RC4.class and crysec/RSA.class with the
classes that you compile. When you compile these classes, make
sure that the crysec.jar file is added to your CLASSPATH variable.

Note: The default implementation of these classes is available in


the crysec.jar file. For information about replacing an existing
class file in a JAR file, refer to your JDK documentation.

SequeLink JDBC Driver Reference


76 Chapter 4 Using SSL Encryption

If you use another implementation of RSA and RC4, you can


adapt the Java source files (src\crysec\RC4.java and
src\crysec\RSA.java) to call your own RSA/RC4 implementation.

SequeLink JDBC Driver Reference


77

5 Using JDBCTest

This chapter introduces JDBCTest, a tool that allows you to test


and learn the JDBC API. It also contains a tutorial that takes you
through a working example of its use.

About JDBCTest
JDBCTest contains menu selections that correspond to specific
JDBC functions—for example, connecting to a database or
passing a SQL statement. It allows you to:

■ Execute a single JDBC method or execute multiple JDBC


methods simultaneously, so that you can easily perform some
common tasks, such as returning result sets

■ Display the results of all JDBC function calls in one window,


while displaying fully commented, Java JDBC code in an
alternate window

JDBCTest Tutorial
This JDBCTest tutorial explains how to use the most important
features of JDBCTest (and the JDBC API) and assumes that you
can connect to an Oracle database with the standard available
demo table or fine-tune the sample SQL statements shown in
this example as appropriate for your environment.

SequeLink JDBC Driver Reference


78 Chapter 5 Using JDBCTest

Starting JDBCTest
How you start JDBCTest depends on your platform, whether you
want to start JDBCTest as an application or applet, and your Java
Virtual Machine.

On Windows 9x and Windows NT


Run the jdbctest.bat file located in the <installdir>\jdbctest
directory.

Note: This example assumes that you have installed the JDK 1.1 or
JDK 1.2 on your workstation and that java.exe is available in your
PATH.

On Solaris
Run the jbctest.sh file located in the <installdir>/jdbctest
directory.

Note: This example assumes that you have installed the JDK 1.1 or
JDK 1.2 on your workstation and that Java is available in your
PATH.

As an Applet
Start your applet viewer or Web browser and open the
jdbctest.html file located in the <installdir>/jdbctest
directory.

Using a Java Virtual Machine Other Than the


JDK
JDBCTest is a Java application. For instructions on starting a Java
application with your Java Virtual Machine, refer to your Java

SequeLink JDBC Driver Reference


JDBCTest Tutorial 79

Virtual Machine documentation. Regardless of the Java Virtual


Machine, you must make sure that your CLASSPATH includes:

■ The directory containing the JDBCTest classes:


<installdir>/jdbctest/classes

■ The JAR file containing the SequeLink JDBC Driver classes:


<installdir>/driver/classes/slje.jar

The class file containing the JDBCTest application is


JDBCTest.class.

JDBCTest accepts a parameter that identifies a configuration file


containing default options. By default, this file is config.txt. For
more information about this configuration file, see the
following section, “Configuring JDBCTest” on page 80.

Here are a few examples of starting JDBCTest with some popular


Java Virtual Machines, where <dir> is your SequeLink Java
Edition installation directory:

Using the Java Runtime Environment 1.1.x (JRE):


jre -cp <dir>/jdbctest/classes;<dir>/driver/classes/slje.jar
JDBCTest Config.txt

Using the Java Runtime Environment 1.2 (JRE):


java -classpath <dir>/jdbctest/classes;<dir>/driver/classes/
slje.jar JDBCTest Config.txt

Using the Java Development Kit 1.2 (JDK):


java -classpath <dir>/jdbctest/classes;<dir>/driver/classes/
slje.jar JDBCTest Config.txt

SequeLink JDBC Driver Reference


80 Chapter 5 Using JDBCTest

Using JView from Microsoft:


Jview /cp:p <dir>/jdbctest/classes;<dir>/driver/classes/slje.jar
JDBCTest Config.txt

Configuring JDBCTest
The default JDBCTest configuration file is <installdir>/
jdbctest/classes/Config.txt. This file can be edited, as appropriate,
for your environment using any text editor. All parameters are
configurable, but the most commonly configured parameters are:

Databases A list of comma separated JDBC URLs.


You can use one of these URLs as a
template when you make a JDBC
connection. The default config.txt file
contains example URLs for most
databases.
DefaultDatabase The default JDBC URL to be used when
you make a connection.

Making a JDBCTest Connection


1 Select Driver / Register Driver. JDBCTest prompts you for the
JDBC driver to load.

2 In the Please supply a Driver URL: field, type,


intersolv.jdbc.sequelink.SequeLinkDriver.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 81

Click OK. The main JDBCTest window indicates that the driver
registration succeeded.

The main JDBCTest window shows the following


information:

■ In the Connection List box, a list of available connections

■ In the JDBC/Database scroll box, a report indicating


whether the last action succeeded or failed

■ In the Java Code scroll box, the actual Java code used to
implement the last action

SequeLink JDBC Driver Reference


82 Chapter 5 Using JDBCTest

Tip: Check the Concatenate check box to see the Java code
of all previous actions; otherwise, the Java code of only
the last action will be shown.
3 Select Connection / Connect to DB. JDBC prompts with a list of
default connection URLs. Select one from the list and change
it as appropriate for your environment.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 83

Click Connect. If the connection attempt was successful, a


connection window appears.

The connection window shows the following information:

■ In the JDBC/Database Output scroll box, a report


indicating whether the last action succeeded or failed

■ In the Java Code scroll box, the actual Java code used to
implement the last action

Tip: Check the Concatenate check box to see the Java


code of all previous actions; otherwise, the Java code of
only the last action will be shown.

SequeLink JDBC Driver Reference


84 Chapter 5 Using JDBCTest

Executing a Simple Select Statement


This example explains how to execute a simple Select statement
and retrieve the results.

1 Select Connection / Create Statement. The connection


window indicates that the creation of the statement was
successful.

2 Select Statement / Execute Stmt Query. JDBCTest prompts for


a SQL statement.

3 Specify the Select statement you want to execute.

Click Submit; then, click Close.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 85

4 Select Results / Show All Results. The data from your result
set is displayed.

5 Scroll through the code in the Java Code scroll box to see
which JDBC calls have been implemented by JDBCTest.

SequeLink JDBC Driver Reference


86 Chapter 5 Using JDBCTest

Executing a Prepared Statement


This example explains how to execute a parameterized statement
multiple times.

1 Select Connection / Create Prepared Statement. JDBCTest


prompts you for a SQL statement.

2 Specify the Insert statement you want to execute.

Click Submit; then, click Close.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 87

3 Select Statement / Set Prepared Parameters. To set the values


and type for each parameter:

a Type the parameter number.

b Select the parameter type.

c Type the parameter value.

d Click Set to pass this information to the JDBC driver.

Click Close.

SequeLink JDBC Driver Reference


88 Chapter 5 Using JDBCTest

4 Select Statement / Execute Stmt Update. As expected, the


JDBC/Database Output scroll box indicates that one row has
been inserted.

5 If you want to insert multiple records, repeat Step 3 and


Step 4 for each record.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 89

6 If you repeat the steps described in “Executing a Simple


Select Statement” on page 84, you will see that the
previously inserted records are also returned.

SequeLink JDBC Driver Reference


90 Chapter 5 Using JDBCTest

Retrieving Database Metadata


1 Select Connection / Get DB Meta Data.

2 Select MetaData / Show Meta Data. Information about the


JDBC driver and the database you are connected to is
returned.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 91

3 Scroll through the Java code in the Java Code scroll box to
find out which JDBC calls have been implemented by
JDBCTest.

The metadata also allows you to query the database catalog


(enumerate the tables in the database, for example). In this
example, we will query all tables that are owned by the user
SCOTT.

4 Select MetaData / Tables.

5 In the Schema Pattern field, type SCOTT.

Click Ok. The Connection window indicates that getTables()


succeeded.

SequeLink JDBC Driver Reference


92 Chapter 5 Using JDBCTest

6 Select Results / Show All Results. All tables owned by SCOTT


are returned.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 93

Scrolling Through a Result Set


Note: Scrollable result sets are supported by JDBC 2.0 and
require a JDK 1.2-compatible Java Virtual Machine. SequeLink
Java Edition supports scrollable cursors against Oracle and
Informix only.

1 Select Connection / Create JDBC 2.0 Statement. JDBCTest


prompts for a result set type and concurrency.

2 In the resultSetType field, select TYPE_SCROLL_SENSITIVE.

3 In the resultSetConcurrency field, select


CONCUR_READ_ONLY.

Click Submit; then, click Close.

4 Select Statement / Execute Stmt Query.

SequeLink JDBC Driver Reference


94 Chapter 5 Using JDBCTest

5 Specify the Select statement you want to execute.

Click Submit; then, click Close.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 95

6 Select Results / Scroll Results. The Scroll Result Set window


indicates that the cursor is positioned before the first row.

SequeLink JDBC Driver Reference


96 Chapter 5 Using JDBCTest

7 Click the Absolute, Relative, Before, First, Prev, Next, Last,


and After buttons, as appropriate, to navigate through the
result set. After each action, the Scroll Result Set window
displays the data at the current position of the cursor.

8 Click Close.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 97

Executing a Batch on a Prepared


Statement
Executing a batch on a prepared statement allows you to update
or insert multiple records simultaneously. In some cases, this can
significantly improve system performance, because fewer round-
trips to the database are required.

Note: Executing a batch on a prepared statement is supported by


the JDBC 2.0 specification and requires a JDK 1.2-compatible
Java Virtual Machine.

1 Select Connection / Create Prepared Statement.

2 Specify the Insert statement you want to execute.

Click Submit; then, click Close.

3 Select Statement / Add Stmt Batch.

SequeLink JDBC Driver Reference


98 Chapter 5 Using JDBCTest

4 For each parameter:

a Type the parameter number.

b Select the parameter type.

c Type the parameter value.

d Click Set.

5 Click Add to add the specified set of parameters to the batch.

6 To add multiple parameter sets to the batch, repeat Step 3 as


many times as you need. When you are finished adding
parameter sets to the batch, click Close.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 99

7 Select Statement / Execute Stmt Batch. JDBCTest displays the


rowcount for each of the elements in the batch.

SequeLink JDBC Driver Reference


100 Chapter 5 Using JDBCTest

8 If you re-execute the Select statement from “Executing a


Simple Select Statement” on page 84, you will see that the
previously inserted records are returned.
.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 101

Using Stored Procedures With Oracle


SequeLink supports stored procedures with Oracle7 and Oracle8
databases. Also, with Oracle8, getProcedures() and
getProcedurecolumns() can return information on procedures
within PL/SQL packages, allowing JDBC applications to execute
these procedures. This example shows you how to fetch rows
using Oracle PL/SQL procedures.

Creating the Stored Procedure


In the following Oracle PL/SQL package, a record type and a
cursor (result set) type are defined. The procedure contains an
input parameter that can have a value, such as Smi%, to request
information about employees whose last name starts with the
letters 'Smi' (for example, Smith or Smithwick). The procedure
also has one input/output parameter of the cursor type defined
in the package.

Create or replace package EmployeeInfo as


Type EmployeeRec is record
(
Employee_Id integer,
Employee_Name varchar2(25),
Employee_Job varchar2(25),
Department_Name varchar2(30),
Employee_Salary integer
);
Type EmployeeCursor is ref cursor return EmployeeRec;
End EmployeeInfo;
Create or replace procedure EmployeeInfoProc
(empname IN varchar2, empcursor IN OUT
EmployeeInfo.EmployeeCursor)
As
Begin
Open empcursor For
select empno, ename, job, dname, sal from emp, dept
where emp.deptno=dept.deptno and ename like empname;
End;

SequeLink JDBC Driver Reference


102 Chapter 5 Using JDBCTest

To create the example stored procedure:


1 Select Connection / Create Statement.

2 Select Statement / Execute Stmt Update. JDBCTest prompts


you for a SQL statement.

3 In the Enter SQL Here scroll box, type the name of the
preceding PL/SQL package.

Click Submit; then, Close. The connection window indicates


that the statement is executed successfully, and the PL/SQL
package is created.

Executing the Stored Procedure


This example explains the JDBC function call sequence required
to execute a stored procedure. We will request information for all
employees starting with “M%”.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 103

From the procedure definition:

Create or replace procedure EmployeeInfoProc (empname IN


varchar2, empcursor IN OUT EmployeeInfo.EmployeeCursor)

you may think that, by having two parameters, the application


must call setString() twice. This is false. The only way to create a
result set from an Oracle stored procedure is to declare this
result set, empcursor, as an input/output parameter. So, the
JDBC API treats this stored procedure as if it has only one input
parameter, and returns a result set.

To execute the example stored procedure:


1 Select Connection / Create Callable Statement. JDBCTest
prompts for the SQL statement to execute the stored
procedure.

2 Using JDBC SQL syntax, specify the stored procedure you


want to execute.

Click Submit; then, click Close.

3 Select Statement / Set Prepared Parameters.

SequeLink JDBC Driver Reference


104 Chapter 5 Using JDBCTest

4 For each parameter:

a Type the parameter number.

b Select the parameter type.

c Type the parameter value.

d Click Set.

Click Close.

5 Select Statement / Execute Stmt Query. The connection


window indicates that the stored procedure has been
executed successfully.

SequeLink JDBC Driver Reference


JDBCTest Tutorial 105

6 Select Results / Show All Results.

SequeLink JDBC Driver Reference


106 Chapter 5 Using JDBCTest

SequeLink JDBC Driver Reference


107

6 Tracking JDBC Calls

This chapter introduces Spy, a tool that allows you to track JDBC
calls, and describes how to use it.

About Spy
Spy passes calls issued by an application to an underlying JDBC
driver and logs detailed information about those calls. It
provides the following advantages:

■ Logging is JDBC 1.22- and JDBC 2.0-compliant.

■ Logging is consistent, regardless of the JDBC driver used.

■ All parameters and function results for JDBC calls can be


logged.

■ Even if your JDBC driver does not support logging, you can
still log JDBC calls.

■ Logging can be enabled, without changing the application,


using the connection URL.

Spy URL Syntax


Spy uses the following format as a connection URL:

jdbc:spy:{original-url};[<key>=<value>;]

where original-url is the connection URL of the underlying


JDBC driver.

SequeLink JDBC Driver Reference


108 Chapter 6 Tracking JDBC Calls

In addition, you can specify the following options:

log=System.out Redirects logging to the Java output standard.


log=(file)<filename> Redirects logging to the file specified in
<filename>. By default, Spy will use the
stream specified in
DriverManager.setLogStream().
load=<classname> Loads the driver specified in <classname>. The
default value is intersolv.jdbc.sequelink.
SequeLinkDriver.
shutup={yes | no} Specifies whether logging of the underlying
JDBC driver is activated. The default is
shutup=no.
linelimit=<numberofchars> Specifies the maximum number of characters Spy
will log on one line. The default is 0 (no
maximum limit).
logIS={yes | no | Specifies whether Spy logs activity on
nosingleread} InputStreams. nosingleread turns on logging
for InputStreams (but not InputStream.read()
messages), allowing logging on InputStreams
without generating large log files full of single-
byte read messages.
logTName={yes | no} Specifies whether Spy logs the name of the
current thread. The default is logTName=no.

SequeLink JDBC Driver Reference


Spy URL Examples 109

Spy URL Examples


Example A:
jdbc:spy:{jdbc:odbc:Oracle7};load=sun.jdbc.odbc.JdbcOdbcDriver;
log=(file)C:\temp\spy.log;shutup=yes

Using this example, Spy would:

1 Load the JDBC-ODBC bridge.

2 Log all JDBC activity to the file c:\temp\spy.log.

3 Disable logging within the JDBC-ODBC bridge.

Example B:
jdbc:spy:{jdbc:sequelink://...};log=System.out;linelimit=80

Using this example, Spy would:

1 Load the SequeLink JDBC Driver.

2 Log all JDBC activity to the standard output file.

3 Log a maximum of 80 characters for each line.

SequeLink JDBC Driver Reference


110 Chapter 6 Tracking JDBC Calls

Spy Log Example


Note: Numbers in bold superscript are note indicators. See the
notes following the example for the referenced text.

Spy for JDBC, Rev. 1.01


(c) Copyright Merant, 1997-1999
All rights reserved.1
registerDriver:driver[className=intersolv.jdbc.spy.SpyDriver,
context=null,intersolv.jdbc.spy.SpyDriver@1ec49f]2

*Driver.connect(jdbc:spy:{jdbc:sequelink://QANT:4003/ [Oracle];})
trying driver[className=intersolv.jdbc.spy.SpyDriver,
context=null,intersolv.jdbc.spy.SpyDriver@1ec49f]3

spy>> Driver.connect(String url, Properties info)


spy>> url = jdbc:spy:{jdbc:sequelink://QANT:4003/[Oracle];
OSUser=qauser;OSPassword=null12}
spy>> info = {password=tiger, user=scott}
spy>> OK (Connection[1])4

getConnection returning
driver[className=intersolv.jdbc.spy.SpyDriver,
context=null,intersolv.jdbc.spy.SpyDriver@1ec49f]5

spy>> Connection[1].getWarnings()
spy>> OK6

spy>> Connection[1].createStatement
spy>> OK (Statement[1])7

spy>> Statement[1].executeQuery(String sql)


spy>> sql = select empno,ename,job from emp where empno=7369
spy>> OK (ResultSet[1])8

spy>> ResultSet[1].getMetaData()
spy>> OK (ResultSetMetaData[1])9

spy>> ResultSetMetaData[1].getColumnCount()

SequeLink JDBC Driver Reference


Spy Log Example 111

spy>> OK (3)10

spy>> ResultSetMetaData[1].getColumnLabel(int column)


spy>> column = 1
spy>> OK (EMPNO)11

spy>> ResultSetMetaData[1].getColumnLabel(int column)


spy>> column = 2
spy>> OK (ENAME)12

spy>> ResultSetMetaData[1].getColumnLabel(int column)


spy>> column = 3
spy>> OK (JOB)13

spy>> ResultSet[1].next()
spy>> OK (true)14

spy>> ResultSet[1].getString(int columnIndex)


spy>> columnIndex = 1
spy>> OK (7369)15

spy>> ResultSet[1].getString(int columnIndex)


spy>> columnIndex = 2
spy>> OK (SMITH)16

spy>> ResultSet[1].getString(int columnIndex)


spy>> columnIndex = 3
spy>> OK (CLERK)17

spy>> ResultSet[1].next()
spy>> OK (false)18

spy>> ResultSet[1].close()
spy>> OK19

spy>> Connection[1].close()
spy>> OK20

SequeLink JDBC Driver Reference


112 Chapter 6 Tracking JDBC Calls

Notes:

1: The Spy driver is registered. The spy>> prefix indicates that this
line has been logged by Spy.

2: The JDBC Driver Manager logs a message each time a JDBC


driver is registered.

3: This is the logging of the JDBC Driver Manager. It logs a


message each time a JDBC application makes a connection.

4: The application connects with the specified URL. The User


Name and Password are specified using properties.

5: This is the logging of the JDBC Driver Manager. It logs a


message each time a successful connection is made.

6: The application checks to see if there are any warnings. In this


example, no warnings are present.

7 and 8: The statement “select empno,ename,job from emp


where empno=7369” is created.

9, 10, 11, 12, and 13: Some meta data is requested.

14, 15, 16, and 17: The first row is fetched.

18: The application attempts to fetch the second row, but the
database returned only one row for this query.

19: After fetching all data, the result set is closed.

20: The application finishes and disconnects.

SequeLink JDBC Driver Reference


113

A JDBC Support

This appendix describes the JDBC 1.22 and JDBC 2.0 functionality
supported by the SequeLink JDBC Driver.

JDBC 1.22 Functionality


Table A-1 lists the JDBC 1.22 functionality supported by the
SequeLink JDBC Driver.

Table A-1. JDBC 1.22 Functionality Supported by the SequeLink JDBC Driver

JDBC Functionality Support


java.sql.CallableStatement Same restrictions as java.sql.Statement
java.sql.Connection Fully implemented
java.sql.DatabaseMetaData Fully implemented
java.sql.Driver Fully implemented by class
intersolv.jdbc.sequelink.SequeLinkDriver
java.sql.PreparedStatement Same restrictions as java.sql.Statement
java.sql.ResultSet Fully implemented
java.sql.ResultSetMetaData Fully implemented
java.sql.Statement ■ No support for query timeout:

[getQueryTimeOut() -
setQueryTimeOut()]
■ No support for cancel execution [cancel()]

SequeLink JDBC Driver Reference


114 Appendix A JDBC Support

Table A-1. JDBC 1.22 Functionality Supported by the SequeLink JDBC Driver (cont.)

JDBC Functionality Support


SQL Escape syntax SequeLink supports most SQL escape syntaxes defined by
JDBC if supported in the native syntax of the connected
database. For example, outer join escape syntax is
supported only when the database supports outer joins. To
obtain details about supported SQL escape syntaxes,
consult your database metadata (using JDBCTest, for
example).
Logging The JDBC logging facility does not log any information for
the SequeLink JDBC Driver. To log JDBC calls, use Spy. For
more information about Spy and logging JDBC calls, see
Chapter 6, “Tracking JDBC Calls” on page 107.

SequeLink JDBC Driver Reference


JDBC 2.0 Functionality 115

JDBC 2.0 Functionality


Table A-2 lists the JDBC 2.0 functionality supported by the
SequeLink JDBC Driver.

Table A-2. JDBC 2.0 Functionality Supported by the SequeLink JDBC Driver

JDBC Functionality Support


java.sql.CallableStatement ■ getBigDecimal() returning a BigDecimal with full
precision

■ Calendar extensions for getDate(), getTime(), and


getTimeStamp
java.sql.Connection ■ createStatement() with result set type and concurrency
(see note)

■ prepareCall() with result set type and concurrency (see


note)

■ prepareStatement() with result set type and


concurrency (see note)
java.sql.DatabaseMetaData Fully implemented
java.sql.Driver Fully implemented
java.sql.PreparedStatement ■ Batches

■ setCharacterStream()

■ Calendar extensions for setDate(), setTime(), and


setTimeStamp()
java.sql.ResultSet ■ Scrolling through result sets (see note)

■ getBigDecimal() returning a BigDecimal with full


precision

■ getCharacterstream()

■ getStatement()

■ Calendar extensions for getDate(), getTime(), and


getTimeStamp()
Note: For more information about scrollable cursors, see “Scrollable Cursors” on page 117.

SequeLink JDBC Driver Reference


116 Appendix A JDBC Support

Table A-2. JDBC 2.0 Functionality Supported by the SequeLink JDBC Driver (cont.)

JDBC Functionality Support


java.sql.ResultSetMetaData Fully implemented
java.sql.Statement Fully implemented
Note: For more information about scrollable cursors, see “Scrollable Cursors” on page 117.

SequeLink JDBC Driver Reference


Scrollable Cursors 117

Scrollable Cursors
Scrollable cursors can move backward and forward in a result
set, allowing the application to scroll back and forth through
retrieved data. SequeLink Java Edition supports scrollable cursors
against a selected list of databases.

Result Set Types


JDBC 2.0 defines the following result set types:

■ Forward-only
■ Scroll-insensitive
■ Scroll sensitive

Forward-only result sets allow you to move forward, but not


backward, through the data. The application only can move
forward using the next() method.

Typically, a scroll-insensitive result set ignores changes that are


made while it is open. It provides a static view of the underlying
data it contains. The membership, order, and column values of
rows are fixed when the result set is created.

In contrast, a scroll-sensitive result set provides a dynamic view


of the underlying data, reflecting changes that are made while it
is open. The membership and ordering of rows in the result set
may be fixed, depending on how it is implemented.

Concurrency Types
JDBC 2.0 defines the following concurrency types for a result set:

■ Read-only
■ Updatable

SequeLink JDBC Driver Reference


118 Appendix A JDBC Support

A read-only result set does not allow its contents to be updated.


Read-only result sets can increase the overall level of concurrency
between transactions, because multiple read-only locks can be
held on a data item simultaneously.

An updatable result set allows its contents to be updated and


may use database write locks to mediate access to the same data
item by different transactions. Because only a single write lock
may be held at one time on a data item, updatable result sets can
reduce concurrency.

An optimistic concurrency control scheme may be appropriate if


you can accurately predict that conflicting access to data will
seldom occur. Typically, optimistic concurrency control
implementations compare rows by a value or by a version
number to determine if an update conflict has occurred.

Using Scrollable Cursors with the


SequeLink JDBC Driver
The SequeLink JDBC Driver supports:

■ Forward-only result sets against all databases.

■ Scroll-sensitive result sets against Oracle and Informix, with


the following characteristics:

• The membership and ordering of rows in a scroll-sensitive


result set are fixed.

• Scroll-sensitive result sets are supported only for


connections to a SequeLink Server 4.5 server or higher.

• Scroll-sensitive result sets are not supported on stored


procedures.

SequeLink JDBC Driver Reference


Scrollable Cursors 119

• Scroll-sensitive result sets are not supported when the


Select statement contains any of the following SQL
language constructions:

• Join
• Aggregate functions
• Group By
• Scroll-sensitive result sets are not supported when a
fragmented table is not created explicitly with the With
RowIDs clause. This only applies to Informix.

The SequeLink JDBC Driver does not support updatable result


sets.

Note: When the SequeLink JDBC Driver cannot support the


requested result set type or concurrency, it will automatically
downgrade it and generate one or multiple SQLWarnings with
detailed information.

SequeLink JDBC Driver Reference


120 Appendix A JDBC Support

JDBC Compatibility
Table A-3 shows compatibility between the JDBC application
versions, Java Virtual Machines, and the SequeLink JDBC Driver.

Table A-3. JDBC Compatibility

JDBC Version Used Virtual


(see note) Machine Compatible? Comments
1.22 1.0.2 No SequeLink Java Edition does not
support JDK 1.0.2.
1.22 1.1.x Yes
1.22 1.2 Yes
2.0 1.0.2 No SequeLink Java Edition does not
support JDK 1.0.2.
2.0 1.1.x No A JDBC 2.0 application requires
the JDBC 2.0 interface.
2.0 1.2 Yes
Note: Is the application using JDBC 1.22 or JDBC 2.0 features?

SequeLink JDBC Driver Reference


Threading 121

Threading
The SequeLink JDBC Driver is completely thread safe; that is, it
will not fail when database requests are made on separate
threads.

A JDBC driver can be based on one of the following


architectures:

■ Thread impaired. The JDBC driver serializes all JDBC calls. All
requests are handled one by one, without concurrent
processing.

■ Thread per connection. The JDBC driver processes requests


concurrently with statements that do not share the same
connection; however requests on the same connection are
serialized. The SequeLink JDBC Driver uses this architecture.

■ Fully threaded. All requests use the threaded model. The


JDBC driver processes all requests on multiple statements
concurrently.

SequeLink JDBC Driver Reference


122 Appendix A JDBC Support

SequeLink JDBC Driver Reference


123

B Fine-Tuning JDBC Application


Performance

This appendix provides some tips for fine-tuning the


performance of your JDBC applications.

Using SequeLink Shadow Data Dictionaries


A SSDD is a collection of tables that contains meta-information
about tables in a database, much like a database’s native data
dictionary or system catalog. You can use the SequeLink
Dictionary Manager (or OS/390 batch procedures) to create and
populate a SSDD with dictionary information about all, or a
subset of, the tables in your database.

Once a SSDD is populated, your ODBC and JDBC applications can


use the SSDD, instead of the native database data dictionary, for
retrieving data dictionary information.

Advantages of Using SSDDs:


■ Improved System Performance. Because SSDDs are prepared
in the format that your SequeLink or JDBC application
requires, system performance can improve significantly,
especially when the remote database contains a large
number of tables or when data dictionary access is slow.

■ Increased Functionality. Some databases and servers limit the


amount of data dictionary information that can be returned
in one session or by one data dictionary query. Using SSDDs,
you can combine data dictionary information that,
otherwise, would span several sessions or data dictionary

SequeLink JDBC Driver Reference


124 Appendix B Fine-Tuning JDBC Application Performance

queries. For example, you can group different types of DB2 on


AS/400 information and de-couple it from the library list.

■ Enhanced Administration. The SequeLink Dictionary Manager


allows you to create different, user-specific dictionaries for
different groups of SequeLink clients, providing end users
with data dictionary views which are optimized for their
specific requirements.

■ Extended Security. Most JDBC applications provide access to


the database for all types of queries and browse the complete
data dictionary by default. SSDDs allow you to limit the data
dictionary information visible to end users.

The information in a SSDD is static, which means that a SSDD


must be updated using the SequeLink Dictionary Manager when
database tables or indexes are altered or dropped. Despite this
limitation, SSDDs can provide significant system performance and
functionality benefits. Although a database’s native data
dictionary is dynamic, it provides slower system performance and
less flexibility.

For information about the connection attributes you can specify


for SSDDs, see “Client Attributes” on page 37. For more
information about using SSDDs, refer to the SequeLink
Administrator’s Guide.

SequeLink JDBC Driver Reference


Reducing Download Time 125

Reducing Download Time


Generally, the time that it takes for applets to download is
determined by the following factors:

■ Number of classes that are loaded. Each class that is


downloaded results in an HTTP request to your Web server.
The more requests and transfers that are made, the slower
the download.

■ Size of the byte code that is loaded. The more bytes that are
transferred, the slower the download.

JDK 1.1-compatible Java Virtual Machines support JAR files,


which reduces the number of HTTP requests because all the class
files are packaged together in the JAR file. The JAR format also
allows you to compress the packaged files, which further
optimizes the download.

First, you must package all classes of your applet into a JAR file.
Second, copy the JAR file into the directory indicated by the
codebase tag, and third, specify the JAR file in the
archive tag.

For example:

<html>
<applet
width=100 height=100
code=JDBCTestApplet
codebase=.
archive=myapplet.jar>
<param name=ConfigFile value=Config.txt>
</applet>

SequeLink JDBC Driver Reference


126 Appendix B Fine-Tuning JDBC Application Performance

The SequeLink JDBC Driver is packaged into the following JAR


files:

■ slje.jar contains the JDBC Driver.

■ crysec.jar contains the SSL implementation. You only require


this file if you will be using SSL encryption.

To use the SequeLink JDBC Driver from within your applet,


specify these JAR files in the archive tag as shown:

<html>
<applet
width=100 height=100
code=JDBCTestApplet
codebase=.
archive=myapplet.jar,slje.jar,crysec.jar>
<param name=ConfigFile value=Config.txt>
</applet>

By default, the JAR files shipped with SequeLink Java Edition


Client are uncompressed. If download speed is crucial in your
environment, you may want to repackage the SequeLink JDBC
Driver classes into a compressed JAR file.

Note: You may experience problems using compressed JAR files


with early versions of Microsoft Internet Explorer 4.x and
Netscape Communicator 4.x.

SequeLink JDBC Driver Reference


Improving Character Set Conversion Performance 127

Improving Character Set Conversion


Performance
Java uses Unicode as its native character encoding method;
however, most databases use a different character encoding
method. The Transliteration connection attribute allows
you to specify how character data is converted between the
driver and database. The standard character set conversion
implementation provided by the SequeLink JDBC Driver is 100%
Pure Java; however, system performance may not be optimal.

If you are using transliteration and want to improve your driver


performance, replace the
intersolv.jdbc.sequelink.Transliteration.class file located in
<installdir>/driver/classes/slje.jar with the
Transliteration.class file located in <installdir>/driver/src/
intersolv/jdbc/sequelink/Transliteration.java.

Note: Transliteration.class uses classes from the sun.io package


provided by Sun Microsystems. Because this transliteration class
is not 100% Pure Java, it is not bundled with the default
implementation of the SequeLink JDBC Driver. By using classes
from the sun.io package, character set conversion performance
can improve significantly; however, Sun Microsystems reserves
the right to remove or change the sun.io classes in future
releases of the Java Virtual Machine, which could result in
compatibility problems with this character set conversion
implementation.

SequeLink JDBC Driver Reference


128 Appendix B Fine-Tuning JDBC Application Performance

Fetching BigDecimal Objects


JDBC 1.22 defines getBigDecimal() with a scale parameter. When
the SequeLink JDBC Driver fetches a BigDecimal object from a
database, it rescales it using the scale specified by the application.
This additional processing can downgrade system performance,
particularly when large numbers of BigDecimal objects are
fetched by your application.

To eliminate this additional rescaling, JDBC 2.0 defines an


overloaded version of getBigDecimal, without the scale
parameter. This method allows the SequeLink JDBC Driver to
return the BigDecimal object with the original precision.

SequeLink JDBC Driver Reference


129

C Frequently Asked Questions

This appendix lists some frequently asked questions and answers


about the SequeLink JDBC Driver.

Q: What platforms are supported by SequeLink Java Edition


Client?

A: SequeLink Java Edition consists of two components, the


SequeLink Java Edition Client (the SequeLink JDBC Driver and
Proxy Server) and a server component. The SequeLink JDBC
Driver is written in Java and is platform-independent; it only
requires a Java Virtual Machine implementation that is
compatible with JDK 1.1 or higher. All major operating systems
support a Java Virtual Machine implementation. The server
component must be SequeLink Server 4.0, or higher, with TCP/IP
support.

Q: Is the SequeLink JDBC Driver 100% Pure Java?

A: Yes, the SequeLink JDBC Driver is 100% Pure Java. No


additional components need to be installed on your client
workstation, other than an implementation of the Java Virtual
Machine. For more information about SequeLink Java Edition
Client product requirements, refer to the SequeLink Java Edition
Client Installation Guide.

SequeLink JDBC Driver Reference


130 Appendix C Frequently Asked Questions

Q: What SequeLink components do I need to make the SequeLink


JDBC Driver work?

A: The following SequeLink components are required by the


SequeLink JDBC Driver:

■ SequeLink JDBC Driver classes

■ SequeLink Server 4.0, or higher, with TCP/IP support. These


include:

• SequeLink Server for Windows NT


• SequeLink Server for UNIX
• SequeLink Server for AS/400
• SequeLink Server for OS/390

■ SequeLink Proxy Server (if using untrusted applets or SSL


encryption)

Q: Which databases can I access with the SequeLink JDBC Driver?

A: All databases supported by SequeLink 4.0, or higher, can be


accessed through the SequeLink JDBC Driver. These include:

■ DB2 on AS/400 ■ Microsoft SQL Server 6.5


■ DB2 on NT ■ ODBC
■ DB2 on OS/390 ■ OpenINGRES 1.x & 2.x
■ DB2 on UNIX ■ Oracle7 & 8
■ INFORMIX-OnLine 5, 7, & 9 ■ Sybase System 10 & 11
■ INFORMIX-SE 5 & 7

For more information about supported databases, refer to the


SequeLink Server Installation Guide.

Q: I have written a JDBC applet that uses the SequeLink JDBC


Driver. Where do I install the SequeLink Java Edition Client on the
Web server?

A: The SequeLink JDBC Driver and SSL classes are packaged in the
JAR files slje.jar and crysec.jar, which are located in the directory
<installdir>/driver/classes. Copy these JAR files to your Web

SequeLink JDBC Driver Reference


131

server and make sure that the JAR files are specified correctly in
your HTML code using the codebase and archive tags in the
applet tag.

Q: Where can I find technical information about JDBC?

A: The Web page at:

http://java.sun.com/products/jdbc/

contains information about JDBC and allows you to download


the JDBC 1.22 and JDBC 2.0 specifications. In addition, the
following Web pages provide some useful information about
JDBC:

■ http://java.sun.com/products/jdk/1.2/docs/guide/jdbc/
index.html

■ http://java.sun.com/products/jdk/1.1/docs/guide/jdbc/
index.html

Q: How do I register a JDBC driver?

A: You can register a JDBC driver in any of the following ways:

■ Method 1: Set the Java property sql.drivers using the Java -D


option. The sql.drivers property is defined as a colon-
separated list of driver class names. For example:

intersolv.jdbc.sequelink.SequeLinkDriver:
sun.jdbc.odbc.JdbcOdbcDriver
The sql.drivers property can be set like other Java properties,
using the -D option. For example:

java -Dsql.drivers=intersolv.jdbc.sequelink.
SequeLinkDriver

SequeLink JDBC Driver Reference


132 Appendix C Frequently Asked Questions

■ Method 2: Set the Java property sql.drivers from within your


Java application or applet. To do this, code the following lines
in your Java application or applet, and call
DriverManager.getConnection():

Properties p = System.getProperties();
p.put (“sql.drivers”,
“intersolv.jdbc.sequelink.SequeLinkDriver”);
System.setProperties (p);
4 Method 3: Explicitly load the driver class using the standard
Class.forName() method. To do this, code the following lines
and call DriverManager.getConnection():

Class.forName(“intersolv.jdbc.sequelink.
SequeLinkDriver”);

Q: Which classes should I import into my applet or application for


JDBC?

A: The classes you need to import are all contained in the java.sql
package. To import these classes, include the following line at the
beginning of your code:

import java.sql.*

Q: I'm downloading my applet from a Web server, but I cannot


connect to any of my available SequeLink servers. When I try to
connect to my SequeLink server I get a
“netscape.security.AppletSecurityException: security.Couldn’t
connect to '...' with origin from '...'” exception. Why is this?

A: Untrusted applets cannot open connections to any machine


other than the originating host. The originating host is the
machine which provides the classes and may be the host from
where the HTML page was accessed or the host specified in the
codebase parameter in the applet tag. This is a Java restriction.
To circumvent these restrictions, the SequeLink Java Edition
Client includes the SequeLink Proxy Server. For more information
about using the SequeLink JDBC Driver with untrusted applets,

SequeLink JDBC Driver Reference


133

see “Using the SequeLink JDBC Driver With Untrusted Applets”


on page 49.

Q: Where can I obtain certificates that I can use as server


certificates for the SequeLink Proxy Server?

A: You can use any certificate for SSL encryption that you can use
for your Web server. If you have a certificate management
environment (for example, SSLeay), you can generate certificates
yourself. For more information about SSLeay, go to:

http://www.psy.uq.oz.au/~ftp/Crypto

You also can apply for test certificates with established


certificate authorities. In addition, you can generate certificates
with the javakey tool included in the JDK 1.1.

Q: I have a server certificate in PEM format. How do I convert it


to DER format?

A: You can use the public domain SSL implementation SSLeay.


For more information about SSLeay, go to:

http://www.psy.uq.oz.au/~ftp/Crypto

Q: Why do I have to specify a certificate verification class, and


why does SequeLink not use the list of trusted certificates that I
have installed in my browser?

A: Browsers allow you to install certificates from trusted sites.


When you make an HTTP connection to an unknown site (a site
whose certificate is not signed by a certificate authority known
to your browser), the browser can prompt you for confirmation.
A JDBC applet that you download to your browser runs in the
Java Virtual Machine of the browser and does not have access to
the list of trusted certificate authorities that you have
configured for your browser; therefore, you must provide you
own verification checking.

SequeLink JDBC Driver Reference


134 Appendix C Frequently Asked Questions

Q: Is it safe to download the class that performs the certificate


check?

A: When you are concerned about the security of downloaded


JDBC applets, you must make sure that no one can tamper with
the applet. You can ensure this by signing your applet and
configuring your browser only to allow outgoing TCP
connections from an applet that is signed by your server. If
someone set up a fraudulent Web server that impersonated your
Web server, they would have to re-sign your applet with their
own certificate. Your browser would then intercept this forged
applet, because it is not signed by a trusted software publisher.

Q: If I perform no real checking of the server certificate, what


problems do I open myself up to?

A: Verifying the server certificate assures you that you are really
connected to the correct server. The SSL handshake guarantees
that the site it received the certificate from knows the private key
that corresponds to the public key in the certificate. If you verify
that the certificate is the one that you expected, you are sure that
you are communicating with the correct server. If you accept any
certificate, you have the same level of protection as with an
anonymous cipher suite. This means that only you and the server
with which you are communicating can decipher the
communication. So, you are protected from eavesdropping.

Q: Why do I always receive the generic error message:


[INTERSOLV][SequeLink JDBC Driver][SSL]java.io.IOException:
Alert: fatal handshake_failure when something goes wrong with
the SSL connection and not a detailed error message?

A: If the SSL implementation returned a detailed error message


describing why the SSL handshake failed, it would become
vulnerable to a “million questions attack.” For more information
about this type of vulnerable exposure, go to:

http://www.rsa.com/rsalabs/pkcs1

SequeLink JDBC Driver Reference


135

This is the reason why the SequeLink JDBC Driver always returns
a generic handshake error to the client. For more information
about the error’s possible cause, review the proxy server log file.

SequeLink JDBC Driver Reference


136 Appendix C Frequently Asked Questions

SequeLink JDBC Driver Reference


137

Index

Symbols OpenINGRES 35
Oracle 35
SequeLink ODBC Socket 33
"man-in-the-middle" security infiltrations 59 SSDD 37
Sybase 36
Transliteration 39
A
Advantages of using SequeLink Shadow B
Data Dictionaries (SSDDs) 123
Algorithms BigDecimal objects 128
Asymmetric cryptographic 59 BlockFetchForUpdate 28
Message digest 60
Symmetric cryptographic 60
Applets, untrusted 132
Asymmetric cryptographic algorithms 59
Attributes
C
BlockFetchForUpdate 28
Certificatecheck 37
Certificate check 37
Certificates
CipherSuites 37
Converting to DER format 133
Client 37
Obtaining 133
Connection 25
Verifying for the SequeLink Proxy
DB2 on AS/400 26
Server 73
DB2 on NT 26
Character set conversion 127
DB2 on OS/390 27
Cipher suites
DB2 on UNIX 27
About 60
ForcePasswordChange 38
Specifying 60
Informix 28
Supported 61
Microsoft SQL Server 29
Using 59
NewPassword (DB2 and OS/390) 38
Client attributes 37
ODBC Btrieve 29
Configuring
ODBC dBASE 30
JDBCTest 80
ODBC Excel 31
SequeLink Proxy Server 51
ODBC FoxPro 31
Connecting
ODBC Microsoft Access 32
With JDBCTest 41
ODBC Paradox 32
With URLs 21
ODBC Text 34

SequeLink JDBC Driver Reference


138 Index

Connection
Attributes 25
F
Problems, troubleshooting 46
URL examples 24 Fetching BigDecimal objects 128
URL format 21 ForcePasswordChange 38
contacting Technical Support 14 Frequently asked questions 129
Conventions used in this book 12 Functionality
Cryptographic characteristics JDBC 1.22 113
Data transfer ciphers 64 JDBC 2.0 115
Key exchange algorithmns 63

H
D
Host name 22
Data transfer ciphers 64
Databases supported 130
DataDictionary 37
DataDictionaryCatalog 38 I
DataDictionarySchema 38
DB2 Importing classes for JDBC 132
ForcePasswordChange 38 Improving character set conversion
NewPassword 38 performance 127
Password expiration 38 Informix connection attributes 28
DB2 on AS/400 connection attributes 26 Installing SequeLink Proxy Server as a
DB2 on NT connection attributes 26 Windows NT service 55
DB2 on OS/390 connection attributes 27
DB2 on UNIX connection attributes 27
Decryption tool 72
Downloading applets, tips 125 J
JAR files 125
Java security restrictions 49, 132
E JDBC
Compatibility 120
Enabling SSL encryption 65 JDBC 1.22 functionality 113
Encryption JDBC 2.0 functionality 115
About 57 Support 113
Using the encryption tool 71 Technical information 131
Error messages 44 JDBCTest
Examples About 77
Connection URLs 24 Configuring 80
URL (SequeLink JDBC Driver) 24 Connecting with 41, 80
URL (Spy) 109

SequeLink JDBC Driver Reference


Index 139

Executing
A batch on a Prepared statement 97
O
A Prepared statement 86
A simple Select statement 84 ODBC
Making a JDBCTest connection 80 Btrieve connection attributes 29
Retrieving database metadata 90 dBASE connection attributes 30
Scrolling through a result set 93 Excel connection attributes 31
Starting 78 FoxPro connection attributes 31
As an applet 78 Microsoft Access connection attributes 32
On Solaris (UNIX) 78 Paradox connection attributes 32
On Windows 9x and Windows NT 78 Socket connection attributes 33
Using a Java Virtual Machine other than Text connection attributes 34
the JDK 78 OpenINGRES connection attributes 35
Tutorial 77 Oracle connection attributes 35
Using stored procedures with Oracle 101 OS/390
ForcePasswordChange 38
NewPassword 38
Password expiration 38
K
Key exchange algorithms 63
P
Pass phrase, providing 68
L Password expiration, OS/390 and DB2 38
PKCS8 format 70
Private keys
Log example, Spy 110
PKCS8 format 70
Logging, SequeLink Proxy Server 53
Using 68

M R
Message digest algorithms 60
Registering the SequeLink JDBC Driver 46
Microsoft SQL Server connection
RSA and RC4 algorithms, using 75
attributes 29

N
NewPassword 38

SequeLink JDBC Driver Reference


140 Index

S CipherSuites 37
Connection URL format 21
Data transfer ciphers 64
Scrollable cursors Enabling 65
Concurrency types 117 Key exchange algorithms 63
Result set types 117 Keyword/value pairs 66
Using with the SequeLink JDBC Driver 118 Supported cipher suites 61
Security restrictions, Java 49 Using
SequeLink ODBC Socket connection Cipher suites 59
attributes 33 Decryption tool 72
SequeLink Proxy Server Encryption tool 71
About 49 Starting
Configuring 51 JDBCTest 78
Installing as a Windows NT service 55 SequeLink Proxy Server
Logging 53 UNIX 52
Obtaining certificates 133 Windows NT 52
Pass phrase 68 Stopping
Starting SequeLink Proxy Server (UNIX) 53
UNIX 52 SequeLink Proxy Server (Windows NT) 53
Windows NT 52 Stored procedures 101
Stopping SupportNet 14
UNIX 53 Sybase connection attributes 36
Windows NT 53 Symmetric cryptographic algorithms 60
Using as a Windows NT service 54
Validating certificate 73
SequeLink Shadow Data Dictionaries (SSDDs)
DataDictionary 37
DataDictionaryCatalog 38
T
DataDictionarySchema 38
TCP port 22, 52
Using 123
Technical Support, contacting 14
Service type 23
Testing your connection 41
Solaris (UNIX), starting JDBCTest 78
Threading 121
Specifying
Transliteration
Cipher suites 60
Class 127
Incomplete URLs 48
Client attribute 39
Spy
Improving character set conversion
About 107
performance 127
Log example 110
Troubleshooting connection problems 46
URL examples 109
URL syntax 107
SSDD client attributes 37
SSL encryption
About 57
Certificatecheck 37

SequeLink JDBC Driver Reference


Index 141

U Starting JDBCTest 78
Un-installing SequeLink Proxy Server as a
Windows NT service 56
Un-installing SequeLink Proxy Server as a WWW, using to contact technical support 14
Windows NT service 56
Untrusted applets 132
URL
Examples (SequeLink JDBC Driver) 24
Examples (Spy) 109
Format for connections 21
Specifying an incomplete 48
Using
Decryption tool 72
Encryption tool 71
Private keys with the SequeLink Proxy
Server 68
RSA and RC4 algorithms 75
Scrollable cursors with the SequeLink JDBC
Driver 118
SequeLink Proxy Server as a Windows NT
service 54
SSL cipher suites 59
SSL encryption 57

V
Validating the SequeLink Proxy Server
certificate 73

W
Windows 9x, starting JDBCTest 78
Windows NT
Installing SequeLink Proxy Server as a
Windows NT service 55
SequeLink Proxy Server as a Windows NT
service 54

SequeLink JDBC Driver Reference

You might also like