Distributed Tuning Interface Reference : PvGetProductsInfo()
 
PvGetProductsInfo()
Retrieves xml string with information on all PSQL products found by the License Manager.
Header File: dtilicense.h (See also Header Files)
Function First Available In Library: w3dbav90.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (macOS) (See also Link Libraries)
Syntax
BTI_API PvGetProductsInfo (
   BTI_LONG           hConnection,
   BTI_CHAR_PTR       productInfo,
   BTI_ULONG_PTR      pBufSize);
Arguments
 
In
hConnection
Connection handle that identifies the server. Connection handles are obtained with the PvConnectServer() function.
Out
productInfo
XML string returned with product information.
In/Out
pBufSize
Address of an unsigned long containing size of the buffer allocated to receive the string. It receives the actual length of selection string.
Return Values
 
DBU_SUCCESS
The operation was successful.
P_E_FAIL
Failed for other reasons.
Status code pertaining to license administration or to authorization
See Status Codes and Messages for License Administrator Status Codes and Authorization Status Codes.
Remarks
Preconditions
The following preconditions must be met:
DTI session started by calling PvStart().
Connection established by PvConnectServer() or if you are performing the operation on a local machine, P_LOCAL_DB_CONNECTION may be used as the connection handle.
Product Information Returned by PvGetProductsInfo()
Following is the document type definition (DTD) for the XML string returned by PvGetProductsInfo() and an explanation of its terms:
<!DOCTYPE products [
<!ELEMENT products (product*)>
<!ELEMENT product (name,id,licenses)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT licenses (license*)>
<!ELEMENT license (type,productCode*,productKey*,state*,feature*,edition*,maxUserCount*,maxSessionCount*,maxDataInUseGB*,platform*,sequence*,userCount*,sessionCount*,dataInUseGB*,timeStamp*,oemId*,application*,description*,isremovable*,gracePeriodEnd*)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT productCode (#PCDATA)>
<!ELEMENT productKey (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!ELEMENT feature (#PCDATA)>
<!ELEMENT edition (#PCDATA)>
<!ELEMENT maxUserCount (#PCDATA)>
<!ELEMENT maxSessionCount (#PCDATA)>
<!ELEMENT maxDataInUseGB (#PCDATA)>
<!ELEMENT platform (#PCDATA)>
<!ELEMENT sequence (#PCDATA)>
<!ELEMENT userCount (#PCDATA)>
<!ELEMENT sessionCount (#PCDATA)>
<!ELEMENT dataInUseGB (#PCDATA)>
<!ELEMENT timeStamp (#PCDATA)>
<!ELEMENT oemId (#PCDATA)>
<!ELEMENT application (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT isremovable (#PCDATA)>
<!ELEMENT gracePeriodEnd (#PCDATA)>
]>
products
A container for all products returned by PvGetProductsInfo().
product
A container for information about a single product.
name
The name of the product.
id
The PSQL code for the product. Refer to dtilicense header file for the list of product codes returned.
licenses
A container for all licenses that apply to the product.
license
A container for information about a single license.
type
The license type:
1: Permanent
2: Expiring license set at issue date
4: Expiring license applied at install time
7: User count increase
productCode
The PSQL code for the product. Refer to dtilicense header file for the list of product codes returned.
productKey
The key used for product authorization; can be empty if product authorization was not used.
state
The current state of the license:
0: Active
1: Expired
2: Disabled
3: Inactive
4: Failed validation
feature
Reserved.
edition
Reserved.
maxUserCount
Maximum concurrent users allowed. Zero indicates unlimited users on PSQL Server and Workgroup editions. Not applicable on PSQL Vx Server edition and always returns “0”.
maxSessionCount
Maximum concurrent sessions allowed. Zero indicates unlimited sessions on PSQL Vx Server edition. Not applicable on PSQL Server and Workgroup editions and always returns “0”.
maxDatainUseGB
Maximum amount of data allowed to be used simultaneously, measured in gigabytes. Zero indicates unlimited amount of data on PSQL Vx Server edition. Not applicable on PSQL Server and Workgroup editions and always returns “0”.
platform
The supported platforms:
0: ANY
1: WIN
2: WIN32
3: WIN64
4: LINUX
5: LINUX32
6: LINUX64
7: MAC
8: MAC32
9: MAC64
sequence
The license sequence number.
userCount
The number of users permitted by the license. -1 indicates unlimited number of users on PSQL Server and Workgroup editions. Not applicable on PSQL Vx Server edition and always returns “0”.
sessionCount
The number of sessions permitted by the license. -1 indicates unlimited number of users on PSQL Vx Server editions. Not applicable on PSQL Server and Workgroup editions and always returns “0”.
dataInUseGB
The amount of data in use permitted by the license, measured in gigabytes. -1 indicates unlimited data count size on PSQL Vx Server editions. Not applicable on PSQL Server and Workgroup editions and always returns “0”.
timeStamp
For temporary keys, the expiration day represented as the number of days from January 1, 2000.
oemId
The vendor ID.
application
The vendor’s application ID.
description
Reserved.
isremovable
The license key is removable:
0: Not removable
1: Removable
gracePeriodEnd
Number of days remaining before the engine is disabled for failing license validation. Empty if a failed-validation period is not applicable to this product. -1 if a failed-validation period is applicable but not in effect for this product.
Example
<?xml version="1.0" encoding='UCS-4' ?>
<!DOCTYPE products [
<!ELEMENT products (product*)>
<!ELEMENT product (name,id,licenses)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT licenses (license*)>
<!ELEMENT license (type,productCode*,productKey*,state*,feature*,edition*,maxUserCount*,maxSessionCount*,maxDataInUseGB*,platform*,sequence*,userCount*,sessionCount*,dataInUseGB*,timeStamp*,oemId*,application*,description*,isremovable*,gracePeriodEnd*)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT productCode (#PCDATA)>
<!ELEMENT productKey (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!ELEMENT feature (#PCDATA)>
<!ELEMENT edition (#PCDATA)>
<!ELEMENT maxUserCount (#PCDATA)>
<!ELEMENT maxSessionCount (#PCDATA)>
<!ELEMENT maxDataInUseGB (#PCDATA)>
<!ELEMENT platform (#PCDATA)>
<!ELEMENT sequence (#PCDATA)>
<!ELEMENT userCount (#PCDATA)>
<!ELEMENT sessionCount (#PCDATA)>
<!ELEMENT dataInUseGB (#PCDATA)>
<!ELEMENT timeStamp (#PCDATA)>
<!ELEMENT oemId (#PCDATA)>
<!ELEMENT application (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT isremovable (#PCDATA)>
<!ELEMENT gracePeriodEnd (#PCDATA)>
]>
<products>
<product>
<name>DataExchange 5 Server: Real-Time Backup</name>
<id>78</id>
<licenses>
<license>
<type>1</type>
<productCode>78</productCode>
<productKey> ABCDE-55555-FGHIJ-55555-KLMNO-55555</productKey>
<state>0</state>
<feature>0</feature>
<edition>0</edition>
<maxUserCount>0</maxUserCount>
<maxSessionCount>0</maxSessionCount>
<maxDataInUseGB>0</maxDataInUseGB>
<platform>2</platform>
<sequence>0</sequence>
<userCount>1</userCount>
<sessionCount>0</sessionCount>
<dataInUseGB>0</dataInUseGB>
<timeStamp>0</timeStamp>
<oemId>0</oemId>
<application>0</application>
<description></description>
<isremovable>1</isremovable>
<gracePeriodEnd>-1</gracePeriodEnd>
</license>
</licenses>
</product>
<product>
<name>PSQL 12 Server</name>
<id>425</id>
<licenses>
<license>
<type>2</type>
<productCode>425</productCode>
<productKey></productKey>
<state>0</state>
<feature>0</feature>
<edition>0</edition>
<maxUserCount>0</maxUserCount>
<maxSessionCount>0</maxSessionCount>
<maxDataInUseGB>0</maxDataInUseGB>
<platform>2</platform>
<sequence>0</sequence>
<userCount>10</userCount>
<sessionCount>0</sessionCount>
<dataInUseGB>0</dataInUseGB>
<timeStamp>4489</timeStamp>
<oemId>8</oemId>
<application>604</application>
<description></description>
<isremovable>0</isremovable>
<gracePeriodEnd></gracePeriodEnd>
</license>
<license>
<type>4</type>
<productCode>425</productCode>
<productKey></productKey>
<state>0</state>
<feature>0</feature>
<edition>0</edition>
<maxUserCount>0</maxUserCount>
<maxSessionCount>0</maxSessionCount>
<maxDataInUseGB>0</maxDataInUseGB>
<platform>1</platform>
<sequence>11200</sequence>
<userCount>20</userCount>
<sessionCount>0</sessionCount>
<dataInUseGB>0</dataInUseGB>
<timeStamp>4429</timeStamp>
<oemId>0</oemId>
<application>1</application>
<description></description>
<isremovable>0</isremovable>
<gracePeriodEnd></gracePeriodEnd>
</license>
<license>
<type>1</type>
<productCode>425</productCode>
<productKey>ABCDE-55555-FGHIJ-55555-KLMNO-55555</productKey>
<state>0</state>
<feature>0</feature>
<edition>0</edition>
<maxUserCount>0</maxUserCount>
<maxSessionCount>0</maxSessionCount>
<maxDataInUseGB>0</maxDataInUseGB>
<platform>2</platform>
<sequence>0</sequence>
<userCount>10</userCount>
<sessionCount>0</sessionCount>
<dataInUseGB>0</dataInUseGB>
<timeStamp>0</timeStamp>
<oemId>333</oemId>
<application>334</application>
<description></description>
<isremovable>1</isremovable>
<gracePeriodEnd>-1</gracePeriodEnd>
</license>
</licenses>
</product>
</products>
See Also
PvValidateLicenses()
PvConnectServer()
PvStart()
PvStop()