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.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Microsoft SQL Server 4 CONNECT Statement Examples 597SQL Pass-Through Facility Specifics <strong>for</strong> Microsoft SQL ServerKey In<strong>for</strong>mationFor general in<strong>for</strong>mation about this feature, see “Autopartitioning Techniques in <strong>SAS</strong>/<strong>ACCESS</strong>” on page 57. Microsoft SQL Server examples are available.Here are the SQL pass-through facility specifics <strong>for</strong> the Microsoft SQL Serverinterface under UNIX hosts.3 The dbms-name is SQLSVR.3 The CONNECT statement is required.3 PROC SQL supports multiple connections to Microsoft SQL Server. If you usemultiple simultaneous connections, you must use the alias argument to identifythe different connections. If you do not specify an alias, the default alias is used.The functionality of multiple connections to the same Microsoft SQL Server datasource might be limited by the particular data source driver.3 The CONNECT statement database-connection-arguments are identical to itsLIBNAME statement connection options.3 These LIBNAME options are available with the CONNECT statement:AUTOCOMMIT=CURSOR_TYPE=KEYSET_SIZE=QUERY_TIMEOUT=READBUFF=READ_ISOLATION_LEVEL=TRACE=TRACEFILE=USE_ODBC_CL=3 The DBMS-SQL-query argument can be a DBMS-specific SQL EXECUTEstatement that executes a DBMS stored procedure. However, if the storedprocedure contains more than one query, only the first query is processed.CONNECT Statement ExamplesThese examples connect to a data source that is configured under the data sourcename User’s Data using the alias USER1. The first example uses the connectionmethod that is guaranteed to be present at the lowest level of con<strong>for</strong>mance. Note thatDATASRC= names can contain quotation marks and spaces.proc sql;connect to sqlsvr as user1(datasrc="User’s Data" user=testuser password=testpass);This example uses the connection method that represents a more advanced level ofMicrosoft SQL Server ODBC con<strong>for</strong>mance. It uses the input dialog box that is providedby the driver. The DSN= and UID= arguments are within the connection string. TheSQL pass-through facility there<strong>for</strong>e does not parse them but instead passes them to theODBC driver manager.

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

Saved successfully!

Ooh no, something went wrong!