Tuesday, 9 April 2013

ORACLE DATABASE MANNUAL CREATION STEPS - For Beginners! Easy 10 Steps!
================================================================
Database Name: cts                         ||
OS: LINUX/AIX                             ||         RAFFEEK :)
Oracle S/W : 10g                             ||
================================================================
1. cd /u01/app/oracle/admin

ls -lrt
mkdir cts
cd cts

mkdir adump bdump cdump udump pfile

2.cd /u01/app/oracle/oradata

mkdir cts

3. pfile creation steps

 cd /u01/app/oracle/admin

ls -lrt

cd <EXISTING DATABASE>/pfile

ls -lrt

cp init.ora /u01/app/oracle/admin/cts/pfile

cd /u01/app/oracle/admin/cts/pfile

ls -lrt

vi init.ora

press "i" to edit

change database name,audit/background/core/user dump locations, controlfile locations and dispatchers name

esc+shift+:+wq  --> to save


4. password file creation steps

cd /u01/app/oracle/product/10.2.0/db_1/dbs

pwd

orapwd file='/u01/app/oracle/product/10.2.0/db_1/dbs/orapwcts.ora' password=sys entries=5

ls -lrt

5. edit the oratab entry

 vi /etc/oratab

Press "i" to edit

cts:/u01/app/oracle/product/10.2.0/db_1:N

esc+shift+:+wq  --> to save


6. . oraenv  --> Set the oracle environment

? cts

  (or)

export ORACLE_SID=cts
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

echo $ORACLE_SID   --> just to check the database name
echo $ORACLE_HOME  --> just to check the oracle home path

sqlplus "/as sysdba"

7.SQL> startup nomount pfile='/u01/app/oracle/admin/cts/pfile/init.ora';


8. SQL> create database cts
datafile '/u01/app/oracle/oradata/cts/system01.dbf' size 250m
sysaux datafile '/u01/app/oracle/oradata/cts/sysaux01.dbf' size 300m
default temporary tablespace temp tempfile '/u01/app/oracle/oradata/cts/tmp01.dbf' size 40m
undo tablespace undotbs1 datafile '/u01/app/oracle/oradata/cts/undo01.dbf' size 40m
logfile
 group 1 '/u01/app/oracle/oradata/cts/log1.dbf' size 40m,
 group 2 '/u01/app/oracle/oradata/cts/log2.dbf' size 40m
/

9. spfile creation

SQL> create spfile from pfile='/u01/app/oracle/admin/cts/pfile/init.ora';

SQL> select status from v$instance;


10.SQL> @?/rdbms/admin/catalog.sql

SQL> @?/rdbms/admin/catproc.sql

SQL>conn system/manager

SQL> @?/sqlplus/admin/pupbld.sql

exit

ps -ef|grep pmon

1 comment: