6.6. SummaryIn this chapter you learned the setup required to connect from a DB2 client to a DB2 server. Four supported connection scenarios were discussed in detail:
A local connection occurs when a DB2 client and a DB2 server reside on the same server. A connection from a DB2 client to a DB2 server requires that at least the DB2 Runtime Client be installed on the client machine. On the server machine, at least DB2 Workgroup Edition is required. A connection from a DB2 client to a DB2 host server requires that at least the DB2 Connect Personal Edition software be installed on the client machine. The supported host servers are DB2 for z/OS and OS/390 and DB2 for iSeries. TCP/IP is the supported communication protocol for all of the above connections. NetBIOS and Named Pipes are supported if both the client and the server are on Windows, and APPC is supported for outbound connection to DB2 host servers. Connectivity information is stored in four main directories: the system database directory, the local database directory, the node directory, and the DCS directory. The system database directory contains the names and aliases of both remote and local databases. The local database directory contains the names and aliases of databases that exist locally on a particular drive (on Windows) or path (on Linux/UNIX). The information about how to reach a remote server is stored in the client's node directory. For a TCP/IP connection, the remote server's host name or IP address and the DB2 port number are stored. To connect to a database residing on a host server, a DCS directory is also required. An entry in the DCS directory contains the actual database name known to the host server. There are two methods you can use to configure client-server connections:
If you use the CA, you can use any of the three CA methods:
After configuring the connections, you need to bind database utilities or else the client will not be able to use any of the database utilities such as import or export. Run the bind command on the db2ubind.lst file to bind database utilities. If the client is going to run CLI/ODBC applications, run the bind command on the db2cli.lst file as well to create CLI packages on the server. If the server is DB2 for z/OS or OS/390, use the ddcsmvs.lst file in the bind command. If the server is DB2 for iSeries, use the ddcs400.lst file. The binding of utilities must be done for each database you want to access. Once a package is successfully bound to the database, all DB2 clients of the same type and DB2 level can use it. |