Monday, July 25, 2016

Oracle 11g Release2 Database Installation On Oracle Linux 6.7 Step By Step


                       Database Installation Prerequisites

Step :01
Perform either the Automatic Setup or the Manual Setup to complete the basic prerequisites. The Additional Setup is required for all installations.
 

Automatic Setup

2.3 Downloading the Oracle Public Yum Repository Files

Note  :The following procedure assumes that yum on your system is configured to expect to find repository files in the default /etc/yum.repos.d directory.


To download the Oracle public yum repository configuration file:


As root, change directory to /etc/yum.repos.d.


# cd /etc/yum.repos.d


Use the wget utility to download the repository configuration file that is appropriate for your system.


# wget http://public-yum.oracle.com/public-yum-release.repo


For Oracle Linux 6, enter:


# wget http://public-yum.oracle.com/public-yum-ol6.repo


The /etc/yum.repos.d directory is updated with the repository configuration file, in this example, public-yum-ol6.repo.

You can enable or disable repositories in the file by setting the value of the enabled directive to 1 or 0 as required.
If you plan to use the "oracle-rdbms-server-11gR2-preinstall" package to perform all your prerequisite setup, follow the instructions at ​http://public-yum.oracle.com to setup the yum repository for OL, then perform the following command.
yum install oracle-rdbms-server-11gR2-preinstall


All necessary prerequisites will be performed automatically. It is probably worth doing a full update as well, but this is not strictly speaking necessary.
yum update
Manual Setup
Using any text editor, create or edit the /etc/sysctl.conf file

[root@oracledb2~]# vi /etc/sysctl.conf
And add or edit lines similar to the following
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2076375040
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
:x (save and exit)
Note: 1. Change the value of parameter if less then the above below.
2. 'kernel.shmmax' Parameter Value should be half size of the RAM.
3. The current values can be tested using the following command.
4. [root@oracledb2 ~]# /sbin/sysctl -a | grep <param-name>
Enter the following command to change the current values of the kernel parameters:
[root@oracledb2 ~]# /sbin/sysctl -p
Step: 02 Add the following lines to the "/etc/security/limits.conf" file.
[root@oracledb2 ~]# vi /etc/security/limits.conf
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
:x(save and exit)
Step: 03  Amend the "/etc/security/limits.d/90-nproc.conf" file as described below.

[root@oracledb2~]# vi /etc/security/limits.d/90-nproc.conf

# Change this
* soft nproc 1024
# To this
* - nproc 16384
:x(save and exit)
Step: 04  Change the setting SELINUX to disabled by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
[root@oracledb2~]# vi /etc/selinux/config
SELINUX=disabled
:x(save and exit)

Step: 05  If you have the Linux firewall enabled, you will need to disable or configure it. The following is an example of disabling the firewall.

[root@oracledb2~]# etc/init.d/iptables stop
[root@oracledb2~]# chkconfig iptables off
Step: 06  Package Requirements
The following list of packages required for Installed for Oracle Database 11g Release 2. We can do it by two ways.
1. Install required packages from YUM server (If yum server already configured)
2. Install required packages manually


Use below command to install required package from Yum Server,
yum install binutils-2*x86_64*
yum install glibc-2*x86_64* nss-softokn-freebl-3*x86_64*

yum install glibc-2*i686* nss-softokn-freebl-3*i686*
yum install compat-libstdc++-33*x86_64*
yum install glibc-common-2*x86_64*
yum install glibc-devel-2*x86_64*
yum install glibc-devel-2*i686*
yum install glibc-headers-2*x86_64*
yum install elfutils-libelf-0*x86_64*
yum install elfutils-libelf-devel-0*x86_64*
yum install gcc-4*x86_64*
yum install gcc-c++-4*x86_64*
yum install ksh-*x86_64*
yum install libaio-0*x86_64*
yum install libaio-devel-0*x86_64*
yum install libaio-0*i686*
yum install libaio-devel-0*i686*
yum install libgcc-4*x86_64*
yum install libgcc-4*i686*
yum install libstdc++-4*x86_64*
yum install libstdc++-4*i686*
yum install libstdc++-devel-4*x86_64*
yum install make-3.81*x86_64*

yum install numactl-devel-2*x86_64*
yum install sysstat-9*x86_64*
yum install compat-libstdc++-33*i686*
yum install compat-libcap*
yum install unixODBC*
yum install unixODBC-devel*

To determine whether the required packages are installed, enter commands similar to the following:

rpm -q package_name
To install required packages manually, mount the DVD and go to the location where all the package kept, after that enter commands similar to the following:


rpm -ivh package_name

For Mounting Linux Installation DVD use the below command,
mount -t iso9660 /dev/dvd /mnt
In these examples, '/mnt' is the mount point directories for the disc drive.
Step: 07  Enter the following commands to create the oinstall, dba groups and Oracle User
[root@oracledb2~]#
groupadd -g 1000 oinstall
groupadd -g 1200 dba
useradd -u 1100 -g oinstall -G dba oracle


Enter the following command to set the password of the oracle user
passwd oracle


Above Command will prompt you to give password. Enter Password twice to register it
New password:
Retype new password:
passwd: all authentication tokens updated successfully
Step : 8  Create the directories in which the Oracle software will be installed.
mkdir -p /home/u01/app/oracle/product/11.2.0/db_1
set the appropriate owner, group, and permissions
chown -R oracle:oinstall /home/u01
chmod -R 775 /home/u01
Step: 9  Login as the oracle user and add the following lines at the end of the ".bash_profile" file.

[oracle@oracledb2~]# vi /home/oracle/.bash_profile
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME= oracledb2.spectrum-bd.com; export ORACLE_HOSTNAME

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
ORACLE_BASE=/home/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant.jar

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant-launcher.jar
CLASSPATH=${CLASSPATH}:$JAVA_HOME/db/lib/derby.jar
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
:x(save and exit
Note : To execute bash_profile
. .bash_profile


Step:10 The "/etc/hosts" file must contain a fully qualified name for the server.

Format :<IP-address> <fully-qualified-machine-name> <machine-name>
[root@oracledb2~]# vi /etc/hosts
For example.

127.0.0.1 localhost.localdomain localhost
192.168.0.15 oracledb2.spectrum-bd.com oracledb2
Step: 11  Connect to server by using vnc viewer and open a new terminal
Now to enable X applications, run the following command as root user

[root@oracledb2~]# xhost +

OR [root@oracledb2 ~]# xhost $HOSTNAME
backup.br.gov.bd being added to access control lis


Step : 12 Unzip Oracle Installer which we uploaded earlier.
[root@oracledb2~]# cd /home/software/
[root@oracledb2 software]# unzip p10404530_112030_Linux-x86-64_1of7.zip

[root@oracledb2 software]# unzip p10404530_112030_Linux-x86-64_2of7.zip


You should now have a single directory called "database" containing installation file
Step :13  Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory. Start Installation
[root@oracledb2 software]# su - oracle

[oracle@oracledb2 software]$ cd

[oracle@oracledb2 ~]$ cd /home/software/database/

[oracle@oracledb2 database]$ ./runInstaller

Starting Installation with GUI wizard
After executing runinstaller command, it will show below lines:
Checking Temp space: must be greater than 120 MB. Actual 40875 MB Passed
Checking swap space: must be greater than 150 MB. Actual 7903 MB Passed
Checking monitor: must be configured to display at least 256 colors passed

'''Some requirement checks failed. You must fulfill these requirements before
continuing with the installation.'''
Continue? (y/n) [n]

Write:''' y'''

You can see the screen of each stage of installation

1.Configure Security Updates: We can unchecked if we won't receive security updates via my oracle support.

2.Warning Message: This warning message show when if you unchecked for receive security updates.Click the 'Yes' button to skip this stage.
 

3.Download Software Updates: Generally we select in this stage Skip software updates.

4.Select Install Option: We can select Create and configure a database option for full installation with database configuration. Or We can select install database software only, which needed to configuration database later.
 

5.System Class: In this stage, we generally choose Desktop class for general use, Or Choose Server class for Production purpose.

6.Typical Install Configuration: In this stage we have to provide, Proper 'Oracle Base', 'Oracle Home' as 'Software Location' which we configure before in bash_profile. Also need to provide Administrative password.

7.Password Confirmation: In this stage, if you use a password that didn't fulfill oracle recommended standard password, then you will see below warning message. But you can click 'Yes' and continue with the installation.

8.Summary: In this stage review the information and click on 'install' to start Installation.

9.Install Product: In this stage we can see the installation progress.....

10.Database Configuar Assistant: In this stage oracle automatically configure and create the database.

11.  Password Management: In this stage, we can unlock and provide password for some user by clicking password management button. But this step is optional. We can just keep the record Global Database Name, SID, Database Control URL(EM) and click 'OK' to continue.
 

12. Execute Configuration Scripts: In this stage, we need to execute 'root.sh' script as a root user.
Open a new terminal as root user and follow the steps,
[root@oracledb02 ~]# cd /home/u01/app/oracle/product/11.2.0/db_1/

[root@oracledb02 db_1]# ./root.sh
It will display the below message and prompt for pathname, We need to just press 'Enter' to continue,

Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /home/u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
After successful execution it will display the below message,
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
13.Finish: In this stage, installer will show Enterprise Manager Login URL, click 'close' to finish the Installation.
 

Connecting to Oracle Database from SQL*Plus
Login as Oracle user:
[root@oracledb02 ~]# su - oracle
Check the Listener Status
[oracle@oracledb02 ~]$ lsnrctl status
Use the below command to UP the Listener if Listener found Down,
[oracle@oracledb02 ~]$ lsnrctl start
Use the below command to connect with the database as 'sys' user
[root@oracledb02 ~]# sqlplus sys/sys_password@orcl as sysdbaAfter successful connection it will display the below message,

SQL*Plus: Release 11.2.0.3.0 Production on Sun Dec 21 21:05:46 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
 

With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>
 
Login to Enterprise Manager


Check the Enterprise Manager Status


[oracle@oracledb02 ~]$ emctl status dbconsole


If Enterprise Manager running properly then it will display the below message


Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.


https://oracledb02.spectrum-bd.com:1158/em/console/aboutApplication
 

Oracle Enterprise Manager 11g is running.

Logs are generated in directory /home/u01/app/oracle/product/11.2.0/db_1/oracledb02.spectrum-bd.com_orcl2/sysman/log


Start the Enterprise Manager using below command if its not running,
[oracle@oracledb02 ~]$ emctl start dbconsole


Check the Enterprise Manager Login from Browser
https://oracledb02.spectrum-bd.com:1158/em/console/aboutApplication


At this Point we can Say Oracle Database Installation Completed Successfully.



Sunday, July 24, 2016

how to find ADG MRP process is running or not



                                       Find MRP process is running or not



 Sqlplus / as sysdba

sql >
select process,client_process,status,thread#,sequence#,block#,blocks  from v$managed_standby;

sql>Alter database recover managed stand b database disconnect from session;
--> show you the mrp process is running

root user:
ps -ef | grep mrp


Friday, July 22, 2016

Exadata db Node 1 can not get ping from Application node


Application node, ot reach Exadata db node 1

Connect and login as root with ILOM remote console to production dbnode01

Take a backup of existing ifcfg-bondeth0 and network file.

cp -rvf /etc/sysconfig/network-scripts/ifcfg-bondeth0 /etc/sysconfig/network-scripts/backup_ifcfg-bondeth0

cp -p /etc/sysconfig/network /etc/sysconfig/backup07_network

Edit and modify the ifcfg-bondeth0 file as below:

vi /etc/sysconfig/network-scripts/ifcfg-bondeth0
Comment the Gateway line
# GATEWAY=10.100.10.1
:wq!
Save and exit.

Edit and modify the network file as below:

vi /etc/sysconfig/network
GATEWAY=10.100.9.1
Comment the GATEWAYDEV=bondeth0
:wq!
Save and exit.(done point)

Restart the Network service.

service network restart

Backout Plan:
---------------
Edit and modify the ifcfg-bondeth0 file as below:
vi /etc/sysconfig/network-scripts/ifcfg-bondeth0
Uncomment the Gateway line
GATEWAY=10.100.10.1
:wq!
Save and exit.

Edit and modify the network file as below:
vi /etc/sysconfig/network
GATEWAY=10.100.10.1
Uncomment the GATEWAYDEV=bondeth0

Save and exit.
Restart the Network service.
service network restart




If you ifup and ifdonw service done its work same on above and network cash clean .


Hope This solution resolve ip reach ping.