Thursday, 23 June 2016

Database Creation in Easy 6 Steps




Step1:
Create Necessary Directory Structure using LINUX -- ‘MKDIR’ command
 
Step2:
Create the Parameter File.

And add necessary parameteres
Location of parameter file= /$ORACLE_HOME/dbs/

[oracle@oracleasm1 dbs]$ vi initmy1.ora

db_name=my1
instance_name=my1
compatible=11.2.0
control_files=/u01/app/oracle/oradata/my1/control01.ctl
undo_tablespace=u01
sga_target=300m
diagnostic_dest=$ORACLE_BASE
:wq!

           
Step3:

Export The Database..& Startup in NOMOUNT stage.
 $ EXPORT ORACLE_SID=my1
 $ sqlplus / as sysdba

SQL> Startup nomount


Step4:
Create the Control File ..


Vi dbScript.sql
 
create database my1
logfile
group 1('/u01/app/oracle/oradata/my1/redo1.log') size 10m,
group 2('/u01/app/oracle/oradata/my1/redo2.log') size 10m
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 0
datafile '/u01/app/oracle/oradata/my1/system01.dbf' size 400m
sysaux datafile '/u01/app/oracle/oradata/my1/sysaux.dbf' size 200m
undo tablespace u01
datafile '/u01/app/oracle/oradata/my1/undo.dbf' size 100m
default temporary tablespace temp1 tempfile '/u01/app/oracle/oradata/my1/temp01.dbf' size 100m
character set AL32UTF8
;


Step5:
Run the control script at database level

Step6:
Run these post script (below)

SQL> @$ORACLE_HOME/rdbms/admin/catalog.sql
This script to create data  Dictionary tables,

SQL> $ORACLE_HOME/rdbms/admin/catproc.sql
script to create procedure And packages

SQL> Connect system/manager
@$ORACLE_HOME/sqlplus/admin/pupbld.sql
script to create users Profile

Above Listed scripts are minimal scripts for creating database.


No comments:

Post a Comment