DB2 Version 10.1 for Linux, UNIX, and Windows

db2LdapRegister API - Register the DB2 server on the LDAP server

Registers the DB2® server in LDAP (Lightweight Directory Access Protocol).

Note: NetBIOS is no longer supported. SNA, including its APIs APPC, APPN, and CPI-C, is also no longer supported. If you use these protocols, you must re-catalog your nodes and databases using a supported protocol such as TCP/IP. References to these protocols should be ignored.

Authorization

None

Required connection

None

API include file

db2ApiDf.h

API and data structure syntax

SQL_API_RC SQL_API_FN
  db2LdapRegister (
   db2Uint32 versionNumber,
   void * pParmStruct,
   struct sqlca * pSqlca);

typedef SQL_STRUCTURE db2LdapRegisterStruct
{
   char *piNodeName;
   char *piComputer;
   char *piInstance;
   unsigned short                      iNodeType;
   unsigned short                      iOsType;
   db2LdapProtocolInfo iProtocol;
   char *piComment;
   char *piBindDN;
   char *piPassword;
} db2LdapRegisterStruct;

typedef SQL_STRUCTURE db2LdapProtocolInfo
{
   char iType;
   char *piHostName;
   char *piServiceName;
   char *piNetbiosName;
   char *piNetworkId;
   char *piPartnerLU;
   char *piTPName;
   char *piMode;
   unsigned short                      iSecurityType;
   char *piLanAdapterAddress;
   char *piChangePasswordLU;
   char *piIpxAddress;
} db2LdapProtocolInfo;

db2LdapRegister API parameters

versionNumber
Input. Specifies the version and release level of the structure passed in as the second parameter, pParamStruct.
pParamStruct
Input. A pointer to the db2LdapRegisterStruct structure.
pSqlca
Output. A pointer to the sqlca structure.

db2LdapRegisterStruct data structure parameters

piNodeName
Input. Specify a short name (less than 8 characters) that represents the DB2 server in LDAP.
piComputer
Input. Specify the name of the computer on which the DB2 server resides. The computer name value must be the same as the value specified when adding the server machine to LDAP. On Windows operating systems, this is the Windows computer name. On UNIX based systems, this is the TCP/IP host name. Specify NULL to register the DB2 server on the local computer.
piInstance
Input. Specify the instance name of the DB2 server. The instance name must be specified if the computer name is specified to register a remote server. Specify NULL to register the current instance (as defined by the DB2SYSTEM environment variable).
iNodeType
Input. Specify the node type for the database server. Valid values are:
  • SQLF_NT_SERVER
  • SQLF_NT_MPP
  • SQLF_NT_DCS
iOsType
Input. Specifies the operating system type of the server machine. If an operating system type is not specified, the local operating system type will be used for a local server and no operating system type will be used for a remote server.
iProtocol
Input. Specify the protocol information in the db2LdapProtocolInfo structure.
piComment
Input. Describes the DB2 server. Any comment that helps to describe the server registered in the network directory can be entered. Maximum length is 30 characters. A carriage return or a line feed character is not permitted.
piBindDN
Input. Specify the user's LDAP distinguished name (DN). The LDAP user DN must have sufficient authority to create and update the object in the LDAP directory. If the user's LDAP DN is not specified, the credentials of the current logon user will be used.
piPassword
Input. Account password.

db2LdapProtocolInfo data structure parameters

iType
Input. Specify the protocol type that this server supports. If the server supports more than one protocol, multiple registrations (each with a different node name and protocol type) are required. Valid values are:
SQL_PROTOCOL_TCPIP
For TCP/IPv4 or TCP/IPv6 support
SQL_PROTOCOL_TCPIP4
For TCP/IPv4 support
SQL_PROTOCOL_TCPIP6
For TCP/IPv6 support
SQL_PROTOCOL_SOCKS
For TCP/IP with security SOCKS
SQL_PROTOCOL_SOCKS4
For TCP/IPv4 with security SOCKS
SQL_PROTOCOL_NPIPE
For Windows Named Pipe support
piHostName
Input. Specify the TCP/IP host name or the IP address. The IP address can be an IPv4 or an IPv6 address. If an IP address is specified, it must match the protocol type selected. For example, if SQL_PROTOCOL_TCPIP4 is selected, the IP address specified must be an IPv4 address.
piServiceName
Input. Specify the TCP/IP service name or port number.
piNetbiosName
Input. Specify the NetBIOS workstation name. The NetBIOS name must be specified for NetBIOS support.
piNetworkID
Input. Specify the network ID. The network ID must be specified for APPC/APPN support.
piPartnerLU
Input. Specify the partner LU name for the DB2 server machine. The partner LU must be specified for APPC/APPN support.
piTPName
Input. Specify the transaction program name. The transaction program name must be specified for APPC/APPN support.
piMode
Input. Specify the mode name. The mode must be specified for APPC/APPN support.
iSecurityType
Input. Specify the APPC security level. Valid values are:
  • SQL_CPIC_SECURITY_NONE (default)
  • SQL_CPIC_SECURITY_SAME
  • SQL_CPIC_SECURITY_PROGRAM
piLanAdapterAddress
Input. Specify the network adapter address. This parameter is only required for APPC support. For APPN, this parameter can be set to NULL.
piChangePasswordLU
Input. Specify the name of the partner LU to use when changing the password for the host database server.
piIpxAddress
Input. Specify the complete IPX address. The IPX address must be specified for IPX/SPX support.

Usage notes

Register the DB2 server once for each protocol that the server supports each time specifying a unique node name.

If any protocol configuration parameter is specified when registering a DB2 server locally, it will override the value specified in the database manager configuration file.

Only a remote DB2 server can be registered in LDAP. The computer name and the instance name of the remote server must be specified, along with the protocol communication for the remote server.

When registering a host database server, a value of SQLF_NT_DCS must be specified for the iNodeType parameter.