Manually DB Creation with 11G

Mohammad taj's picture

Manually database creation is one of the more frequently performed actions of a professional DBA. And, with Oracle 11g it only takes a few minutes to do :)

The procedure is same as previous which we are used for 9i and 10g.

In this database creation I used below features:

1. OMF (Oracle Managed File) for datafiles, redolog files & controlfiles
2. FRA (Flash Recovery Area) for Archivelog or backup files
3. ASM (Automatic Storage Mgmt) for Volume manager

1. Create Required Directories

E:\>mkdir e:\oracle\ORA11G

NOTE: above directory is for TRACE FOLDER.

And for ASM I already created DGRP2 group for database.

2. Set Enviourment Variable (ORACLE_HOME,ORACLE_SID,PATH)

E:\>set ORACLE_HOME=c:\app\m.taj\product\11.1.0\db_1
E:\>set PATH=c:\app\m.taj\product\11.1.0\db_1\bin
E:\>set ORACLE_SID=ora11g

3. Choose a Database Administrator Authentication Method

Two authentication method we can use.
1. Password Authentication method
For Password Authentication method we need to create PASSWORD file through ORAPWD utility.

2. OS Authentication method
For OS Authentication method OS user must be member of OS DBA Group.

NOTE: Here I used OS authentication Method.

3. Creating INIT.ORA parameter file
Set minimum required parameter in INIT.ora file.

Open NOTEPAD file and set below parameters

db_name = 'ORA11G'
#Database name.

#OMF configuration for Datafile,controlfile
#OMF configuration for redolog file 

#FRA (FLASH RECOVERY AREA configuration)

#It is new feature with 11g for trace files (bdump,udump,cdump or many others
#folder created in "DIAG" folder inside "e:\oracle\ora11g" folder.

Save it in Temporary folder.

4. Create an Instance

E:\>oradim -NEW -SID ora11g -STARTMODE auto
Instance created.

5. Connect to an Instance

E:\>sqlplus /nolog
SQL*Plus: Release - Production on Thu May 1 18:04:30 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.

6. Create Server Parameter file (SPFILE)

SQL> create SPFILE from PFILE='c:\temp\init.TXT';
File created.

7. Start the Instance

SQL> startup nomount

ORACLE instance started.
Total System Global Area 150667264 bytes
Fixed Size 1331740 bytes
Variable Size 92278244 bytes
Database Buffers 50331648 bytes
Redo Buffers 6725632 bytes

8. Create Database

SQL> create database ORA11G;
Database created.

9. Create Temporary and Additional Tablespace

SQL> create temporary tablespace TEMP TEMPFILE '+DGRP2' size 5m;
Tablespace created.
SQL> create tablespace USERDATA DATAFILE '+DGRP2' size 5m;
Tablespace created.
SQL> alter database default temporary tablespace TEMP;
Database altered.
SQL> alter database default tablespace USERDATA;
Database altered.

10. Run Scripts to build data dictionary views

SQL> @%ORACLE_HOME%/rdbms/admin/catalog.sql
SQL> @%ORACLE_HOME%/rdbms/admin/catproc.sql
SQL> @%ORACLE_HOME%/sqlplus/admin/pupbld.sql

11. Change Database Mode from NO-ARCHIVELOG to ARCHIVELOG.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount
ORACLE instance started.
Total System Global Area 150667264 bytes
Fixed Size 1331740 bytes
Variable Size 92278244 bytes
Database Buffers 50331648 bytes
Redo Buffers 6725632 bytes
Database mounted.
SQL> alter database ARCHIVELOG;
Database altered.
SQL> alter database OPEN;
Database altered.

NOTE: It is recommended to run database in ARCHIVELOG MODE

12. Check all database files how is look in ASM :)

SQL> select NAME from v$datafile 
2 union all 
3 select NAME from v$controlfile 
4 union all 
5 select MEMBER from v$logfile;
7 rows selected.


Very nice to read this article. I'm new to DBA, I've one question, in 11i, is the extent management locally managed or dictionary managed by default ? It's better, if we mention the locally managed for the non-system tablespaces, it will reduce the contention in the system tablespaces.

Mohammad taj's picture

Read this

When you do not explicitly specify the type of extent management, Oracle Database determines extent management as follows:

If the CREATE TABLESPACE statement omits the DEFAULT storage clause, then the database creates a locally managed autoallocated tablespace.

Best Regards
Mohammed Taj


This Post was very useful to easily understand ,and to implement.



This post is an excellent contribution for DBAs and other professionals like me. I am not a DBA or OCP, but working as an Oracle developer. Database creation was a big issue for me, but now it will not be an issue any longer.

Thank you.
Muhammad Taj.