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 DBLIBINIT= LIBNAME Option 127Syntax 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 initialization command that you select can be a script, stored procedure, or anyDBMS SQL statement that might provide additional control over the interactionbetween your <strong>SAS</strong>/<strong>ACCESS</strong> interface and the DBMS.The command executes immediately after the first DBMS connection is successfullyestablished. If the command fails, then a disconnect occurs and the libref is notassigned. You must specify the command as a single, quoted string, unless it is anenvironment variable.DBLIBINIT= fails if either CONNECTION=UNIQUE or DEFER=YES, or if both ofthese LIBNAME options are specified.When multiple LIBNAME statements share a connection, the initialization commandexecutes only <strong>for</strong> the first LIBNAME statement, immediately after the DBMSconnection is established. (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 in bothLIBNAME statements, but the DBLIBINIT 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 dblibinit=’Test’;libname mydblib2 oracle user=testuser pass=testpassconnection=globalread dblibinit=’NoTest’;See Also“CONNECTION= LIBNAME Option” on page 108“DBLIBTERM= LIBNAME Option” on page 128“DEFER= LIBNAME Option” on page 139

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

Saved successfully!

Ooh no, something went wrong!