Oracle 10g Installation and manual DB Creation
ORACLE INSTALLATION AND DB CREATION
PRE INSTALLATION STEPS FOR ORACLE
After creating Redhat linux – Open Terminal in GUI – then give
[root@localhost ~]# Service network restart - then
1. Creating the Home directory for oracle
mkdir -p /oraeng
Now give df –h that will give the list of mount points
2. Creation of groups for the oracle user
groupadd –g 1000 oinstall
groupadd -g 2000 dba
useradd -u 1001 -g oinstall -G dba -d /oraeng -m oracle
#u uid
#d home directory for the user “oracle”
#g assigns a base group to the user
#G adds a additional group to the user
chown -R oracle:oinstall /oraeng
chown -R oracle:dba /disk1 /disk2 /oraeng
# R - Recursive
4. Set the Kernel level Parameters
cd /etc/rc.d/rc5.d
vim S99kernel
echo 2147483648 > /proc/sys/kernel/shmmax
echo 4096 > /proc/sys/kernel/shmmni
echo 2097152 > /proc/sys/kernel/shmall
echo 65536 > /proc/sys/fs/file-max
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
echo 250 32000 100 128 > /proc/sys/kernel/sem
5. Save the file and the change the permission
chmod 777 S99kernel
6. Execute the file
./S99kernel This ll execute the file
cd /etc
vi sysctl.conf
kernel.core_uses_pid = 1
net.core.rmem_max = 262144
net.core.rmem_default = 262144
net.core.wmem_max = 262144
net.core.wmem_default = 262144
#rmem-TCP receiver buffer size
#wmem-TCP sender buffersize
7. Check the Kernel parameter
cat /proc/sys/kernel/shmmax (shared memory maximum)
2147483648 this ll come..
8. Set the password for the oracle user
passwd oracle
9. Edit the .bash_profile
Reboot and login as oracle and then edit.
ll get into home directory /oraeng.
ls –a will show al hidden files . In that find out bash_profile and edit it.
vim .bash_profile
export PATH
unset USERNAME
export ORACLE_SID=appdb
export ORACLE_HOME=/oraeng
export LD_LIBRARY_PATH=$ORACLE_HOME/lib,/usr/lib,/usr/ucblib,/usr/openwin/lib
export CLASS_PATH=$ORACLE_HOME/jlib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/ccs/bin:/ucb/bin:$PATH:.
10. Execute the bash_profile
. .bash_profile
Echo $ORACLE_SID
Appdb
Echo $ORACLE_HOME
/oraeng
To check if it has executed or not
12. check whether the following directories
Cd /disk1
ls
cd oracle/
ls
cd Oracle10g_linux/
ls
cd database/
ls
chmod –R 777 /oraeng/
13. Run the Run installer
cd /disk1/Oracle/Oracle10g_linux/database/
./runInstaller
Select the Installation Method as Advanced :
Select the Installation Type as Enterprise Edition:
Specify the Path for Installation (default Oracle itself choose the path)
Start Installation :
If any requirements verified, verify it as user verified and click next
Select the Configuration option as install Database Software only
Run the scripts orainstroot.sh, root.sh as root user
Along with the /oraeng/root.sh another file called Root .sh will also be there.
Then go to terminal and login as root.
Su –
Cd /oraeng/orainventory/
ls
./orainstRoot.sh
cd..
./root.sh
DATABASE INSTALLATION STEPS
Sqlplus
User_name: /as sysdba
SQL> exit
Disconnected
( Now that the database can be created )
1. Create the physical level dump directories
Cd /disk1
mkdir test
mkdir bdump cdump udump archive backup
ls
2. DB Creation Script:
Cd dbs
Vi appdbscript.sql ( in that write the below)
CREATE DATABASE testdb
DATAFILE '/disk1/test/system01.dbf' size 190M
SYSAUX DATAFILE '/disk1/test/sysaux.dbf' size 70M
UNDO TABLESPACE undotbs DATAFILE '/disk1/test/undotbs.dbf' size 30M
DEFAULT TEMPORARY TABLESPACE temp tempfile '/disk1/test/temp.dbf' size 40M
logfile
group 1('/disk1/test/redolog1a.log','/disk1/test/redolog1b.log') size 10M,
group 2('/disk1/test/redolog2a.log','/disk1/test/redolog2b.log') size 10M
controlfile reuse;
ls
export $ORACLE_SID=test
ls
cp init.ora init$ORACLE
3. PARAMETER FILE CONFIGURATION:
Copy the sample init.ora file in the dbs directory to your SID
Ex: cp init.ora initappdb.ora
Edit the Parameters ( these all will be there. Its enough if we just edited in needed places)
vi initappdb.ora
db_name=testdb
shared_pool_size = 65M
control_files = ('/disk1/test/cntl1.ctl','/disk1/test/cnt2.ctl')
Add the parameters : below the above syntax
background_dump_dest='/disk1/test/bdump'
user_dump_dest='/disk1/test/udump'
core_dump_dest='/disk1/test/cdump'
UNDO_TABLESPACE=undotbs
UNDO_RETENTION=900
UNDO_MANAGEMENT=AUTO
4. Change the permission of DB script
chmod 777 appdbscript.sql
sqlplus
User_name: /as ssdba
SQL> Startup nomount
Oracle instance is started.
SQL> @appdbscript.sql
// export $ORACLE_SID=SIDname
5. Go to the sqlplus prompt
sqlplus
6. Run the script
@dbscript
POST INSTALLATION STEPS
7. Run the script as sysdba
SQL>@$ORACLE_HOME/rdbms/admin/catalog.sql
SQL>@$ORACLE_HOME/rdbms/admin/catproc.sql
8. Run the script as system user
SQL>conn system/manager
SQL>@$ORACLE_HOME/sqlplus/admin/pupbld.sql
SQL> select name from v$database;
NAME
---------
TESTDB
#select name from v$database
#select open-mode from v$database
#archive log list;
#alter database backup controlfile to trace;
#alter system logfile;
#start nomount list;
#select status from v$instance;
#alter database mount;
#alter database open;
If you have any clarification,you can mention here.........













Comments
Post a Comment