Index
1. Firstly, export Environment Variables.
To export EV automatically for every session, do below changes to /home/oracle/.bashrc file:
export ORACLE_SID=kamran
export ORACLE_HOME=/home/oracle/oracle/product/10.2.0/db_1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib


2. Create parameter file and modify it by setting minimum required parameters:
*.db_name=kamran*.db_block_size=8192
*.sga_target=1677721600
*.undo_management=’AUTO’
*.control_files = (‘/home/oracle/oracle/product/10.2.0/control01.ctl’) *.user_dump_dest=’/home/oracle/oracle/product/10.2.0/udump’ *.background_dump_dest=’/home/oracle/oracle/product/10.2.0/bdump’ *.core_dump_dest=’/home/oracle/oracle/product/10.2.0/cdump’
After creation of this parameter file, create below folders in /home/oracle/oracle/product/10.2.0/ directory. Three of them are dump folders (needed for trace files and alert.log file). We’re going to keep Control Files and DataFiles in oradata folder.
– oradata
– udump
– bdump
– cdump


3. Create Server parameter file (SPFILE) using this parameter file and STARTUP the instance in NOMOUNT mode.
CREATE SPFILE FROM PFILE=’/home/oracle/oracle/product/10.2.0/init.ora’;
STARTUP NOMOUNT


Now our instance started, SGA allocated and background processes started
4. Create database script
CREATE DATABASE sunm
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 (‘/SPA4/UndoTemp/ORACLE/sunm/oradata/redo01.log’) SIZE 50M,
GROUP 2 (‘/SPA4/UndoTemp/ORACLE/sunm/oradata/redo02.log’) SIZE 50M,
GROUP 3 (‘/SPA4/UndoTemp/ORACLE/sunm/oradata/redo03.log’) SIZE 50M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE ‘/SPA4/UndoTemp/ORACLE/sunm/oradata/system01.dbf’ SIZE 325M REUSE
SYSAUX DATAFILE ‘/SPA4/UndoTemp/ORACLE/sunm/oradata/sysaux01.dbf’ SIZE 325M REUSE
DEFAULT TABLESPACE users
DATAFILE ‘/SPA4/UndoTemp/ORACLE/sunm/oradata/users01.dbf’
SIZE 500M REUSE AUTOEXTEND ON MAXSIZE 2G
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE ‘/SPA4/UndoTemp/ORACLE/sunm/oradata/temp01.dbf’
SIZE 20M REUSE
UNDO TABLESPACE undotbs
DATAFILE ‘/SPA4/UndoTemp/ORACLE/sunm/oradata/undotbs01.dbf’
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE 2G;
5. Run the scripts necessary to build views, synonyms, and PL/SQL packages
CONNECT / AS SYSDBA
SQL>@$ORACLE_HOME/rdbms/admin/catalog.sql
SQL>@$ORACLE_HOME/rdbms/admin/catproc.sql
6. Shutdown the instance and startup the database.
Your database is ready for use!

