IBM Books

Administrative API Reference

sqlugtpi - Get Table Partitioning Information

Allows an application to obtain the partitioning information for a table. The partitioning information includes the partitioning map and the column definitions of the partitioning key. Information returned by this API can be passed to sqlugrpn - Get Row Partitioning Number to determine the partition number and the node number for any row in the table.

To use this API, the application must be connected to the database that contains the table for which partitioning information is being requested.

Scope

This API can be executed on any node defined in the db2nodes.cfg file.

Authorization

For the table being referenced, a user must have at least one of the following:

Required Connection

Database

Version

sqlutil.h

C API Syntax



/* File: sqlutil.h */
/* API: Get Table Partitioning Information */
/* ... */
SQL_API_RC SQL_API_FN
  sqlugtpi (
    unsigned char * tablename,
    struct sqlupi * part_info,
    struct sqlca * sqlca);
/* ... */
 

Generic API Syntax



/* File: sqlutil.h */
/* API: Get Table Partitioning Information */
/* ... */
SQL_API_RC SQL_API_FN
  sqlggtpi (
    unsigned short tn_length,
    unsigned char * tablename,
    struct sqlupi * part_info,
    struct sqlca * sqlca);
/* ... */
 

API Parameters

tn_length
A 2-byte unsigned integer with the length of the table name.

tablename
The fully qualified name of the table.

part_info
A pointer to the sqlupi structure. For more information about this structure, see SQLUPI.

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

See Also

sqlugrpn - Get Row Partitioning Number

sqludrdt - Redistribute Nodegroup.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]