Name

CREATE DATABASE

Synopsis

CREATE DATABASE [dbname]
CONTROLFILE [REUSE] (filespec
[,filespec. . .])
LOGFILE [GROUP integer]
(filespec[,[GROUP
integer]
filespec ...])
      [MAXLOGFILES integer]
      [MAXLOGMEMBERS integer]
      [MAXLOGHISTORY integer]
      [MAXDATAFILES integer]
      [MAXINSTANCES integer]
      [ARCHIVELOG | NOARCHIVELOG]
   CHARACTER SET charset
   NATIONAL CHARACTER SET charset
DATAFILE (filespec autoextend_clause[,filespec
[autoextend_clause]...])

Creates a database (dbname) and specifies parameters associated with it. The database name may be 1 to 8 characters long, and may not be a reserved word.

Keywords

CONTROLFILE

Specifies the names of one or more control files to be used for this database.

REUSE

Specifies that one or more existing control files specified in INIT.ORA can be reused and overwritten. If this keyword is omitted and any of the control files named in INIT.ORA exists, an error will result. If the parameters specified require that the control file be larger than the current size, the command will fail. Note that this option is not normally used for new database creation.

filespec

Specifies an operating system file or raw partition. The syntax is shown later in the filespec section.

LOGFILE

Specifies the names of one or more redo log file GROUPs to be created.

MAXLOGFILES

Specifies the maximum number of redo log file groups that can ever be created for the database. The default and maximum values are operating system dependent. This value must be at least 2, and should be at least 3.

MAXLOGMEMBERS

Specifies the maximum number of copies of a redo log group that may exist in the database. The minimum is 1, and the default and maximum are operating system dependent.

MAXLOGHISTORY

Specifies the maximum number of archived redo log file groups for automatic media recovery of the Parallel Server. The minimum value is 1; the default and maximum are operating system dependent.

MAXDATAFILES

Specifies the maximum number of datafiles that can ever be created for the database. The minimum is 1, but should never be set lower than the largest number of datafiles ever created in the database.

MAXINSTANCES

Specifies the maximum number of instances that can have the database mounted and open. This parameter applies only to the Parallel Server.

ARCHIVELOG

Specifies that the database will be run in archivelog mode, which means that a redo log group must be archived before it can be reused. If the group has not been archived, the database will halt until archiving occurs successfully. This mode is required in order to perform media recovery.

NOARCHIVELOG

Specifies that redo log groups will not be archived, and may be reused immediately by Oracle. This is the default.

CHARACTER SET

Specifies the character set that the database will use to store data. This character set cannot be changed after database creation. The choices and default are operating system dependent.

NATIONAL CHARACTER SET

Specifies the character set that the database will use to store data in NCHAR, NCLOB, and NVARCHAR2 datatypes. This character set cannot be changed after database creation. If this parameter is not specified, it will default to the value specified for CHARACTER SET.

DATAFILE

Specifies the names of all datafiles in the database, which must all exist.

autoextend_clause

Specifies whether a given datafile is able to be automatically extended when it runs out of free space. The syntax is shown in the later autoextend_clause section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset