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 the IBNAME statement.
Here is the LIBNAME statement syntax for accessing Sybase.
LIBNAME libref sybase <connection-options> <LIBNAME-options>;

Arguments

libref
any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.
sybase
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.
Alias: DB=
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, and 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.

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.