The distribution information includes the distribution map and the column definitions of the distribution key. Information returned by this API can be passed to the sqlugrpn API to determine the database partition number and the database partition server number for any row in the table.
Beginning with DB2® 9.7, this API is deprecated. Use the db2GetDistMap (Get distribution map) API to return the distribution information. If you call the sqlugtpi API and the DB2_PMAP_COMPATIBILITY registry variable is set to OFF, the error message SQL2768N is returned.
To use this API, the application must be connected to the database that contains the table for which distribution information is being requested.
This API can be executed on any database partition server defined in the db2nodes.cfg file.
Database
sqlutil.h
SQL_API_RC SQL_API_FN
sqlugtpi (
unsigned char * tablename,
struct sqlupi * part_info,
struct sqlca * sqlca);
SQL_API_RC SQL_API_FN
sqlggtpi (
unsigned short tn_length,
unsigned char * tablename,
struct sqlupi * part_info,
struct sqlca * sqlca);