This chapter describes local and global temporary databases, how to create and manage them, and how to bind logins or applications to a temporary database or group of temporary databases. This chapter also describes private devices, how to create and manage them, and how to use them for local user temporary databases.
Temporary databases provide storage for temporary tables and other temporary working storage needs. The Cluster Edition supports both local and global temporary databases. Local temporary databases can be accessed only by the owning instance, and are used primarily to store session-specific private temporary objects: #tables, worktables, and fake tables. Global temporary databases can be accessed by all instances in the cluster and are used to store temporary objects that can exist beyond the current session.
The Cluster Edition supports:
Local system temporary databases
Local user temporary databases
Global user temporary databases
The global system temporary database (dbid of 2)
Temporary databases are inherited from the model database with these database options set:
select into/bulkcopy
trunc log on chkpt
A guest user is automatically added to the temporary database, and all users are granted create table permission.