13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The LIBNAME Statement <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 4 LIBNAME Statement Syntax <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 89LIBNAME Statement Syntax <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong>Associates a <strong>SAS</strong> libref with a DBMS database, schema, server, or a group of tables and views.Valid:AnywhereSyntaxu LIBNAME libref engine-name;v LIBNAME libref CLEAR|_ALL_ CLEAR;w LIBNAME libref LIST|_ALL_ LIST;ArgumentsThe <strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statement takes the following arguments:librefis any <strong>SAS</strong> name that serves as an alias to associate <strong>SAS</strong> with a database, schema,server, or group of tables and views. Like the global <strong>SAS</strong> LIBNAME statement, the<strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statement creates shortcuts or nicknames <strong>for</strong> data storagelocations. While a <strong>SAS</strong> libref is an alias <strong>for</strong> a virtual or physical directory, a<strong>SAS</strong>/<strong>ACCESS</strong> libref is an alias <strong>for</strong> the DBMS database, schema, or server whereyour tables and views are stored.engine-nameis the <strong>SAS</strong>/<strong>ACCESS</strong> engine name <strong>for</strong> your DBMS, such as oracle or db2. The enginename is required. Because the <strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statement associates a librefwith a <strong>SAS</strong>/<strong>ACCESS</strong> engine that supports connections to a particular DBMS, itrequires a DBMS-specific engine name. See the DBMS-specific reference section <strong>for</strong>details.<strong>SAS</strong>/<strong>ACCESS</strong>-connection-optionsprovide connection in<strong>for</strong>mation and control how <strong>SAS</strong> manages the timing andconcurrence of the connection to the DBMS; these arguments are different <strong>for</strong> eachdatabase. For example, to connect to an Oracle database, your connection options areUSER=, PASSWORD=, and PATH=:libname myoralib oracle user=testuser password=testpass path=’voyager’;If the connection options contain characters that are not allowed in <strong>SAS</strong> names,enclose the values of the arguments in quotation marks. On some DBMSs, if youspecify the appropriate system options or environment variables <strong>for</strong> your database,you can omit the connection options. For detailed in<strong>for</strong>mation about connectionoptions <strong>for</strong> your DBMS, see the reference section <strong>for</strong> your <strong>SAS</strong>/<strong>ACCESS</strong> interface .<strong>SAS</strong>/<strong>ACCESS</strong>-LIBNAME-optionsdefine how DBMS objects are processed by <strong>SAS</strong>. Some LIBNAME options canenhance per<strong>for</strong>mance; others determine locking or naming behavior. For example,the PRESERVE_COL_NAMES= option lets you specify whether to preserve spaces,special characters, and mixed case in DBMS column names when creating tables.The availability and default behavior of many of these options are DBMS-specific.For a list of the LIBNAME options that are available <strong>for</strong> your DBMS, see the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!