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.

128 DBLIBTERM= LIBNAME Option 4 Chapter 10DBLIBTERM= LIBNAME OptionSpecifies a user-defined termination command to execute once, be<strong>for</strong>e the DBMS that isassociated with the first connection made by the LIBNAME statement or libref disconnects.Default value: noneValid 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, TeradataSyntaxDBLIBTERM=DBMS-user-commandSyntax DescriptionDBMS-user-commandis any DBMS command that can be executed by the <strong>SAS</strong>/<strong>ACCESS</strong> engine and thatdoes not return a result set or output parameters.DetailsThe termination command that you select can be a script, stored procedure, or anyDBMS SQL statement that might provide additional control over the interactionbetween the <strong>SAS</strong>/<strong>ACCESS</strong> engine and the DBMS. The command executes immediatelybe<strong>for</strong>e <strong>SAS</strong> terminates the last connection to the DBMS. If the command fails, then<strong>SAS</strong> provides a warning message but the library deassignment and disconnect stilloccurs. You must specify the command as a single, quoted string.DBLIBTERM= fails if either CONNECTION=UNIQUE or DEFER=YES or both ofthese LIBNAME options are specified.When two LIBNAME statements share the same physical connection, thetermination command is executed only once. (Multiple LIBNAME statements that useCONNECTION=GLOBALREAD and identical values <strong>for</strong> CONNECTION_GROUP=,DBCONINIT=, DBCONTERM=, DBLIBINIT=, and DBLIBTERM= options and anyDBMS connection options can share the same connection to the DBMS.)ExampleIn the following example, CONNECTION=GLOBALREAD is specified on bothLIBNAME statements, but the DBLIBTERM commands are different. There<strong>for</strong>e, thesecond LIBNAME statement fails to share the same physical connection.libname mydblib oracle user=testuser pass=testpassconnection=globalread dblibterm=’Test’;libname mydblib2 oracle user=testuser pass=testpassconnection=globalread dblibterm=’NoTest’;

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

Saved successfully!

Ooh no, something went wrong!