db_instanceid

Description

(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

database_id

ID of the database.

database_name

name of the database

Examples

Example 1

Returns the owning instance for database ID 5

select db_instanceid(5)

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can run sdc_intempdbconfig.