Installing Oracle 10g in RH4 Enterprise

1. Checking System
a. Host File:
edit /etc/hosts file, add following entry if not exit


127.0.0.1 localhost.localdomain localhost

Notes: there is a blank enter after the line, otherwise this setting will not effective.
Its better just restart the machine

b. Space:

# df -m
Oracle need at least 2GB

c. RMP:

The following packages (or later versions) must be installed:
Red Hat Enterprise Linux 3.0 and 4.0,
make-3.79.1
gcc-3.2.3-34
glibc-2.3.2-95.20
compat-db-4.0.14-5
compat-gcc-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-libstdc++-7.3-2.96.128
compat-libstdc++-devel-7.3-2.96.128
openmotif21-2.1.30-8
setarch-1.3-1

2. Directory and user Create

a. Enter the following commands to create the oinstall and dba groups:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba

b. If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group, then enter the following command:

# /usr/sbin/usermod -g oinstall -G dba oracle

If the oracle user does not exist, enter the following command to create it:
# /usr/sbin/useradd -g oinstall -G dba oracle

Here, g=primary group, G=Secondary Group
c. Directory

#cd /
#mkdir orahome
#cd orahome
#mkdir home
#mkdir base
#chown -R oracle:oinstall orahome

#mkdir database

Copy the oracle database software in database directory form the media CD.

#chmod 777 database

3. Bash Profile
#gedit /home/oracle/.bash_profile

Add following text in bash profile


export ORACLE_HOME=/orahome/home
export ORACLE_BASE=/orahome/base
TEMP=/tmp
TMPDIR=/tmp
export TEMP TMPDIR

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/s:bin
export PATH
unset USERNAME

4. Kernel parameters

To see all kernel parameters, execute:
#sysctl -a

#gedit /etc/sysctl.conf

Add following setting,


kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
rmem_default = 262144
rmem_max = 262144
wmem_default = 262144
wmem_max = 262144

Notes: If exiting value is grater than above value just remain this entry.

Adding these lines to the /etc/sysctl.conf file will cause the system to change these kernel parameters after each boot using the /etc/init.d/bootmisc script which is invoked by /etc/inittab. But in order that these new added lines or settings in /etc/sysctl.conf become effective immediately, execute the following command:
Configuring kernel parameters:
#sysctl -p

5. Start Installer
Logout root user and Login to oracle user (GUI mode). Then start Oracle Universal Installer, enter the following command:
#cd database
# ./runInstaller
If the Environment value is properly provided, oracle installer automatically set the installation Directory.

Then just follow the installer direction. Its better that fist time do not create database. Install only oracle home.
Tips: oracle installer prompts to execute two scripts at the end of the installation. Using su root, run these two scripts.

6. Checking Oracle
#sqlplus /nolog
Or
#cd /orahome/home/bin
#./sqlplus /nolog

7. Creating Database
Login as oracle user in GUI mode
a. Run Listener
#lsnrctl start
Or
#cd /orahome/home/bin
#./ lsnrctl start
b. Run DBCA
#dbca
Or
#cd /orahome/home/bin
#./dbca

8. User Database
Suppose databsae Instance name is KHDB
#export ORACLE_SID=KHDB;
sql>sqlplus /nolog;
sql>conn /as sysdba;
sql>startup;

For shutdownig oracle
sql>shutdown immediate;

Welcome oracle in Redhat.
######################################################
Md. Abul Khayer
GIS Programmer, CEGIS

Advertisements

Problem ORACLE 9i: file is more recent than controlfile – old controlfile

When I am practicing oracle 9i fundamental one, I execute Database base control file location change operation. But unfortunately I have performed this operation in database open state. This cause problem when next time I try to open my database. Oracle has prompted messages “file is more recent than controlfile – old controlfile”.

I am new in oracle. This problem creates in big trouble to me. After exploring in Google at least two hour at last I can resolve this problem.

Solution:
I have executed recovery operation. Here i follow incomplete user managed backup procedure. Before that I have backup my entire important file of the database. The follow below steps,

1. Open database at mount state
sql> startup mount

2. Identified the current Redo file
sql>select l.status, member from v$logfile inner join v$log l using (group#);
INACTIVE C:/oracle/MYDB/ctl/redo01.log
CURRENT C:/oracle/MYDB/ctl/redo02.log
INACTIVE C:/oracle/MYDB/ctl/redo03.log

OR
Sql> select * from v$log;

3. Start database recovery
SQL>recover database using backup controlfile until cancel;

Input the current redo log file dirrectory and press enter
C:/oracle/MYDB/ctl/redo02.log

4. Open Database using reset log
sql> alter database open resetlogs;

Thanks GOD!!!

Ref: Here