Administrative API Reference

sqlbstpq - Single Tablespace Query

Retrieves information about a single currently defined table space.

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

Version

sqlutil.h

C API Syntax



/* File: sqlutil.h */
/* API: Single Tablespace Query */
/* ... */
SQL_API_RC SQL_API_FN
  sqlbstpq (
    struct sqlca * pSqlca,
    sqluint32 TablespaceId,
    struct SQLB_TBSPQRY_DATA * pTablespaceData,
    sqluint32 reserved);
/* ... */
 

Generic API Syntax



/* File: sqlutil.h */
/* API: Single Tablespace Query */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgstpq (
    struct sqlca * pSqlca,
    sqluint32 TablespaceId,
    struct SQLB_TBSPQRY_DATA * pTablespaceData,
    sqluint32reserved);
/* ... */
 

API Parameters

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

TablespaceId
Input. Identifier for the table space which is to be queried.

pTablespaceData
Input and output. Pointer to a user-supplied SQLB_TBSPQRY_DATA structure where the table space information will be placed upon return. The caller of this API must initialize the structure and set TBSPQVER to SQLB_TBSPQRY_DATA_ID (in sqlutil).

reserved
Input. Always SQLB_RESERVED1.

Sample Programs

C
\sqllib\samples\c\tabspace.sqc

COBOL
\sqllib\samples\cobol\tabspace.sqb

Usage Notes

This API retrieves information about a single table space if the table space identifier to be queried is known. This API provides an alternative to the more expensive OPEN TABLESPACE QUERY, FETCH, and CLOSE combination of APIs, which must be used to scan for the desired table space when the table space identifier is not known in advance. The table space IDs can be found in the system catalogs. No agent snapshot is taken; since there is only one entry to return, it is returned directly.

For more information, see sqlbotsq - Open Tablespace Query.

See Also

sqlbctsq - Close Tablespace Query

sqlbftpq - Fetch Tablespace Query

sqlbgtss - Get Tablespace Statistics

sqlbotsq - Open Tablespace Query

sqlbmtsq - Tablespace Query.


[ Top of Page | Previous Page | Next Page ]