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.

Important: This command or API has been deprecated in Version 9.7 and might be removed in a future release. You can use the MON_GET_TABLESPACE and the MON_GET_CONTAINER table functions instead which return more information. For more information, see LIST TABLESPACES and LIST TABLESPACE CONTAINERS commands have been deprecated.

Scope

In a partitioned database environment, only the table spaces on the current database partition are listed.

Authorization

One of the following authorities:
  • 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

This API uses the lower level services, namely:
  • sqlbotcq
  • sqlbftcq
  • sqlbctcq
to get all of the table space container query data at once.

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.