Steps in creating a database manually

In this post, we are going to learn “how to create an Oracle database manually”. The database in Oracle can be created using DBCA and using the manual method. it would be a good idea to create a database manually at least once to understand how a database is created step by step in Oracle.

Step 1: Decide the name of your database instance(Here I have used MTEST)

Also, make sure that ORACLE_HOME is set

Step 2: Create a pfile with the minimal and mandatory requirements

[oracle@stagdb ~]$ cd $ORACLE_HOME/dbs

[oracle@stagdb dbs]$ vi initMTEST.ora

 

*.audit_file_dest=’/u01/app/admin/MTEST/adump’

*.audit_trail=’db’

*.compatible=’11.2.0.0.0′

*.control_files=’/u01/MTEST/control01.ctl’,’/u01/MTEST/control02.ctl’

*.db_block_size=8192

*.db_name=’MTEST’

*.diagnostic_dest=’/u01/app’

*.SGA_TARGET=2G

*.undo_tablespace=’UNDOTBS1′

 

save and exit.

Step 3:  Create a required directory structure.

Step 4: Connect to the sql prompt and startup with nomount option.

Step 5: Issue the create database statement

create database MTEST

datafile ‘/u01/MTEST/system01.dbf’ size 500M

sysaux datafile ‘/u01/MTEST/sysaux.dbf’ size 100m

undo tablespace UNDOTBS1

datafile ‘/u01/MTEST/UNDOTBS01.dbf’ size 100m

default temporary tablespace temp

tempfile ‘/u01/MTEST/tmpp01.dbf’ size 100m

logfile

group 1 ‘/u01/MTEST/redolog1.ora’ size 50m,

group 2 ‘/u01/MTEST/redolog2.ora’ size 50m;

Step 6: Run Scripts to Build Data Dictionary Views

Here,

CATALOG.SQL : Creates the views of the data dictionary tables, the dynamic performance views, and public synonyms for many of the views. Grants PUBLIC access to the synonyms.

CATPROC.SQL:Runs all scripts required for or used with PL/SQL.

PUPBLD.SQL: Required for SQL*Plus. Enables SQL*Plus to disable commands by user.

connect sys/passwd

Important dictionary views 

Words from dbapath

Thank you for giving your valuable time to read the above information. I hope the content served your purpose in reaching out the blog.
Suggestions for improvement of the blog are highly appreciable. Please contact us for any information/suggestion/feedback.

If you want to be updated with all our articles

please follow us on Facebook | Twitter
Please subscribe to our newsletter.