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.
instance_name([id])
is the ID of the Adaptive Server whose name you are researching.
Returns the name of the instance with an ID of 12:
select instance_name(12)
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute instance_name.