GetBackendPID

Returns the server PID (process ID) (as on the server) for the connection. D7+ Only.
function GetBackendPID(Connection: TSQLConnection): Integer;

Parameters:

Connection
The TSQLConnection component that is connected to the server.

Return Value:

An Integer value corresponding to the PID..

Exceptions:

EDatabaseError is raised in case of an error.

Quick Info:

Supported Compilers:D7+
Category:Database Information
Unit: PGEDriverUtils.pas

Example 4.3. 

ShowMessage('The PID of this connection is ' + IntToStr(GetBackendPID(SQLConnection1)));