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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The LIBNAME Statement <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 4 DBMSTEMP= LIBNAME Option 131DBMSTEMP= LIBNAME OptionSpecifies whether <strong>SAS</strong> creates temporary or permanent tables.Default value:Valid in:NO<strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statementDBMS support: Aster nCluster, DB2 under UNIX and PC Hosts, DB2 under z/OS,Greenplum, HP Neoview, Microsoft SQL Server, MySQL, Netezza, ODBC, OLE DB,Oracle, Sybase IQ, TeradataSyntaxDBMSTEMP=YES | NOSyntax DescriptionYESspecifies that <strong>SAS</strong> creates one or more temporary tables.NOspecifies that <strong>SAS</strong> creates permanent tables.DetailsTo specify this option, you must first specify CONNECTION=GLOBAL, except <strong>for</strong>Microsoft SQL Server, which defaults to UNIQUE. To significantly improveper<strong>for</strong>mance, you must also set DBCOMMIT=0. The value <strong>for</strong> SCHEMA= is ignored.You can then access and use the DBMS temporary tables using <strong>SAS</strong>/<strong>ACCESS</strong> enginelibrefs that share the global connection that <strong>SAS</strong> used to create those tables.To join a temporary and a permanent table, you need a libref <strong>for</strong> each table and theselibrefs must successfully share a global connection.DB2 under z/OS, Oracle, and Teradata: Set INSERTBUFF=1000 or higher tosignificantly improve per<strong>for</strong>mance.ODBC: This engine supports DB2, MS SQL Server, or Oracle if you are connected tothem.ExamplesThis example shows how to use this option to create a permanent and temporarytable and then join them in a query. The temporary table might not exist beyond asingle PROC step. However, this might not be true <strong>for</strong> all DBMSs.options sastrace=(,,d,d) nostsuffix sastraceloc=saslog;LIBNAME permdata DB2 DB=MA40 SCHEMA=<strong>SAS</strong>TDATA connection=global dbcommit=0USER=sasuser PASSWORD=xxx;LIBNAME tempdata DB2 DB=MA40 SCHEMA=<strong>SAS</strong>TDATA connection=global dbcommit=0dbmstemp=yes USER=sasuser PASSWORD=xxx;proc sql;create table tempdata.ptyacc as

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

Saved successfully!

Ooh no, something went wrong!