Identify the current VP

A VP that is currently performing some task is called an active VP. The database server assigns a unique integer, called the VP identifier, to each active VP.

The onstat -g glo command displays the VP identifier in the first column of the output it generates (column with the heading “vp". For example, the onstat output in The onstat -g glo command output shows information for VPs whose VP identifiers range 1 - 13.

The VP identifier uniquely identifies the running oninit process. You can use it as an identifier for named memory that stores information unique to that VP.

The active VP on which a UDR executes is the current VP for the UDR. To obtain the VP identifier of the current VP, use the mi_vpinfo_vpid() function. After you have the VP identifier of the current VP, you can use the following functions to obtain additional information about the VP environment of the UDR.
VP-environment information DataBlade® API function
VP-class identifier mi_vpinfo_classid()
Whether the current VP is part of a nonyielding VP class mi_vpinfo_isnoyield()