The DRDA Specification
Total Page:16
File Type:pdf, Size:1020Kb
Technical Standard DRDA, Version 4, Volume 1: Distributed Relational Database Architecture (DRDA) The Open Group ©February 2007, The Open Group All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior permission of the copyright owners. This documentation and the softwaretowhich it relates arederived in part from copyrighted materials supplied by International Business Machines. Neither International Business Machines nor The Open Group makes any warranty of any kind with regardtothis material, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The Open Group shall not be liable for errors contained herein, or for any direct or indirect, incidental, special, or consequential damages in connection with the furnishing, performance, or use of this material. Technical Standard DRDA, Version 4, Volume 1: Distributed Relational Database Architecture(DRDA) ISBN: 1-931624-70-4 Document Number: C066 Published in the U.K. by The Open Group, February 2007. Any comments relating to the material contained in this document may be submitted to: The Open Group Thames Tower 37-45 Station Road Reading Berkshire, RG1 1LX United Kingdom or by Electronic Mail to: [email protected] ii Technical Standard (2007) Contents Chapter 1 The DRDA Specification ................................................................ 1 1.1 The DRDA Reference .............................................................................. 2 1.1.1 What it Means to Implement Different Levels of DRDA ............... 2 1.1.2 What it Means to Implement DRDA Level 6 ................................... 3 1.1.3 What it Means to Implement DRDA Level 5 ................................... 9 1.1.4 What it Means to Implement DRDA Level 4 ................................... 29 1.1.5 What it Means to Implement DRDA Level 3 ................................... 32 1.1.6 What it Means to Implement DRDA Distributed Unit of Work .......................................................................................... 35 1.2 The FD:OCA Reference .......................................................................... 38 1.3 The DDM Reference ................................................................................ 39 Part 1 Database Access Protocol .......................................................... 43 Chapter 2 Introduction to DRDA..................................................................... 45 2.1 DRDA Structureand Other Architectures ........................................... 45 2.2 DRDA and SQL ....................................................................................... 45 2.3 DRDA Connection Architecture........................................................... 46 2.4 Types of Distribution .............................................................................. 46 2.5 DRDA Protocols and Functions............................................................ 49 Chapter 3 Using DRDA: Overall Flows........................................................ 53 3.1 Introduction to Protocol Flows ............................................................. 53 3.1.1 Initialization Flows .............................................................................. 54 3.1.2 Bind Flows ............................................................................................. 57 3.1.3 SQL Statement Execution Flows........................................................ 59 3.1.4 Commit Flows ...................................................................................... 61 3.1.5 Termination Flows ............................................................................... 63 3.1.6 Utility Flows .......................................................................................... 65 3.1.6.1 Packet Flow ........................................................................................ 65 Chapter 4 The DRDA Processing Model and Command Flows ................................................................................. 67 4.1 DDM and the Processing Model........................................................... 68 4.2 DRDA Relationship to DDM................................................................. 69 4.3 The DRDA Processing Model ............................................................... 70 4.3.1 DRDA Managers .................................................................................. 70 4.3.1.1 SNA Communications Manager..................................................... 70 4.3.1.2 SNA Sync Point Communications Manager................................. 71 4.3.1.3 TCP/IP Communications Manager ............................................... 71 4.3.1.4 Agent................................................................................................... 71 4.3.1.5 Supervisor .......................................................................................... 72 4.3.1.6 Security Manager .............................................................................. 72 4.3.1.7 Directory ............................................................................................. 73 DRDA, Version 4, Volume 1: Distributed Relational Database Architecture (DRDA) iii Contents 4.3.1.8 Dictionary........................................................................................... 73 4.3.1.9 Resynchronization Manager............................................................ 73 4.3.1.10 Sync Point Manager.......................................................................... 73 4.3.1.11SQL Application Manager ............................................................... 74 4.3.1.12 Relational Database Manager.......................................................... 76 4.3.1.13 CCSID Manager ................................................................................. 77 4.3.1.14 XA Manager ....................................................................................... 77 4.3.2 The DRDA Processing Model Flow................................................... 78 4.3.3 Product-Unique Extensions................................................................ 84 4.3.4 Diagnostic and Problem Determination Support in DRDA .......... 84 4.3.5 Intermediate Server Processing .......................................................... 85 4.3.5.1 Overview and Terminology ............................................................. 85 4.3.5.2 Examples ............................................................................................ 86 4.4 DDM Commands and Replies .............................................................. 88 4.4.1 Accessing aRemote Relational Database Manager ........................ 89 4.4.2 DRDA Security Flows ......................................................................... 97 4.4.2.1 Identification and Authentication Security Flows ....................... 97 4.4.2.2 Security-Sensitive Data Encryption Security Flow ...................... 111 4.4.2.3 Intermediate Server Processing Security Flow for Security-Sensitive Data Encryption................................................ 117 4.4.2.4 Trusted Application Server.............................................................. 119 4.4.2.5 Establishing aTrusted Connection ................................................. 119 4.4.2.6 Switch ID Associated with a Trusted Connection........................ 123 4.4.3 Performing the Bind Operation and Creating a Package............... 127 4.4.3.1 Perform the Bind Copy Operation to Copy an Existing Package................................................................................ 132 4.4.3.2 Perform the Bind Deploy Operation to Deploy an Existing Package................................................................................ 136 4.4.4 Deleting an Existing Package ............................................................. 139 4.4.4.1 Delete Many Existing Packages ...................................................... 141 4.4.5 Performing aRebind Operation......................................................... 143 4.4.6 Activating and Processing Queries ................................................... 145 4.4.6.1 Fixed Row Protocol ........................................................................... 148 4.4.6.2 Limited Block Protocol (No FD:OCA Generalized String Data in Answer Set)................ 157 4.4.6.3 Limited Block Protocol (FD:OCA Generalized String Data in Answer Set) ...................... 164 4.4.7 Executing aBound SQL Statement.................................................... 171 4.4.7.1 Executing Ordinary Bound SQL Statements................................. 171 4.4.7.2 Invoking aStored Procedurethat Returns Result Sets................ 177 4.4.7.3 Executing Chained Ordinary Bound SQL Statements as an Atomic Operation ................................................................... 188 4.4.7.4 Executing Bound SQL Statement with Array Input .................... 193 4.4.8 Preparing an SQL Statement .............................................................. 195 4.4.9 Retrieving the Data Variable Definitions of an SQL Statement ...................................................................................... 198 4.4.10 Executing aDescribe Table SQL Statement...................................... 200 4.4.11Executing a Dynamic SQL Statement ............................................... 202