An oracle database can be created either using Manually or using DBCA( GUI Method).  But few organizations recommend to use manual method for creating database. Here I have provided steps for creating database Manually with installation of differnt optional components.
Before creating an oracle database, Make sure oracle database software is installed.

REFER –  Steps to install oracle 12c software

Lets say we will create a database named DBATEAM

1. First, create a profile with a correct environment variable.


ORACLE_HOME = Oracle database binary installation location.


2. Now create the init.ora file( in $ORACLE_HOME/dbs location)

When we start the instance, it will read this file and set values accordingly.

mkdir /u01/app/oracle

mkdir -p /u01/oradata/DBATEAM/data/DBATEAM

COMPATIBLE –             Version of the oracle database

CONTROL_FILE –        When we create the database, the control_files will be created in the specified location.

DB_BLOCK_SIZE–       This is the default block_size of the database. Any tablespace we create in the database will take this block size value.

DB_NAME  –                   Name of the database

DIAGNOSTIC_DEST–  ADR location, where the log and trace files will be written

SGA_TARGET –             Shared global area, memory allocated.

UNDO_TABLESPACE–  The default undo tablespace, that will be created in the database


3.  Start the database in nomount stage:

4.  Below the create database script.

MAXLOGFILES – Maximum number of redo log files that can be created in the database.

MAXLOGMEMBERS – maximum number of redo log file members that any given log file group can have in the database.

MAXLOGHISTORY – Maximum number of archive redo logs for automatic media recovery.

MAXDATAFILES – This defines the maximum number of datafile, But upon reaching max value, it will extend automatically to value upto DB_FILES parameter.

The MAXINSTANCES – No. of instances for the database, for standalone it will be 1 and for RAC database, it will be that of no. of rac nodes.

CHARACTER SET – Characterset of the database.

5. Now create the data dictionary views(CATALOG and CATPROC component)

These two are mandatory scripts we need to run after creating a database. Below scripts will create the dictionary views and tables.

6. Create the product user profile table ( by connecting to system user)

You can install the additional components depending upon the requirement. These are the optional components.

7. Install JVM(JAVA VIRTUAL MACHINE) component:[optional]

8. Install CONTEXT component:[optional]

9. Install ORADIM component:[optional]

10. Install MEDIA component:[optional]

12. Install OLAP component:[optional]

13. Install SPATIAL component:[optional]

14. Install LABEL security component:[optional]

15. Install APEX component:[optional]

16. Install DATABASE VAULT component:[optional]

You can check the installed components by running the below query.

select comp_id,status,comp_name from dba_registry;

17. Create a listener file and start the listener.