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.

714 Examples 4 Chapter 25ORAPW= is an alias <strong>for</strong> this option. If you do not wish to enter yourOracle password in uncoded text, see PROC PWENCODE in Base <strong>SAS</strong>Procedures Guide <strong>for</strong> a method to encode it.BUFFSIZE=number-of-rowsspecifies the number of rows to retrieve from an Oracle table or view witheach fetch. Using this argument can improve the per<strong>for</strong>mance of any query toOracle.By setting the value of the BUFFSIZE= argument in your <strong>SAS</strong> programs,you can find the optimal number of rows <strong>for</strong> a given query on a given table.The default buffer size is 250 rows per fetch. The value of BUFFSIZE= canbe up to 2,147,483,647 rows per fetch, although a practical limit <strong>for</strong> mostapplications is less, depending on the available memory.PRESERVE_COMMENTSenables you to pass additional in<strong>for</strong>mation (called hints) to Oracle <strong>for</strong>processing. These hints might direct the Oracle query optimizer to choose thebest processing method based on your hint.You specify PRESERVE_COMMENTS as an argument in the CONNECTstatement. You then specify the hints in the Oracle SQL query <strong>for</strong> theCONNECTION TO component. Hints are entered as comments in the SQLquery and are passed to and processed by Oracle.PATH=Oracle-database-specificationspecifies the Oracle driver, node, and database. Aliases are required if youare using SQL*Net Version 2.0 or later. In some operating environments, youcan enter the in<strong>for</strong>mation that is required by the PATH= statement be<strong>for</strong>einvoking <strong>SAS</strong>.<strong>SAS</strong>/<strong>ACCESS</strong> uses the same Oracle path designation that you use toconnect to Oracle directly. See your database administrator to determine thepath designations that have been set up in your operating environment, andto determine the default value if you do not specify a path designation. OnUNIX systems, the TWO_TASK environment variable is used, if set. Ifneither PATH= nor TWO_TASK have been set, the default value is the localdriver.ExamplesThis example uses the alias DBCON <strong>for</strong> the DBMS connection (the connection aliasis optional):proc sql;connect to oracle as dbcon(user=testuser password=testpass buffsize=100path=’myorapath’);quit;This next example connects to Oracle and sends it two EXECUTE statements toprocess.proc sql;connect to oracle (user=testuser password=testpass);execute (create view whotookorders asselect ordernum, takenby,firstname, lastname, phonefrom orders, employeeswhere orders.takenby=employees.empid)

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

Saved successfully!

Ooh no, something went wrong!