04.04.2013 Views

Addressing OLTP Solutions with CICS: The Transaction Server ... - Ibm

Addressing OLTP Solutions with CICS: The Transaction Server ... - Ibm

Addressing OLTP Solutions with CICS: The Transaction Server ... - Ibm

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DB2 has the concept of binding a program (or package) to a database. For <strong>CICS</strong><br />

transactions that use static SQL statements, the binder′s privileges are used to<br />

access the database. Because all transactions execute under the same<br />

database userid, this userid must still be granted EXECUTE privileges against<br />

packages that involve <strong>CICS</strong> transactions. <strong>CICS</strong> transactions that use dynamic<br />

SQL have their access authentication done at run time. For more information<br />

about DB2 security in an XA environment, see the DATABASE 2 for AIX<br />

Administration Guide, S20H-4580.<br />

<strong>The</strong> local configuration is probably the easiest to implement, but the worst from<br />

a resource distribution point of view. For best throughput the database machine<br />

should be located on a dedicated machine. With a local configuration, the<br />

database server and <strong>CICS</strong> for AIX region compete for system resources such as<br />

processor cycles and memory.<br />

7.4.1.2 Remote Configuration<br />

In a remote configuration the <strong>CICS</strong> for AIX region and the DB2 for AIX server<br />

reside in two separate RISC System/6000 machines. IBM DB2 <strong>Server</strong> for AIX<br />

must be installed on the remote database machine, and an instance of a DB2 for<br />

AIX server must be created there as well. In the local machine where the <strong>CICS</strong><br />

for AIX region resides, DB2 Client for AIX must be configured. <strong>The</strong> Client<br />

Application Enabler for AIX (CAE) product provides the DB2 client code. CAE is<br />

a run-time environment for applications accessing a remote database server.<br />

To connect a DB2 Client for AIX to a DB2 <strong>Server</strong> for AIX you use the remote data<br />

services (RDS) protocol, also known as DB2 common server private protocol.<br />

RDS supports distributed unit of work (DUW) <strong>with</strong> two-phase commit protocol.<br />

A shared object, an XAD entry, and the switch load file are required on the local<br />

(<strong>CICS</strong> for AIX region) machine. <strong>The</strong> DB2INSTANCE environment variable must<br />

be set to the DB2 instance name and be present on both the local and the<br />

remote machines.<br />

When the <strong>CICS</strong> application server (cicsas) issues the xa_open call to the local<br />

DB2 client, the database alias is obtained from the XA open string, and the<br />

DB2INSTANCE value is obtained from the <strong>CICS</strong> for AIX region environment file.<br />

<strong>The</strong>n the system database directory, for that DB2INSTANCE checked for a match<br />

in the database alias name. From the matched entry in the system database<br />

directory, the machine name is obtained and is checked against the machine<br />

names in the node directory. Once a match is found, the port number and the<br />

host name are obtained and checked against the /etc/services file of the host<br />

name for a port number match. If the port numbers match, a connection is<br />

established to the DB2 for AIX server on the host name system, which is the<br />

remote machine.<br />

Figure 30 on page 102 shows a <strong>CICS</strong> for AIX region accessing databases in a<br />

remote DB2 system.<br />

Chapter 7. Interactions <strong>with</strong> the DB2 Family of Products 101

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

Saved successfully!

Ooh no, something went wrong!