Wednesday, April 15, 2009

Creating a database Manually

Creating a database Manually
Step-1. Create a folder as ORCL2 (name other then the existing database)
And then create 5 more folders in this folder name and give them the following names
1. create
2. udump
3. bdump
4. cdump
5. Pfile

Step-2. Copy original “init.ora” from Oracle → admin → ORCL → Pfile and past it in new
Pfile folder created in 1st step.

Step-3. Change these parameters in new init.ora file
1. Db_name = ORCL2
2. background_dump_dest = c:\ORCL2\bdump
core_dump_dest = c:\ORCL2\cdump
user_dump_dest = c:\ORCL2\udump
3. control_files = ("C:\oracle\oradata\ORCL2\CONTROL01.CTL", "C:\oracle\oradata\ORCL2\
CONTROL02.CTL", "C:\oracle\oradata\ORCL2\CONTROL03.CTL")
4. Remote_login_password file = SHARED
5. # undo_managemnt = Auto
# undo_tablespace = undoTBS1

Step-4. Now startup the database with Pfile in no mount mode and create a database
SQL > Startup nomount pfile=’c:\orcl2\pfile\init.ora’
SQL > Create database orcl2
2. datafile ‘c\orcl2\create\system01.dbf’ size 200M
3. Log file
4. Group 1 (‘c:\orcl\create\g1m1.log’) size 5M ,
5. Group 2 (‘c\ orcl\create\g2m2.log’) size 5M ;
Now an empty database is created

Step-5. To copy default tables we have to run these scripts
SQL> @c:\oracle\ora92\RDBMS\admin\catalog.sql
SQL> @c:\oracle\ora92\RDBMS\admin\catproc.sql
Step-6. Now we can create additional table spaces as needed

No comments: