sys_tempdbid

(Cluster environments only) Returns the id of the effective local system temporary database of the specified instance. Returns the id of the effective local system temporary database of the current instance when instance_id is not specified.

Syntax

sys_tempdbid(instance_id)

Parameters

Examples

Usage

If you do not specify an instance ID, sys_tempdbid returns the ID of the effective local system temporary database for the current instance.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can run sys_tempdbid.