Creates a new database.
This reference page contains information specific to
the Cluster Edition. See the Reference Manual for
complete syntax and usage information for create database.
create [ [ global | system ] temporary ] database database_name [ for instance instance_name ] [on {default | database_device} [= size] [, database_device [= size]]...] [log on database_device [= size] [, database_device [= size]]...] [with {override | default_location = "pathname"}] [for {load | proxy_update}]
global temporary – indicates that you are creating a global temporary database.
system temporary – indicates that you are creating a local system temporary database.
temporary – indicates that you are creating a temporary database.
database_name – is the name of the new database. This name must conform to the rules for identifiers and cannot be a variable.
for instance instance_name – specifies the instance that is to own the local system temporary database or local temporary database you are creating. This parameter is not used when creating global temporary databases.
You must create a local user temporary database from
the instance that is to own it. You can create a local system temporary
database from any instance.
Example1 Creates a local user temporary database on “ase1.” Execute the following command from the owner instance (“ase1”).
create temporary database local_tempdb1 for instance ase1
or,
create temporary database local_tempdb1
Example 2 Creates a local system temporary database on “ase1.” Execute this command from any instance in the cluster.
create system temporary database local_systempdb1 for instance ase1
Example 3 Creates a global temporary database.
create global temporary database global_tempdb1