You are on page 1of 4

ORACLE-DBA

How to Create Database manually Linux?


Step 1: Create a configuration file with all specified configuration parameter
with respective values with your specified SGA values as
Im keeping my database name as sameer so its configuration file i.e pfile as
initsameer.ora:sameer._db_cache_size=184549376
sameer._java_pool_size=4194304
sameer.__large_pool_size=4194304
sameer._shared_pool_size=83886080
sameer._streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/product/10.2.0/admin/sameer/adump'
*.background_dump_dest='/u01/app/oracle/product/10.2.0/admin/sameer/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/product/oradata/sameer/control01.ctl','/u01/app/or
acle/product/oradata/sameer/control02.ctl','/u01/app/oracle/product/oradata/sameer/
control03.ctl'
*.core_dump_dest='/u01/app/oracle/product/10.2.0/admin/sameer/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='sameer'
*.db_recovery_file_dest='/u01/app/oracle/product/10.2.0/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.job_queue_processes=10
*.open_cursors=300
SAMEER.MCA-DBA _Lorven Technology
Page 1

ORACLE-DBA

*.pga_aggregate_target=94371840
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=285212672
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/product/10.2.0/admin/sameer/udump'
->From o/s level create manually all directories
i.e. adump,bdump,cdump,dpdump,udump

Step 2: Create password file for this database as follows:


orapwd file=$ORACLE_HOME/dbs/orapwsameer password=sameer
entries=10
In the entries we can set how many times can resuse,if value is exceed
connection will loss.

Step 3: In Linux check the dbname it export or not as:


echo $ORACLE_SID
To export dbname as:

export ORACLE_SID=sameer

Step 4: Startup database in nomount stage with created pfile as:


Startup nomount pfile=path/initsameer.ora;
In nomount stage run Database created script as
@yourpath/createddbfile.sql; /*Run the database created script
with location */
SAMEER.MCA-DBA _Lorven Technology
Page 2

ORACLE-DBA

Create a script as (createddbfile.sql):-

CREATE DATABASE sameer

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

MAXLOGHISTORY 292

LOGFILE

GROUP 1 '/u01/app/oracle/product/oradata/sameer/redo01.log' SIZE 5M,

GROUP 2 '/u01/app/oracle/product/oradata/sameer/redo02.log' SIZE 5M,

GROUP 3 '/u01/app/oracle/product/oradata/sameer/redo03.log' SIZE 5M

DATAFILE '/u01/app/oracle/product/oradata/sameer/system01.dbf' size 170m


autoextend on

SYSAUX DATAFILE '/u01/app/oracle/product/oradata/sameer/sysaux01.dbf' size


100m autoextend on

DEFAULT TEMPORARY TABLESPACE temp tempfile


'/u01/app/oracle/product/oradata/sameer/temp.dbf' size 20m

DEFAULT tablespace users datafile


'/u01/app/oracle/product/oradata/sameer/users.dbf' size 20m

UNDO TABLESPACE undotbs1 datafile


'/u01/app/oracle/product/oradata/sameer/undotbs.dbf' size 20m

CHARACTER SET WE8ISO8859P1

SAMEER.MCA-DBA _Lorven Technology


Page 3

ORACLE-DBA

Step 5: For creating Datadictionary base tables ,default user,profiles,sample


users and pl/sql related objects we have to run the following script as

@$ORACLE_HOME/rdbms/admin/catalog.sql;
@$ORACLE_HOME/rdbms/admin/catproc.sql;
Connect to System/manager user:--Run the following script:
@$ORACLE_HOME/sqlplus/admin/pupbld.sql;
@$ORACLE_HOME/rdbms/admin/utlsampl.sql;
Step 6: create spfile from pfile;

SAMEER.MCA-DBA _Lorven Technology


Page 4

You might also like