Beginning in SAS 7, you can associate a SAS libref directly with a
database, schema, server, or group of tables and SAS views, depending
on your DBMS. To assign a libref to DBMS data, you must use the
SAS/ACCESS
LIBNAME statement, which has syntax and options that are different
from the Base SAS LIBNAME statement. For example, to connect to an
ORACLE database, you might use the following
SAS/ACCESS LIBNAME statement:
libname mydblib oracle user=smith password=secret path='myoracleserver';
This LIBNAME statement
connects to ORACLE by specifying the ORACLE connection options: USER=,
PASSWORD=, and PATH=. In addition to the connection options, you can
specify
SAS/ACCESS LIBNAME options that control the type of database
connection that is made. You can use additional options to control
how your data is processed.
You can use a DATA step,
SAS procedures, or the
Explorer
window to view and update the DBMS data associated with
the libref, or use the DATASETS and CONTENTS procedures to view information
about the DBMS objects.
See your
SAS/ACCESS
documentation for a full listing of the
SAS/ACCESS LIBNAME options
that can be used with librefs that refer to DBMS data.