Administrative API Reference

sqleregs - Register

Registers the DB2 server on the network server. The DB2 server's network address is stored in a specified registry on the file server, where it can be retrieved by a client application that uses the IPX/SPX communication protocol.

Authorization

None

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Register */
/* ... */
SQL_API_RC SQL_API_FN
  sqleregs (
    unsigned short Registry,
    void * pRegisterInfo,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Register */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgregs (
    unsigned short Registry,
    void * pRegisterInfo,
    struct sqlca * pSqlca);
/* ... */
 

API Parameters

Registry
Input. Indicates where on the network file server to register the DB2 server. In this release, the only supported value is SQL_NWBINDERY (NetWare file server bindery, defined in sqlenv).

pRegisterInfo
Input. A pointer to the sqle_reg_nwbindery structure. In the structure, the caller specifies a user name and password that are valid on the network file server. For more information about this structure, see SQLE-REG-NWBINDERY.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

REXX API Syntax

This API can be called from REXX through the SQLDB2 interface. See How the API Descriptions are Organized, or the Application Development Guide. For a description of the syntax, see the Command Reference.

Sample Programs

C
\sqllib\samples\c\regder.c

COBOL
\sqllib\samples\cobol\regder.cbl

Usage Notes

This API determines the IPX/SPX address of the DB2 server machine (the machine from which it was called), and then creates an object in the NetWare file server bindery using the value for objectname specified in the database manager configuration file. The IPX/SPX address of the DB2 server is stored as a property in that object. In order for a client to connect or attach to a DB2 database using IPX/SPX file server addressing, it must catalog an IPX/SPX node (using the same FILESERVER and OBJECTNAME specified on the server) in the node directory.

The specified NetWare user name and password must have supervisory or equivalent authority.

This API must be issued locally from a DB2 server. It is not supported remotely.

After installation and configuration of DB2, the DB2 server should be registered once on the network file server (unless only direct addressing will be used by IPX/SPX clients to connect to this DB2 server). After that, if the IPX/SPX fields are reconfigured, or the DB2 server's IPX/SPX internetwork address changes, deregister the DB2 server on the network file server before making the changes, and then register it again after the changes have been made.

See Also

sqledreg - Deregister.


[ Top of Page | Previous Page | Next Page ]