Binding users and applications to temporary databases

You can use sp_tempdb to bind logins and applications to temporary databases or temporary database groups, and to create temporary database groups in both the nonclustered Adaptive Server and the Cluster Edition. In the Cluster Edition, which supports both local and global temporary databases, you can bind logins or applications to local user temporary databases or temporary database groups, but not to global temporary databases.

The default temporary database group is system-generated and always present. It is empty unless you use sp_tempdb to add local temporary databases to it.

NoteIn the Cluster Edition, the system temporary database tempdb (dbid 2) is a global system temporary database, and is not a member of the default group. This behavior is different from that of the system temporary database tempdb (dbid 2) in the nonclustered Adaptive Server. In the nonclustered Adaptive Server, the system temporary database tempdb is, by default, a member of the default group.

The sp_tempdb user interface includes the option unbindall_gr, which removes all bindings to the specified group in either the nonclustered Adaptive Server or the Cluster Edition. In addition, the unbind option includes an instance_name parameter that is specific to the Cluster Edition.