Administrative API Reference
Registers the DB2 server in LDAP (Lightweight Directory Access
Protocol).
This API is available on Windows NT, Windows 98, Windows 95, and Windows
2000 only.
Authorization
None
Required Connection
None
Version
db2ApiDf.h
C API Syntax
/* File: db2ApiDf.h */
/* API: db2LdapRegister */
/* ... */
SQL_API_RC SQL_API_FN
db2LdapRegister (
sqlint32 versionNumber,
void * pParamStruct,
struct sqlca * pSqlca);
typedef struct
{
char * piNodeName;
char * piComputer;
char * piInstance;
unsigned short iNodeType;
db2LdapProtocolInfo iProtocol;
char * piComment;
char * piBindDN;
char * piPassword;
} db2LdapRegisterStruct;
typedef struct
{
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;
/* ... */
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. For
more information about this structure, see SQLCA.
- 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 system 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 NT, this
is the NT computer name. On UNIX based systems, this is the TCP/IP host
name. On OS/2, this is the value specified for the DB2SYSTEM
registry variable. 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
- 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.
- 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_APPN - For APPC/APPN support
SQL_PROTOCOL_NETB - For NetBIOS support
SQL_PROTOCOL_TCPIP - For TCP/IP support
SQL_PROTOCOL_SOCKS - For TCP/IP with socket security
SQL_PROTOCOL_IPXSPX - For IPX/SPX support
SQL_PROTOCOL_NPIPE - For Windows NT Named Pipe support
- piHostName
- Input. Specify the TCP/IP host name or the IP 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.
[ Top of Page | Previous Page | Next Page ]