Manual Database Creation

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

MANUAL DATABASE CREATION

MANUAL DATABASE CREATION..............................................................................I


Think of Database name......................................................................................................II
Create respective filesystem as same as previous one........................................................II
Create initialization parameter file......................................................................................II
Create Environmental file...................................................................................................II
Create Database script .......................................................................................................III
Run create database script..................................................................................................III
Post creation steps..............................................................................................................IV
Why?..................................................................................................................................IV
Shutdown and startup the Database...................................................................................IV
..........................................................................................................................................IV

Document Prepared by: Nikhil Rangaraju


Oracle NAIO

NOTE: Database was created with the same user.

I
Think of Database name

Oracle_Sid = db02

Create respective filesystem as same as previous one

Oracle9i

Admin Oradata

db01 db02 db01 db02

bdump udump cdump bdump udump cdump

Command:
Mkdir db02
Mkdir bdump
Mkdir cdump
Mkdir udump

Create initialization parameter file

Go to ORACLE_HOME/dbs and create initdb02.ora file.

Command:
Cp initdb01.ora initdb02.ora
Vi initdb02.ora
%s/db01/db02/g

Create Environmental file

Su – oracle9i
Vi db02.env
export ORACLE_BASE=/u01/oracle9i
export ORACLE_HOME=$ORACLE_BASE/product

II
export ORACLE_SID=db02
export LD_ASSUME_KERNEL=2.4.19
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

umask 022

:wq--- save and quit


Now run the script using following command
. db02.env

Create Database script

Createdb.sql located in ORACLE_BASE


create database db02
logfile
group 1 ('/u01/oracle9i/oradata/db02/log01.rdo') size 10m,
group 2 ('/u01/oracle9i/oradata/db02/log02.rdo') size 10m
datafile '/u01/oracle9i/oradata/db02/system01. dbf' size 100m
autoextend on next 512k maxsize 120m
default temporary tablespace temp
tempfile '/u01/oracle9i/oradata/db02/temp01.dbf' size 10m
autoextend on next 5m maxsize 20m
undo tablespace UNDOTBS1
datafile '/u01/oracle9i/oradata/db02/undo01.dbf' size 10m
autoextend on next 5m maxsize 60m
character set WE8ISO8859P1
national character set AL16UTF16
;

Login as SYSDBA

Command:
Sqlplus ‘/as sysdba’

Startup the database in nomount mode

Command:
Startup nomount

Run create database script

III
Command:
@Createdb.sql

Post creation steps


Run catalog.sql and catproc.sql scripts located in
ORACLE_HOME/rdbms/admin/

Command:
@ ORACLE_HOME/rdbms/admin/catalog.sql
@ ORACLE_HOME/rdbms/admin/catproc.sql

Why?
Catalog.sql is for creatintg data dictionary views & synonyms
CatProc.sql is for running scripts required for server side pl/sql.

Connect as System/Manager and run the following script.

Command:
@ ORACLE_HOME/sqlplus/admin/pupbld.sql

Why?
Pupbld.sql is for installaing Product user profiles.

Shutdown and startup the Database

Command:
shut immediate
startup

IV

You might also like