DB2 Version 9.7 for Linux, UNIX, and Windows

db2InstanceStart API - Start instance

Starts a local or remote instance.

Scope

In a single-partition database environment, the scope is that single database partition only. In a partitioned database environment, it is the collection of all logical database partition servers defined in the node configuration file, db2nodes.cfg.

Authorization

One of the following:
  • sysadm
  • sysctrl
  • sysmaint

Required connection

None

API include file

db2ApiDf.h

API and data structure syntax

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

typedef SQL_STRUCTURE db2InstanceStartStruct
{
             db2int8 iIsRemote;
             char *piRemoteInstName;
             db2DasCommData * piCommData;
             db2StartOptionsStruct * piStartOpts;
} db2InstanceStartStruct;

typedef SQL_STRUCTURE db2DasCommData
{
             db2int8 iCommParam;
             char *piNodeOrHostName;
             char *piUserId;
             char *piUserPw;
} db2DasCommData;

typedef SQL_STRUCTURE db2StartOptionsStruct
{
             db2Uint32 iIsProfile;
             char *piProfile;
             db2Uint32 iIsNodeNum;
             db2NodeType iNodeNum;
             db2Uint32 iOption;
             db2Uint32 iIsHostName;
             char *piHostName;
             db2Uint32 iIsPort;
             db2PortType iPort;
             db2Uint32 iIsNetName;
             char *piNetName;
             db2Uint32 iTblspaceType;
             db2NodeType iTblspaceNode;
             db2Uint32 iIsComputer;
             char *piComputer;
             char *piUserName;
             char *piPassword;
             db2QuiesceStartStruct iQuiesceOpts;
} db2StartOptionsStruct;

typedef SQL_STRUCTURE db2QuiesceStartStruct
{
             db2int8 iIsQRequested;
             db2int8 iQOptions;
             char *piQUsrName;
             char *piQGrpName;
             db2int8 iIsQUsrGrpDef;
} db2QuiesceStartStruct;

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

typedef SQL_STRUCTURE db2gInstanceStStruct
{
             db2int8 iIsRemote;
             db2Uint32 iRemoteInstLen;
             char *piRemoteInstName;
             db2gDasCommData * piCommData;
             db2gStartOptionsStruct * piStartOpts;
} db2gInstanceStStruct;

typedef SQL_STRUCTURE db2gDasCommData
{
             db2int8 iCommParam;
             db2Uint32 iNodeOrHostNameLen;
             char *piNodeOrHostName;
             db2Uint32 iUserIdLen;
             char *piUserId;
             db2Uint32 iUserPwLen;
             char *piUserPw;
} db2gDasCommData;

typedef SQL_STRUCTURE db2gStartOptionsStruct
{
             db2Uint32 iIsProfile;
             char *piProfile;
             db2Uint32 iIsNodeNum;
             db2NodeType iNodeNum;
             db2Uint32 iOption;
             db2Uint32 iIsHostName;
             char *piHostName;
             db2Uint32 iIsPort;
             db2PortType iPort;
             db2Uint32 iIsNetName;
             char *piNetName;
             db2Uint32 iTblspaceType;
             db2NodeType iTblspaceNode;
             db2Uint32 iIsComputer;
             char *piComputer;
             char *piUserName;
             char *piPassword;
             db2gQuiesceStartStruct iQuiesceOpts;
} db2gStartOptionsStruct;

typedef SQL_STRUCTURE db2gQuiesceStartStruct
{
             db2int8 iIsQRequested;
             db2int8 iQOptions;
             db2Uint32 iQUsrNameLen;
             char *piQUsrName;
             db2Uint32 iQGrpNameLen;
             char *piQGrpName;
             db2int8 iIsQUsrGrpDef;
} db2gQuiesceStartStruct;

db2InstanceStart API parameters

versionNumber
Input. Specifies the version and release level of the structure passed as the second parameter pParmStruct.
pParmStruct
Input. A pointer to the db2InstanceStartStruct structure.
pSqlca
Output. A pointer to the sqlca structure.

db2InstanceStartStruct data structure parameters

iIsRemote
Input. An indicator set to constant integer value TRUE or FALSE. This parameter should be set to TRUE if this is a remote start.
piRemoteInstName
Input. The name of the remote instance.
piCommData
Input. A pointer to the db2DasCommData structure.
piStartOpts
Input. A pointer to the db2StartOptionsStruct structure.

db2DasCommData data structure parameters

iCommParam
Input. An indicator set to TRUE or FALSE. This parameter should be set to TRUE if this is a remote start.
piNodeOrHostName
Input. The database partition or hostname.
piUserId
Input. The user name.
piUserPw
Input. The user password.

db2StartOptionsStruct data structure parameters

iIsProfile
Input. Indicates whether a profile is specified. If this field indicates that a profile is not specified, the file db2profile is used.
piProfile
Input. The name of the profile file to be executed at each node to define the DB2® environment (MPP only). This file is executed before the nodes are started. The default value is db2profile.
iIsNodeNum
Input. Indicates whether a node number is specified. If specified, the start command only affects the specified node.
iNodeNum
Input. The database partition number.
iOption
Input. Specifies an action. Valid values for OPTION (defined in sqlenv header file, located in the include directory) are:
SQLE_NONE
Issue the normal db2start operation.
SQLE_ADDNODE
Issue the ADD NODE command.
SQLE_RESTART
Issue the RESTART DATABASE command.
SQLE_RESTART_PARALLEL
Issue the RESTART DATABASE command for parallel execution.
SQLE_STANDALONE
Start the node in STANDALONE mode.
iIsHostName
Input. Indicates whether a host name is specified.
piHostName
Input. The system name.
iIsPort
Input. Indicates whether a port number is specified.
iPort
Input. The port number.
iIsNetName
Input. Indicates whether a net name is specified.
piNetName
Input. The network name.
iTblspaceType
Input. Specifies the type of system temporary table space definitions to be used for the node being added. Valid values are:
SQLE_TABLESPACES_NONE
Do not create any system temporary table spaces.
SQLE_TABLESPACES_LIKE_NODE
The containers for the system temporary table spaces should be the same as those for the specified node.
SQLE_TABLESPACES_LIKE_CATALOG
The containers for the system temporary table spaces should be the same as those for the catalog node of each database.
iTblspaceNode
Input. Specifies the node number from which the system temporary table space definitions should be obtained. The node number must exist in the db2nodes.cfg file, and is only used if the tblspace_type field is set to SQLE_TABLESPACES_LIKE_NODE.
iIsComputer
Input. Indicates whether a computer name is specified. Valid on the Windows operating system only.
piComputer
Input. Computer name. Valid on the Windows operating system only.
piUserName
Input. Logon account user name. Valid on the Windows operating system only.
piPassword
Input. The password corresponding to the logon account user name.
iQuiesceOpts
Input. A pointer to the db2QuiesceStartStruct structure.

db2QuiesceStartStruct data structure parameters

iIsQRequested
Input. An indicator set to TRUE or FALSE. This parameter should be set to TRUE if quiesce is requested.
iQOptions
Input. Specifies any instance quiesce options. Valid values (defined in sqlenv header file, located in the include directory) are:
DB2INSQUIESCE_RESTRICTEDACCESS
The instance is started in ADMIN MODE with the RESTRICTED ACCESS option to prevent databases being activated to do authorization checking.
piQUsrName
Input. The quiesced username.
piQGrpName
Input. The quiesced group name.
iIsQUsrGrpDef
Input. An indicator set to TRUE or FALSE. This parameter should be set to TRUE if a quiesced user or quiesced group is defined.

db2gInstanceStStruct data structure specific parameters

iRemoteInstLen
Input. Specifies the length in bytes of piRemoteInstName.

db2gDasCommData data structure specific parameters

iNodeOrHostNameLen
Input. Specifies the length in bytes of piNodeOrHostName.
iUserIdLen
Input. Specifies the length in bytes of piUserId.
iUserPwLen
Input. Specifies the length in bytes of piUserPw.

db2gQuiesceStartStruct data structure specific parameters

iQUsrNameLen
Input. Specifies the length in bytes of piQusrName.
iQGrpNameLen
Input. Specifies the length in bytes of piQGrpName.