Database Creation

1. Decide where to store pfile, Datafile, Controlfile and Redo log file. For example here we decide to store those file in C:\

2. Create the folder in the following orders

bdump: Store Background process trace files.

cdump: Core dump files.

ddump: The dpdump directory has files created by the data pump export/import utility.

adump: The adump directory seems to be the area that Oracle ASM (automatic storage management) utility writes to.

pfile: Instance parameter files

udump: User SQL trace files

3. Copy an existing INIT.ORA file and paste it in pfile directory

4. Rename the file initdba1.ora

5. Password File Creation:

C:\>orapwd file=C:\oracle\product\10.2.0\db_1\database\pwddba1 password=admin entries=10

6. Instance Creation:

C:\>oradim -new -sid dba1 -intpwd admin -maxusers 10 -startmode auto -pfile C:\oracle\product\10.2.0\admin\dba1\pfile\initdba1.ora

7. Oracle Base, Home and SID Creation

C:\>set oracle_base=C:\oracle

C:\>set oracle_home=C:\oracle\product\10.2.0\db_1

C:\>set orcle_sid=dba1


SQL*Plus: Release - Production on Wed May 12 16:25:14 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> connect sys/admin as sysdba


SQL> startup nomount pfile='C:\oracle\product\10.2.0\admin\dba1\pfile\initdba1.ora';

ORACLE instance started.

Total System Global Area 167772160 bytes

Fixed Size 1247876 bytes

Variable Size 62915964 bytes

Database Buffers 96468992 bytes

Redo Buffers 7139328 bytes

8. Database Creation

SQL> create database dba1

controlfile reuse


group 1


'C:\oracle\product\10.2.0\oradata\dba1\redo1b.log') size 5m,

group 2


'C:\oracle\product\10.2.0\oradata\dba1\redo2b.log') size 5m

maxlogfiles 4

maxlogmembers 2

maxdatafiles 5

maxinstances 2

maxloghistory 0

datafile 'C:\oracle\product\10.2.0\oradata\dba1\system01.dbf' size 100


datafile 'C:\oracle\product\10.2.0\oradata\dba1\sysaux01.dbf' size 50m

undo tablespace UNDOTBS1

datafile 'C:\oracle\product\10.2.0\oradata\dba1\utable01.dbf' size 10m

default temporary tablespace temp

tempfile 'C:\oracle\product\10.2.0\oradata\dba1\temp01.dbf' size 10m

character set we8iso8859p1;

Database created.

Maxlogfiles: maximum number of redo log groups that can be created for the database.

Maxlogmembers: maximum number of members for each group.

Maxdatafiles: Maximum number of datafile that can be created.

Maxinstances: The number of instances that can access a database concurrently.

Maxloghistory: specifies the maximum number of redo log files that can be recorded in the log history of the control file.

9. Executing Scripts