CREATE DATABASE SCRIPT DESCRIPTION
SCRIPT:-
CREATE DATABASE mynewdb
USER SYS IDENTIFIED BY sys_password
USER SYSTEM IDENTIFIED BY system_password
LOGFILE GROUP1 ('/u01/app/oracle/oradata/mynewdb/redo01.log')
SIZE 100M,
GROUP 2 ('/u01/app/oracle/oradata/mynewdb/redo02.log')
SIZE 100M,
GROUP 3 ('/u01/app/oracle/oradata/mynewdb/redo03.log')
SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/mynewdb/system01.dbf' SIZE
325M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/mynewdb/sysaux01.dbf'
SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/mynewdb/users01.dbf'
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/mynewdb/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/u01/app/oracle/oradata/mynewdb/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
1:-CREATE DATABASE mynewdb:-The database is named mynewdb. Its global
database name is mynewdb where the domain portion is taken from
the initialization file.
2:- Three control files are created as specified by the CONTROL_FILES initialization parameter,
which was set before database creation in the initialization parameter file.
3:- USER SYS IDENTIFIED BY sys_password/USER SYSTEM IDENTIFIED BY
system_password:--The passwords for user accounts SYS and SYSTEM are
set to the values that you specified. Beginning with Release 11g, the
passwords are case-sensitive. The two clauses that specify the
passwords for SYS and SYSTEM are not mandatory in this release of
Oracle Database. However, if you specify either clause, you must
specify both clauses.
4:- The new database has three redo log files as specified in the
LOGFILE clause. MAXLOGFILES, MAXLOGMEMBERS, and MAXLOGHISTORY
define limits for the redo log.
5:- MAXDATAFILES specifies the maximum number of datafiles that can
be open in the database. This number affects the initial sizing of
the control file.
NOTE:-
You can set several limits during database creation. Some of these limits are limited by and
affected by operating system limits. For example, if you set MAXDATAFILES, Oracle Database
allocates enough space in the control file to store MAXDATAFILES filenames, even if the database
has only one datafile initially. However, because the maximum control file size is limited and
operating system dependent, you might not be able to set all CREATE DATABASE parameters at
their theoretical maximums.
MAXDATAFILE:-65533 (per database) / 1022(per tablespace)
-The US7ASCII character set is used to store data in this database.
-The AL16UTF16 character set is specified as the NATIONAL CHARACTER SET, used to
store data in columns specifically defined as NCHAR, NCLOB, or NVARCHAR2.
• The SYSTEM tablespace, consisting of the operating system file
/u01/app/oracle/oradata/mynewdb/system01.dbf is created as specified by the
DATAFILE clause. If a file with that name already exists, it is overwritten.
• The SYSTEM tablespace is created as a locally managed tablespace.
• A SYSAUX tablespace is created, consisting of the operating system file
/u01/app/oracle/oradata/mynewdb/sysaux01.dbf as specified in the SYSAUX
DATAFILE clause.
• The DEFAULT TABLESPACE clause creates and names a default permanent tablespace for this
database.
• The DEFAULT TEMPORARY TABLESPACE clause creates and names a default temporary
tablespace for this database.
• The UNDO TABLESPACE clause creates and names an undo tablespace that is used to store
undo data for this database if you have specified UNDO_MANAGEMENT=AUTO in the
initialization parameter file. If you omit this parameter, it defaults to AUTO.
• Redo log files will not initially be archived, because the ARCHIVELOG clause is not specified
in this CREATE DATABASE statement. This is customary during database creation. You can
later use an ALTER DATABASE statement to switch to ARCHIVELOG mode. The initialization
parameters in the initialization parameter file for mynewdb relating to archiving are
LOG_ARCHIVE_DEST_1 and LOG_ARCHIVE_FORMAT.
FILES MINIMUM / DEFAULT MAXIMUM / DEFAULT
TABLESPACE 1 2 64
MAXDATAFILES 2 2 1024
Calc:-tablespace x Maxdafiles Total datafiles:-65536
REDOLOG GROUPS 2 3 255
REDOLOG MEMBERS 1 2 5
Size=4 Mb for each member Size= 2gb for each member
SCRIPT:-
CREATE DATABASE mynewdb
USER SYS IDENTIFIED BY sys_password
USER SYSTEM IDENTIFIED BY system_password
LOGFILE GROUP1 ('/u01/app/oracle/oradata/mynewdb/redo01.log')
SIZE 100M,
GROUP 2 ('/u01/app/oracle/oradata/mynewdb/redo02.log')
SIZE 100M,
GROUP 3 ('/u01/app/oracle/oradata/mynewdb/redo03.log')
SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/mynewdb/system01.dbf' SIZE
325M REUSE
SYSAUX DATAFILE '/u01/app/oracle/oradata/mynewdb/sysaux01.dbf'
SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/mynewdb/users01.dbf'
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/mynewdb/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs
DATAFILE '/u01/app/oracle/oradata/mynewdb/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
1:-CREATE DATABASE mynewdb:-The database is named mynewdb. Its global
database name is mynewdb where the domain portion is taken from
the initialization file.
2:- Three control files are created as specified by the CONTROL_FILES initialization parameter,
which was set before database creation in the initialization parameter file.
3:- USER SYS IDENTIFIED BY sys_password/USER SYSTEM IDENTIFIED BY
system_password:--The passwords for user accounts SYS and SYSTEM are
set to the values that you specified. Beginning with Release 11g, the
passwords are case-sensitive. The two clauses that specify the
passwords for SYS and SYSTEM are not mandatory in this release of
Oracle Database. However, if you specify either clause, you must
specify both clauses.
4:- The new database has three redo log files as specified in the
LOGFILE clause. MAXLOGFILES, MAXLOGMEMBERS, and MAXLOGHISTORY
define limits for the redo log.
5:- MAXDATAFILES specifies the maximum number of datafiles that can
be open in the database. This number affects the initial sizing of
the control file.
NOTE:-
You can set several limits during database creation. Some of these limits are limited by and
affected by operating system limits. For example, if you set MAXDATAFILES, Oracle Database
allocates enough space in the control file to store MAXDATAFILES filenames, even if the database
has only one datafile initially. However, because the maximum control file size is limited and
operating system dependent, you might not be able to set all CREATE DATABASE parameters at
their theoretical maximums.
MAXDATAFILE:-65533 (per database) / 1022(per tablespace)
-The US7ASCII character set is used to store data in this database.
-The AL16UTF16 character set is specified as the NATIONAL CHARACTER SET, used to
store data in columns specifically defined as NCHAR, NCLOB, or NVARCHAR2.
• The SYSTEM tablespace, consisting of the operating system file
/u01/app/oracle/oradata/mynewdb/system01.dbf is created as specified by the
DATAFILE clause. If a file with that name already exists, it is overwritten.
• The SYSTEM tablespace is created as a locally managed tablespace.
• A SYSAUX tablespace is created, consisting of the operating system file
/u01/app/oracle/oradata/mynewdb/sysaux01.dbf as specified in the SYSAUX
DATAFILE clause.
• The DEFAULT TABLESPACE clause creates and names a default permanent tablespace for this
database.
• The DEFAULT TEMPORARY TABLESPACE clause creates and names a default temporary
tablespace for this database.
• The UNDO TABLESPACE clause creates and names an undo tablespace that is used to store
undo data for this database if you have specified UNDO_MANAGEMENT=AUTO in the
initialization parameter file. If you omit this parameter, it defaults to AUTO.
• Redo log files will not initially be archived, because the ARCHIVELOG clause is not specified
in this CREATE DATABASE statement. This is customary during database creation. You can
later use an ALTER DATABASE statement to switch to ARCHIVELOG mode. The initialization
parameters in the initialization parameter file for mynewdb relating to archiving are
LOG_ARCHIVE_DEST_1 and LOG_ARCHIVE_FORMAT.
FILES MINIMUM / DEFAULT MAXIMUM / DEFAULT
TABLESPACE 1 2 64
MAXDATAFILES 2 2 1024
Calc:-tablespace x Maxdafiles Total datafiles:-65536
REDOLOG GROUPS 2 3 255
REDOLOG MEMBERS 1 2 5
Size=4 Mb for each member Size= 2gb for each member