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 SPOOL= LIBNAME Option 185SPOOL= LIBNAME OptionSpecifies whether <strong>SAS</strong> creates a utility spool file during read transactions that read data morethan once.Default value: YESValid in: <strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statementDBMS support: Aster nCluster, DB2 under UNIX and PC Hosts, DB2 under z/OS,Greenplum, HP Neoview, In<strong>for</strong>mix, Microsoft SQL Server, MySQL, Netezza, ODBC,OLE DB, Oracle, Sybase, Sybase IQ, TeradataSyntaxSPOOL=YES | NO | DBMSSyntax DescriptionYESspecifies that <strong>SAS</strong> creates a utility spool file into which it writes the rows that areread the first time. For subsequent passes through the data, the rows are read fromthe utility spool file rather than being re-read from the DBMS table. This guaranteesthat the row set is the same <strong>for</strong> every pass through the data.NOspecifies that the required rows <strong>for</strong> all passes of the data are read from the DBMStable. No spool file is written. There is no guarantee that the row set is the same <strong>for</strong>each pass through the data.DBMSis valid <strong>for</strong> Oracle only. The required rows <strong>for</strong> all passes of the data are read fromthe DBMS table but additional en<strong>for</strong>cements are made on the DBMS server side toensure that the row set is the same <strong>for</strong> every pass through the data. This settingcauses <strong>SAS</strong>/<strong>ACCESS</strong> Interface to Oracle to satisfy the two-pass requirement bystarting a read-only transaction. SPOOL=YES and SPOOL=DBMS have comparableper<strong>for</strong>mance results <strong>for</strong> Oracle. However, SPOOL=DBMS does not use any diskspace. When SPOOL is set to DBMS, you must set CONNECTION=UNIQUE or anerror occurs.DetailsIn some cases, <strong>SAS</strong> processes data in more than one pass through the same set of rows.Spooling is the process of writing rows that have been retrieved during the first pass ofa data read to a spool file. In the second pass, rows can be reread without per<strong>for</strong>mingI/O to the DBMS a second time. When data must be read more than once, spoolingimproves per<strong>for</strong>mance. Spooling also guarantees that the data remains the samebetween passes, as most <strong>SAS</strong>/<strong>ACCESS</strong> interfaces do not support member-level locking.MySQL: Do not use SPOOL=NO with the MySQL interface.Teradata: SPOOL=NO requires <strong>SAS</strong>/<strong>ACCESS</strong> to issue identical SELECT statementsto Teradata twice. Additionally, because the Teradata table can be modified betweenpasses, SPOOL=NO can cause data integrity problems. Use SPOOL=NO withdiscretion.

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

Saved successfully!

Ooh no, something went wrong!