As shown in Figure 29, a VM application must go through the DB2 for VM application requester (resource adapter) to access any DB2 for VM or DRDA Application Server database. A DB2 for VM Application Server database can receive SQL requests from any DB2 for VM or DRDA Application Requester.
Figure 29. DB2 for VM Application Requester and Application Server
DB2 for VM supports three processing options on the sqlinit command that allow the user and the database administrator to enable the distributed database support. The user can specify one of the following SQLINIT options before preprocessing or running the application:
Table 3 compares functional characteristics of the DB2 for VM
application requester SQLINIT processing options.
Table 3. Comparison of DB2 for VM Application Requester SQLINIT Processing Options
[SQLDS] | [AUTO] | [DRDA] |
Both partners must be DB2 for VM systems | Connects to any DRDA system | Connects to any DRDA system |
Can communicate with partner locally, through TSAF or AVS/VTAM | Can communicate with a DB2 for VM system locally, or with a remote DB2 for VM system through TSAF or AVS. With an unlike system, must communicate through AVS. | Can communicate with a DB2 for VM system locally, or with a remote DB2 for VM system through TSAF or AVS. With an unlike system, must communicate through AVS. |
Supports static, dynamic, and extended dynamic SQL | Supports static, dynamic, and extended dynamic SQL | Supports static, dynamic, and extended dynamic SQL 6 |
CCSIDs defined by SQLINIT for the application requester are ignored by the DB2 for VM application server | CCSIDs defined by SQLINIT for the Application Requester are honored by the DB2 for VM Application Server and proper conversion is performed (if the application server is set to AUTO as well) | CCSIDs defined by SQLINIT for the Application Requester are honored by the DB2 for VM Application Server and proper conversion is performed |
Fixed 8K blocksize; OPEN call returns no rows; Application Requester must explicitly close cursor | DB2 for VM to DB2 for VM: SQLDS method; all others: DRDA method | Variable 1K to 32K blocksize; more compact data packaging; OPEN call returns one block of rows; Application Server can implicitly close cursor saving Application Requester from sending a CLOSE call |
Can use cursor INSERT and PUTs to insert a block of rows at a time using fixed 8K blocksize | DB2 for VM to DB2 for VM: SQLDS method; all others: DRDA method | PUTs are converted into regular single row inserts and sent out one row at a time |
All DB2 for VM-unique commands are supported | DB2 for VM to DB2 for VM: SQLDS method; all others: DRDA method | DB2 for VM operator commands, some DB2 for VM statements, and some ISQL and DBSU commands are not supported (See the DB2 for VSE & VM SQL Reference). |
LUWID is not supported | LUWID is supported | LUWID is supported |
This section describes various options for starting the Database Server Machine.
The database administrator can specify one of the following options on the PROTOCOL parameter when starting the database server machine.
The Application Server is sensitive to the processing option selected by the application requester. If a DB2 for VM requester specifies PROTOCOL(SQLDS), the processing on the DB2 for VM server continues normally with private flows. If the DB2 for VM requester specifies PROTOCOL(AUTO), the DB2 for VM server notifies the requester to switch to private flows. No CCSID information is exchanged between the application requester and the application server. The application server assumes that the application requester CCSIDs are the same as the application server CCSIDs. If the DB2 for VM requester specifies PROTOCOL(DRDA), the conversation is terminated. If an application requester other than DB2 for VSE & VM attempts to access the DB2 for VM server, the conversation is terminated.
This parameter specifies whether or not a syncpoint manager (SPM) will be used to coordinate DRDA-2 multi-site-read, multi-site-write distributed unit of work activity.
If Y is specified, the server will use a syncpoint manager if possible, to coordinate two-phase commits and resynchronization activity. If N is specified, the application server will not use an SPM to perform two-phase commits. If N is specified, the application server is limited to multi-site-read, single-site-write distributed units of work and it can be the single write site. If Y is specified, but the application server finds that a syncpoint manager is not available, then the server will operate as if N was specified.
The default is SYNCPNT=Y when PROTOCOL=AUTO. When PROTOCOL=SQLDS, the SYNCPNT parameter is set to N.