11.07.2015 Views

SQL Reference Volume 1 - Ibm

SQL Reference Volume 1 - Ibm

SQL Reference Volume 1 - Ibm

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Distributed relational databasesv CONNECT (Type 1) supports the single database per unit of work (Remote Unitof Work) semantics.v CONNECT (Type 2) supports the multiple databases per unit of work(Application-Directed Distributed Unit of Work) semantics.The DB2 call level interface (CLI) and embedded <strong>SQL</strong> support a connection modecalled concurrent transactions, which allows multiple connections, each of which isan independent transaction. An application can have multiple concurrentconnections to the same database.The application server can be local to or remote from the environment in which theprocess is initiated. An application server is present, even if the environment is notusing distributed relational databases. This environment includes a local directorythat describes the application servers that can be identified in a CONNECTstatement.The application server runs the bound form of a static <strong>SQL</strong> statement thatreferences tables or views. The bound statement is taken from a package that thedatabase manager has previously created through a bind operation.For the most part, an application connected to an application server can usestatements and clauses that are supported by the application server’s databasemanager. This is true even if an application is running through the applicationrequester of a database manager that does not support some of those statementsand clauses.Remote unit of workThe remote unit of work facility provides for the remote preparation and execution of<strong>SQL</strong> statements. An application process at computer system A can connect to anapplication server at computer system B and, within one or more units of work,execute any number of static or dynamic <strong>SQL</strong> statements that reference objects atB. After ending a unit of work at B, the application process can connect to anapplication server at computer system C, and so on.Most <strong>SQL</strong> statements can be remotely prepared and executed, with the followingrestrictions:v All objects referenced in a single <strong>SQL</strong> statement must be managed by the sameapplication server.v All of the <strong>SQL</strong> statements in a unit of work must be executed by the sameapplication server.At any given time, an application process is in one of four possible connectionstates:v Connectable and connectedAn application process is connected to an application server, and CONNECTstatements can be executed.If implicit connect is available:– The application process enters this state when a CONNECT TO statement ora CONNECT without operands statement is successfully executed from theconnectable and unconnected state.– The application process may enter this state from the implicitly connectablestate if any <strong>SQL</strong> statement other than CONNECT RESET, DISCONNECT, SETCONNECTION, or RELEASE is issued.28 <strong>SQL</strong> <strong>Reference</strong> <strong>Volume</strong> 1

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

Saved successfully!

Ooh no, something went wrong!