Client-to-server
communications
configuration
overview
Thistopicprovidesinformationforchoosing asuitablemethodforconfiguring client-to-server communications.ThistopicappliestoconfiguringDB2clientand serverproductsratherthantodatabaseconnectivity driverslikeODBCorJDBC drivers.
Understandingclient-to-server communications:Components andscenarios: Thebasic componentsinvolvedinclient-to-servercommunicationsare described below:
v Client.Thisrefers totheinitiatorofthecommunications.Thisrole canbefilled byanyofthefollowingDB2 productsor components:
– DB2 ClientorDB2RuntimeClient.
– DB2 ConnectPersonal Edition:ThisproductisasupersetoftheDB2Client. – a DB2serverproduct:ADB2 serverisa supersetoftheDB2 Client.
v Server.Thisreferstothereceiverofthecommunicationsrequestfromtheclient. Thisrole isnormallyfilledbyaDB2forLinux,UNIX,andWindows server product.WhenDB2 Connectproductsare present,thetermservercanalso mean aDB2serverona midrangeormainframeplatform.
v Communicationsprotocol.Thisreferstotheprotocolusedtosend databetween theclientand server.TheDB2 productsupportsseveralprotocols:
– TCP/IP.Afurtherdistinctioncanbe madebetweentheversion:TCP/IPv4or TCP/IPv6.
– Named Pipes.ThisoptionisavailableonWindows only.
– IPC(interprocesscommunications).Thisprotocolisusedforlocal connections.
Thereare alsosomeadditionalcomponentsencounteredinsomeenvironments: v DB2Connectgateway.ThisreferstoaDB2ConnectServer productthat
providesagatewaybywhichDB2clients canconnecttoDB2 serverson midrangeandmainframeproducts.
v LDAP(LightweightDirectoryAccessProtocol). Inan LDAP-enabled
environment,itisnotnecessarytoconfigureclient-to-servercommunications. Whena clientattemptstoconnectto adatabase,ifthedatabasedoesnotexistin thedatabase directoryonthelocalmachine thentheLDAPdirectoryissearched forinformationrequiredtoconnecttothedatabase.
Thescenarios listedbelowillustrateexamplesof situationscoveredby client-to-server communications:
v DB2Clientestablishescommunicationswith aDB2serverusingTCP/IP. v DB2RuntimeClientestablishes communicationswithaDB2 serverusing
NamedPipesonaWindows network.
v DB2serverestablishescommunicationswithanother DB2serverviasome communicationsprotocol.
v DB2Clientestablishescommunicationswith amainframeDB2serverviaa DB2 ConnectserverusingTCP/IP.
Understanding client-to-servercommunications:Types ofconnections:
Generallyspeaking, referencestosettingupclient-to-servercommunicationsrefer
toremote connections,ratherthanlocalconnections.
Alocalconnectionisaconnection betweena databasemanagerinstance anda
database managedbythatinstance.Inotherwords,theCONNECTstatementis issued fromthedatabasemanagerinstancetoitself.Localconnectionsare distinctive becausenocommunicationssetupisrequiredand IPC(interprocess communications)isused.
Aremote connectionisonewheretheclientissuingtheCONNECTstatementtoa
database isina differentlocationfromthedatabaseserver.Commonly,theclient and serverareondifferentmachines.However,remote connectionsarepossible within thesamemachineiftheclientand serverareindifferentinstances. Another lesscommontypeofconnection isa loopbackconnection.Thisisa typeof remote connectionwheretheconnectionisconfiguredfromaDB2instance (the client) tothesame DB2instance(theserver).
Comparisonof methodsforconfiguringclient-to-servercommunications: Several methodsare availableforconfiguringclient-to-servercommunications. Choosing asuitablemethodinvolvesanswering twoquestions. Thisfirst isWhich
tool willyou use:ConfigurationAssistantor commandline tools?
v TheConfigurationAssistantisa graphicaltoolprovidedwithversions ofthe DB2ClientandDB2serverproductsonWindowsand LinuxonIntel™x8632-bit platformsandAMD64/EM46Tplatforms.Thistoolisnotprovidedwith theDB2 RuntimeClient.
v ThecommandlinetoolsconsistoftheCommandLineProcessor(CLP),andthe commandsdb2cfexp(configurationexport),anddb2cfimp(configuration import).
The secondquestionis:Whattypeofconfigurationtaskdoyouwanttoperform? Options are:
v Configureaclientbyenteringinformationmanually.
v Configureaclientbysearchingthenetworkforserver(s)toconnectto. v Makedatabasesona serveraccessibletooneor moreclients.
v Usetheconnectionsettingsforoneclientasthebasisforconfiguringadditional clients.
With answerstothesequestions,youcanusethetablebelow toidentifythe appropriate configurationmethod.Linkstoeachmethodare providedattheend of thistopic.Notesfollowthetablethatprovidemoredetails.
Table6.Toolsandmethodsforconfiguringaclient-to-serverconnection
Typeofconfigurationtask ConfigurationAssistant Commandline Configureaclientby
enteringinformation manually
Configureadatabase connectionmanuallywith theConfigurationAssistant
Configureclient-to-server connectionsusingthe commandlineprocessor
Table6.Toolsandmethodsforconfiguringaclient-to-serverconnection (continued)
Typeofconfigurationtask ConfigurationAssistant Commandline Configureaclientby
searchingthenetworkfor server(s)toconnectto
Configureadatabase connectionbysearchingthe networkwiththe
ConfigurationAssistant
Notapplicable
Usetheconnectionsettings foroneclientasthebasisfor configuringadditionalclients
1. Createaclientprofile usingtheConfiguration Assistant
2. Configuredatabase connectionsusingaclient profilewiththe
ConfigurationAssistant
createanduseaclientprofile usingcommandsdb2cfexp anddb2cfimp
Note: Profilesare usedinsomemethodsforconfiguringclient-to-server
communications.Aclientprofileisafilethatcontains settingsfor aclient. Settingscaninclude:
v Databaseconnectioninformation(includingCLIorODBCsettings). v Clientsettings(includingdatabasemanagerconfigurationparametersand
DB2registryvariables).
v CLIorODBCcommonparameters.
Aserverprofileissimilartoaclient profilebutcontains settingsforaserver.
Profilescanbecreatedand usedwith theConfigurationAssistantorby usingthecommandsdb2cfexp (configurationexport),anddb2cfimp (configurationimport).
Note: Configuringa databaseconnectionbysearchingthenetworkwiththe ConfigurationAssistantisnota recommendedmethod forDB2Connect customersconnectingtodatabasesonmidrange ormainframeplatforms. Related concepts:
v Chapter1,“DB2clientsetupoverview,” onpage3
v “LDAPconsiderations fortheConfigurationAssistant”onpage50 Related tasks:
v “Configuringadatabaseconnectionbysearchingthenetworkusingthe ConfigurationAssistant”onpage46
v “ConfiguringadatabaseconnectionmanuallyusingtheConfigurationAssistant” onpage45
v “Configuringclient-to-serverconnectionsusingthecommandlineprocessor”on page51
v “Configuringdatabaseconnectionsusinga clientprofilewith theConfiguration Assistant”onpage48
v “Creatinga clientprofileusingtheConfigurationAssistant” onpage47 Related reference:
v “db2cfexp-Connectivity configurationexporttoolcommand”inCommand Reference
v “db2cfimp-Connectivityconfigurationimporttoolcommand”inCommand Reference
v “Communicationprotocolssupported”onpage42
v “Supportedcombinations ofclientandserverversions”onpage42
Communication
protocols
supported
Thistopicidentifies thesupportedprotocolsforconnecting fromaDB2clienttoa DB2 server.Thisincludes:
v connectingfromDB2clients tomidrangeormainframehosts usingDB2Connect products.
v connectingfrommidrangeormainframeplatformstodatabasesonDB2for Linux,UNIX,andWindows.
The TCP/IPprotocolissupportedonall platformsonwhichDB2forLinux,UNIX, and Windowsisavailable.BothTCP/IPv4andTCP/IPv6aresupported. IPv4 addresseshavea four-partstructure,forexample,9.11.22.314.IPv6addresses haveaneight-partname,where eachpartconsistsof4hexdigitsdelimitedbya colon.Two colons(::) representsoneormoresetsofzeros.For example,
2001:0db8:4545:2::09ff:fef7:62dc.
Inaddition,theWindowsNamed PipesprotocolissupportedonWindows networks.ToadministeraVersion9DB2 databaseremotely,youmust connect usingTCP/IP.
Related concepts:
v “Client-to-servercommunicationsconfigurationoverview”onpage39
Supported
combinations
of
client
and
server
versions
Thissectiondescribes whichversionsofa clientcanconnecttowhichversions ofa server.Thisincludessupport forearlierversionsand supportforaccessingDB2 databasesonmidrangeand mainframeservers.Forthemostup-to-date
information,seehttp://www.ibm.com/software/data/db2/udb/sysreqs.html Combinations ofDB2UDBVersion8 andDB2Version 9:
DB2 UDBVersion8iscompatiblewith DB2Version9.Thatis, clientsfromeither version canaccessaremote serverofeitherversion.Notethefollowingrestrictions: v Thereisa restrictionwhenaDB2client islocatedonthesamesystemasaDB2
server,and theyaredifferentversions.Inthiscase,localclient-to-server
connectionsusingInterprocessCommunication(IPC)arenotsupported.Instead, aconnectioncanbe establishedbytreating theconnection asa remote
connection(calledaloopback connection)usingTCP/IP.
AccesstoDB2Version 9serversfrom DB2UDBVersion7clients:
AccessfromDB2UDB Version7clientsissupportedbutwiththesamerestrictions asforaccessingDB2 UDBVersion8servers.RestrictionsthatapplytoallDB2UDB Version7 clientsinclude:
v DB2UDBVersion7clients supportonlySQLrequestsonaDB2Version9 server. Thereisnosupportforutility orAPIrequests.
v 32-bitDB2UDB Version7 clientssupport onlyconnectionstoDB2onWindows. Thereisnosupportforconnecting toDB2onotheroperatingsystems.To overcomethis restriction,usea32-bit DB2Connectgateway.
Additional restrictionsthatapplyto64-bit DB2UDBVersion7clients include: v 64-bitDB2UDB Version7 clientssupport onlyconnectionstoDB2onoperating
systemsotherthanWindows.
Combinations ofDB2Version9 andDB2productson midrangeandmainframe platforms:
DB2 Version9 forLinux,UNIX,and Windowsserverssupport accessfromthe followingDB2 clientsonmidrangeandmainframeplatforms:
v DB2forz/OSVersion7and Version8. v DB2foriSeriesVersion5.
v DB2forVMandVSEVersion7.
DB2 Version9 forLinux,UNIX,and Windowsclients canaccessthefollowing earlier versionsofDB2 Connect:
v DB2ConnectVersion8.
DB2 ConnectPersonal EditionVersion9 canconnecttothesameDB2 server versions ascanDB2Version9 clientsorservers.
Related concepts:
v “AbouttheReleaseNotes” inReleasenotes
v “Client-to-servercommunicationsconfigurationoverview”onpage39 v Chapter1,“DB2clientsetupoverview,” onpage3
v Chapter2,“Typesof clients-DB2Runtime ClientandDB2Client,”onpage5 v “Version9incompatibilitieswith previousreleasesand changedbehaviors”in