A remote server with server class ASEODBC is an Adaptive Server Enterprise (version 10 and later) database server. SQL Anywhere requires the installation of the Adaptive Server Enterprise ODBC driver and Open Client connectivity libraries to connect to a remote Adaptive Server Enterprise database server with class ASEODBC.
Open Client should be version 11.1.1, EBF 7886 or later. Install Open Client and verify connectivity to the Adaptive Server Enterprise server before you install ODBC and configure SQL Anywhere. The Sybase ODBC driver should be version 11.1.1, EBF 7911 or later.
The local setting of the quoted_identifier option controls the use of quoted identifiers for Adaptive Server Enterprise. For example, if you set the quoted_identifier option to Off locally, then quoted identifiers are turned off for Adaptive Server Enterprise.
Configure a user data source in the Configuration Manager with the following attributes:
General tab Type any value for Data Source Name. This value is used in the USING clause of the CREATE SERVER statement.
The server name should match the name of the server in the Sybase interfaces file.
Advanced tab Click the Application Using Threads and Enable Quoted Identifiers options.
Connection tab Set the charset field to match your SQL Anywhere character set.
Set the language field to your preferred language for error messages.
Performance tab Set the Prepare Method to 2-Full.
Set the Fetch Array Size as large as possible for the best performance. This increases memory requirements since this is the number of rows that must be cached in memory. Adaptive Server Enterprise recommends using a value of 100.
Set Select Method to 0-Cursor.
Set Packet Size to as large a value as possible. Adaptive Server Enterprise recommends using a value of -1.
Set Connection Cache to 1.
When you execute a CREATE TABLE statement, SQL Anywhere automatically converts the data types to the corresponding Adaptive Server Enterprise data types. The following table describes the SQL Anywhere to Adaptive Server Enterprise data type conversions.
SQL Anywhere data type | Adaptive Server Enterprise default data type |
---|---|
BIT | bit |
VARBIT(n) | if (n <= 255) varbinary(n) else image |
LONG VARBIT | image |
TINYINT | tinyint |
SMALLINT | smallint |
INT, INTEGER | int |
BIGINT | numeric(20,0) |
UNSIGNED TINYINT | tinyint |
UNSIGNED SMALLINT | int |
UNSIGNED INTEGER | numeric(11,0) |
UNSIGNED BIGINT | numeric(20,0) |
CHAR(n) | if (n <= 255) char(n) else text |
VARCHAR(n) | if (n <= 255) varchar(n) else text |
LONG VARCHAR | text |
NCHAR(n) | if (n <= 255) nchar(n) else ntext |
NVARCHAR(n) | if (n <= 255) nvarchar(n) else ntext |
LONG NVARCHAR | ntext |
BINARY(n) | if (n <= 255) binary(n) else image |
VARBINARY(n) | if (n <= 255) varbinary(n) else image |
LONG BINARY | image |
DECIMAL(prec,scale) | decimal(prec,scale) |
NUMERIC(prec,scale) | numeric(prec,scale) |
SMALLMONEY | numeric(10,4) |
MONEY | numeric(19,4) |
REAL | real |
DOUBLE | float |
FLOAT(n) | float(n) |
DATE | datetime |
TIME | datetime |
SMALLDATETIME | smalldatetime |
TIMESTAMP | datetime |
TIMESTAMP WITH TIMEZONE | varchar(254) |
XML | text |
ST_GEOMETRY | image |
UNIQUEIDENTIFIER | binary(16) |
Supply a connection string in the USING clause of the CREATE SERVER statement to connect to an Adaptive Server Enterprise database.
CREATE SERVER TestASE CLASS 'ASEODBC' USING 'DRIVER=SYBASE ASE ODBC Driver;Server=TestASE;Port=5000;Database=testdb;UID=username;PWD=password' |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |