spid_instance_id

Description

Returns the instance id on which the specified process id (spid) is running.

Syntax

spid_instance_id(spid_value)

Parameters

spid_value – the spid number whose instance id is requested.

Example

Returns the id of the instance that is running process id number 27:

select spid_instance_id(27)

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute spid_instance_id.