ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddp_5.4.0.1/rbal1rddsetupexample.htm

167 lines
11 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Example: Set up a relational database directory" />
<meta name="abstract" content="The Spiffy Corporation network provides an example to illustrate how the relational database directory is used on servers in a distributed relational database network and show how each is set up. The example assumes the use of Advanced Program-to-Program Communication (APPC) for communications, as opposed to TCP/IP, which would be simpler to set up." />
<meta name="description" content="The Spiffy Corporation network provides an example to illustrate how the relational database directory is used on servers in a distributed relational database network and show how each is set up. The example assumes the use of Advanced Program-to-Program Communication (APPC) for communications, as opposed to TCP/IP, which would be simpler to set up." />
<meta name="DC.subject" content="relational database directory, set up example, examples, using CL programs" />
<meta name="keywords" content="relational database directory, set up example, examples, using CL programs" />
<meta name="DC.Relation" scheme="URI" content="rbal1rdbdir.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/addrdbdire.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/chgrdbdire.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/crtctlappc.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/dspneta.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/dsprdbdire.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1savrdbd.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal1rddsetupexample" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Example: Set up a relational database directory</title>
</head>
<body id="rbal1rddsetupexample"><a name="rbal1rddsetupexample"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Set up a relational database directory</h1>
<div><p>The Spiffy Corporation network provides an example to illustrate
how the relational database directory is used on servers in a distributed
relational database network and show how each is set up. The example assumes
the use of Advanced Program-to-Program Communication (APPC) for communications,
as opposed to TCP/IP, which would be simpler to set up.</p>
<div class="section"><p>However, some elements of the example are protocol-independent.
The RDB directory entries needed for APPC use are also needed in a TCP/IP
network, but the parameters differ. Host names or IP addresses and port identifications
would replace logical unit (LU) names, device descriptions, modes, TPNs, and
so forth.</p>
</div>
<div class="section"><p>A simple relationship to consider is the one between two regional
offices as shown in the following figure:</p>
</div>
<div class="example"> <div class="fignone"><span class="figcap">Figure 1. Relational database directory set up for two servers</span><br /><img src="rv2w737.gif" alt="Relational Database Directory Set up for Two servers" /><br /></div>
</div>
<div class="section"><div class="p">The relational database directory for each regional office must
contain an entry for the local relational database and an entry for the remote
relational database because each server is both an application requester (AR)
and an application server (AS). The commands to create the relational database
directory for the MP000 server are: <pre>ADDRDBDIRE RDB(MP000) RMTLOCNAME(*LOCAL) TEXT('Minneapolis region database')
ADDRDBDIRE RDB(KC000) RMTLOCNAME(KC000) TEXT('Kansas City region database')</pre>
</div>
</div>
<div class="section"><div class="p">In the preceding example, the MP000 server identifies itself as
the local relational database by specifying *LOCAL for the RMTLOCNAME parameter.
There is only one relational database on an <span class="keyword">iSeries™ server</span>.
You can simplify identification of your network relational databases by making
the relational database names in the RDB directory the same as the server
name. The entry for the local location can have the same name as the local
server name, and the entry for the remote location name can have the same
name as the remote server name. <div class="note"><span class="notetitle">Note:</span> The server name is specified
on the SYSNAME parameter of the <span class="cmdname">Change Network Attributes (CHGNETA)</span> command.
The local server is identified on the LCLLOCNAME parameter of the <span class="cmdname">CHGNETA</span> command
during communications configuration. Remote locations using SNA (APPC) are
identified with the RMTCPNAME parameter on the <span class="cmdname">Create Controller
Description (APPC) (CRTCTLAPPC)</span> command during communications configuration.
Using the same names for server names, network locations, and database names
can help avoid confusion, particularly in complex networks.</div>
</div>
</div>
<div class="section"><div class="p">The corresponding entries for the KC000 server relational database
directory are: <pre>ADDRDBDIRE RDB(KC000) RMTLOCNAME(*LOCAL) TEXT('Kansas City region database')
ADDRDBDIRE RDB(MP000) RMTLOCNAME(MP000) TEXT('Minneapolis region database')</pre>
</div>
</div>
<div class="section"><p>A more complex example to consider is that of a regional office
to its dealerships. For example, to access relational databases in the network
shown in the following figure, the relational database directory for MP000
server must be expanded to include an entry for each of its dealerships.</p>
</div>
<div class="example"> <div class="fignone"><span class="figcap">Figure 2. Relational database directory setup for multiple servers</span><br /><img src="rv2w738.gif" alt="Relational database directory setup for multiple servers" /><br /></div>
</div>
<div class="section"><p>A sample of the commands used to complete the MP000 relational
database directory to include all its dealer databases is as follows: </p>
</div>
<div class="section"><div class="p"><pre>PGM
ADDRDBDIRE RDB(MP000) RMTLOCNAME(*LOCAL) +
TEXT('Minneapolis region database')
ADDRDBDIRE RDB(KC000) RMTLOCNAME(KC000)
TEXT('Kansas City region database')
ADDRDBDIRE RDB(MP101) RMTLOCNAME(MP101)
TEXT('Dealer database MP101')
ADDRDBDIRE RDB(MP002) RMTLOCNAME(MP110)
TEXT('Dealer database MP110')
.
.
.
ADDRDBDIRE RDB(MP215) RMTLOCNAME(MP201)
TEXT('Dealer database MP201')
ENDPGM</pre>
</div>
</div>
<div class="section"><p>In the preceding example, each of the region dealerships is included
in the Minneapolis relational database directory as a remote relational database.</p>
</div>
<div class="section"><p>Because each dealership can serve as an AR to MP000 and to other
dealership application servers, each dealership must have a relational database
directory that has an entry for itself as the local relational database and
the regional office and all other dealers as remote relational databases.
The database administrator has several options to create a relational database
directory at each dealership server.</p>
</div>
<div class="section"><p>The most time-consuming and error-prone method is to create a
relational database directory at each server by using the <span class="cmdname">Add Relational
Database Directory Entry (ADDRDBDIRE)</span> command to create each directory
entry on all servers that are part of the MP000 distributed relational database
network.</p>
</div>
<div class="section"><p>A better alternative is to create a control language (CL) program
like the one shown in the preceding example for the MP000. The distributed
relational database administrator can copy this CL program for each of the
dealership servers. To customize this program for each dealership, the database
administrator changes the remote location name of the MP000 server to MP000,
and changes the remote location name of the local dealership to *LOCAL. The
distributed relational database administrator can distribute the customized
CL program to each dealership to be run on that server to build its unique
relational database directory.</p>
</div>
<div class="section"><p>A third method is to write a program that reads the relational
database directory information sent to an output file as a result of using
the <span class="cmdname">Display Relational Database Directory Entry (DSPRDBDIRE)</span> command.
This program can be distributed to the dealerships, along with the output
file containing the relational database directory entries for the MP000 server.
Each server could read the MP000 output file to create a local relational
database directory. The <span class="cmdname">Change Relational Database Directory Entry
(CHGRDBDIRE)</span> command can then be used to customize the MP000 server
directory for the local server. </p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1rdbdir.htm" title="The i5/OS licensed program uses the relational database directory to define the relational database names that can be accessed by applications running on an iSeries server, to specify if the connection uses Systems Network Architecture (SNA) or IP, and to associate these relational database names with their corresponding network parameters.">Use the relational database directory</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="rbal1savrdbd.htm" title="The relational database directory is not an iSeries object. Instead it is made up of files that are opened by the server at IPL time.">Save and restore relational database directories</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../cl/addrdbdire.htm">Add Relational Database Directory Entry (ADDRDBDIRE) command</a></div>
<div><a href="../cl/chgrdbdire.htm">Change Relational Database Directory Entry (CHGRDBDIRE) command</a></div>
<div><a href="../cl/crtctlappc.htm">Create Controller Description (APPC) (CRTCTLAPPC) command</a></div>
<div><a href="../cl/dspneta.htm">Display Network Attributes (DSPNETA) command</a></div>
<div><a href="../cl/dsprdbdire.htm">Display Relational Database Directory Entry (DSPRDBDIRE) command</a></div>
</div>
</div>
</body>
</html>