instance_name

Description

(Cluster environments only) Returns the name for the Adaptive Server whose id you provide, or the name of the Adaptive Server from which it is issued if you do not provide a value for id.

Syntax

instance_name([id])

Parameters

id

is the ID of the Adaptive Server whose name you are researching.

Examples

Example 1

Returns the name of the instance with an ID of 12:

select instance_name(12)

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute instance_name.