Copyright: Copyright © 1997 Symantec Corporation.
Citation: Reprint permission by Symantec, dbANYWHERE 1997


DBAW.doc

2/20/97

This is the main file for the dbANYWHERE online help.

Files

The other files are:

db_contx	Context sensitive
db_pop	Pop-ups and definitions
db_proc	Procedures and miscellaneous
db_ref	Reference
db_tools	Tools
db_trble	Troubleshooting and errors
Style template

dbawhelp.dot is the style template for this online help system. Each file is attached to robortf.dot (except dbaw.doc which is attached to robohelp.dot). I used Format | Style Gallery to merge in dbawhelp.dot.

Tables

The maximum table width is 3.75" (because the Window width is approximately 4").

Footnotes

I redid the footnotes and all links so that the $ (topic title) and A (Alink) footnotes are exactly the same. The # footnote (topic ID) is the same as $ and A except that it has an underscore (_) instead of any non-alpha characters (space, apostrophe, hyphen). All > (window) footnotes equal visual.

Exceptions

•	I removed the apostrophes from the Alinks because they caused errors.

•	I subsequently changed a few topic titles without changing their corresponding  # and A footnotes.


db_pop.doc

Pop-up definitions for the dbANYWHERE online help:

•	Definitions

•	URLs (not pop-ups because they're too large)

•	dbawdsn.ini fields

•	Fields in Data Source configuration files


Definitions


client machine

Machine that communicates with a dbANYWHERE Server machine to access a Data Source.


client software

Software that dbANYWHERE uses to communicate with a database engine such as:

•	Oracle Server client software

•	Microsoft SQL Server client software

•	ODBC32 Administrator


connection statistics

DC messages which occur when a client disconnects. The format for a DC message is:

DC, <client IP address>, <initial connect time>, <connect time duration>, <number of requests processed>

where:

•	<initial connect time> is in second since 1970

•	<connect time duration> is in seconds


dbANYWHERE (naming conventions)

dbANYWHERE Server	Middleware database software that supports three-tier architecture for database access
dbANYWHERE Workgroup Server	Restricted version of the dbANYWHERE Server which is shipped with Visual Cafe Pro
dbANYWHERE Server machine	Hardware on which dbANYWHERE software is running
dbANYWHERE	Both versions of dbANYWHERE


development machine

Machine that combines a client machine and a Java development environment such as Visual Cafe Pro.


Java VM: Java Virtual Machine

Virtual machine provided with the JDK (Java Development Kit). The machine contains:

•	Byte code translator that converts a downloaded binary Java file into instructions that the client machine can execute.

•	Library routines that a Java applet calls.

For more information, see www.javasoft.com.


JDBC

Standard for Data Source access from Java applets and applications. JDBC is an API developed by Sun Microsystems. For more information, see splash.javasoft.com/jdbc on the WWW.


ping: Packet INternet Groper

Network message that a computer transmits to check for the presence, connectedness, and responsiveness of another computer. The other computer responds by echoing the message back to the first computer.


SQL statement

SQL 92 string that defines a view. If the string is in the standard SELECT statement format as shown below, Visual Cafe Pro's wizards and Join Definition dialog box can parse the string and edit it for you. If the string is not in the standard SELECT statement format, you need to use the SQL Statement dialog box to edit the string manually.

Standard format

SELECT column[, column ...] FROM table WHERE condition

Example

SELECT emp_fname, emp_lname, location_id FROM emp_info WHERE location_id BETWEEN 10 AND 20


URLs (not pop-ups)


dbANYWHERE Server machine URL

A dbANYWHERE Server machine URL is the address of a dbANYWHERE Server machine on the Internet. The format is:

dbaw://IPaddress:Port

Tip

To determine a dbANYWHERE Server machine’s IP address and port number when running in console mode, look at the dbANYWHERE title bar. To determine a dbANYWHERE Server machine's IP address and port number when running in Service mode, look at the dbANYWHERE startup messages.

Usage

Your clients need to use this IP address to connect to the dbANYWHERE Server machine. During development, if you're running the client and dbANYWHERE on the same machine, the client can use "localhost" or "127.0.0.1" to connect to the dbANYWHERE Server machine.

Examples

dbaw://155.64.35.135:8889
dbaw://localhost:8889

Fields

dbaw

Value that defines the protocol and subprotocol for a connection to a dbANYWHERE Server machine. dbaw is the actual value to use.

IP address: Internet Protocol address

dbANYWHERE Server machine's unique IP address via network TCP/IP configuration. The IP address formats are:

•	Local host

The client and dbANYWHERE are on the same machine. We suggest using this configuration during development. Example:

127.0.0.1

•	Numeric

The client and dbANYWHERE are on different machines. Example:

123.45.67.123

•	Alias

The client and dbANYWHERE are on different machines. The client depends on the host or the database server to convert this alias to a numeric IP address. Example:

symantec.com

Port

Unique port number for the dbANYWHERE Server machine’s socket-based service. The port number represents a logical connection that can be called by client machines.


Data Source URL for JDBC

A Data Source URL is the address of a Data Source on the Internet. The format for JDBC is:

jdbc:dbaw://IPaddress:Port/Engine/Server/DataSource

Tip

An easy way to determine a dbANYWHERE Server machine’s IP address and port number is to look at the dbANYWHERE startup messages.

Example

jdbc:dbaw://155.64.35.135:8889/ORACLE_7/t:155.44.33.119/sales

Fields

jdbc:dbaw

Value that defines the protocol and subprotocol for a connection to a Data Source. jdbc:dbaw is the actual value to use.

IP address: Internet Protocol address

dbANYWHERE Server machine's unique IP address via TCP/IP configuration. For more information, see dbANYWHERE Server machine URL.

Port

Unique port number for the dbANYWHERE Server machine’s socket-based service. The port number represents a logical connection that can be called by client machines.

Engine

Name of the Data Source's engine. The possible values are the same as those for the dbANYWHERE Data Source configuration file's <engine name> field.

Server

Name of the Data Source's server. The possible values are the same as those for the dbANYWHERE Data Source configuration file's <server name> field.

Data Source

Name of the Data Source. The possible values are the same as those for the dbANYWHERE Data Source configuration file's <Data Source name> field.

Specific Data Sources

For URL information about specific Data Sources, see:

Connecting to Informix Server via JDBC

Connecting to Microsoft Access via JDBC

Connecting to Microsoft SQL Server via JDBC

Connecting to an ODBC SQL based Data Source via JDBC

Connecting to an ODBC Xbase Data Source via JDBC

Connecting to Oracle Server via JDBC

Connecting to Sybase SQL Anywhere via JDBC

Connecting to Sybase SQL Server via JDBC


dbawdsn.ini fields


<label>

Purpose: Label for a DSN section

Description: Each <label> value in dbawdsn.ini's header matches a DSN section name.


<description>

Purpose: Data Source description


<engine name>

Purpose: dbANYWHERE Data Source engine driver

Description: dbANYWHERE uses a specific name for each type of Data Source engine.

Possible values:

<engine name>	Data Source
Informix	Informix OnLine Server 7.x
MS_Access	Microsoft Access
ODBC_DSN	SQL based ODBC Data Source
ODBC_Xbase_DSN	Xbase ODBC Data Source
Oracle_7	Oracle 7.x
SQL_Server	Microsoft SQL Server
Sybase_NT	Sybase SQL Server for Windows NT
Sybase_SQLANY	Sybase SQL Anywhere
Sybase_Win95	Sybase SQL Server for Windows 95
Watcom	Watcom 4.x


<server name>

Purpose: Server name

Description: The server name tells dbANYWHERE the Data Source's location on the network.

Possible values:

<server name>	<engine name>
Server name	Informix
<Data Source name>	MS_Access
<Data Source name>	ODBC_DSN
<Data Source name>	ODBC_Xbase_DSN
See below.	Oracle_7
Server name	SQL_Server
Server name	Sybase_NT
<Data Source name>	Sybase_SQLANY
Server name	Sybase_Win95
<Data Source name>	Watcom
Oracle Server <server name> values

<server name>	Protocol	Notes
2:<database>	Personal Oracle	<database> is the name of the database or Oracle SID to connect to.
P: <server>	SQLNET V1 - Names Pipes	<server> is the name or address of the machine running the Oracle Server database.
B:<server>	SQLNET V1 - NetBIOS
X:<server>	SQLNET V1 - SPX/IPX
T:<server>	SQLNET V1 - TCP/IP
TNS:<service>	SQLNET V2	<service> is the service name in the client configuration file tnsnames.ora. The client configuration file is typically generated by a DBA to specify connection parameters. The file should be in the \network\admin subdirectory of the Oracle client software directory.


<Data Source name>

Purpose: Data Source name

Description: This value is optional. If you don't provide a <Data Source name>, dbANYWHERE uses the <server name> value.

Possible values:

For	This value can be
All Data Sources except Oracle Server	Any name you choose.
All Oracle Server protocols except SQLNET V2	The database instance.
Oracle SQLNET V2	<service>	<service> is the service name in the client configuration file tnsnames.ora. The client configuration file is typically generated by a DBA to specify connection parameters. The file should be in the \network\admin subdirectory of the Oracle client software directory.


<user name>

Purpose: User name for logging on to the Data Source

Description: This value is optional. If you don't provide a <user name>, you must still provide the USERNAME field:

USERNAME=


<password>

Purpose: Password for logging on to the Data Source

Description: This value is optional. If you don't provide a <password>, you must still provide the PASSWORD field:

PASSWORD=


Fields in Data Source configuration files


<cancel>

Purpose: Flag indicating whether or not to cancel pending results

Description: dbANYWHERE can perform a cancel operation on a database process's pending results. If this value is N, dbANYWHERE reads and discards all pending results for a process before moving to the next request. This value should be N when accessing a database via TCP/IP.

Default value: Y

Possible values:

N = no

Y = yes


<max processes>

Purpose: Maximum number of open processes

Description: When dbANYWHERE connects to the database, dbANYWHERE opens a number of processes. This is the maximum number of processes that may be open for one user.

Default value: 5

Possible values: 1 through 99


<min processes>

Purpose: Minimum number of open processes

Description: When dbANYWHERE connects to the database, dbANYWHERE opens a number of processes. This value is the minimum number of open processes at any given time.

Default value: 1

Possible values: 1 through 99


<read timeout>

Purpose: Maximum time to wait for data definition language statement results

Description: You can limit the number of seconds that dbANYWHERE waits for a database to return the results of a data definition language statement. If the database doesn't return a result within this length of time, dbANYWHERE displays a time-out message to the user.

Default value: 15

Possible values: 1 through 999


<select timeout>

Purpose: Maximum time to wait for SELECT statement results

Description: You can limit the number of seconds that dbANYWHERE waits for a database to return the results of a SELECT statement. If the database doesn't return a result within this length of time, dbANYWHERE displays a time-out message to the user.

Default value: 180

Possible values: 1 through 999


<update timeout>

Purpose: Maximum time to wait for UPDATE statement results

Description: You can limit the number of seconds that dbANYWHERE waits for a database to return the results of an UPDATE statement. If the database doesn't return a result within this length of time, dbANYWHERE displays a time-out message to the user.

Default value: 60

Possible values: 1 through 999


db_ref.doc

Reference topics for the dbANYWHERE online help:

•	Packages installed

•	Configuration files

•	Data types

•	Data Sources and drivers

•	Support information


Packages installed


Packages installed

Setup installs the following packages:

•	dbaw.zip

•	dbaw_awt.zip

•	sql.zip

•	symantec.zip

Note: symantec.zip is a merged version of the other packages. We recommend that you not use symantec.zip because sql.zip will be unnecessary in the future, and future releases of dbANYWHERE might not provide symantec.zip.


sql.zip

sql.zip is the complete set of JDBC classes which are exactly the same as Sun's JDBC 1.21 package except that the base package "java" has been renamed "symjava." The package is named symjava because the Java Security Model doesn't let you download classes that start with "java." Future versions of dbANYWHERE which use JDK 1.1 won't provide sql.zip.

For information about Sun's JDBC package, see splash.javasoft.com/jdbc on the WWW.

Directories in sql.zip

symjava\math	Special JDBC class that handles the BigDecimal and BigInteger data types
symjava\sql	Standard JDBC classes. Some of these classes are defined in this package and implemented in dbaw.zip.


dbaw.zip

Directories in dbaw.zip

symantec\itools\db\jdbc	dbANYWHERE's implementation of the JDBC classes. sql.zip defines these classes but doesn't implement them.
symantec\itools\db\net	dbANYWHERE's low-level network protocol classes
symantec\itools\db\pro	Symantec's dbANYWHERE API


dbaw_awt.zip

dbaw_awt.zip contains the dbAWARE components which use the dbANYWHERE API (which is in dbaw.zip) to support data binding, simplified master/detail relationships, scrolling database cursor support, and optimistic concurrency.

Directories in dbaw_awt.zip

symantec\itools\awt\image	StreamImage object which can be downloaded without using file I/O, thus preventing security problems
symantec\itools\db\awt	Visual Cafe Pro components. For more information, see the Visual Cafe Pro online help.


Configuration files


dbANYWHERE Data Source configuration file (dbawdsn.ini)

dbawdsn.ini lets you define Data Sources for all dbANYWHERE engines, both ODBC and non-ODBC. Using this file is optional.

Reasons for using dbawdsn.ini

•	dbawdsn.ini lets your client applications be location independent because you can specify a DSN in the Data Source URL instead of using a JDBC URL. If any of the Data Source's parameters change, you can change them in dbawdsn.ini instead of changing them in each client application.

•	When anyone requests a list of valid Data Sources, dbANYWHERE returns the ODBC Data Sources, the current user's Data Sources, and the Data Sources defined in dbawdsn.ini.

•	In the future, dbANYWHERE may offer an option that lets you require that all Data Sources be defined in dbawdsn.ini for tighter access control to your Data Sources.

Format

The header contains one <label>=<description> line for each Data Source. The file contains one DSN section for each Data Source. The order of the DSN sections doesn't need to match the order of the DSNs in the header.

[dbANYWHERE Data Sources]

<label>=<description>

.
.
.

[<label>]

ENGINE=<engine name>

SERVER=<server name>

DB=<Data Source name>

USERNAME=<user name>

PASSWORD=<password>
.
.
.

Example

[dbANYWHERE Data Sources]

EmployeeInfo=Database of employee information

SalesInfo=Database of sales information

[EmployeeInfo]

ENGINE=Sybase_NT

SERVER=MySybaseServer

DB=MySybaseDatabase

USERNAME=Jane Doe

PASSWORD=chocolate

[SalesInfo]

ENGINE=Oracle_7

SERVER=X:oraserver.com

DB=ORCL

USERNAME=John Smith

PASSWORD=tiger


Microsoft SQL Server configuration file (ddmssql.ini)

ddmssql.ini lets you override the default values that the Microsoft SQL Server driver uses.

Format

MINDBPROCESSES=<min processes>

MAXDBPROCESSES=<max processes>

DODBCANCEL=<cancel>

SELECT_TIMEOUT=<select timeout>

UPDATE_TIMEOUT=<update timeout>

READ_TIMEOUT=<read timeout>

Example

MINDBPROCESSES=5

MAXDBPROCESSES=5

DODBCANCEL=N

SELECT_TIMEOUT=180

UPDATE_TIMEOUT=60

READ_TIMEOUT=15


Sybase SQL Server configuration file (ddsybase.ini)

ddsybase.ini lets you override the default values that the Sybase SQL Server driver uses.

Format

MINDBPROCESSES=<min processes>

MAXDBPROCESSES=<max processes>

DODBCANCEL=<cancel>

SELECT_TIMEOUT=<select timeout>

UPDATE_TIMEOUT=<update timeout>

READ_TIMEOUT=<read timeout>

Example

MINDBPROCESSES=5

MAXDBPROCESSES=5

DODBCANCEL=N

SELECT_TIMEOUT=180

UPDATE_TIMEOUT=60

READ_TIMEOUT=15


Data types


JDBC data type mapping

The JDBC Specification describes the mapping between SQL data types and Java data types on page 27.

Data type mapping for specific Data Sources

Informix Server

Microsoft Access

Microsoft SQL Server

ODBC

Oracle Server

Sybase SQL Anywhere

Sybase SQL Server


Informix Server data type mapping

Informix Server data type	JDBC data type
BYTE	LONGVARBINARY
CHAR(n)	CHAR
CHARACTER(n)	CHAR
DATE	DATE
DATETIME	TIMESTAMP
DEC	DECIMAL*
DECIMAL	DECIMAL*
DOUBLE PRECISION	FLOAT**
FLOAT(n)	FLOAT**
INT	INTEGER
INTEGER	INTEGER
INTERVAL	VARCHAR
MONEY(p,s)	DECIMAL
NCHAR(n)	CHAR
NUMERIC(p,s)	NUMERIC
NVARCHAR(m,r)	VARCHAR
REAL	FLOAT**
SERIAL	INTEGER
SMALLFLOAT	FLOAT**
SMALLINT	SMALLINT
TEXT	LONGVARCHAR
VARCHAR (m,r)	VARCHAR
* Decimal and Numeric are interchangeable in JDBC mapping

** Float and Double are interchangeable in JDBC mapping


Oracle Server data type mapping

Oracle Server data type	JDBC data type
CHAR(size)	CHAR
DATE	TIMESTAMP
LONG	LONGVARCHAR
LONG RAW	LONGVARBINARY
MLSLABEL	BINARY
NUMBER(p, s)	DECIMAL(p, s)
RAW(size)	BINARY
ROWID	BINARY
VARCHAR2(size)	VARCHAR


Microsoft SQL Server data type mapping

Microsoft SQL Server data type	JDBC data type
binary(n)	BINARY
bit	BIT
char(n)	CHAR
datetime	TIMESTAMP
decimal(p, s)	DECIMAL
float(n)	FLOAT
image	LONGVARBINARY
int	INTEGER
money	DECIMAL
numeric(p, s)	NUMERIC
real	REAL
smalldatetime	DATE
smallint	SMALLINT
smallmoney	DECIMAL
text	LONGVARCHAR
timestamp	BINARY
tinyint	TINYINT
varbinary(n)	VARBINARY
varchar(n)	VARCHAR


Sybase SQL Server data type mapping

Sybase SQL Server data type	JDBC data type
binary(n)	BINARY
bit	BIT
char(n)	CHAR
datetime	TIMESTAMP
decimal(p, s)	DECIMAL
float(n)	FLOAT
image	LONGVARBINARY
int	INTEGER
money	DECIMAL
numeric(p, s)	NUMERIC
real	REAL
smalldatetime	DATE
smallint	SMALLINT
smallmoney	DECIMAL
text	LONGVARCHAR
timestamp	BINARY
tinyint	TINYINT
varbinary(n)	VARBINARY
varchar( n)	VARCHAR


Sybase SQL Anywhere data type mapping

Sybase SQL Anywhere data type	JDBC data type
binary(size)	BINARY
char(size)	CHAR
character varying(size)	VARCHAR
character(size)	CHAR
date	DATE
decimal(p, s)	DECIMAL or NUMERIC
double (double precision floating point)	DOUBLE
float (single precision floating point) See Note #1.	FLOAT or REAL
int	INTEGER
integer See Note #2.	INTEGER
long binary	LONGVARBINARY
long varchar	LONGVARCHAR
numeric(p, s)	DECIMAL or NUMERIC
real (single precision floating point) See Note #1.	FLOAT or REAL
smallint	SMALLINT
time	TIME
timestamp	TIMESTAMP
varchar(size)	VARCHAR
Note #1: float and real

Some Sybase SQL Anywhere float and real values are incorrectly rounded or truncated for insert and update statements. Thus, some real and float values entered through a Java applet are stored as different values in the database. You can observe this problem by using the Sybase SQL Anywhere ISQL utility and executing SQL data modification statements. There is no workaround for this problem. The only solution is for Sybase to update the SQL Anywhere database engine.

Note #2: integer

Sybase SQL Anywhere's integer data type has the following range:

-2,147,883,648 to 2,147,883,647

However, SQL statements for Sybase SQL Anywhere cannot handle the -2,147,883,648 value. They can handle all other values (-2,147, 883, 647 and above).


Microsoft Access data type mapping

Microsoft Access data type	JDBC data type
Binary	BINARY
Bit	BIT
Byte	TINYINT
Counter (auto-increment)	INTEGER
Currency	DECIMAL
Datetime	TIMESTAMP
Double (double precision floating point)	DOUBLE
Long	INTEGER
Long Binary	LONGVARBINARY
Long Text	LONGVARCHAR
Short	SMALLINT
Single (single precision floating point)	FLOAT
Text	CHAR


ODBC data type mapping

This topic covers the data type mapping for dbANYWHERE's direct ODBC driver. For data type mapping for the generic ODBC drivers, see your third-party ODBC driver documentation.

ODBC data type	JDBC data type
SQL_BIGINT	BIGINT
SQL_BINARY	BINARY
SQL_BIT	BIT
SQL_CHAR	CHAR
SQL_DATE	DATE
SQL_DECIMAL	DECIMAL
SQL_DOUBLE	DOUBLE
SQL_FLOAT	FLOAT
SQL_INTEGER	INTEGER
SQL_LONGVARBINARY	LONGVARBINARY
SQL_LONGVARCHAR	LONGVARCHAR
SQL_NUMERIC	NUMERIC
SQL_REAL	REAL
SQL_SMALLINT	SMALLINT
SQL_TIME	TIME
SQL_TIMESTAMP	TIMESTAMP
SQL_TINYINT	TINYINT
SQL_VARBINARY	VARBINARY
SQL_VARCHAR	VARCHAR


TIMESTAMP

TIMESTAMP uses the 24-hour format.

Examples

TIMESTAMP value	Meaning
1997-02-05 11:00:00.000000000	11:00 AM on 2/5/97
1997-02-05 13:00:00.000000000	1:00 PM on 2/5/97
Nanoseconds

java.sql.Timestamp uses a 9-digit nanosecond format. Examples:

Nanosecond value	Meaning
000000123	123 nanoseconds
123	123,000,000 nanoseconds


Data Sources and drivers


Handling an ODBC Data Source

Direct ODBC Data Sources

dbANYWHERE provides ODBC drivers for direct access to the following Data Sources:

•	Microsoft Access

•	Sybase SQL Anywhere

•	Watcom

Generic ODBC Data Sources

dbANYWHERE provides the following ODBC driver managers:

•	SQL based

•	Xbase

You need to provide a third-party ODBC driver for your Data Source, such as the Intersolv 32-bit ODBC Driver Pack.


Using dbANYWHERE's driver name

dbANYWHERE's driver name which adheres to the JDBC Specification is:

symantec.itools.db.jdbc.Driver

Note: The driver name is case sensitive.


Support information


Ordering a product

Pricing information

Pricing information for dbANYWHERE and other Symantec Internet Tools products is at www.symantec.com/cafe/PricingStructure.html.

Ordering

To order products via mail, write to:

Symantec Corporation
Attn: Order Administration
P.O. Box 10849
Eugene, OR 97440


Sending feedback

We would love to hear your comments!

IMPORTANT!  For best response, please include the following information:

•	Your email address.

•	Machine information: Type (486, Pentium), Processor speed, RAM.

•	Operating system and version number.

•	dbANYWHERE version number from Help [image] About.

•	Description of the problem.

•	Java code you're using that might help, including the URL.

•	Relevant output captured in the dbANYWHERE window including log messages if applicable.

•	Data Source you're connecting to or attempting to connect to. If you're connecting to the Oracle Server, let us know which version of SQLNET you're using.

•	Table structures and definitions.

•	Windows NT Users: Indicate whether or not you're running dbANYWHERE as a Windows NT Service.

Ways you can send us feedback:

1.	e-mail tsunami@symantec.com.

This e-mail address is monitored on a weekly basis by our Technical Support Teams.

2.	Submit comments to one of our online forums:

•	Symantec Internet Service & Support Center

http://www.symantec.com/servsupp.html

From here you can choose several options including Technical Support and Customer Service.  You may also choose to use our Chat Forums.

•	Symantec's Internet News Groups

news://services.symantec.com

## dbANYWHERE News Groups ##

symantec.support.devtools.pc.dbanywhere.announce

symantec.support.devtools.pc.dbanywhere.install

symantec.support.devtools.pc.dbanywhere.using

symantec.support.devtools.pc.dbanywhere.jdbc

These news groups are monitored daily by our Technical Support Teams.

•	Symantec on Compuserve

GO SYMANTEC

dbANYWHERE is a section in the Symantec DevTools Forum. This discussion section is monitored daily by our Technical Support Teams.

•	Symantec on America OnLine

Keyword: SYMANTEC

•	Symantec BBS (300 through 28.8Kbps)

541-484-6669

3.	On the Internet, go to http://www.symantec.com/feedback/index.html.


Contacting technical support

Notice: The support services outlined below are available at the time of release of this product. Symantec reserves the right to change or eliminate support services or options at any time.

Customer support

For customer support, call 800-441-7234.

Complimentary technical support

•	Available to registered users for 90 days from the date of your first call.

•	(541) 465-8430 Monday through Friday, 7:00 a. m. to 4:00 p. m. Pacific time.

PriorityCare Services

PriorityCare offers two “pay as you go” options:

•	PriorityCare 800 number

$25 per call charged to your credit card (VISA, MasterCard or American Express).

(800) 927-4012 Monday through Friday, 6:00 a. m. to 5:00 p. m. Pacific time.

•	PriorityCare 900 number

$2 per minute after the first minute charged to your telephone bill.

(900) 646-0006 Monday through Friday, 6:00 a. m. to 5:00 p. m. Pacific time.

PremiumCare Services

•	Available to all registered users of Symantec products on an annual subscription basis.

•	Call (800) 441-7234 for information.

PremiumCare Gold support

•	Unlimited calls on a toll-free 800 line.

•	Average hold time kept to a minimum.

•	Available Monday through Friday, 6:00 a.m. to 5:00 p.m. Pacific Time.

PremiumCare Platinum support

•	Unlimited calls on a toll-free 800 line.

•	Average hold time kept to a minimum.

•	A Support Center Manual with troubleshooting, installation, configuration, and usage information.

•	Quarterly updates of technical notes and bulletins.

•	Instant access to senior support staff.

•	Automatic updates of inline software revisions. (Inline software revisions do not include version upgrades.)

•	Available Monday through Friday, 6:00 a.m. to 6:00 p.m. Pacific Time. After hours and weekend support is for an additional fee.

Online services

Online services provide a variety of electronic service and support options.

•	CompuServe: Type GO SYMANTEC at any ! prompt.

•	America Online: Type keyword: SYMANTEC

•	World Wide Web: http://www.symantec.com (information only)

•	FTP: ftp.symantec.com (downloads only)

Other services

•	Fax on Demand: lets you order faxes of the latest technical tips.

(541) 984-2490 24-hours a day


Trademark information

dbANYWHERE, Symantec Cafe, Visual Cafe, and Visual Cafe Pro are trademarks of Symantec Corporation. Other brands and their products are trademarks of their respective holders and should be noted as such.


db_tools.doc

Topics for the dbANYWHERE tools:

•	dbANYWHERE Service Manager

•	Data Source Tool

Note: "Testing a Data Source connection" (which has information about the Data Source Tool) is in db_proc.doc because it involves more than the Data Source Tool.

•	dbANYWHERE Admin


dbANYWHERE Service Manager


Using the dbANYWHERE Service Manager

The dbANYWHERE Service Manager lets you run dbANYWHERE as a Windows NT Service.

To start the dbANYWHERE Service Manager

•	Run dbawmgr.exe. For information about where Setup installs this file, see the readme file.

Tasks

Configuring the dbANYWHERE Windows NT Service

Installing and removing the dbANYWHERE Windows NT Service

Starting and stopping the dbANYWHERE Windows NT Service

Viewing events

Monitoring performance

Allowing remote administration

For more information

See "To configure startup for a service" in the Windows NT online help.


Installing and removing the dbANYWHERE Windows NT Service

To install dbANYWHERE as a Windows NT Service

1.	Run dbawmgr.exe to start the dbANYWHERE Service Manager. For information about where Setup installs this file, see the readme file.

2.	Choose Options [image] Install As Service.

To remove the dbANYWHERE Windows NT Service

1.	Run dbawmgr.exe to start the dbANYWHERE Service Manager. For information about where Setup installs this file, see the readme file.

2.	Choose Options [image] Remove Service.


Starting and stopping the dbANYWHERE Windows NT Service

After installing the dbANYWHERE Windows NT Service, you can start, stop, pause, and resume the service.

1.	Run dbawmgr.exe to start the dbANYWHERE Service Manager. For information about where Setup installs this file, see the readme file.

2.	Click Start, Stop, Pause, or Resume.


Viewing events

The Event Viewer lets you:

•	Troubleshoot hardware and software problems.

•	Monitor dbANYWHERE Windows NT Service security events.

To start the Event Viewer

1.	Run dbawmgr.exe to start the dbANYWHERE Service Manager. For information about where Setup installs this file, see the readme file.

2.	Choose Options [image] Launch Event Viewer.

3.	For information about the Event Viewer, choose Help [image] Topics in the Event Viewer.


Monitoring performance

The Performance Monitor lets you:

•	Examine the resource usage for specific components and program processes.

•	Gauge your computer's efficiency.

•	Identify and troubleshoot possible problems.

•	Plan for additional hardware needs.

To start the Performance Monitor

1.	Run dbawmgr.exe to start the dbANYWHERE Service Manager. For information about where Setup installs this file, see the readme file.

2.	Choose Options [image] Launch Performance Monitor.

3.	For information about the Performance Monitor, choose Help [image] Topics in the Performance Monitor.


Data Source Tool


Using the Data Source Tool

The Data Source Tool displays the Data Sources listed in the dbANYWHERE Data Source configuration file. You can use the Data Source Tool to:

•	Edit the dbANYWHERE Data Source configuration file.

•	Test a Data Source's connection.

To start the Data Source Tool

Note: To use the Data Source Tool, you must have the Java Virtual Machine installed on your system.

•	Run dsntool.bat. For information about where Setup installs this file, see the readme file.

Fields

Defined Data Sources	Data Sources listed in dbawdsn.ini.
Selected Data Source	The Data Source Tool displays the configuration information for the Data Source that is selected in the "Defined Data Sources" list.
Name	<label> value.
Description	<description> value.
Engine	Descriptive phrase for the <engine name> value.
Data Source	<Data Source name> value.
Username	<user name> value.
Password	<password> value.
dbANYWHERE Server URL	The dbANYWHERE Server's URL.


Editing the dbANYWHERE Data Source configuration file

The Data Source Tool lets you edit dbawdsn.ini which is the dbANYWHERE Data Source configuration file.

To start the Data Source Tool

Note: To use the Data Source Tool, you must have the Java Virtual Machine installed on your system.

•	Run dsntool.bat. For information about where Setup installs this file, see the readme file.

To change a Data Source's values

1.	Select a Data Source from the Defined Data Sources list.

2.	Enter or select a new value for each field you want to change.

3.	Click Save.

To add a Data Source

1.	Click New.

2.	Enter or select a value for each field.

To delete a Data Source

1.	Select a Data Source from the Defined Data Sources list.

2.	Click Delete.


dbANYWHERE Admin


Using dbANYWHERE Admin

dbANYWHERE Admin lets you check and test your dbANYWHERE system configuration.

Note: dbANYWHERE Admin was developed as an in-house tool for the Symantec engineers. We are providing it to you for your convenience.

To start dbANYWHERE Admin

1.	Start dbANYWHERE.

2.	Choose Options [image] Properties [image] Remote Admin to display the Remote Admin tab.

3.	Select the "Allow remote administration" check box.

4.	Select the dbANYWHERE Admin icon from your Start menu: Start [image] Programs [image] dbANYWHERE Server [image] dbANYWHERE Admin

or

Run dbawadmin.bat which is in dbANYWHERE's dbawAdmin directory.

Tasks

Connecting to a dbANYWHERE Server machine

Checking dbANYWHERE Server machine statistics

Checking dbANYWHERE connections

Testing a dbANYWHERE Server machine


Connecting to a dbANYWHERE Server machine

Before using dbANYWHERE Admin's features, you need to connect to a dbANYWHERE Server machine.

To connect dbANYWHERE Admin to a dbANYWHERE Server machine

1.	Start dbANYWHERE Admin.

2.	Choose File [image] Connect. dbANYWHERE Admin displays the Connect dialog box.

3.	Enter the IP address and port number of the dbANYWHERE Server machine to connect to.

4.	Click Connect.

To disconnect dbANYWHERE Admin from a dbANYWHERE Server machine

•	Choose File [image] Disconnect.


Checking dbANYWHERE Server machine statistics

dbANYWHERE Admin lets you check the dbANYWHERE Server machine statistics such as the dbANYWHERE version, up time, and number of connections.

1.	Start dbANYWHERE Admin.

2.	Connect to a dbANYWHERE Server machine.

3.	Choose View [image] Server stats.

4.	Click Refresh.

Fields

Version	dbANYWHERE version number
Up time	Length of time since dbANYWHERE started
# of accepted connections	Number of successful connections to dbANYWHERE since dbANYWHERE started
Current # of connections	Number of current connections to dbANYWHERE including the connection from dbANYWHERE Admin


Checking dbANYWHERE connections

dbANYWHERE Admin lets you check the current connections to dbANYWHERE in terms of IP addresses, time connected, and transmission information.

1.	Start dbANYWHERE Admin.

2.	Connect to a dbANYWHERE Server machine.

3.	Choose View [image] Connections.

4.	Click Refresh.

Format

<ID>, <IP address>, <time>, <not used>, <requests>, <bytes received>, <bytes sent>

Fields

<ID>	ID number for the connection. dbANYWHERE Admin assigns the ID numbers.
<IP address>	IP address of the machine that is connected to dbANYWHERE
<time>	Length of time since the connection was made
<not used>	Not used
<requests>	Number of  requests the connected machine made to the dbANYWHERE Server machine
<bytes received>	Number of bytes dbANYWHERE received from the connected machine
<bytes sent>	Number of bytes dbANYWHERE sent to the connected machine


Testing a dbANYWHERE Server machine

dbANYWHERE Admin lets you test a dbANYWHERE Server machine's link performance.

1.	Start dbANYWHERE Admin.

2.	Connect to a dbANYWHERE Server machine.

3.	Choose View [image] Ping.

4.	Optional: Change the ping text, ping count, and repeat count.

5.	Optional: Select the Results / Show check box.

6.	Click Ping. dbANYWHERE Admin pings the dbANYWHERE Server machine. When dbANYWHERE Admin receives the echo, it displays the round-trip time and the byte transfer rate.

Fields

Ping text	Text string to send in the ping message
Ping count	Number of copies of the text string to send in the ping message
Repeat count	Number of times to ping the dbANYWHERE Server machine
Results	Echo that dbANYWHERE Admin received back from the dbANYWHERE Server machine
Show	Indicates whether or not to display the results
Time stats	Length of time between sending the ping and receiving the echo
Clear	Clears the Time stats text area


db_trble.doc

Troubleshooting and error information for the dbANYWHERE online help:

•	Troubleshooting

•	Errors


Troubleshooting


Troubleshooting a dbANYWHERE connection

Some common errors stem from an incorrect URL string. The URL must specify either the dbANYWHERE Server machine's IP address or machine name. If you are using DHCP (an automatic IP address assignment feature provided on some networks), your dbANYWHERE Server machine's IP address may be different each time you start the machine.

If you receive the message "DataBase.connectServer() : Unable to connect. java.lang.NullPointerException," or "Exception from DataBase.connectServer() : Invalid subname syntax near <database>", check your dbANYWHERE Server machine's URL.

The URL must also contain the appropriate reference to the dbaw protocol, a valid database driver, and database name.  Don't forget to check that the host PC is accessible on the network.


Troubleshooting a Data Source connection

A database connection error may be caused by a number of different problems. The first step is to make sure that the dbANYWHERE Server machine can connect to the database.  Testing this depends on the type of database client libraries needed and the protocol being used; use a utility to try connecting to the database (such as ISQL or DBPING). If dbANYWHERE can’t connect to the database, the problem is most likely being caused by something other than dbANYWHERE.  If you were able to connect, then you may not have the correct database connection information.

The driverManager.getConnection() class requires a method call to System.setProperties(), which violates the Java applet/browser security model (see "Java In A Nutshell" by David Flanagan (O'Reilly), pg. 198).  An alternative approach is to use the driver.connect() class, as specified by JavaSoft's JDBC v1.1 specification which is at http://splash.javasoft.com/jdbc/.

Local Data Sources

Since a local database engine may consume a large percentage of your PC resources, you may not have enough RAM and/or a large enough swap file to facilitate the auto-start feature.  Manually start the database before attempting to access it, and you should be able to connect in most cases.

Troubleshooting a specific Data Source

Microsoft Access

Microsoft SQL Server

ODBC Data Source

Oracle Server

Sybase SQL Anywhere

Sybase SQL Server


Troubleshooting Sybase SQL Anywhere

1.	Make sure the PATH environment variable includes the bin directory in which the client software is installed.

2.	Verify connecting to the ODBC Data Source by using either ODBC Test or the Microsoft Query tools.

3.	Verify the user name and password.


Troubleshooting Microsoft Access

Microsoft Access ODBC errors may be due to conflicting versions of the Microsoft Access engine and ODBC vendor drivers, as well as using a combination of 16-bit (Windows 3.x) and 32-bit (Windows 95/NT) software. We recommend that you use 32-bit software for Windows '95/NT as often as possible, as 16-bit applications require more overhead.

1.	Verify connecting to the ODBC Data Source by using either ODBC Test or the Microsoft Query tools.

2.	Verify the user name and password.


Troubleshooting an ODBC Data Source

This topic describes troubleshooting an ODBC Data Source that is connected via a third-party ODBC driver.

1.	Make sure the connection to the remote database is possible using vendor supplied utilities. For example in the above case, try to connect using ISQL to connect to the SQL Server database.

2.	Try connecting to the ODBC Data Source using the 3rd party ODBC driver using ODBC Test or the Microsoft Query tools.

3.	Verify the user name and password.


Troubleshooting Sybase SQL Server

Common causes of SQL Anywhere connection errors

•	Your machine does not have sufficient memory to auto-start the database engine.

•	The SQL Anywhere installation is not configured properly.

Troubleshooting

1.	Make sure the 32-bit Sybase client software for the appropriate OS (Windows95 or NT) is installed.

2.	Make sure the full path where the client DLLs and EXEs exist is in the PATH environment variable.

3.	Verify connecting to the remote database from the client using vendor supplied WISQL32 or SYBPING utilities.

4.	Verify the user name and password.


Troubleshooting Microsoft SQL Server

If you are getting Microsoft SQL Server errors, check your configuration for SQL Server client software and ensure it is correct (keep in mind that for 4.2, the default is named pipes).  For best results, we recommend using TCP/IP.

In addition, there is a limitation in the Microsoft SQL Server library ("db-library") which does not allow our current driver implementation to maintain two or more open statements per connection.  The queries must be processed serially, or else an error such as "attempt to initiate process with results pending" occurs.

1.	Make sure the Microsoft SQL Server 32-bit client software is installed.

2.	Make sure the directory containing the Microsoft SQL Server client DLL’s is included in the PATH environment variable.

3.	Verify your connection by connecting to the remote database using the SQL Server utilities (i.e. ISQL).

4.	Verify the user name and password.


Troubleshooting Oracle Server

If you are receiving connection errors with Oracle Server for Windows 95 and dbANYWHERE, you are probably using an old version of the dbANYWHERE Oracle Server drivers. There are now separate drivers for Windows 95 and Windows NT. See the Java Central Web page (http://www.symantec.com/product/index_devtools.html) or Symantec Technical Support for details on getting updated drivers.

1.	Make sure the Oracle Server client software for the appropriate OS (Windows95 or Windows NT) is installed.

2.	Make sure the full path where the client DLLs and EXEs exist is in the PATH environment variable.

3.	Verify the URL for appropriate usage of Protocol.

4.	Verify connection to the remote database using vendor supplied utilities like SQLPLUS, Oracle Enterprise Manager etc.


Troubleshooting a callable statement

The following CallableStatement methods do not work for some third-party ODBC drivers if you escape process the stored procedure:

•	setTimeStamp( )

•	setTime( )

•	setDate( )


Errors


Handling a SQL exception

Check to see if your IP address or machine name is correct and your CLASSPATH environment variable on the dbANYWHERE Server machine refers to all of the classes required by the applet.

If a Data Source operation throws a SQL exception, the SQL exception object provides vendor-specific error information. See the JDBC Specification for a description of the SQL exception object. To resolve a SQL exception, see your Data Source's documentation.


Handling a post-connection error

If you are receiving connection errors/exceptions (such as "Method Verification Error", "Security Violation", or "Illegal Access Error") the source of the problem could be due to several different factors.

1.	Make sure that your dbANYWHERE Server machine URL and Data Source URL are correct.

2.	To run an applet from another machine, you need to have Web server software configured and running on the dbANYWHERE Server machine. Otherwise you’ll always get a “Security Violation” error.

3.	The classes that your applet refers to might not be available. Make sure that your CLASSPATH environment variable includes the directories that contain your class files or packages.

4.	Since Java is a new technology, each Web browser supports Java differently. Your browser might not be capable of downloading the class files your applet requires. One way to get around this problem is to uncompress the class file and recreate the directory structure it contains, located below the directory where the applet is stored. See Using the dbANYWHERE packages.

5.	The "IllegalAccessError" error can occur when an applet tries to use an invalid machine name (such as a bad IP address).


Handling a Web browser error

If your dbANYWHERE Server machine URL and Data Source URL are correct and the dbANYWHERE Server machine can connect to a database, the error is probably not due to the database configuration being used; browser errors are much more likely to be the problem. There are differences in the behavior of commercial browsers, in part due to the implementation of security protocols in each version. Some of the browsers may deny downloading more than one package, or can only read classes that have been extracted. See “Web browsers supported” in the “Installing dbANYWHERE Server” manual for further details on browser compatibility.


Handling firewall conflicts

Since clients can access the Web via sockets, clients behind a firewall should have no problems extending beyond their Intranet. If you are using applets, however, you'll be restricted to connecting back to the hosting IP address (due to Java /browser restrictions). The firewall prevents outside clients from connecting to servers behind the firewall. To get access through a firewall, see your system administrator.


db_proc.doc

Procedures and miscellaneous topics for the dbANYWHERE online help:

•	Welcome to dbANYWHERE

•	Setting up dbANYWHERE

•	Connecting to a Data Source


Welcome to dbANYWHERE

dbANYWHERE implements the Sun Microsystems JDBC API. It manages transactions between a client's Java applet or application and one or more databases. It also lets you implement metadata calls which you can use to generate database-independent code. dbANYWHERE is JDBC 1.1 compliant.

A Java client written to the JDBC API transparently connects to a dbANYWHERE Server machine, and the server machine connects to target databases. This architecture lets you install database libraries in one location (the dbANYWHERE Server machine) instead of on each client machine. By using dbANYWHERE's implementation of JDBC, you can create a client program that is platform-independent and database-independent.

dbANYWHERE also ships with the dbANYWHERE API which provides an increased level of functionality such as:

•	Data binding.

•	Simplified master/detail relationships.

•	Scrolling database cursor support such as previous and next.

•	Optimistic concurrency.

Versions

dbANYWHERE comes in two versions: the dbANYWHERE Server and the dbANYWHERE Workgroup Server. The differences between the two versions are:

•	They provide different database connectivity. See the "System requirements" section in the "Installing dbANYWHERE Server" manual for details.

•	The dbANYWHERE Server can be executed as a Windows NT Service with hooks into the Event Viewer and Performance Monitor.

Naming conventions

dbANYWHERE Server	Middleware database software that supports three-tier architecture for database access
dbANYWHERE Workgroup Server	Restricted version of the dbANYWHERE Server which is shipped with Visual Cafe Pro
dbANYWHERE Server machine	Hardware on which dbANYWHERE software is running
dbANYWHERE	Both versions of dbANYWHERE


Setting up dbANYWHERE


Setting up a dbANYWHERE system

Configuring your system

The configuration to use depends on:

•	Your system environment.

•	Whether you are developing or deploying a program.

•	Whether you are using local or remote databases.

Architecture for a runtime system

Architecture for a development system

Additional tasks

Setting the dbANYWHERE Server machine's URL

Using the dbANYWHERE packages

Allocating the dbANYWHERE resources

Logging messages


Architecture for a runtime system

Three-tier architecture for remote databases

For remote databases at runtime, we recommend that you use a three-tier architecture in which the client, dbANYWHERE, and the databases reside on separate machines.

Two-tier architecture for local databases

For local databases at runtime, we recommend that you use a two-tier architecture in which the client resides on one machine and dbANYWHERE and the databases reside on another machine.

Three-tier architecture for local and remote databases

For a combination of local and remote databases at runtime, we recommend that you use a three-tier architecture in which the client resides on one machine, dbANYWHERE and the local databases reside on a second machine, and the remote database reside on other machines.


Architecture for a development system

Two-tier architecture for remote databases

For remote databases during development, we recommend that you use a two-tier architecture in which the client and dbANYWHERE are on one machine and the databases are on other machines.

One-tier architecture for local databases

For local databases during development, we recommend that you use a one-tier architecture in which the client, dbANYWHERE, and the databases reside on one machine.

Two-tier architecture for local and remote databases

For a combination of local and remote databases during development, we recommend that you use a two-tier architecture in which the client, dbANYWHERE and the local databases reside on one machine, and the remote database reside on other machines.


Using the dbANYWHERE packages

1.	Determine the packages to use:

For client programs that use:	Use these packages:
JDBC API	dbaw.zip sql.zip
dbANYWHERE API	dbaw.zip dbaw_awt.zip sql.zip
Note: For information about where Setup installs these files, see the readme file.

2.	Set up the packages for a development system or a runtime system.


Setting up the dbANYWHERE packages for a development system

1.	Copy the .zip files to the development machine.

2.	Modify your CLASSPATH environment variable to point to the directory that contains the .zip files.

If using Symantec Cafe or Visual Cafe Pro

Modify the program's CLASSPATH statement which is in sc.ini in the program's bin directory. For example, if you put the .zip files in a directory called zipFiles:

CLASSPATH=…;c:\zipFiles\dbaw.zip;c:\zipFiles\dbaw_awt.zip;c:\zipFiles\sql.zip

Note: Cafe and Visual Cafe Pro read sc.ini only when launched. If you edit sc.ini while Cafe or Visual Cafe Pro is running, restart the program for the changes to take effect.

If  not using these programs

Add a SET CLASSPATH statement to autoexec.bat. For example, if you put the .zip files in a directory called zipFiles:

SET CLASSPATH=…;c:\zipFiles\dbaw.zip;c:\zipFiles\dbaw_awt.zip;c:\zipFiles\sql.zip

Note: Remember to restart your system for changes to autoexec.bat to take effect.


Setting up the dbANYWHERE packages for a runtime system

Options

•	You can provide the dbANYWHERE packages as zipped files or unzipped files.

•	You can set up the files so that your applet or application automatically downloads the classes to the client machine.

We recommend providing the dbANYWHERE packages as unzipped files and setting up the files for automatic downloading because:

•	This configuration doesn't require you to install packages onto the client.

•	Your applet or application downloads only the required classes.

For more information about these options, see the "System requirements" section in the "Installing dbANYWHERE Server" manual.

To set up the dbANYWHERE packages as zipped files for automatic downloading

•	Copy the files to your applet's or application's directory. For example, if your applet is called dbapplet.class and is in c:\client\dbapplet, you would have the following files:

c:\client\dbapplet\dbapplet.class
c:\client\dbapplet\sql.zip
c:\client\dbapplet\dbaw.zip
c:\client\dbapplet\dbaw_awt.zip

To set up the dbANYWHERE packages as unzipped files for automatic downloading

1.	Copy the files to your applet's or application's directory. For example, if your applet is called dbapplet.class and is in c:\client\dbapplet, you would have the following files:

c:\client\dbapplet\dbapplet.class
c:\client\dbapplet\sql.zip
c:\client\dbapplet\dbaw.zip
c:\client\dbapplet\dbaw_awt.zip

2.	Unzip the files and delete the .zip files. Retain the complete directory structure for the unzipped files. For example, if your applet is called dbapplet.class and is in c:\client\dbapplet, you would have the following files:

c:\client\dbapplet\dbapplet.class
c:\client\dbapplet\symjava\math\*.class
c:\client\dbapplet\symjava\sql\*.class
c:\client\dbapplet\symantec\itools\db\jdbc\*.class
c:\client\dbapplet\symantec\itools\db\net\*.class
c:\client\dbapplet\symantec\itools\db\pro\*.class
c:\client\dbapplet\symantec\itools\awt\image\*.class
c:\client\dbapplet\symantec\itools\db\awt\*.class


Changing dbANYWHERE properties

The Properties dialog box specifies:

•	dbANYWHERE Server machine's URL (Network tab)

•	Message log configuration (Logging tab)

•	Allocation of dbANYWHERE resources (Resources tab)

•	Whether or not to allow remote administration (Remote Admin tab)

•	dbANYWHERE Windows NT Service configuration (NT Service tab)

To change dbANYWHERE properties

1.	Start dbANYWHERE or the dbANYWHERE Service Manager .

2.	Choose Options [image] Properties.

3.	For information about the properties, press F1. There is F1 help for each tab in the Properties dialog box.


Connecting to a Data Source


Connecting to Sybase SQL Anywhere via JDBC

This procedure describes how to connect to Sybase SQL Anywhere via JDBC as a direct ODBC Data Source using the ODBC driver that dbANYWHERE provides. To use SQL based ODBC or Xbase ODBC and a third-party ODBC driver, see:

Connecting to an ODBC SQL based Data Source via JDBC

Connecting to an ODBC Xbase Data Source via JDBC

To connect to Sybase SQL Anywhere via JDBC

1.	Make sure you have access to Sybase SQL Anywhere or Watcom.

2.	Make sure you have access to Sybase SQL Anywhere's ODBC32 driver.

3.	Use Sybase SQL Anywhere's ODBC32 Administrator to create and install the ODBC Data Source on the dbANYWHERE Server machine:

a.	Start the ODBC32 Administrator. This displays the Data Sources dialog box which shows your registered Data Sources and drivers.

Note: On Windows NT 3.51, start the ODBC32 Administrator by running odbcad32.exe which is in the Windows directory.

b.	Click Add. This displays the Add Data Source dialog box.

c.	Select a Data Source from the list of Installed ODBC Drivers. For example, select Sybase SQL Anywhere 5.0.

d.	Click OK. This displays the ODBC Configuration dialog box.

e.	Fill in the dialog box. For example, to use the Sademo database, use the following values:

Field	Value
Data Source Name	Sademo
User ID	dba (optional)
Password	sql (optional)
Database Name	Sademo (optional)
Database File	c:\sqlany50\sademo.db
Database Startup type	Local
f.	Click OK. The ODBC32 Administrator adds the Data Source to your ODBC configuration.

g.	Click Close.

4.	Set the URL

The Server and Data Source parameters in the Data Source URL need to be the same as the ODBC Data Source name defined on the dbANYWHERE Server machine. For example:

•	To connect to a Sybase SQL Anywhere database with an ODBC Data Source named “Sademo”:

jdbc:dbaw://localhost:8889/Sybase_SQLANY/Sademo/Sademo

•	To connect to a Sybase SQL Anywhere database with the default ODBC Data Source named “SQL Anywhere 5.0 Sample”:

jdbc:dbaw://localhost:8889/Sybase_SQLANY/SQL Anywhere 5.0 Sample/SQL Anywhere 5.0 Sample

•	To connect to a Watcom 4.0 database with an ODBC Data Source named “Sample”:

jdbc:dbaw://localhost:8889/Watcom/Sample/Sample

For more information

See Sybase SQL Anywhere's online help.


Connecting to Microsoft Access via JDBC

This procedure describes how to connect to Microsoft Access via JDBC as a direct ODBC Data Source using the ODBC driver that dbANYWHERE provides. To use SQL based ODBC or Xbase ODBC and a third-party ODBC driver, see:

Connecting to an ODBC SQL based Data Source via JDBC

Connecting to an ODBC Xbase Data Source via JDBC

To connect to Microsoft Access via JDBC

1.	Make sure you have access to Microsoft Access.

2.	Make sure you have access to Microsoft Access' ODBC32 driver.

3.	Use Microsoft Access's ODBC32 Administrator to create and install the ODBC Data Source on the dbANYWHERE Server machine:

a.	Start the ODBC32 Administrator. This displays the Data Sources dialog box which shows your registered Data Sources and drivers.

Note: On Windows NT 3.51, start the ODBC32 Administrator by running odbcad32.exe which is in the Windows directory.

b.	Click Add. This displays the Add Data Source dialog box.

c.	Select a Data Source from the list of Installed ODBC Drivers. For example, select Microsoft Access Driver.

d.	Click OK. This displays the ODBC Microsoft Access Setup dialog box.

e.	Fill in the dialog box. For example, to use a database called MyInfo, use the following values:

Field	Value
Data Source Name	MyInfo
Database	c:\MyDocuments\MyInfo (You can click Select to browse for the file.)
System Database	None
f.	If you want to set a user name and password, click Advanced. This displays the Set Advanced Options dialog box.

g.	Fill in the dialog box and click OK. This returns you to the ODBC Microsoft Access Setup dialog box.

h.	Click OK. The ODBC32 Administrator adds the Data Source to your ODBC configuration.

i.	Click Close.

4.	Set the URL

The Server and Data Source parameters in the Data Source URL need to be the same as the ODBC Data Source name defined on the dbANYWHERE Server machine. For example:

•	To connect to a Microsoft Access ODBC Data Source named “NorthWind”:

jdbc:dbaw://localhost:8889/MS_Access/NorthWind/NorthWind

For more information

See Microsoft Access's online help.


Connecting to an ODBC SQL based Data Source via JDBC

This procedure describes how to connect to an ODBC SQL based Data Source via JDBC using a third-party ODBC driver.

1.	Install the third-party 32-bit ODBC driver pack on the dbANYWHERE Server machine.

2.	Install an ODBC Data Source on the dbANYWHERE Server machine. You can use the ODBC32 Administrator to create the ODBC Data Source.

3.	Install client software on the dbANYWHERE Server machine.

4.	Set the URL

The Server and Data Source parameters in the Data Source URL need to be the same as the ODBC Data Source name defined on the dbANYWHERE Server machine. For example:

•	To connect to a Microsoft SQL Server ODBC Data Source named “SQLSrvDSN”:

jdbc:dbaw://localhost:8889/ODBC_DSN/SQLSrvDSN/SQLSrvDSN

For more information

See the documentation for your Data Source and ODBC driver.


Connecting to an ODBC Xbase Data Source via JDBC

This procedure describes how to connect to an ODBC Xbase Data Source via JDBC using a third-party ODBC driver.

1.	Install the third-party 32-bit ODBC driver pack on the dbANYWHERE Server machine.

2.	Install an ODBC Data Source on the dbANYWHERE Server machine. You can use the ODBC32 Administrator to create the ODBC Data Source.

3.	Install client software on the dbANYWHERE Server machine.

4.	Set the URL

The Server and Data Source parameters in the Data Source URL need to be the same as the ODBC Data Source name defined on the dbANYWHERE Server machine. For example:

•	To connect to a dBase ODBC Xbase Data Source named “DbaseFile”:

jdbc:dbaw://localhost:8889/ODBC_Xbase_DSN/DbaseFile/DbaseFile

For more information

See the documentation for your Data Source and ODBC driver.


Connecting to Microsoft SQL Server via JDBC

1.	Install the Microsoft SQL Server 32-bit client software on the dbANYWHERE Server machine.

2.	Set the URL

The Server parameter in the Data Source URL needs to correspond to the name of the SQL Server. For example:

•	To connect to a Microsoft SQL Server named “MySQLServer" and a database named "pubs":

jdbc:dbaw://localhost:8889/SQL_Server/MySQLServer/pubs

For more information

See the Microsoft SQL Server documentation.


Connecting to Sybase SQL Server via JDBC

1.	Sybase SQL Server ships two different sets of Open-Client/NetLibrary software to connect from Windows 95/NT clients.  Depending on your client type, install the appropriate 32-bit client software on the dbANYWHERE Server machine.

2.	Set the URL

The Server parameter in the Data Source URL needs to correspond to the name of the Sybase SQL Server defined in sql.ini. You can use the vendor-supplied SQLEDIT tool to generate or view configuration files. For example:

•	To connect to a Sybase SQL Server named “MySybServer" and a database named "sample" on Windows NT:

jdbc:dbaw://localhost:8889/Sybase_NT/MySybServer/sample

•	To connect to a Sybase SQL Server named “MySybServer" and a database named "sample" on Windows 95:

jdbc:dbaw://localhost:8889/Sybase_Win95/MySybServer/sample

For more information

See the Sybase SQL Server documentation.


Connecting to Oracle Server via JDBC

1.	SQLNet is the Oracle client software for connecting to remote databases from client machines. Oracle Server ships different sets of SQLNet client software for Windows 95 and Windows NT. Install the appropriate client software on the dbANYWHERE Server machine.

Note: dbANYWHERE supports several Oracle protocols. Refer to the Oracle Server documentation for more information about the different protocols and compatibility between them.

2.	Set the URL

The Server parameter in the Data Source URL needs to have the format and values described for the dbANYWHERE Data Source configuration file's <server name> parameter. For example:

•	To connect to an Oracle Server database named "ORCL" running at "oraserver.com" using SQLNET V1:

jdbc:dbaw://localhost:8889/Oracle_7/T:oraserver.com/ORCL  (TCP/IP)

jdbc:dbaw://localhost:8889/Oracle_7/P:oraserver.com/ORCL  (Named Pipes)

jdbc:dbaw://localhost:8889/Oracle_7/X:oraserver.com/ORCL  (SPX/IPX)

jdbc:dbaw://localhost:8889/Oracle_7/B:oraserver.com/ORCL  (NetBIOS)

•	To connect to an Oracle Server database named “ORCL” using SQLNET V2 with a service name “ORASERV.WORLD” specified in tnsnames.ora:

jdbc:dbaw://localhost:8889/Oracle_7/TNS:ORASERV.WORLD/ORASERV.WORLD

•	To connect to a Personal Oracle7 database named “ORCL” running on the dbANYWHERE Server machine:

jdbc:dbaw://localhost:8889/Oracle_7/2:ORCL/ORCL

For more information

See the Oracle Server documentation.


Connecting to Informix Server via JDBC

1.	Install the Informix I-Connect client software to be used for connecting to the database server on the dbANYWHERE server machine.

Note: Client configuration can be done using “Informix SetNet32”, an utility supplied by Informix.

2.	After specifying all the connection parameters using Informix SetNet32, verify connection to the database using other utilities like Ilogin to verify connection to the database.

The Server parameter in the Data Source URL needs to have the format and values described for the dbANYWHERE Data Source configuration file's <server name> parameter. For example:

•	to connect to an Informix database named “stores7” running on a server named “MyInfxServer”

jdbc:dbaw//localhost:8889/Informix/MyInfxServer/stores7

For more information

See the Informix Server Documentation


Creating a Data Source configuration file

A Data Source configuration file lets you override the default values that a Data Source driver uses. dbANYWHERE provides some sample configuration files. You can use one of these sample files as the basis for a configuration file.

1.	Determine the sample file to use:

Sample file	Data Source
ddmssql.smp	Microsoft SQL Server
ddsybase.smp	Sybase SQL Server
2.	Copy the sample file to the dbANYWHERE directory.

3.	Change the filename's extension from .smp to .ini.

4.	Use a text editor to edit the file. The following topics describe the Data Source configuration files:

Microsoft SQL Server configuration file (ddmssql.ini)

Sybase SQL Server configuration file (ddsybase.ini)


Testing a Data Source connection

To test a Data Source's connection using the Test Data Sources command

1.	Choose Help [image] Test Data Sources.

2.	Select a Data Source from the list. The list consists of the Data Sources in the dbANYWHERE Data Source configuration file.

3.	Optional: Enter a user name and password. If you don't enter these values, the test uses the user name and password defined in the DSN section in the dbANYWHERE Data Source configuration file.

4.	Click Test.

5.	After a few moments, the test displays the test results.

To test a Data Source's connection using the Data Source Tool

1.	Start the Data Source Tool (See Using the Data Source Tool).

2.	Select a Data Source from the Defined Data Sources list.

3.	Click Test. This displays the Test dialog.

4.	Click PRO API Test or JDBC API Test.

If the test fails

1.	Check the Data Source's user name and password.

2.	Check the Data Source URL.

3.	Check the Data Source's information in the dbANYWHERE Data Source configuration file. To modify this file, you can use a text editor or the Data Source Tool.

4.	For more information, see Troubleshooting a Data Source connection.


Modifying Default Processing

Use  the dbANYWHERE driver INI files to override any default processing performed by the database drivers. These files have the same name as the driver DLL file. For example, for the Microsoft SQL Server driver (ddmssql.dll ), the driver INI file is ddmssql.ini, while the Sybase SQL Server driver (ddsybase.dll), the driver INI file is ddsybase.ini and the Informix Online Server (ddinfmx.dll), the driver INI file is ddinfmx.dll.  Sample files are provided to make it easier for you to create an appropriate driver INI file to modify the default processing.

To override default processing

1.	Copy the appropriate sample file (with the .smp extension ) to an INI file.

Make sure to maintain the same filename, but with the INI extension.

2.	Change the parameters in the new INI file.

Using the example above, the following table contains a description of the INI file parameters for the Microsoft SQL Server and Sybase SQL Server databases.

3. 	Restart dbANYWHERE.

Description of INI file parameters for Microsoft SQL Server and Sybase SQL Server drivers

Parameter	Default	Value Range

MinDBProcesses	1	1 - max*

MaxDBProcesses	3	3 - max*

Select_Timeout	180	1 - 999

Update_Timeout	60	1 - 999

Read_Timeout	15	1 - 999

*max = the maximum number of db processes allowed by your database server license, installation, and configuration.

Description of INI file parameters for Informix Online Server driver

Parameter	Default	Value Range

Select_Timeout	180	1 - 999

Update_Timeout	60	1 - 999

Read_Timeout	15	1 - 999

Other_Timeout	120	1 - 999

MinDBProcesses:  The minimum number of open processes maintained at any given time between dbANYWHERE and the SQL Server database.

MaxDBProcesses: The maximum number of open processes maintained at any given time

between dbANYWHERE and the SQL Server database.

Select_Timeout: The number of seconds dbANYWHERE waits for a "select" SQL statement to return with results from the server. If the time-out expires before the results are obtained, the user is notified via a time-out message.

Update_Timeout: The number of seconds dbANYWHERE waits for an "Update" SQL statement to process. If the time-out expires before results are obtained, the user is notified via a time-out message.

Read_Timeout: The number of seconds dbANYWHERE waits for a data definition language statement to process. If the time-out expires before results are obtained, the user is notified via a time-out message.

Other_Timeout: The number of seconds dbANYWHERE waits for a all other statements (statements not handled in the Select, Update, or Read time out settings) to  process. If the time-out expires before results are obtained, the user is notified via a time-out message.


db_contx.doc

Context sensitive topics for the dbANYWHERE online help:

•	Tabs

•	Dialog boxes


Tabs


Setting the dbANYWHERE Server machine's URL

The Network tab lets you set the dbANYWHERE Server machine's URL. The default settings work for typical systems.

To display the Network tab

•	Choose Options [image] Properties [image] Network.

Fields

Port number

Specifies the dbANYWHERE Server machine's port number. The default value is 8889.

IP Address

Specifies the dbANYWHERE Server machine's IP address. You can:

•	Use the default value (select the "Use default" check box). We recommend that you use the default value if you have only one IP address defined for your dbANYWHERE Server machine.

or

•	Enter a numeric value. Some machines are "multi-homed" which means that they have more than one IP address. For such machines, we recommend that you enter a numeric value.


Logging messages

The Logging tab lets you set up a message log. It specifies the information to log and the logging destination. A message log is useful for debugging during development. Since a message log can decrease performance, we recommend not using one at runtime.

Note: dbANYWHERE truncates each message at 8000 bytes.

To display the Logging tab

•	Choose Options [image] Properties [image] Logging.

To log messages only when dbANYWHERE is maximized

1.	Select the "only when visible" check box.

2.	Clear the "always" check box.

To log messages regardless of whether dbANYWHERE is maximized or minimized

1.	Select the "only when visible" check box.

2.	Select the "always" check box.

Fields

Log what: SQL statements

Indicates whether or not to log the SQL statements that are sent to the Data Source.

Log what: Connection stats

Indicates whether or not to log the connection statistics.

Log where: Log to NT Event Log (Windows NT only)

Indicates whether or not to log messages to the Windows NT Event Log. This option is available only if you are running dbANYWHERE as a Windows NT Service. Use Windows NT's Event Viewer to see these messages.

Log where: Log to screen

Indicates when to log messages to the dbANYWHERE window.

only when visible

Indicates whether or not to log messages when dbANYWHERE is maximized. This check box applies only when dbANYWHERE is in console mode. dbANYWHERE always selects this option and you cannot change it.

always

Indicates whether or not to always log messages regardless of whether dbANYWHERE is maximized or minimized.

Keep the most recent xxx messages.

Specifies the number of messages to keep in the log. The default value is 4096. To maximize dbANYWHERE's performance, use a smaller number.

Log where: Log to file

Indicates whether or not to log messages to a file.

(checkbox)

Indicates whether or not to log messages to the file specified by the "Logfile path" value.

Let file grow to xxx megabytes.

Specifies the maximum file size. When the file reaches the maximum size, dbANYWHERE renames it to filename.bak and creates a new file for additional messages. If filename.bak already exists, dbANYWHERE deletes the old filename.bak before renaming the log file to filename.bak.

Logfile path

Specifies the pathname for the log file.


Allocating dbANYWHERE resources

The Resources tab lets you configure dbANYWHERE's connections and limit shared resources to minimize the impact of lazy or hostile clients.

To display the Resources tab

•	Choose Options [image] Properties [image] Resources.

Fields

Limit connect time

These settings prevent a client from tying up resources indefinitely.

Disconnect client after xxx minutes

Indicates whether or not to disconnect a client after the client has been connected for the specified number of minutes even if the client is active.

or if idle for xxx minutes

Indicates whether or not to disconnect a client after the client has been idle for the specified number of minutes.

Limit simultaneous sessions

User defined limit

Specifies the maximum number of simultaneous sessions. This number cannot exceed the "Limit client sessions" values in the License dialog box. Limiting the number of simultaneous sessions can prevent too large a strain on your system. The best value for this limit depends on your system hardware and applications.

Limit system resource usage

Deny connections if available memory drops below xxx mbytes.

Specifies the minimum amount of system memory that must be available before making a new connection. dbANYWHERE denies new connections if available system memory drops below this level.


Allowing remote administration

The Remote Admin tab indicates whether or not to allow remote system administration which means that you can control dbANYWHERE from a computer other than the dbANYWHERE Server machine.

NOTE: Remote administration is currently limited to the features provided by dbANYWHERE Admin.

To display the Remote Admin tab

•	Choose Options [image] Properties [image] Remote Admin.


Configuring the dbANYWHERE Windows NT Service

The NT Service tab lets you set auto start and account information for the dbANYWHERE Windows NT Service.

To display the NT Service tab

1.	Install dbANYWHERE as a Windows NT Service.

Note: Don't start the service.

2.	Wait until State = Stopped.

3.	Choose Options [image] Properties [image] NT Service.

Fields

AutoStart on system boot

Indicates whether or not to automatically start the dbANYWHERE Windows NT Service when you start  or restart the system.

Account: Use system account

Indicates whether or not to use the system account. This is the default account.

Account: Use this account

Indicates whether or not to use the account specified by the UserName and Password values. This account must have access to the database client software which means that you must have installed the client software under the specified account.


Dialog boxes


Viewing license information

The License dialog box displays your dbANYWHERE license information:

•	Your name and ID number.

•	Database drivers you have access to.

•	Number of client sessions allowed.

•	IP addresses for the databases.

•	License expiration and license release number.

•	Features allowed.

To change these settings, you need to purchase a different version of dbANYWHERE or purchase additional dbANYWHERE database drivers.

To display the License dialog box

•	Choose Options [image] License.

Fields

Customer information: Name

Customer or generic license name.

Customer information: ID

Customer or generic license ID.

Database drivers

List of licensed drivers.

Limit client sessions

dbANYWHERE uses the total number of connected clients when checking license limits. For example, if your unlicensed limit is 2, and 2 or more users are connected (to any driver), then you will not be able to connect to any unlicensed drivers.

Licensed drivers

Maximum number of clients allowed to connect to all licensed drivers.

Unlicensed drivers

Maximum number of clients allowed to connect to all the unlicensed drivers. Unlicensed drivers are allowed a small number of connections for evaluation purposes.

IP Addresses

If your license restricts dbANYWHERE to a specific IP address or set of addresses, those IP addresses will be listed here. Otherwise, the “Any” box will be checked.

Expiration: Never

Indicates that this license never expires. However, a license will usually be invalid for future major releases as indicated by the Release section.

Expiration: On xxx / Grace period (days): xxx

Indicates that this license expires on the specified calendar date with a grace period of the specified number of days.

Expiration: xxx days after installation

Indicates that this license expires the specified number of days after installation.

Release: Major

Specifies the major release number that this license supports.

Release: Any Minor

Indicates that this license supports all minor releases within the major release.

Release: Specific Minor

Specifies the minor releases that this license supports.

Supported features: Allow NT Service Mode

Indicates whether or not you can run this copy of dbANYWHERE as a Windows NT Service. This feature is available only if you are running dbANYWHERE under Windows NT. For information about installing dbANYWHERE as a Windows NT Service, see Using the dbANYWHERE Service Manager.

Supported features: Allow Secure Protocol

Indicates whether or not dbANYWHERE provides secure connections to clients that request them.

Supported features: Allow multiple instances

Indicates whether or not dbANYWHERE honors the -port command line option which is available only for console mode. Honoring the -port command line option lets you run more than one instance of dbANYWHERE, each on a separate port. If dbANYWHERE doesn't honor the -port command line option, then dbANYWHERE honors only the port number specified in the Network tab.

Upgrade

Clicking Upgrade displays a file selection dialog that lets you select and install a license upgrade file. For the complete procedure for installing an additional dbANYWHERE driver, see the "Installing dbANYWHERE Server" manual.