Download Oracle 11g / 12 c Software

MySQL Tutorial

This section presents the steps involved when you create a database
manually. These steps should be followed in the order presented. Before
you create the database make sure you have done the planning about the
size of the database, number of tablespaces and redo log files you want in
the database.

Regarding the size of the database you have to first find out how many
tables are going to be created in the database and how much space they
will be occupying for the next 1 year or 2. The best thing is to start
with some specific size and later on adjust the size depending upon the
requirement

Plan the layout of the underlying operating system files your database
will comprise. Proper distribution of files can improve database
performance dramatically by distributing the I/O during file access. You
can distribute I/O in several ways when you install Oracle software and
create your database. For example, you can place redo log files on
separate disks or use striping. You can situate datafiles to reduce
contention. And you can control data density (number of rows to a data
block).

Select the standard database block size. This is specified at database
creation by the DB_BLOCK_SIZE initialization parameter and cannot be
changed after the database is created. For databases, block size of 4K
or 8K is widely used

Before you start creating the Database it is best to write down the
specification and then proceed

The examples shown in these steps create an example database my_ica_db

Let us create a database my_ica_db with the following specification

Database name and System Identifier

SID=myicadbDB_NAME=myicadb

TABLESPACES (we will have 6 tablespaces in this database. With 1
datafile in each tablespace)

Tablespace Name

Datafile Location

Size

SYSTEM

/u01/oracle/oradata/myica/sys.dbf

500M

USERS

/u01/oracle/oradata/myica/usr.dbf

100M

UNDOTBS

/u01/oracle/oradata/myica/undo.dbf

100M

TEMP

/u01/oracle/oradata/myica/temp.dbf

100M

INDEX_DATA

/u01/oracle/oradata/myica/indx.dbf

100M

SYSAUX

/u01/oracle/oradata/myica/sysaux.dbf

100M

LOGFILES (we will have 2 log groups in the database)

Logfile Group

Member Location

Size

GROUP 1

/u01/oracle/oradata/myica/log1.ora

10M

GROUP 2

/u01/oracle/oradata/myica/log2.ora

10M

CONTROL FILE(We will have 1 Control File in the following
location)

/u01/oracle/oradata/myica/control.ora

PARAMETER FILE (we will use normal parameter file for now, later
on we can switch to SPFile)

/u01/oracle/dbs/initmyicadb.ora

(remember the parameter file name should of the format init<sid>.ora
and it should be in ORACLE_HOME/dbs directory in Unix o/s and
ORACLE_HOME/database directory in windows o/s)

Now let us start creating the database.

Step 1: Login to oracle account and make directories for
your database.

After entering
the above parameters save the file by pressing "Esc
:wq"

Step 3: Now set ORACLE_SID environment variable and start the
instance.

$ export ORACLE_SID=myicadb

$ sqlplus
Enter User: / as sysdbaSQL>startup nomount

Step 4: Give the create database command

Here I am not specifying optional setting such as language, characterset
etc. For these settings oracle will use the default values. I am giving the bare minimum command to create the
database to keep it simple.

If you are getting any errors then see accompanying messages. If no
accompanying messages are shown then you have to see the alert_myicadb.log file located in
BACKGROUND_DUMP_DEST directory, which will show the exact reason why the command has failed. After you have rectified the
error please delete all created files in u01/oracle/oradata/myica directory and again give the above command.

Step 5: After the above command finishes, the database will get
mounted and opened. Now create additional
tablespaces