Add RDB Directory Entry (ADDRDBDIRE)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Add Relational Database Directory Entry (ADDRDBDIRE) command allows you to add an entry to the relational database directory. Relational database (RDB) entries can represent local databases or remote databases. The RDB associated with an entry can also be classified as a system database or a user database.

There is only one system database per system. It is defined as the system auxiliary storage pool (ASP number 1) and configured basic user ASPs (ASP numbers 2-32). A system can be configured to have one or more user databases. A user database is defined to be an ASP group that is configured and available. Such a database is joined to the system database in such a way that all of the objects on the system database are also accessible through it.

As used in this context, 'system' can refer a locical partition of an iSeries machine configured with multiple partitions.

Local databases include the system database and any available user databases on this system. Remote databases normally reside on another system, but an unavailable ASP group configured on this system is also considered to be temporarily remote, because it might have been switched to another node within a cluster of systems.

Restriction: You must have execute authority to the application requester driver program to specify the program on this command.

Top


 

Parameters

Keyword Description Choices Notes
RDB Entry Element list Required, Key, Positional 1
Element 1: Relational database Character value
Element 2: Relational database alias Character value, *NONE
RMTLOCNAME Remote location Single values: *ARDPGM, *LOOPBACK
Other values: Element list
Required, Positional 2
Element 1: Name or address Character value, *LOCAL
Element 2: Type *SNA, *IP
TEXT Text Character value, *BLANK Optional
PORT Port number or service program Character value, *DRDA Optional
RMTAUTMTH Remote authentication method Element list Optional
Element 1: Preferred method *USRID, *USRIDPWD, *ENCRYPTED, *KERBEROS
Element 2: Allow lower authentication *ALWLOWER, *NOALWLOWER
DEV Device Element list Optional
Element 1: APPC device description Name, *LOC
LCLLOCNAME Local location Communications name, *LOC, *NETATR Optional
RMTNETID Remote network identifier Communications name, *LOC, *NETATR, *NONE Optional
MODE Mode Communications name, *NETATR Optional
TNSPGM Transaction program Character value, *DRDA Optional
ARDPGM Application requester driver Single values: *DRDA
Other values: Element list
Optional
Element 1: Program Qualified object name
Qualifier 1: Program Name
Qualifier 2: Library Name, *LIBL, *CURLIB

Top

 

Entry (RDB)

Specifies the relational database name information.

Valid relational database names and aliases must begin with a letter and consist of uppercase A-Z, 0-9, and underscore.

Element 1: Relational database

Specifies the relational database name as identified on the remote location. You can specify a maximum of 18 characters for the name. MVS relational databases allow a maximum of 16 characters.

Element 2: Relational database alias

Specifies the relational database alias. The alias is used for locally identifing the relational database specified above. You can specify a maximum of 18 characters for the alias.

Top

 

Remote location (RMTLOCNAME)

Specifies the remote location name of the system on which the RDB is located.

This is a required parameter.

The possible values are:

*LOCAL

This entry is the system database (system ASP and any basic ASPs) on this system. You can specify *LOCAL for only one entry in the RDB directory.

If *LOCAL is specified, the DEV, LCLLOCNAME, RMTNETID, MODE, TNSPGM and ARDPGM parameters are ignored, and the value of the second element is forced to *IP.

*LOOPBACK

This value is an alias for the IP address of the host system. It can be used for a user database (ASP group) on the local system.

If *LOOPBACK is specified, the DEV, LCLLOCNAME, RMTNETID, MODE, TNSPGM and ARDPGM parameters are ignored, and the value of the second element is forced to *IP.

*ARDPGM

The RDB is accessed by using the application requester driver program specified on the ARDPGM parameter. A remote location name is not used to locate the RDB.

If *ARDPGM is specified, the PORT, DEV, LCLLOCNAME, RMTNETID, MODE, and TNSPGM parameters are ignored.

remote-location-name

The first element of this parameter can be specified in several forms:

  • SNA remote location name (LU name). Specify a maximum of 8 characters for the remote location name. If this form is used, the second element of this parameter must be *SNA (the default).

  • SNA remote network identifier and remote location name separated by a period. Specify a maximum of 8 characters for the remote location name, and a maximum of 8 characters for the remote network identifier. If this form of the parameter is used, the second element of this parameter must be *SNA (the default), and any value specified for the RMTNETID parameter must agree. If the RMTNETID parameter is not specified, the RMTNETID value will be set to agree with the RMTLOCNAME parameter.

  • IP address in dotted decimal form. Specify an internet protocol address in the form nnn.nnn.nnn.nnn where each nnn is a number in the range 0 through 255. If this form is used, the second element of this parameter must be specified as *IP.

  • IP host domain name. Specify an internet host domain name of up to 254 characters in length. If this form is used, the second element of this parameter must be specified as *IP.

If *IP is specified for the second element, the DRDA application server at the remote location must support the use of TCP/IP, and the DEV, LCLLOCNAME, RMTNETID, MODE, and TNSPGM parameters will be ignored.

If *IP is not specified, the application server must support SNA connectivity. More information about SNA remote location names can be found in the APPC Programming book, SC41-5443 and the APPN Support information in the iSeries Information Center at http://www.iseries.ibm.com/infocenter.

Top

 

Text (TEXT)

Specifies the text that briefly describes the object.

The possible values are:

*BLANK

No text is specified.

'description'

Specify a maximum of 50 characters of text enclosed in apostrophes.

Top

 

Port number or service program (PORT)

Specifies the TCP/IP port that is used at the remote location to communicate with the system on which the RDB is located. This parameter will be ignored if *IP is not specified in the RMTLOCNAME parameter.

The possible values are:

*DRDA

The DRDA well-known port of 446 will be used.

port-number

Specify a number ranging from 1 through 65535.

service-name

Specify a maximum of 14 characters for the service name. This name must be registered in the service database file.

Top

 

Remote authentication method (RMTAUTMTH)

Specifies the preferred remote authentication method on a DDM/DRDA TCP/IP connection request. The actual method used depends on the outcome of the negotiation process between client and server, which depends on the cryptographic support available and the server security configuration. The CHGDDMTCPA (Change DDM TCP/IP Attributes) command can be used to configure DDM/DRDA TCP/IP security on iSeries servers. This parameter will be ignored if *IP is not specified in the Remote location (RMTLOCNAME parameter).

Element 1: Preferred method

Specifies the initial authentication method proposed to the server. Based on the authentication methods supported by the server and the value specified for the Allow lower authentication element of this parameter, an authentication method is negotiated that is acceptable to both the Application Requester and Application Server systems.

Possible values are:

*ENCRYPTED

User ID and associated encrypted password is sent on a DDM connection request. Cryptographic support must be available on both systems for this authentication method to be used.

*USRID

User ID only is sent on a DDM connection request. This is the lowest authentication method.

*USRIDPWD

User ID and associated password is sent on a DDM connection request. Passwords are not encrypted if this authentication method is used.

*KERBEROS

Authentication occurs using Kerberos. The RDB name must map to a target principal name in the Enterprise Identity Mapping (EIM) environment. Kerberos needs to be configured on both systems for this authentication method to be used.

Element 2: Allow lower authentication

Specifies whether an authentication method lower than what was specified for the Preferred method element of this parameter will be accepted during negotiation with the Application Server system. If the Application Server system is configured to require a higher authentication method than the value specified for the Preferred method element of this parameter and the Application Requester system can support a higher authentication method, the negotiated authentication method can always be higher than the Preferred method. From highest to lowest, the authentication methods are:

Possible values are:

*ALWLOWER

Allow negotiation of a lower authentication method than what was specified for the Preferred method element of this parameter.

*NOALWLOWER

Do not allow negotiation of a lower authentication method than what was specified for the Preferred method element of this parameter.

Top

 

Device (DEV)

Specifies the name of the advanced program-to-program communications (APPC) device description on this system that is used with this RDB entry.

More information on device names is in the APPC Programming book, SC41-5443.

The possible values are:

*LOC

If APPC is being used, the system determines which device description is used. If advanced peer-to-peer networking (APPN) is being used, the system ignores this parameter.

device-name

Specify a maximum of 10 characters for the name of a device description.

Top

 

Local location (LCLLOCNAME)

Specifies the local location name by which this system is identified to the system on which the RDB is located. The local location name cannot be the same as the remote location name.

The possible values are:

*LOC

If advanced program-to-program communications (APPC) is being used, the system determines which local location name is used. If advanced peer-to-peer networking (APPN) is being used, the system uses the default local location defined in the network attributes.

*NETATR

The LCLLOCNAME value specified in the system network attributes is used.

local-location-name

Specify a maximum of 8 characters for the local location name.

Top

 

Remote network identifier (RMTNETID)

Specifies the remote network identifier of the system on which the RDB is located. If this parameter is specified, the RMTLOCNAME parameter must be consistent with this RMTNETID parameter. If the RMTLOCNAME parameter specified a network ID, this parameter must agree (otherwise, an error message will be issued). If the RMTLOCNAME parameter does not specify any network ID, there is no possibility of conflict with this parameter.

More information on remote network identifiers is in the APPC Programming book, SC41-5443.

The possible values are:

*LOC

If advanced program-to-program communications (APPC) is being used, the system determines which remote network identifier is used. If advanced peer-to-peer networking (APPN) is used, the system uses the local network identifier defined in this system's network attributes for the remote network identifier.

*NETATR

The remote network identifier specified in the network attributes is used.

*NONE

No remote network identifier (ID) is used.

remote-network-identifier

Specify a maximum of 8 characters for the remote network identifier.

Top

 

Mode (MODE)

Specifies the mode name to use with the remote location name to communicate with the system on which the RDB is located.

The possible values are:

*NETATR

The mode in the network attributes is used.

BLANK

A mode name of all blanks is used.

mode-name

Specify a maximum of 8 characters for the mode name.

Top

 

Transaction program (TNSPGM)

Specifies the name of the transaction program to use with the RDB entry.

The possible values are:

*DRDA

The distributed relational database architecture (DRDA) transaction program name, X'07F6C4C2', is used. DRDA is a means by which RDBs communicate with each other over a network.

transaction-program-name

Specify the transaction program name in one of the following formats:

  • A 4-byte hexadecimal name, which is entered by enclosing the 8 hexadecimal digits in apostrophes with a prefix of X. For example, X'07F6C4C2' is a 4-byte hexadecimal name.

  • An 8-byte character name.

If you are typing a hexadecimal value on a command prompt and the prompt is too small for the number of characters you want to type, type an ampersand (&) to expand the prompt to hold the necessary characters.

Top

 

Application requester driver (ARDPGM)

Specifies the qualified name of the application requester driver that is the program to be called to process SQL requests directed to the RDB. The program must exist in a library that is located in the system database (system ASP or a configured basic user ASP) on this system, and must be of the object type *PGM.

The possible values are:

*DRDA

The Distributed Relational Database Architecture (DRDA) application requester is used.

The name of the program name can be qualified by one of the following library values:

*LIBL

All libraries in the library list for the current thread are searched until the first match is found.

*CURLIB

The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.

library-name

Specify the name of the library where the program name is created.

program-name

Specify the name of the application requester driver program to be called to process the SQL requests.

Top


 

Examples

Example 1: Adding an Entry

 ADDRDBDIRE   RDB(MYRDB)  RMTLOCNAME(*LOCAL)

This command adds an entry to the relational database directory. The entry identifies the local relational database. In an SQL program, this relational database name is used when referring to the local relational database.

Example 2: Adding an Entry

 ADDRDBDIRE   RDB(YOURRDB)  RMTLOCNAME(NEWYORK)

This command adds an entry to the relational database directory. The entry identifies a remote location, NEW YORK.

Example 3: Adding an Entry for an Application Requester Driver Program

 ADDRDBDIRE   RDB(YOURRDB)  RMTLOCNAME(*ARDPGM)
             ARDPGM(MYLIB/MYPGM)

This command adds an entry to the relational database directory. The entry indicates that access to relational database YOURRDB will be done by an application requester driver program named MYPGM in the library MYLIB.

Example 4: Adding an Entry for TCP/IP usage

 ADDRDBDIRE   RDB(TCPRDB)  RMTLOCNAME(ROCHESTER.XYZ.COM *IP)
             PORT(*DRDA)

This command adds an entry to the relational database directory. The entry specifies that the remote RDB associated with the RDB name of TCPRDB uses TCP/IP and is on the host with the domain name of ROCHESTER.XYZ.COM, and listens on the standard DRDA port of 446 (*DRDA is the default port so the PORT parameter is unneccessary in this case).

Example 5: Adding an Entry for TCP/IP using Dotted Decimal IP Address and a Numeric Port Number

 ADDRDBDIRE   RDB(DB2DSYS)  RMTLOCNAME('9.5.36.17' *IP)
             PORT(5021)

This command adds an entry to the relational database directory. The entry specifies that the remote RDB associated with the RDB name of DB2DSYS uses TCP/IP and is on the host with an IP address of 9.5.36.17, and listens on port 5021. A System/390 MVS installation, for example, can have multiple DB2 subsystems, and TCP/IP can support only one server at each port number, so port numbers other than 446 are sometimes required.

Example 6: Adding an Entry for TCP/IP using a Service Name for the Port Identification

 ADDRDBDIRE   RDB(DB2ESYS)  RMTLOCNAME(ROCHESTER.XYZ.COM *IP)
             PORT(DB2ESYS_PORT)

This command uses a service name to specify the port number when adding a new entry. OS/400 will attempt to resolve the name DB2ESYS_PORT to a port number by use of the TCP/IP Service Table. In order for the name to be properly resolved, an entry for DB2ESYS_PORT must exist in the TCP/IP Service Table. The WRKSRVTBLE or CFGTCP command can be used to update the service table.

Top


 

Error messages

*ESCAPE Messages

CPF3EC0

Add relational database directory entry failed.

Top