How to Create a Oracle Database – DBA Tutorial

Recommended by 0 users

Steps to Create Database

STEP 1: 

Login as a oracle user and move to dbs directory, it is available in oracle_home  location

$cd $oracle_home/dbs


Create init<sid>.ora (ex: initcricket.ora) file i.e., parameter file and keep intIalization parameters which are required to create the database.

For example, here my sid (system identifier) is cricket.

$vi initcricket.ora (press enter here)

Db_name= cricket



Db_cache_size = 500m

Shared_pool_size = 300m

Control_files=(/u01/ cricket /control01.ctl,/u01/ cricket /control02.ctl)

Undo_management = auto

Undo_tablespace = undotbs1

Diagnostic_dest=/u01/ cricket /diag

Compatible =

:wq (save  parameter file & quite the file)


 Create a directory structures, what you kept in the init <sid>.ora file.

For above example i used /u01/cricket directory structure, so we need to create it.

$mkdir -p /u01/cricket


Now export the oracle_sid value as cricket by using following command.

$export oracle_sid=cricket



Now connect to the sql as sysdba user by using following command.

$sqlplus / as sysdba

STEP 6: 

In startup nomount stage only it is possible to create the database,

So now we move to nomount state by using the following command.

Sql> startup nomount


For database creation we need to fire the below sql statement.

Sql>create database cricket

Datafile ‘/u01/cricket/system.dbf’ size 1024m extent management local

Sysaux datafile ‘/u01/cricket/sysaux.dbf’ size 700m

Default tablespace user_tbs

Datafile ‘/u01/cricket/user01.dbf’ size 500m

Undo tablespace undotbs1

Datafile ‘/u01/cricket/undo01.dbf’ size 500m

Default temporary tablespace temptbs

Tempfile ‘/u01/cricket/temp01.dbf’ size 500m



Group 1 ‘/u01/cricket/redolog01.log’ size 512m,

Group 2 ‘/u01/cricket/redolog02.log’ size 512m,

Group 3 ‘/u01/cricket/redolog03.log’ size 512m


It will take few minits for  to create the database.


 After database creation we need to run the two scripts at sql prompt.

These scripts create the data dictionary under system tablespace.


It will take few minits. After this one we run second script.


It will take few minits.


Now we login as a system user and run one more script.

Sql>conn system/manager


Enroll for Instructor Led Online Oracle DBA Training

0 Responses on How to Create a Oracle Database – DBA Tutorial"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.