db_instanceid

(Cluster environments only) Returns the ID of the owning instance of a specified local temporary database. Returns NULL if the specified database is a global temporary database or a nontemporary database.

Syntax

db_instanceid(database_id)
db_instanceid(database_name)

Parameters

Examples

Usage

Access to a local temporary database is allowed only from the owning instance. db_instanceid determines whether the specified database is a local temporary database, and the owning instance for the local temporary database.You can then connect to the owning instance and access its local temporary database.

You must include an parameter with db_instanceid.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can run sdc_intempdbconfig.