Oracle8i SQL Reference Release 2 (8.1.6) A76989-01 |
|
SQL Statements (continued), 4 of 20
maxsize_clause::=
To create a database, making it available for general use.
This statement erases all data in any specified datafiles that already exist in order to prepare them for initial database use. If you use the statement on an existing database, all data in the datafiles is lost.
After creating the database, this statement mounts it in either exclusive or parallel mode (depending on the value of the PARALLEL_SERVER
initialization parameter) and opens it, making it available for normal use. You can then create tablespaces and rollback segments for the database. For information on these tasks, see "CREATE ROLLBACK SEGMENT" and "CREATE TABLESPACE".
See Also:
|
You must have the OSDBA
role enabled.
If the REMOTE_LOGIN_PASSWORDFILE
initialization parameter is set to EXCLUSIVE
, Oracle returns an error when you attempt to re-create the database. To avoid this message, either set the parameter to SHARED
, or re-create your password file before re-creating the database.
database |
is the name of the database to be created and can be up to 8 bytes long. The database name can contain only ASCII characters. Oracle writes this name into the control file. If you subsequently issue an |
|
|
Note: You cannot use special characters from European or Asian character sets in a database name. For example, characters with umlauts are not allowed. |
|
|
If you omit the database name from a |
|
|
reuses existing control files identified by the initialization parameter |
|
|
If you omit this clause and any of the files specified by |
|
|
specifies one or more files to be used as redo log files. Each filespec specifies a redo log file group containing one or more redo log file members (copies). For the syntax of filespec, see "filespec". All redo log files specified in a |
|
|
|
uniquely identifies a redo log file group and can range from 1 to the value of the |
|
If you omit the |
|
|
specifies the maximum number of redo log file groups that can ever be created for the database. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The default, minimum, and maximum values depend on your operating system. |
|
|
specifies the maximum number of members, or copies, for a redo log file group. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The minimum value is 1. The maximum and default values depend on your operating system. |
|
|
specifies the maximum number of archived redo log files for automatic media recovery with Oracle Parallel Server. Oracle uses this value to determine how much space in the control file to allocate for the names of archived redo log files. The minimum value is 0. The default value is a multiple of the |
|
|
Note: This parameter is useful only if you are using Oracle with the Parallel Server option in parallel mode, and archivelog mode enabled. |
|
|
specifies the initial sizing of the datafiles section of the control file at |
|
|
The number of datafiles accessible to your instance is also limited by the initialization parameter |
|
|
specifies the maximum number of instances that can simultaneously have this database mounted and open. This value takes precedence over the value of initialization parameter |
|
|
specifies that the contents of a redo log file group must be archived before the group can be reused. This clause prepares for the possibility of media recovery. |
|
|
specifies that the contents of a redo log file group need not be archived before the group can be reused. This clause does not allow for the possibility of media recovery. |
|
|
The default is |
|
|
specifies the character set the database uses to store data. The supported character sets and default value of this parameter depend on your operating system. |
|
|
Restriction: You cannot specify any fixed-width multibyte character sets as the database character set. See Also: Oracle8i National Language Support Guide for more information about character sets. |
|
|
specifies the national character set used to store data in columns specifically defined as |
|
|
specifies one or more files to be used as datafiles. See the syntax description of filespec in "filespec". All these files become part of the |
|
|
Note: Oracle recommends that the total initial space allocated for the |
|
autoextend_clause |
enables or disables the automatic extension of a datafile. If you do not specify this clause, datafiles are not automatically extended. |
|
|
|
disables autoextend if it is turned on. |
|
|
enables autoextend. |
|
|
specifies the size in bytes of the next increment of disk space to be allocated to the datafile automatically when more extents are required. Use K or M to specify this size in kilobytes or megabytes. The default is the size of one data block. |
|
|
specifies the maximum disk space allowed for automatic extension of the datafile. |
|
|
sets no limit on the allocation of disk space to the datafile. |
The following statement creates a small database using defaults for all arguments:
CREATE DATABASE;
The following statement creates a database and fully specifies each argument:
CREATE DATABASE newtestCONTROLFILE REUSE LOGFILE GROUP 1 ('diskb:log1.log', 'diskc:log1.log') SIZE 50K, GROUP 2 ('diskb:log2.log', 'diskc:log2.log') SIZE 50K MAXLOGFILES 5 MAXLOGHISTORY 100 DATAFILE 'diska:dbone.dat' SIZE 2M MAXDATAFILES 10 MAXINSTANCES 2 ARCHIVELOG CHARACTER SET US7ASCII NATIONAL CHARACTER SET JA16SJISFIXED DATAFILE 'disk1:df1.dbf' AUTOEXTEND ON 'disk2:df2.dbf' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;
|
![]() Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|