Provides a one-call interface to the table space query data. The query data for all table spaces in the database is returned in an array.
Scope
In a partitioned database server environment, only the table spaces on the current node are listed.
Authorization
One of the following:
Required Connection
Database
API Include File
sqlutil.h
C API Syntax
/* File: sqlutil.h */
/* API: Tablespace Query */
/* ... */
SQL_API_RC SQL_API_FN
sqlbmtsq (
struct sqlca * pSqlca,
unsigned long * pNumTablespaces,
struct SQLB_TBSPQRY_DATA *** pppTablespaceData,
unsigned long reserved1,
unsigned long reserved2);
/* ... */
|
Generic API Syntax
/* File: sqlutil.h */
/* API: Tablespace Query */
/* ... */
SQL_API_RC SQL_API_FN
sqlgmtsq (
struct sqlca * pSqlca,
unsigned long * pNumTablespaces,
struct SQLB_TBSPQRY_DATA *** pppTablespaceData,
unsigned long reserved1,
unsigned long reserved2);
/* ... */
|
API Parameters
Sample Programs
Usage Notes
This API uses the lower level services, namely:
to get all of the table space query data at once.
If sufficient memory is available, this function returns the number of table spaces, and a pointer to the memory location of the table space query data. It is the user's responsibility to free this memory with a call to sqlefmem (see sqlefmem - Free Memory).
If sufficient memory is not available, this function simply returns the number of table spaces, and no memory is allocated. If this should happen, use sqlbotsq - Open Tablespace Query, sqlbftpq - Fetch Tablespace Query, and sqlbctsq - Close Tablespace Query, to fetch less than the whole list at once.
See Also
sqlbctsq - Close Tablespace Query