DB2 Version 10.1 for Linux, UNIX, and Windows

db2ReadLogNoConnInit API - Initialize reading the database logs without a database connection

Allocates the memory to be used by db2ReadLogNoConn in order to extract log records from the DB2® database logs and query the Log Manager for current log state information.

Authorization

None

Required connection

None

API include file

db2ApiDf.h

API and data structure syntax

SQL_API_RC SQL_API_FN
  db2ReadLogNoConnInit (
       db2Uint32 versionNumber,
       void * pDB2ReadLogNoConnInitStruct,
       struct sqlca * pSqlca);

typedef SQL_STRUCTURE db2ReadLogNoConnInitStruct
{
   db2Uint32 iFilterOption;
   char *piLogFilePath;
   char *piOverflowLogPath;
   db2Uint32 iRetrieveLogs;
   char *piDatabaseName;
   char *piDbPartitionName;
   db2LogStreamIDType *piLogStreamNum;
   db2Uint32 iReadLogMemoryLimit;
   char                                **poReadLogMemPtr;
} db2ReadLogNoConnInitStruct;

db2ReadLogNoConnInit API parameters

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

db2ReadLogNoConnInitStruct data structure parameters

iFilterOption
Input. Specifies the level of log record filtering to be used when reading the log records. Valid values are:
DB2READLOG_FILTER_OFF
Read all log records in the given LSN range.
DB2READLOG_FILTER_ON
Reads only log records in the given LSN range marked as propagatable. This is the traditional behavior of the asynchronous log read API.
piLogFilePath
Input. Path where the log files to be read are located.
piOverflowLogPath
Input. Alternate path where the log files to be read may be located.
iRetrieveLogs
Input. Option specifying if userexit should be invoked to retrieve log files that cannot be found in either the log file path or the overflow log path. Valid values are:
DB2READLOG_RETRIEVE_OFF
Userexit should not be invoked to retrieve missing log files.
DB2READLOG_RETRIEVE_LOGPATH
Userexit should be invoked to retrieve missing log files into the specified log file path.
DB2READLOG_RETRIEVE_OVERFLOW
Userexit should be invoked to retrieve missing log files into the specified overflow log path.
piDatabaseName
Input. Name of the database that owns the recovery logs being read. This is required if the retrieve option is specified.
piDbPartitionName
Input. Name of the database partition that owns the recovery logs being read. This is required if the retrieve option, mentioned previously, is specified outside of a DB2 pureScale® environment.
piLogStreamNum
Input. Log stream number that owns the recovery logs that are being read. This is required if the retrieve option, mentioned previously, is specified in a DB2 pureScale environment.
iReadLogMemoryLimit
Input. Maximum number of bytes that the API may allocate internally.
poReadLogMemPtr
Output. API-allocated block of memory of size iReadLogMemoryLimit. This memory contains persistent data that the API requires at each invocation. This memory block must not be reallocated or altered in any way by the caller.

Usage notes

The memory initialized by db2ReadLogNoConnInit must not be altered.

When db2ReadLogNoConn will no longer be used, invoke db2ReadLogNoConnTerm to deallocate the memory initialized by db2ReadLogNoConnInit.