Administrative API Reference

sqleaddn - Add Node

Adds a new node to the parallel database system. This API creates database partitions for all databases currently defined in the MPP server on the new node. The user can specify the source node for any system temporary table spaces to be created with the databases, or specify that no system temporary table spaces are to be created. The API must be issued from the node that is being added, and can only be issued on an MPP server.

Scope

This API only affects the node on which it is executed.

Authorization

One of the following:

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Add Node */
/* ... */
SQL_API_RC SQL_API_FN
  sqleaddn (
    void * pAddNodeOptions,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Add Node */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgaddn (
    unsigned short addnOptionsLen,
    struct sqlca * pSqlca,
    void * pAddNodeOptions);
/* ... */
 

API Parameters

addnOptionsLen
Input. A 2-byte unsigned integer representing the length of the optional sqle_addn_options structure in bytes.

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

pAddNodeOptions
Input. A pointer to the optional sqle_addn_options structure. This structure is used to specify the source node, if any, of the system temporary table space definitions for all database partitions created during the add node operation. If not specified (that is, a NULL pointer is specified), the system temporary table space definitions will be the same as those for the catalog node. For more information about this structure, see SQLE-ADDN-OPTIONS.

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.

Usage Notes

Before adding a new node, ensure that there is sufficient storage for the containers that must be created for all existing databases on the system.

The add node operation creates an empty database partition on the new node for every database that exists in the instance. The configuration parameters for the new database partitions are set to the default value.

If an add node operation fails while creating a database partition locally, it enters a clean-up phase, in which it locally drops all databases that have been created. This means that the database partitions are removed only from the node being added (that is, the local node). Existing database partitions remain unaffected on all other nodes. If this fails, no further clean up is done, and an error is returned.

The database partitions on the new node cannot be used to contain user data until after the ALTER NODEGROUP statement has been used to add the node to a nodegroup. For details, see the SQL Reference.

This API will fail if a create database or a drop database operation is in progress. The API can be called again once the operation has completed.

If system temporary table spaces are to be created with the database partitions, sqleaddn may have to communicate with another node in the MPP system in order to retrieve the table space definitions. The start_stop_time database manager configuration parameter is used to specify the time, in minutes, by which the other node must respond with the table space definitions. If this time is exceeded, the API fails. Increase the value of start_stop_time, and call the API again.

See Also

sqlecrea - Create Database

sqledrpn - Drop Node Verify

sqlepstart - Start Database Manager.


[ Top of Page | Previous Page | Next Page ]