Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
   
STEPS TO CREATE DATABASE MANUALLY ON LINUX




By Monish S Bhattacharya
Sep 15, 2008

Digg! digg!     Print    email to friend Email to Friend

Note: This article was written for educational purpose only. Please refer to the related vendor documentation for detail.




STEPS TO CREATE DATABASE MANUALLY ON LINUX

This article shows you steps to create a database manually on Linux.

Step 1:

First create all the necessary directories. Followings are my directories:

testdb1]$ ls
admin backup archive
admin]$ ls
adump bdump cdump udump

Step 2:

Next prepare the database creation script. Following is my script  "testdb1.sql"

CREATE DATABASE "testdb1"
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/d02/monish/testdb1/redo1.log' SIZE 10M,
GROUP 2 '/d02/monish/testdb1/redo2.log' SIZE 10M,
GROUP 3 '/d02/monish/testdb1/redo3.log' SIZE 10M
DATAFILE
'/d02/monish/testdb1/system.dbf' size 100m,
'/d02/monish/testdb1/usr04.dbf' size 10m
sysaux datafile '/d02/monish/testdb1/sysaux.dbf' size 100m
undo tablespace undotbs
datafile '/d02/monish/testdb1/undo.dbf' size 50m
CHARACTER SET US7ASCII
;

Step 3:

Prepare the init file. Like this one [inittestdb1.ora]

*.audit_file_dest='/d02/monish/testdb1/admin/adump'
*.background_dump_dest='/d02/monish/testdb1/admin/bdump'
*.compatible='10.2.0.3.0'
*.control_files='/d02/monish/testdb1/control01.ctl',
'/d02/monish/testdb1/control02.ctl','/d02/monish/testdb1/control03.ctl'
*.core_dump_dest='/d02/monish/testdb1/admin/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='testdb1'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=indiaXDB)'
*.job_queue_processes=10
*.log_archive_dest_1='LOCATION=/d02/monish/testdb1/archive'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=200278016
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=601882624
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS'
*.user_dump_dest='/d02/monish/testdb1/admin/udump'
*.db_recovery_file_dest='/d02/monish/testdb1/backup'
*.db_recovery_file_dest_size=2147483648

Step 4:

Now perform the following steps:

$ export ORACLE_SID=testdb1

$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Thu May 22 17:35:28 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.

SQL> startup pfile=/u01/app/oracle/product/10.2.0/db_1/dbs/inittestdb1.ora nomount

ORACLE instance started.
Total System Global Area 603979776 bytes
Fixed Size 1263176 bytes
Variable Size 167774648 bytes
Database Buffers 427819008 bytes
Redo Buffers 7122944 bytes

SQL> @testdb1.sql
Database created.

Step 5:

So your database is create. Now just run the catalog.sql and catproc.sql scripts.
You will find the in $ cd $ORACLE_HOME/rdbms/admin

SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql
SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc.sql
SQL> select name from v$database;

NAME
---------
TESTDB1

Okay, now your database is ready to use.

 

 



Comments/Reviews on this article:
swapnil  gawde
Apr 05, 2009

GOOD ONE MANISH

velmurugan  chellappa
Mar 04, 2010

hi,
i need step by step procedure for creating oracle 10g database in windows2003.

with regards
velu

krishna  kumar
Nov 05, 2008

gud job manish and thanks
i have started my ocp certification and was searching for installation notes since long

anantha  surisetty
Nov 10, 2009

hi Monish, this is really helpful for a DBA who is a beginner

 
About author:

Hi! This is Monish. I have just started my career as an Oracle DBA.

 

Please login to post your comments





  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor