1、Reference numberISO/IEC 9579:2000(E)ISO/IEC 2000Information technology Remotedatabase access for SQL with securityenhancementTechnologies de linformation Accs la base de donnes distancepour SQL avec scurit accrueNational Standard of CanadaCAN/CSA-ISO/IEC 9579:04(ISO/IEC 9579:2000)International Stand
2、ard ISO/IEC 9579:2000 (second edition, 2000-02-15) has been adopted without modification(IDT) as CSA Standard CAN/CSA-ISO/IEC 9579:04, which has been approved as a National Standard of Canada bythe Standards Council of Canada.ISBN 1-55397-494-8 January 2004The Canadian Standards Association (CSA), T
3、he Standards Council of Canada is theunder whose auspices this National Standard has been coordinating body of the National Standards system, produced, was chartered in 1919 and accredited by a federation of independent, autonomousthe Standards Council of Canada to the National organizations working
4、 towards the furtherStandards system in 1973. It is a not-for-profit, development and improvement of voluntarynonstatutory, voluntary membership association standardization in the national interest.engaged in standards development and certification The principal objects of the Council are to foster
5、activities. and promote voluntary standardization as a means CSA standards reflect a national consensus of of advancing the national economy, benefiting theproducers and users including manufacturers, health, safety, and welfare of the public, assisting consumers, retailers, unions and professional
6、and protecting the consumer, facilitating domestic organizations, and governmental agencies. The and international trade, and furthering internationalstandards are used widely by industry and commerce cooperation in the field of standards.and often adopted by municipal, provincial, and A National St
7、andard of Canada is a standard whichfederal governments in their regulations, particularly in has been approved by the Standards Council ofthe fields of health, safety, building and construction, Canada and one which reflects a reasonableand the environment. agreement among the views of a number of
8、capableIndividuals, companies, and associations across individuals whose collective interests provide to theCanada indicate their support for CSAs standards greatest practicable extent a balance ofdevelopment by volunteering their time and skills to representation of producers, users, consumers, and
9、CSA Committee work and supporting the Associations others with relevant interests, as may be appropriateobjectives through sustaining memberships. The more to the subject in hand. It normally is a standardthan 7000 committee volunteers and the 2000 which is capable of making a significant and timely
10、sustaining memberships together form CSAs total contribution to the national interest.membership from which its Directors are chosen. Approval of a standard as a National Standard ofSustaining memberships represent a major source of Canada indicates that a standard conforms to theincome for CSAs sta
11、ndards development activities. criteria and procedures established by the StandardsThe Association offers certification and testing Council of Canada. Approval does not refer to theservices in support of and as an extension to its technical content of the standard; this remains thestandards developm
12、ent activities. To ensure the continuing responsibility of the accreditedintegrity of its certification process, the Association standards-development organization.regularly and continually audits and inspects products Those who have a need to apply standards arethat bear the CSA Mark. encouraged to
13、 use National Standards of CanadaIn addition to its head office and laboratory complex whenever practicable. These standards are subject in Toronto, CSA has regional branch offices in major to periodic review; therefore, users are cautioned centres across Canada and inspection and testing to obtain
14、the latest edition from the organizationagencies in eight countries. Since 1919, the preparing the standard.Association has developed the necessary expertise to The responsibility for approving National Standards meet its corporate mission: CSA is an independent of Canada rests with theservice organ
15、ization whose mission is to provide an Standards Council of Canadaopen and effective forum for activities facilitating the 270 Albert Street, Suite 200exchange of goods and services through the use of Ottawa, Ontario, K1P 6N7standards, certification and related services to meet Canadanational and in
16、ternational needs.For further information on CSA services, write toCanadian Standards Association5060 Spectrum Way, Suite 100Mississauga, Ontario, L4W 5N6CanadaAlthough the intended primary application of this Standard is stated in its Scope, it is importantto note that it remains the responsibility
17、 of the users to judge its suitability for their particular purpose.Registered trade-mark of Canadian Standards AssociationCAN/CSA-ISO/IEC 9579:04 Information technology Remote database access for SQL with security enhancementJanuary 2004 Canadian Standards Association CSA/1CAN/CSA-ISO/IEC 9579:04In
18、formation technology Remotedatabase access for SQL withsecurity enhancementCSA PrefaceStandards development within the Information Technology sector is harmonized with internationalstandards development. Through the CSA Technical Committee on Information Technology (TCIT),Canadians serve as the Cana
19、dian Advisory Committee (CAC) on ISO/IEC Joint Technical Committee 1 onInformation Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the ISO memberbody for Canada and sponsor of the Canadian National Committee of the IEC. Also, as a member of theInternational Telecommunication Uni
20、on (ITU), Canada participates in the International Telegraph andTelephone Consultative Committee (ITU-T).This International Standard was reviewed by the CSA TCIT under the jurisdiction of the StrategicSteering Committee on Information Technology and deemed acceptable for use in Canada. (Acommittee m
21、embership list is available on request from the CSA Project Manager.) From time to time,ISO/IEC may publish addenda, corrigenda, etc. The CSA TCIT will review these documents for approvaland publication. For a listing, refer to the CSA Information Products catalogue or CSA Info Update orcontact a CS
22、A Sales representative. This Standard has been formally approved, without modification, bythe Technical Committee and has been approved as a National Standard of Canada by the StandardsCouncil of Canada.January 2004 Canadian Standards Association 2004All rights reserved. No part of this publication
23、may be reproduced in any form whatsoever without the prior permission ofthe publisher. ISO/IEC material is reprinted with permission. Where the words “this International Standard” appear in thetext, they should be interpreted as “this National Standard of Canada”.Inquiries regarding this National St
24、andard of Canada should be addressed to Canadian Standards Association 5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N6 1-800-463-6727 416-747-4044www.csa.caReference numberISO/IEC 9579:2000(E)ISO/IEC 2000INTERNATIONALSTANDARDISO/IEC9579Second edition2000-02-15Information technolog
25、y Remotedatabase access for SQL with securityenhancementTechnologies de linformation Accs la base de donnes distancepour SQL avec scurit accrueISO/IEC 9579:2000(E)PDF disclaimerThis PDF file may contain embedded typefaces. In accordance with Adobes licensing policy, this file may be printed or viewe
26、d but shall notbe edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading thisfile, parties accept therein the responsibility of not infringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in thi
27、sarea.Adobe is a trademark of Adobe Systems Incorporated.Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameterswere optimized for printing. Every care has been taken to ensure that the file is suitable for use
28、by ISO member bodies. In the unlikely eventthat a problem relating to it is found, please inform the Central Secretariat at the address given below. ISO/IEC 2000All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, ele
29、ctronicor mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISOs member bodyin the country of the requester.ISO copyright officeCase postale 56 Gb7 CH-1211 Geneva 20Tel. + 41 22 749 01 11Fax + 41 22 734 10 79E-mail copyrightiso.ch
30、Web www.iso.chii ISO/IEC 2000 All rights reserved ISO/IEC ISO/IEC 9579:2000 (E)Remote Database Access for SQL (RDA/SQL) iiiContents Contents . . iiiTables . . viii Figures . i xForewor d . . x Introductio n . . xi 1 Scop e . . 1 2 Normative Reference s . . 3 2.1 International Standards . . 3 2.2 Int
31、ernet Engineering Task Force . . 3 2.3 Institute of Electrical and Electronics Engineer s . . 4 3 Interoperabilit y . . 5 3.1 Interoperability between implementation s . 5 3.2 Interope rability with conforming OSI implementation s . 5 3.3 Interoperability with future edition s . . 5 4 Definitions, C
32、onventions and Notation s . . 6 4.1 Definition s . . 6 4.2 Convention s . . 7 4.2.1 Convention for Figure s . 7 4.2.2 Naming of Concept s . 7 4.2.3 Naming of Parameter s . 7 4.2.4 Specifica tion of RDA Protocol, RDA Operations and RDA encoding element s . 7 4.2.5 Evaluation of Rule s . 7 ISO/IEC 957
33、9:2000 (E) ISO/IECiv Contents4.3 Notation s . . 9 4.3.1 SQL/CLI function s . 9 4 .3.2 Implicit encoding definition s . 9 4.3.3 Encoding Attribute s . . 9 4.3.4 Notation for encoding synta x . . 9 5 Model and Facilitie s . 10 5.1 Mode l . 10 5.2 The RDA - client environmen t. . 11 5.2.1 Service Use r
34、 . 11 5.2.2 SQL - client Service s . . 11 5.2.3 RDA - client Service s . 125.2.4 Transport Mappin g . 12 5.2.5 RDA - clien t . 12 5.2.6 RDA Location Server . . 13 5.3 The RDA - server environmen t . 14 5.3.1 Transpo rt Mappin g . 14 5.3.2 RDA - server Service s . . 14 5.3.3 RDA - serve r. . 15 5.3.4
35、 SQL - serve r . 15 5.3.5 RDA Support Serve r . 15 5.4 RDA concepts and the mapping of SQL/CLI concept s . . 16 5.4.1 Application Communication Area s . . 16 5.4.1.1 Attribute s . . 16 5.4.1.2 Diagnostics area s . . 16 5.4.1.3 Descriptor area s . . 16 5.4.2 SQL_TEX T . . 17 5.4.3 SQL - session and S
36、QL - connectio n . 17 5.4.4 SQL User Name and Password . . 17 5.4.5 Multi - site Transactions . . 17 5.4.6 SQL/CLI Handle s . 17 5.4.7 Connection Iden t . 18 5.4.8 Statement Iden t . 18 5.4.9 Request Iden t. . 18 5.4.10 Encoding s . 18 5.5 RDA Model of Transpor t. . 19 5.5.1 Transport Provide r. . 1
37、9 5.5.2 Transport Addres s . 19 5. 5.3 Destination SQL - server Nam e . 19 5.5.4 Transport Connectio n . . 19 5.5.5 Transport Facilitie s . 19 5.6 RDA Facilities for Transport Connection s . 21 5.6.1 RDA Suspend and Resume Facilit y . 21 5.6.2 RDA Encoding Facilit y . 21 5.7 RDA Facilities for Trans
38、action Co - ordinatio n . 22 5.7.1 RDA Transaction Co - ordination Facilit y . 22 ISO/IEC ISO/IEC 9579:2000 (E)Remote Datab ase Access for SQL (RDA/SQL) v5.8 RDA Facilities for Securit y . 23 5.8.1 RDA Security Service s . 23 5.8.2 Use of Transport Provider security facilitie s . . 23 5. 8.3 Use of
39、Authentication in RDAConnec t . . 24 5.8.4 Use of MessageAuthentication in RDAMessag e . . 24 6 RDA Protoco l . 26 6.1 The RDA Protocol Exchang e . . 26 6.2 RDAMessag e . . 27 6.2.1 RDAMessage protocol elemen t . 27 6.2.2 MessageAuthentication encoding elemen t . 30 6.3 Invocation of RDA Operation s
40、 . . 32 6.3.1 Invocation of the Request in the RDA - client environmen t . 32 6.3.2 Evaluation of the Request in the RDA - server environmen t . . 33 6.3.3 Invocation of the Response in the RDA - server en vironmen t . . 34 6.3.4 Evaluation of the Response in the RDA - client environment . 35 6.3.5
41、Transport Fail Indicatio n . 35 7 RDA Operations . 37 7. 1 RDA request operation s . . 37 7.1.1 RDAConnect Operatio n . . 37 7.1.2 RDADisconnect Operation . . 40 7.1.3 RDAEndTran Operatio n . 41 7.1.4 RDAClient Attribute Operatio n . . 43 7.1.5 RDAStatementPrepare Operatio n . . 44 7.1.6 RDAStatemen
42、tDeallocate Operatio n . 45 7.1.7 RDAStatementExecute Operatio n . 46 7.1.8 RDAStatementExecDirect Operatio n . . 49 7.1.9 RDAStatementFetchRows Operatio n . . 50 7.1.10 RDAStatementCloseCursor Operatio n . . 52 7.1.11 RDAStatementCancel Operat io n . 53 7.1.12 RDASetCursorName Operatio n . . 54 7.1
43、.13 RDAGetCursorName Operatio n . . 55 7.1.14 RDAGetInfo Operatio n . 56 7.1.15 RDAGetTypeInfo Op eratio n . 57 7.2 RDA response encoding elemen t . 58 7.3 Encoding component s . 62 7.3.1 RDAAttribute encoding elemen t . 62 7.3.2 RDADiagnostic an d RDADiagnosticStatus encoding elements . . 65 7.3.3
44、RDAItemDescriptor encoding elemen t . . 66 7.3.4 RDARow and RDAValue encoding element s . . 68 8 Exception s . . 69 8.1 Exception codes for RDA - specific Condition s . 69 ISO/IEC 9579:2000 (E) ISO/IECvi Contents8.2 Exception Behaviou r . 70 9 Encoding s . 71 9.1 The Base Encodin g . 72 9.2 The ASN.
45、1 PER Encodin g . . 73 10 Transport Mapping s . . 74 10.1 Mapping to TCP/I P . 75 10.1.1 Transport Addres s . 75 10.1.2 Mapping of Transport Con nec t . . 75 10.1.3 Mapping of Transport Disconnec t . 75 10.1.4 Mapping of Transport Fai l. . 75 10.1.5 Mapping of Transport Sen d . 75 10.1.6 Mapping of
46、Transport Receiv e . . 75 10.1.7 Mapping of Transport Error s . 75 10.1.8 Default Encodin g . . 75 10.2 Mapping to TLS . . 76 10.2.1 Mapping of Trans port Connec t . . 76 10.2.2 Mapping of encoding s . 76 10.2.3 Mapping of Transport Error s . 76 10.2.4 Provision of mandatory security facilitie s . .
47、 76 10.2.5 Provision of optional security facilitie s . . 76 11 Conformanc e . . 77 11.1 RDA - client Conformanc e . 77 11.2 RDA - server Conformanc e . 77 11 .3 Claims of Conformanc e . . 77 Annex A Conformance Proform a . 79 A.1. Identificatio n . . 79 A.2. Supplier Detail s . . 79 A.3. Implementa
48、tion Detail s . 80 A.4. RDA Suppor t. . 80 A.5. Optional facilities for RDA - clients onl y . . 81 A.6. Optional facilities for RDA - servers onl y . 82 Annex B RDA Pro gramming Interfac e . 83 B.1. Notation for defining RDA/API function s . 84 B.2. Mapping RDA/API to a programming languag e . . 84
49、B.3. Transport Handle s . 84 ISO/IEC ISO/IEC 9579:2000 (E)Remote Datab ase Access for SQL (RDA/SQL) viiB.4. Transport Mapping Code s . 84 B.5. Transport Connection Managemen t . 85 B.6. RDA/API function s . 85 B.7. RDA/API function invocatio n . 85 B.8. RDA/API function parameter s . . 86 Annex C Mapping of SQL/CL I . 93 C.1. SQLDisconnec t . 94 C.2. SQLEndTra n .