sqlbtcq API - Get the query data for all table space containers
Provides a one-call interface to the table space container query data. The query data for all containers in a table space, or for all containers in all table spaces, is returned in an array.
Scope
In a partitioned database environment, only the table spaces on the current database partition are listed.
Authorization
- SYSADM
- SYSCTRL
- SYSMAINT
- SYSMON
- DBADM
Required connection
Database
API include file
sqlutil.h
API and data structure syntax
SQL_API_RC SQL_API_FN
sqlbtcq (
struct sqlca * pSqlca,
sqluint32 TablespaceId,
sqluint32 * pNumContainers,
struct SQLB_TBSCONTQRY_DATA ** ppContainerData);
SQL_API_RC SQL_API_FN
sqlgtcq (
struct sqlca * pSqlca,
sqluint32 TablespaceId,
sqluint32 * pNumContainers,
struct SQLB_TBSCONTQRY_DATA ** ppContainerData);
sqlbtcq API parameters
- pSqlca
- Output. A pointer to the sqlca structure.
- TablespaceId
- Input. ID of the table space for which container data is desired, or a special ID, SQLB_ALL_TABLESPACES (defined in sqlutil), which produces a list of all containers for the entire database.
- pNumContainers
- Output. The number of containers in the table space.
- ppContainerData
- Output. The caller supplies the API with the address of a pointer to a SQLB_TBSCONTQRY_DATA structure. The space for the table space container query data is allocated by the API, and a pointer to that space is returned to the caller. On return from the call, the pointer to the SQLB_TBSCONTQRY_DATA structure points to the complete set of table space container query data.
Usage notes
- sqlbotcq
- sqlbftcq
- sqlbctcq
If sufficient memory is available, this function returns the number of containers, and a pointer to the memory location of the table space container query data. It is the user's responsibility to free this memory with a call to sqlefmem. If sufficient memory is not available, this function simply returns the number of containers, and no memory is allocated. If this should happen, use sqlbotcq, sqlbftcq, and sqlbctcq to fetch less than the whole list at once.