setClientInfo method
Set client information for end-to-end application tracing.
Sets additional client information that appears in V$SESSION. Can store arbitrary application-specific data.
Parameters:
clientInfo: Client information string (up to 64 bytes)
Example - Application Context:
await connection.setClientInfo('WebApp v2.1.0');
// DBA can see: SELECT client_info FROM v$session WHERE ...
See also:
- setClientIdentifier to set the client identifier
- setModule to set the module name
Implementation
Future<void> setClientInfo(String clientInfo) async {
_ensureConnected();
final (clientInfoNative, clientInfoLen) = StringUtils.toNativeUtf8WithLength(clientInfo, _memoryManager);
final result = _dpiOracle.dpiConn_setClientInfo(
_connectionPtr.value,
clientInfoNative,
clientInfoLen,
);
if (result == DPI_FAILURE) {
throw OracleConnectionException('Failed to set client info');
}
}