Release Notes


38.1 db2ArchiveLog (new API)

db2ArchiveLog

Closes and truncates the active log file for a recoverable database. If user exit is enabled, issues an archive request.

Authorization

One of the following:

Required Connection

This API automatically establishes a connection to the specified database. If a connection to the specified database already exists, the API will return an error.

API Include File

db2ApiDf.h

C API Syntax



/* File: db2ApiDf.h */
/* API:  Archive Active Log */
SQL_API_RC SQL_API_FN
   db2ArchiveLog (
      db2Uint32 version,
      void *pDB2ArchiveLogStruct,
      struct sqlca * pSqlca);
 
typedef struct
{
   char                *piDatabaseAlias;
   char                *piUserName;
   char                *piPassword;
   db2Uint16           iAllNodeFlag;
   db2Uint16           iNumNodes;
   SQL_PDB_NODE_TYPE   *piNodeList;
   db2Uint32           iOptions;
} db2ArchiveLogStruct

Generic API Syntax



/* File: db2ApiDf.h */
/* API:  Archive Active Log */
SQL_API_RC SQL_API_FN
   db2gArchiveLog (
      db2Uint32 version,
      void *pDB2ArchiveLogStruct,
      struct sqlca * pSqlca);
 
typedef struct
{
   db2Uint32           iAliasLen;
   db2Uint32           iUserNameLen;
   db2Uint32           iPasswordLen;
   char                *piDatabaseAlias;
   char                *piUserName;
   char                *piPassword;
   db2Uint16           iAllNodeFlag;
   db2Uint16           iNumNodes;
   SQL_PDB_NODE_TYPE   *piNodeList;  
   db2Uint32           iOptions;
} db2ArchiveLogStruct

API Parameters

version
Input. Specifies the version and release level of the variable passed in as the second parameter, pDB2ArchiveLogStruct.

pDB2ArchiveLogStruct
Input. A pointer to the db2ArchiveLogStruct structure.

pSqlca
Output. A pointer to the sqlca structure.

iAliasLen
Input. A 4-byte unsigned integer representing the length in bytes of the database alias.

iUserNameLen
A 4-byte unsigned integer representing the length in bytes of the user name. Set to zero if no user name is used.

iPasswordLen
Input. A 4-byte unsigned integer representing the length in bytes of the password. Set to zero if no password is used.

piDatabaseAlias
Input. A string containing the database alias (as cataloged in the system database directory) of the database for which the active log is to be archived.

piUserName
Input. A string containing the user name to be used when attempting a connection.

piPassword
Input. A string containing the password to be used when attempting a connection.

iAllNodeFlag
MPP only. Input. Flag indicating whether the operation should apply to all nodes listed in the db2nodes.cfg file. Valid values are:

DB2ARCHIVELOG_NODE_LIST
Apply to nodes in a node list that is passed in piNodeList.

DB2ARCHIVELOG_ALL_NODES
Apply to all nodes. piNodeList should be NULL. This is the default value.

DB2ARCHIVELOG_ALL_EXCEPT
Apply to all nodes except those in the node list passed in piNodeList.

iNumNodes
MPP only. Input. Specifies the number of nodes in the piNodeList array.

piNodeList
MPP only. Input. A pointer to an array of node numbers against which to apply the archive log operation.

iOptions
Input. Reserved for future use.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]