78 CONNECTION= LIBNAME Option Chapter 9
CONNECTION= LIBNAME Option
Specifies whether operations against a single libref share a connection to the DBMS, and whether
operations against multiple librefs 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:
DBMS-specific
Syntax
CONNECTION= SHAREDREAD | UNIQUE | SHARED | GLOBALREAD | GLOBAL
Syntax Description
Not all values are valid for all SAS/ACCESS interfaces. See details below.
SHAREDREAD
specifies that all READ operations that access DBMS tables in a single libref share a
single connection. A separate connection is established for each table that is opened
for update or output operations.
Where available, this is usually the default value because it offers the best
performance and it guarantees data integrity.
UNIQUE
specifies that a separate connection is established every time a DBMS table is
accessed by your SAS application.
Use UNIQUE if you want each use of a table to have its own connection.
SHARED (This value is valid in the interfaces to DB2 OS/390, DB2 UNIX/PC, ODBC,
and Microsoft SQL Server.)
specifies that all operations that access DBMS tables in a single libref share a single
connection.
Use this option with caution. If READ and UPDATE connections are shared and a
commit or rollback is performed, the READ cursors might have to be resynchronized.
If the cursors are resynchronized, there is no guarantee that the new solution table
will match the original solution table that was being read.
Use SHARED to eliminate the deadlock that can occur when you create and load a
DBMS table from an existing table that resides in the same database or tablespace.
This only happens in certain output processing situations and is the only
recommended use for CONNECTION=SHARED.
GLOBALREAD
specifies that all READ operations that access DBMS tables in multiple librefs share
a single connection if the following is true:
the participating librefs are created by LIBNAME statements that specify
identical values for the CONNECTION=, CONNECTION_GROUP=,
DBCONINIT=, DBCONTERM=, DBLIBINIT=, and DBLIBTERM= options
the participating librefs are created by LIBNAME statements that specify
identical values for any DBMS connection options.
A separate connection is established for each table that is opened for update or
output operations.