Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

DB2 10.1 DBA for Linux, UNIX, and Windows certification exam 611 prep, Part 8: Connectivity and networking

Darliene Hopes (dlhopes@us.ibm.com), DB2 Solution Migration Consultant, IBM
Darliene Hopes
Darliene Hopes is a DB2 solution migration consultant at IBM. She has been working with DB2 for Linux, UNIX, and Windows since the start of her career. She is an IBM Certified DB2 database administrator who has been recently and consistently contributing to the DB2 community.

Summary:  This tutorial aims to explain the process of configuring communications and the processes of cataloging databases, remote servers (nodes), and Database Connection Services (DCS) databases. You will also get introduced to DB2® Discovery and learn how to manage connections to System z® and System i® host databases. You will also learn about Lightweight Directory Access Protocol (LDAP). This tutorial prepares you for Part 8 of the DB2® 10.1 DBA for Linux®, UNIX®, and Windows® certification exam 611.

View more content in this series

Date:  25 Oct 2012
Level:  Intermediate PDF:  A4 and Letter (389 KB | 20 pages)Get Adobe® Reader®

Comments:  

Cataloging remote servers and databases

After a server is configured for communications, all clients that wish to access the database on the server must be configured to communicate with the server. After that entries from the server and the remote database must be added to the system database and node directories on the client. If the client intends to connect to a System z or System i database via DB2 Connect, entries must also be added to the DCS directory. This is done through a process called cataloging, in which entries are added to DB2's directories.

Cataloging a DB2 database

Most users never have to be concerned with the cataloging process since databases are cataloged implicitly upon creation. But, if you intend on accessing a database stored on a remote server, you must get familiar with the process of cataloging DB2 databases. It can be done using Data Studio or by executing the CATALOG DATABASE command.


Listing 1. Cataloging a database syntax
                         
CATALOG [DATABASE | DB] [DatabaseName]
<AS [Alias]>
<ON [Path] | AT NODE [NodeName]>
<AUTHENTICATION [AuthenticationType]>
<WITH "[Description]">
                    


Table 1. Cataloging a database attributes
DatabaseNameAliasPathNodeNameAuthenticationTypeDescription
Name assigned to database being catalogedAlias assigned to database when catalogedLocation (drive or directory) where directory hierarchy and files associated with the database to be cataloged are physically storedNode where database to be cataloged resides; should match an intro in node directory fileIdentifies where and how authentication is to take place when user attempts to access the databaseComment describing the database entry to be made in the database directory for the database to be cataloged (must be enclosed in quotation marks)

Example: To catalog a database physically residing in directory /home/db2info and has been given the name DUMMY_DB, execute the following CATALOG DATABASE command:

 
CATALOG DATABASE dummy_db AS test
ON /home/db2info
AUTHENTICATION SERVER
                


Cataloging a remote server (node)

The process involved in cataloging nodes (servers) is different from the one used to catalog databases. Usually, nodes are implicitly cataloged when a remote database is cataloged via Data Studio. To explicitly catalog a node (server) you can execute the CATALOG … NODE command that corresponds to the communications protocol being used to access the server being cataloged. There are different forms of the command, including:

  • CATALOG LOCAL NODE
  • CATALOG LDAP NODE
  • CATALOG NAMED PIPE NODE
  • CATALOG TCPIP NODE

The syntax for these commands are similar except that many options available are specific to the communications protocol for which the command is tailored. Since TCP/IP is the most common communication protocol used, we'll look at the syntax for that form of the CATALOG … NODE command.


Listing 2. Cataloging a remote server syntax
                     
CATALOG <ADMIN> [TCPIP | TCPIP4 | TCPIP6] NODE [NodeName]
REMOTE [IPAddress | HostName]
SERVER [ServiceName | PortNumber]
<SECURITY SOCKS>
<REMOTE INSTANCE [InstanceName]>
<SYSTEM [SystemName]>
<OSTYPE [SystemType]>
<WITH "[Description]">
                    


Table 2. Cataloging remote server attributes
NodeNameIPAddressHostNameServiceNamePortNumberInstanceNameSystemNameSystemNameDescription
Alias to be assigned to the node to be catalogedIP address of the server where the remote database you are trying to communicate with resides (IPv4/IPv6)Host name as it is known to the TCP/IP network (the name of the server where remote database you are trying to communicate with resides)Service name that the DB2 Database Manger instance on the server uses to communicatePort number the DB2 Database Manager instance on the server uses to communicate Name of the server instance to which an attachment is to be madeDB2 system name used to identify the server workstationType of OS being used on the server workstation (AIX®, Windows®, HP-UX, Sun, OS/390®, OS/400®, VM, VSE, and Linux®)Comment used to describe the node entry to be made in the node directory for the node being cataloged (must be enclosed in quotation marks)

Either the remote TCP/IP hostname or the remote IP address can be used to catalog a node. Similarly, the remote TCP/IP service name or the remote TCP/IP port number can be used when cataloging a node.

Example 1: To catalog a node for an AIX server named DB2HOST that has a DB2 instance named DB2INST1 that listens on port 60001, and assign it the alias REMOTE_SV, execute the following command:

 
CATALOG TCPIP NODE remote_sv
REMOTE db2host
SERVER 60001
OSTYPE AIX
WITH "A remote AIX TCP/IP node" 
                

Example 2: To catalog a node for a Linux server that has the IPv4 address 192.0.32.71 and a DB2 instance named DB2INST1 listening on port 50001, and assign it the alias SERVER1, you can do so by executing a command that looks like this:

 
CATALOG TCPIP4 NODE server1
REMOTE 192.0.32.71
SERVER 50001
OSTYPE LINUX
                

More examples are available: Configuring client-to-server connections using the command line processor.


Cataloging a DCS database

Cataloging a Database Connection Services (DCS) database is similar to cataloging a regular DB2 database. To catalog the database, you use the CATALOG DCS DATABASE command with the following syntax:


Listing 3. CATALOG DCS DATABASE command syntax
                     
CATALOG DCS [DATABASE | DB] [ALIAS]
<AS [TargetName]>
<AR [LibraryName]>
<PARMS "[ParameterString]">
<WITH "[Description]">
                


Table 3. CATALOG DCS DATABASE attributes
AliasTargetNameLibraryNameParameterStringDescription
Alias of the target database to be catalogedName of the target host database to be catalogedName of the application requester library to be loaded and used to access the remote database listed in the DCS directory (must be enclosed in quotation marks)Parameter string to be passed to the application requester when invokedComment describing the database entry to be made in the DCS directory for the database to be cataloged (must be enclosed in quotation marks)

Example: To catalog a DB2 for z/OS database residing in the TEST_DB subsystem on the z/OS server that has the name INFO and assign it the alias DATA_SYS, you could do so by executing a CATALOG DCS DATABASE command:

 
CATALOG DCS DATABASE data_sys
AS test_db
WITH "DB2 for z/OS LOCATION NAME TEST_DB"
                

More information is available: Configuring client-to-server connections using the command line processor.

3 of 9 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=842457
TutorialTitle=DB2 10.1 DBA for Linux, UNIX, and Windows certification exam 611 prep, Part 8: Connectivity and networking
publish-date=10252012
author1-email=dlhopes@us.ibm.com
author1-email-cc=