Previous Page | Next Page

SAS/ACCESS Interface to Sybase

LIBNAME Statement Specifics for Sybase


Overview

This section describes the LIBNAME statement that SAS/ACCESS Interface to Sybase supports. A Sybase example is available. For details about this feature, see Overview of the LIBNAME Statement for Relational Databases.

Here is the LIBNAME statement syntax for accessing Sybase.

LIBNAME libref sybase <connection-options> <LIBNAME-options>;

Arguments

libref

is any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.

sybase

is the SAS/ACCESS engine name for the Sybase interface.

connection-options

provide connection information and control how SAS manages the timing and concurrence of the connection to the DBMS. Here are the connection options for Sybase.

USER=<'>SYBASE-user-name<'>

specifies the Sybase user name (also called the login name) that you use to connect to your database. If the user name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.

PASSWORD=<'>SYBASE-password<'>

specifies the password that is associated with your Sybase user name. If you omit the password, a default password of NULL is used. If the password contains spaces or nonalphanumeric characters, you must enclose it in quotation marks. PASSWORD= can also be specified with the SYBPW=, PASS=, and PW= aliases.

DATABASE=<'>database-name<'>

specifies the name of the Sybase database that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks. If you omit DATABASE=, the default database for your Sybase user name is used. DATABASE= can also be specified with the DB= alias.

SERVER=<'>server-name<'>

specifies the server that you want to connect to. This server accesses the database that contains the tables and views that you want to access. If the server name contains lowercase, spaces, or nonalphanumeric characters, you must enclose it in quotation marks. If you omit SERVER=, the default action for your operating system occurs. On UNIX systems, the value of the environment variable DSQUERY is used if it has been set.

IP_CURSOR= YES | NO

specifies whether implicit PROC SQL pass-through processes multiple result sets simultaneously. IP_CURSOR is set to NO by default. Setting it to YES allows this type of extended processing. However, it decreases performance because cursors, not result sets, are being used. Do not set to YES unless needed.

If you specify the appropriate system options or environment variables for your database, you can often omit the connection options. See your Sybase documentation for details.

LIBNAME-options

define how SAS processes DBMS objects. Some LIBNAME options can enhance performance, while others determine locking or naming behavior. The following table describes the LIBNAME options for SAS/ACCESS Interface to Sybase, with the applicable default values. For more detail about these options, see LIBNAME Options for Relational Databases.

SAS/ACCESS LIBNAME Options for Sybase
Option Default Value
ACCESS=
none
AUTHDOMAIN=
none
AUTOCOMMIT=
YES
CONNECTION=
SHAREDREAD
CONNECTION_GROUP=
none
DBCOMMIT=
1000 (inserting) or 0 (updating)
DBCONINIT=
none
DBCONTERM=
none
DBCREATE_TABLE_OPTS=
none
DBGEN_NAME=
DBMS
DBINDEX=
NO
DBLIBINIT=
none
DBLIBTERM=
none
DBLINK=
the local database
DBMAX_TEXT=
1024
DBPROMPT=
NO
DBSASLABEL=
COMPAT
DBSERVER_MAX_BYTES=
COMPAT
DBSLICEPARM=
THREADED_APPS,2 or 3
DEFER=
NO
DIRECT_EXE=
none
DIRECT_SQL=
YES
ENABLE_BULK=
YES
INTERFACE=
none
MAX_CONNECTS=
25
MULTI_DATASRC_OPT=
none
PACKETSIZE=
server setting
QUOTED_IDENTIFIER=
NO
READBUFF=
100
READ_ISOLATION_LEVEL=
1 (see Locking in the Sybase Interface)
READ_LOCK_TYPE=
NOLOCK (see Locking in the Sybase Interface)
REREAD_EXPOSURE=
NO
SCHEMA=
none
SPOOL=
YES
SQL_FUNCTIONS=
none
SQL_FUNCTIONS_COPY=
none
SQL_OJ_ANSI=
NO
UPDATE_ISOLATION_LEVEL=
1 (see Locking in the Sybase Interface)
UPDATE_LOCK_TYPE=
PAGE (see Locking in the Sybase Interface)
UTILCONN_TRANSIENT=
NO


Sybase LIBNAME Statement Example

In the following example, the libref MYDBLIB uses the Sybase engine to connect to a Sybase database. USER= and PASSWORD= are connection options.

libname mydblib sybase user=testuser password=testpass;

If you specify the appropriate system options or environment variables for your database, you can often omit the connection options. See your Sybase documentation for details.

Previous Page | Next Page | Top of Page