The LIBNAME Statement for Relational Databases CONNECTION_GROUP= LIBNAME Option 81
In the following GLOBAL example, you have two different librefs that share one
connection.
libname db2lib db2 connection=global;
libname db2data db2 connection=global;
data db2lib.new(in=’database test’);
set db2data.old;
run;
If you did not use the CONNECTION= option in the above two examples, you would
deadlock in DB2 and get the following error:
ERROR: Error attempting to CREATE a DBMS table.
ERROR: DB2 execute error DSNT408I SQLCODE = --911,
ERROR: THE CURRENT UNIT OF WORK HAS BEEN ROLLED
BACK DUE TO DEADLOCK.
See Also
“DEFER= LIBNAME Option” on page 97
“ACCESS= LIBNAME Option” on page 69
“CONNECTION_GROUP= LIBNAME Option” on page 81
CONNECTION_GROUP= LIBNAME Option
Causes operations against multiple librefs to share a connection to the DBMS. Also causes
operations against multiple Pass-Through Facility CONNECT statements to share a connection to
the DBMS
Valid in:
the SAS/ACCESS LIBNAME statement
DBMS support: DB2 OS/390, DB2 UNIX/PC, Informix, ODBC, OLE DB, Oracle,
Microsoft SQL Server, SYBASE, Teradata
Default value: none
Syntax
CONNECTION_GROUP= connection-group-name
Syntax Description
connection-group-name
is the name of a connection group
Details
This option causes a DBMS connection to be shared by all READ operations against
multiple librefs if the following is true: