Search This Blog

Sunday, December 25, 2016

database is connecting from apps tier in R12

Today i got the error below after running fnd_nodes cleanup.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory

I was able to connect to database and autoconfig ran fine in db tier. But it was throwing the above error in apps tier and i was unable to connect to db from apps tier. database was up and running fine.
Honestly i was not sure about the cause of this error. As i checked the xml file. DBC file, tnsname and listener file i could not figure out anything.

Cause of the error :

This is due to db restricted session. In order to run adstats.sql i had to enable restricted session. But i dint disable it after adstats.sql. Thats what causing the issue.

Fix :

Simply i bounced the db once since i could not figure out the cause of the issue while troubleshooting. After that this error disappeared.

Also we can do the below to avoid this error and no need of bounce,

SQL> alter disable restricted session;



Tuesday, December 20, 2016

How to find process id which is using specific port?

This script will simply give you which process is exactly using your port. Just copy the script in a shell and execute.You need to supply port value as an input while executing the script.

Ex : ./script_name.sh 7213

Script get_port_pid.sh:

#!/bin/bash

# Get the process which listens on port
# $1 is the port we are looking for
if [ $# -lt 1 ]
then
echo "Please provide a port number parameter for this script"
echo "e.g. $0 22"
exit
fi
echo "Greping for your port, please be patient (CTRL+C breaks) ... "

for i in `ls /proc`
do
pfiles $i | grep AF_INET | grep $1
if [ $? -eq 0 ]
then
echo Is owned by pid $i
fi
done

RC-50221: Warning: Port pool not free in R12 while running adcfgclone.pl

I was getting the error below while running adcfgclone in R12.2 for run file system. While selecting the port pool value, i was getting the error saying one of the port pool is not free. upon checking the logs i found out OACORE (port no - 7213) is used by some processes which is causing this issue.

Error from the log :

Checking  WLS Admin Server Port on ahqtest:  Port Value = 7013
   WLS Admin Server Port available:  Port Value = 7013
 Checking  WLS OACORE Application Port on ahqtest:  Port Value = 7213
RC-50204: Error: - WLS OACORE Application Port in use: Port Value = 7213

I tried to figure out the process with the below commands but i could not figure out which process exactly using 7213.

bash-3.2$ netstat -an|egrep "7213"
10.171.17.18.7213          *.*                0      0 49152      0 LISTEN

Upon surfing i figure out the below useful shell script. This script will simply give you which process is exactly using your port. Just copy the script in a shell and execute.You need to supply port value as an input while executing the script.

Ex : ./script_name.sh 7213

Script get_port_pid.sh:

#!/bin/bash

# Get the process which listens on port
# $1 is the port we are looking for
if [ $# -lt 1 ]
then
echo "Please provide a port number parameter for this script"
echo "e.g. $0 22"
exit
fi
echo "Greping for your port, please be patient (CTRL+C breaks) ... "

for i in `ls /proc`
do
pfiles $i | grep AF_INET | grep $1
if [ $? -eq 0 ]
then
echo Is owned by pid $i
fi
done



Get the process id and kill it from OS level and re-run adcfgclone.pl script.

Thanks!

How to attach db oracle home to central inventory?


Summary :

I was getting the error below when i tried the check lsinventory. It is due to oracle home was not registered with the central inventory. We are having solaris servers and we can find the inventory location through $ORACLE_HOME/oraInst.loc or /var/opt/oracle/oraInst.loc.


bash-3.2$ /d02/DEV/oratest/11204/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.15
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /d02/DEV/oratest/11204
Central Inventory : /var/opt/oracle/oraInventory
   from           : /d02/DEV/oratest/11204/oraInst.loc
OPatch version    : 11.2.0.3.15
OUI version       : 11.2.0.4.0
Log file location : /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log

List of Homes on this system:

  Home name= OH375238208, Location= "/d02/DEV/appltest/fs2/FMW_Home/oracle_common"
  Home name= OH6845398, Location= "/d02/DEV/appltest/fs2/FMW_Home/webtier"
  Home name= OH639747260, Location= "/d02/DEV/appltest/fs2/FMW_Home/Oracle_EBS-app1"
  Home name= DEV_TOOLS__d02_DEV_appltest_fs2_EBSapps_10_1_2, Location= "/d02/DEV/appltest/fs2/EBSapps/10.1.2"
LsInventorySession failed: RawInventory gets null OracleHomeInfo

OPatch failed with error code 73


From the error message we can find out that current running oracle home '/d02/DEV/oratest/11204' was not listed in the inventory.

Below log will give your more info on the registered oracle homes in the invetory.

 vi /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log
"/d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log" 31 lines, 2853 characters
[Dec 19, 2016 2:25:30 PM]    OUI exists, the oraclehome is OUI based.
[Dec 19, 2016 2:25:30 PM]    OUI exists, the oraclehome is OUI based.
[Dec 19, 2016 2:25:30 PM]    OPatch invoked as follows: 'lsinventory -invPtrLoc /d02/DEV/oratest/11204/oraInst.loc '
[Dec 19, 2016 2:25:30 PM]    OUI-67077:
                             Oracle Home       : /d02/DEV/oratest/11204
                             Central Inventory : /var/opt/oracle/oraInventory
                                from           : /d02/DEV/oratest/11204/oraInst.loc
                             OPatch version    : 11.2.0.3.15
                             OUI version       : 11.2.0.4.0
                             OUI location      : /d02/DEV/oratest/11204/oui
                             Log file location : /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch2016-12-19_14-25-29PM_1.log
[Dec 19, 2016 2:25:30 PM]    Patch history file: /d02/DEV/oratest/11204/cfgtoollogs/opatch/opatch_history.txt
[Dec 19, 2016 2:25:30 PM]    Starting LsInventorySession at Mon Dec 19 14:25:30 AST 2016
[Dec 19, 2016 2:25:31 PM]    List of Homes on this system:

                               Home name= OH375238208, Location= "/d02/DEV/appltest/fs2/FMW_Home/oracle_common"
                               Home name= OH6845398, Location= "/d02/DEV/appltest/fs2/FMW_Home/webtier"
                               Home name= OH639747260, Location= "/d02/DEV/appltest/fs2/FMW_Home/Oracle_EBS-app1"
                               Home name= DEV_TOOLS__d02_DEV_appltest_fs2_EBSapps_10_1_2, Location= "/d02/DEV/appltest/fs2/EBSapps/10.1.2"
[Dec 19, 2016 2:25:31 PM]    OUI-67073:LsInventorySession failed: RawInventory gets null OracleHomeInfo
[Dec 19, 2016 2:25:31 PM]    Finishing LsInventorySession at Mon Dec 19 14:25:31 AST 2016
[Dec 19, 2016 2:25:31 PM]    Stack Description: java.lang.RuntimeException: RawInventory gets null OracleHomeInfo
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.RawInventory.loadRawInventory(RawInventory.java:207)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.RawInventory.init(RawInventory.java:171)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.RawInventory.getInstance(RawInventory.java:87)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.IPMReadServices.getRawInventory(IPMReadServices.java:149)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.ipm.IPMReadServices.loadInventory(IPMReadServices.java:1031)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.LsInventorySession.process(LsInventorySession.java:317)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.OPatchSession.process(OPatchSession.java:2042)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.OPatch.process(OPatch.java:796)
[Dec 19, 2016 2:25:31 PM]    StackTrace: oracle.opatch.OPatch.main(OPatch.java:846)

To check the registered oracle homes within the central inventory, please check the inventory.xml file below.

cd /var/opt/oracle/oraInventory/ContentsXML/

open inventory.xml 

Below are the steps to register oracle home with central inventory.

bash-3.2$ cd $ORACLE_HOME/oui/bin

Make sure you have sourced the env file or provide entire oracle home location in the ORACLE_HOME variable.

bash-3.2$ ./runInstaller -silent -attachHome -invPtrLoc /var/opt/oracle/oraInst.loc
ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=ORAHOME11Gr23


Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 45917 MB    Passed
The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /var/opt/oracle/oraInventory
/var/opt/oracle/oraInventory/ContentsXML/inventory.xml (Permission denied)
'AttachHome' failed.

bash-3.2$ ll /var/opt/oracle/oraInventory/ContentsXML/inventory.xml

bash-3.2$ ls -ltr /var/opt/oracle/oraInventory/ContentsXML/inventory.xml
-rw-r-----   1 appltest oinstall     984 Dec 15 16:17
/var/opt/oracle/oraInventory/ContentsXML/inventory.xml

bash-3.2$ ls -ltr /var/opt/oracle/oraInventory/ContentsXML/inventory.xml
-rwxrwxrwx   1 appltest oinstall     984 Dec 15 16:17

/var/opt/oracle/oraInventory/ContentsXML/inventory.xml

It was a permission issue. After granting required permissions i was to able to register oracle home with the central inventory successfully.

bash-3.2$ ./runInstaller -silent -attachHome -invPtrLoc /var/opt/oracle/oraInst.loc ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=ORAHOME11Gr23
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 45917 MB    Passed
The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /var/opt/oracle/oraInventory
'AttachHome' was successful.

After this i was able to query the lsinventory successfully without any issue.

Thanks!

Monday, December 12, 2016

ERROR : failed to execute adclone.pl


Hello Guys,

I experienced the below error while R12.2 cloning. I have provided the error message from the logs.

SEVERE : Nov 21, 2016 9:39:32 AM - ERROR - CLONE-20275   Insufficient space to create /var/tmp//CLONINGCLIENT1318925579433524449.
SEVERE : Nov 21, 2016 9:39:32 AM - CAUSE - CLONE-20275   Minimum required space was at least "1,892" MB, but only "49" MB was available for use.
SEVERE : Nov 21, 2016 9:39:32 AM - ACTION - CLONE-20275   Make sure that the minimum required space is available for use.
SEVERE : Nov 21, 2016 9:39:32 AM - ERROR - CLONE-20233   Restoring Middleware home for sourceid "mwhome1@FMW_Home" has failed.
SEVERE : Nov 21, 2016 9:39:32 AM - CAUSE - CLONE-20233   An internal operation failed.
SEVERE : Nov 21, 2016 9:39:32 AM - ACTION - CLONE-20233   Check the clone log and error file for more details.
SEVERE : Nov 21, 2016 9:39:32 AM - ERROR - CLONE-20237   Restoring the sourceid "mwhome1@FMW_Home" has failed.
SEVERE : Nov 21, 2016 9:39:32 AM - CAUSE - CLONE-20237   An internal operation failed.
SEVERE : Nov 21, 2016 9:39:32 AM - ACTION - CLONE-20237   Check the clone log and error file for more details.
SEVERE : Nov 21, 2016 9:39:33 AM - ERROR - CLONE-20218   Cloning is not successful.
SEVERE : Nov 21, 2016 9:39:33 AM - CAUSE - CLONE-20218   An internal operation failed.
SEVERE : Nov 21, 2016 9:39:33 AM - ACTION - CLONE-20218   Provide the clone log and error file for investigation.


We can figure out the errors from the log files below to figure out the error.

bash-3.2$ ls -ltr
total 228
-rw-r-----   1 appltest oinstall  102233 Nov 21 09:39 CLONE2016-11-21_09-35-01AM.log
-rw-r-----   1 appltest oinstall    1316 Nov 21 09:39 CLONE2016-11-21_09-35-01AM.error
bash-3.2$ pwd
/d02/DEV/appltest/fs2/inst/apps/DEV_ahqtest/admin/log/clone/fmwT2PApply


Upon investigating into logs i found out that /var is 100% utilised. I cleared few files to fix this issue 

/dev/dsk/c0d0s3         32G    31G    47M   100%    /var

Wednesday, November 16, 2016

Unable to locate 'make' utility in path

Issue :

bash-3.2$ perl adcfgclone.pl dbTechStack

                     Copyright (c) 2011 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adcfgclone Version 120.63.12020000.7.1202010.2

Enter the APPS password :

Checking for make...
 Unable to locate 'make' utility in path
 Checking for ld...
 Unable to locate 'ld' utility in path
 Checking for ar...
 Unable to locate 'ar' utility in path
 Unable to locate all utilities with system path.

 PATH = /d01/oraclone/UAT/11.2.0/appsutil/clone/bin/../jre/bin:/usr/bin:/bin


WARNING: Could not find all the required OS utilities in the $PATH. Please review the checks above

Fix :

export PATH=/usr/ccs/bin:$PATH




Tuesday, November 8, 2016

Could not chdir to home directory /home/btbs: No such file or directory

Error :


Could not chdir to home directory /home/btbs: No such file or directory


Fix :

This error is due to home path is set incorrectly in passwd file. Please do the below :

create home directory for user /export/home/username (Its for solaris). You can create /home or /export/home depends on your configuration.

cat /etc/passwd

Pleae check the home path for user.

btbs:x:101:1::/home/username/bin/sh

Update your actual home path as below,

btbs:x:101:1::/export/home/username:/bin/sh

It fixed the issue.


Monday, October 24, 2016

DB CLONING – RMAN DUPLICATE (Backup based)

Hello Everyone,

Below is tested in my environment and i have done refresh successfully using this method. Following will be backup based duplicate with no production downtime. Here i have done the refresh for oracle e-business suite.


DB CLONING – RMAN DUPLICATE (Backup based)


Source
Target
Host name
ORAPROD
ORACLONE
Instance name
PROD
CLONE






Preclone in Prod dbTier : 

Go to /u01/oracle/PROD/11.2.0/appsutil/scripts/PROD_oraprod

Perl adpreclone.pl dbTier

Please make sure stage created successfully.

Login to clone server :

Create directory for clone oracle home.

Mkdir –p /a02/oraclone/CLONE/11.2.0
Mkdir –p /a02/oraclone/CLONE/data

Copy oracle home from prod to clone server.

(Note : Copy only oracle home, don’t copy any db files since we will duplicating the db through RMAN.)

Adcfgclone in CLONE server :

Once oracle home copied to clone server, Execute the below.

Go to $ORACLE_HOME/clone/bin

Perl adcfgclone.pl dbTechStack

dbTechSTack – It will configure the clone oracle home and will make necessary directories and configuration files for clone instance.
Once adcfgclone.pl completes successfully, we can get the env file clone instance under $ORACLE_HOME. We can use the populated env file for clone instance.

Backup the production database :
Go to prod server :

Cd /tmp/sikky/rman/scripts/

Backup the production database, archive logs and control files.

Use the below command :

Nohup rman cmdfile= full_bkp_ar_cf.rcv log= full_bkp_ar_cf.log &

Make sure rman completed without any error.
Script used :
connect target sys/sys123
RUN
 {
 ALLOCATE CHANNEL t1 DEVICE TYPE DISK MAXPIECESIZE = 8G;
 ALLOCATE CHANNEL t2 DEVICE TYPE DISK MAXPIECESIZE = 8G;
 ALLOCATE CHANNEL t3 DEVICE TYPE DISK MAXPIECESIZE = 8G;
 ALLOCATE CHANNEL t4 DEVICE TYPE DISK MAXPIECESIZE = 8G;
 ALLOCATE CHANNEL t5 DEVICE TYPE DISK MAXPIECESIZE = 8G;
 backup as compressed backupset incremental level 0 FILESPERSET 4
 format '/export/home/oracle/PROD/backup/FULL_%d_%U'
 (database);
 RELEASE CHANNEL t1 ;
 RELEASE CHANNEL t2 ;
 RELEASE CHANNEL t3 ;
 RELEASE CHANNEL t4 ;
 RELEASE CHANNEL t5 ;
 sql 'alter system archive log current';
 backup
  filesperset 20
  format '/export/home/oracle/PROD/backup/ar_%t_%s_%p'
  (archivelog all);

 backup
  format '/export/home/oracle/PROD/backup/cf_%d_%U'
  (current controlfile);
 }

Above script can be used to backup the full database, archive logs and current control file.

Move backup pieces to Clone :

Check the directories where backup pieces have been stored in Prod server. Create the same directory structure in clone server.

Mkdir –p /export/home/oracle/PROD/backup
(Please create a similar directory in clone server like prod to avoid any irrelevant errors)

Scp the backup pieces from prod to clone.

Cd /export/home/oracle/PROD/backup
Scp * oraclone@oraclone: /export/home/oracle/PROD/backup/

TNSNAMES.ORA :

Make sure both servers able to ping with each other. Add the both instance tns entries in both tnsnames.ora

Prod :

PROD=
        (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(HOST=oraprod.ebs.com)(PORT=1521))
            (CONNECT_DATA=
                (SERVICE_NAME=PROD)
                (INSTANCE_NAME=PROD)
            )
        )

CLONE = (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(HOST=oraclone)(PORT=1542))
                (CONNECT_DATA=(SID=CLONE))
            )

Clone :

CLONE = (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(HOST=oraclone)(PORT=1542))
                (CONNECT_DATA=(SID=CLONE))
            )

PROD=
        (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(HOST=oraprod.ebs.com)(PORT=1521))
            (CONNECT_DATA=
                (SERVICE_NAME=PROD)
                (INSTANCE_NAME=PROD)
            )
        )

Orapwd creation :

Please make sure both oracle homes have password file with same password.
orapwd file=$ORACLE_HOME/dbs/orapwPROD password=sys123 entries=4
orapwd file=$ORACLE_HOME/dbs/orapwCLONE password=sys123 entries=4

Please read my blog once before you do the above. It may be helpful to create password file.
http://sikkyappsdba.blogspot.com/2016/10/ora-01994-grant-failed-password-file.html

Pfile creation :

If prod is running with spfile create a pfile from spfile and scp it to clone server.

$sqlplus / as sysdba
SQL > create pfile from spfile;

Scp pfile to $ORACLE_HOME/dbs to clone server.

Edit the pfile and update the below parameters.

db_name                         = CLONE
control_files                   = /a02/oraclone/CLONE/data/cntrl01.dbf,/a02/oraclone/CLONE/data/cntrl02.dbf,/a02/oraclone/CLONE/data/cntrl03.dbf
db_file_name_convert='/u01/oracle/PROD/data','/a02/oraclone/CLONE/data'
log_file_name_convert='/u01/oracle/PROD/data','/a02/oraclone/CLONE/data'

Clone instance :

Once pfile is created start the instance in nomount.
sqlplus / as sysdba
startup nomount pfile=initCLONE.ora

RMAN Connectivity :

Check whether you are able to connect to both database through RMAN.
Rman> connect target sys/sys123@PROD
RMAN> connect auxiliary sys/sys123@CLONE

Nohup rman cmdfile= dup_bkp.rcv log= dup_bkp.rcv &

Script used :

connect auxiliary sys/change_on_install@CLONE
connect target sys/change_on_install@PROD
RUN
{
ALLOCATE AUXILIARY CHANNEL ch01 device type disk; 
ALLOCATE AUXILIARY CHANNEL ch02 device type disk;
ALLOCATE CHANNEL ch03 device type disk;
ALLOCATE CHANNEL ch04 device type disk;
duplicate target database to 'CLONE';
RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;

}

RMAN will do the rest. Just sit and monitor the logs.

Output :

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 24-OCT-16

released channel: ch01
released channel: ch02
released channel: ch03
released channel: ch04
Recovery Manager complete.

RMAN will do the refresh and will open the database. It is recommended to Create spfile once and bounce the database.

ORA-01994: GRANT failed: password file missing or disabled

How to replicate?

Below is the one of the way to replicate this issue. Connect to sysdba and grant sysdba privilage to sys user.

Cause :

Oracle is unable to read your password file.

Just make sure the below,

1) Create a password file if it does not exist

2) While creating password file make sure to mention $ORACLE_HOME/dbs in file variable.
 Ex : orapwd file=$ORACLE_HOME/dbs/orapwORADEV password=change_on_install entries=4

By default oracle looks for password file here. Either mentioned the above or move to $ORACLE_HOME/dbs and create password file.

3) Make sure your sid matches with the password file (Upper case or lower case).

Ex :

NAME      OPEN_MODE
--------- --------------------
ORADEV    READ WRITE

For my db, it worked only after created like orapwORADEV

The above should fix this error. 

Thursday, October 20, 2016

Step by step R12.1.1 installation

Hello DBA's,

This post will be useful for beginners who installing e-business suite for first time.

Pre-requisites :

Please create OS users needed for the installation. Recommended are applmgr and oracle.

Applmgr - Application binary owner
Oracle - Database binary owner

How to create OS user?

Run the below as root user,

Lets create the groups before we create users.

# groupadd dba
#groupadd oinstall

Now create the user,

useradd oracle -g oinstall -G dba (g denotes primary group and G denotes secondary group)
useradd applmgr -g oinstall -G dba

If you dont have root password reach out to your UNIX or OS team. They will assist you on this.

OS Pre-requisites :

Please read the below note before you start the installation.

Oracle E-Business Suite Release 12 Installation Guidelines (Doc ID 405565.1)

Pick the note id depends on your hardware. In this post we will be installing on Linux (32 bit) so we have to refer note id 761564.1/

Platform-Specific Documents - Release 12.1.1

Platform
Refer To
Linux x86 (32-bit)
Linux x86-64 (64-bit)
HP-UX Itanium
HP-UX PA-RISC (64-bit)
IBM AIX on Power Systems (64-bit)
IBM: Linux on System z
Microsoft Windows Server (32-bit)
Oracle Solaris on SPARC (64-bit)


Please make sure your server has all the recommended RPM's.

Our hardware will be as follows :

OS - Oracle linux 6 (32 bit)

How to check whether rpm is installed?

Use the below as root user.

# rpm -qa|grep <rpm name>

If the server returns rpm with the greater version of the recommended then we are good to keep the same. If it returns lower version we have to upgrade the rpm or if it does not return we need to install the rpm.

#rpm -ivh <rpm name> --> to install
#rpm -Uvh <rpm name> --> To upgrade


To force any rpm to be installed :

#rpm -ivh <rpm name> --nodeps

You can also use yum command to install rpm's.


Oracle Linux 6*
Red Hat Enterprise Linux 6*
Update 1 (6.1) or higher of Oracle Linux 6 is required.
Update 1 (6.1) or higher of Red Hat Enterprise Linux 6 is required.
The following packages (or versions of packages) are not part of the OS distribution media and must be downloaded separately (from http://oss.oracle.com/projects/compat-oracle/files/Enterprise_Linux) for both Oracle Linux 6 and RHEL 6 and installed manually:
  • openmotif21-2.1.30-11.EL6.i6861 --> Make sure you have exact version of openmotif as recommended by oracle or else you will not be able to open forms.
  • xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386
The following packages must be installed from the Oracle Linux 6 or RHEL 6 distribution media:
  • binutils-2.20.51.0.2-5.20
  • compat-glibc-2.5-46.2.0.1
  • compat-glibc-headers-2.5-46.2.0.1
  • gcc-4.4.5-6
  • gcc-c++-4.4.5-6
  • glibc-2.12-1.252
  • glibc-common-2.12-1.252
  • glibc-devel-2.12-1.25
  • glibc-headers-2.12-1.25
  • libgcc-4.4.5-62
  • libstdc++-devel-4.4.5-6
  • libstdc++-4.4.5-62
  • make-3.81-192
  • gdbm-1.8.0-362
  • libXp-1.0.0-15.1
  • libaio-0.3.107-102
  • libgomp-4.4.5-6
  • sysstat-9.0.4-18
  • compat-libstdc++-296-2.96-144
  • compat-libstdc++-33-3.2.3-69
Additionally, the following RPMs are required for the database tier running 11gR2 (users must upgrade the bundled 11gR1 DB to 11gR2 either before or after installing 12.1) on the database tier:
  • elfutils-libelf-devel-0.152-1
  • libaio-devel-0.3.107-10
  • mksh-39-5
  • unixODBC-2.2.14-11
  • unixODBC-devel-2.2.14-11
  • xorg-x11-utils-7.4-8
Note:
1: The openmotif package version must be 2.1.30 (for example, openmotif-2.3.3-1 is not supported).
2: This rpm is distributed as part of the 'default' installation of Enterprise Linux

Once everything is setup we are good to begin the rapidwiz.

what is rapidwiz?

Rapidwiz is just a tool where we used to install ebs software. (like runinstaller)

Go to the stage directory and invoke the installation.

[oracle@dev  log]$ ./rapidwiz



- Select install option
- Upgrade option will be for R12 upgrades from 11i

Uncheck the tick box at this stage.


 - Select create new configuration


- Select port pool value. Its user defined.


- Since this is new implementation we will choose Fresh Database with below details
DB SID
DB Host and domain name
Os version
DB os user name and group 
$ORACLE_BASE value


select suite licensing

\


select DB characterset


Select application host name

 Below option is to enable or disable any service.







Rapidwiz will begin the installation now. 






If you get the error above please apply the below fix.

Solution:

1) Shut all application services.

2) create the below link for library file as below

 ln -s   /usr/lib/libgdbm.so.2.0.0  /usr/lib/libdb.so.2 (Please refer the screen shot below)

3) Startup all application services








Thats it. We can start the services and check the login page.

Step by step physical standby creation

Step by step dataguard configuration



In this exercise I have provided steps in detailed manner to build physical standby database in oracle 11g. We will be doing standby setup in the following servers.

Server details :


Hostname
Ip address
Primary
Dev186.ebs.com
192.168.55.42
Standby
Dev201.ebs.com
192.168.55.34

DB details :


SID
DB_Unique_Name
Service Name
Primary
Primary
Primary
PRIMARY
Standby
Primary
Standby
STANDBY

Prerequisites for primary server :

- Primary should be running in archive log mode and Force logging should be enabled as below


Please issue the below to check whether db is running in archive log mode or no archive log mode :

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST

Please issue the below to check whether db is running in force_logging mode :

SQL> select FORCE_LOGGING from v$database;

FOR
---
YES

In case your db is running in noarchivelog mode and non-force logging mode follow the below :

Before issuing the queries below make sure to keep your db in mount state :

SQL> alter database archivelog enable;

SQL>alter database force logging;

make sure you have  connectivity between primary and standby servers.

From primary :

[oracle@dev186 oracle]$ ping 192.168.55.34

From standby :

[oracle@dev186 oracle]$ ping 192.168.55.42



Primary listener file : (/oracle/11g/11gr2/network/admin/listener.ora)


# listener.ora Network Configuration File: /oracle/11g/11gr2/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER_PRIMARY = (SID_LIST = (SID_DESC =(SID_NAME = primary) (ORACLE_HOME = /oracle/11g/11gr2)))

INBOUND_CONNECT_TIMEOUT_LISTENER = 0


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = dev186.ebs.com)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = primary)
      (ORACLE_HOME = /oracle/11g/11gr2)
     )
  )
ADR_BASE_LISTENER = /oracle/11g









TNS files : (/oracle/11g/11gr2/network/admin/tnsnames.ora)

# tnsnames.ora Network Configuration File: /oracle/11g/11gr2/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

PRIMARY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dev186.ebs.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PRIMARY)
    )
  )

LISTENER_PRIMARY =
  (ADDRESS = (PROTOCOL = TCP)(HOST = dev186.ebs.com)(PORT = 1521))


STANDBY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dev201.ebs.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = STANDBY)
    )
  )

Once you have updated both the listener and tnsnames files, start the listener in both the servers and check the below :

Primary :

[oracle@dev186 oracle]$  lsnrctl start

to check status,

[oracle@dev186 oracle]$ lsnrctl status

Standby :

[oracle@dev201 oracle]$ lsnrctl start

once listener is up issue the below and check the connectivity

[oracle@dev186 oracle]$tnsping primary
[oracle@dev186 oracle]$tnsping standby





In order to configure dataguard, your primary and standby should use same password file. Create a new password file if you dont remember current sys password else you can move  the current password file to standby as below :


[oracle@dev186 oracle]$ cd $ORACLE_HOME

[oracle@dev186 11gr2]$ cd dbs

[oracle@dev186 dbs]$ ls

hc_clone.dat  hc_primary.dat  initCLONE.ora    initstandby.ora  lkSTANDBY     redo.sql          spfileprimary.ora
hc_DBUA0.dat  hc_standby.dat  init.ora         lkCLONE          orapwprimary  snapcf_primary.f
hc_orcl.dat   initclone.ora   initPRIMARY.ora  lkPRIMARY        primary.ora   spfileclone.ora

[oracle@dev186 dbs]$ scp orapwprimary oracle@192.168.55.34:/oracle/11g/product/11.2.0/dbhome_1/dbs/ orapwstandby

Add standby redo logs  :

SQL>alter database add standby logfile group 4 ‘/oracle/11g/flash_recovery_area/PRIMARY/onlinelog/log4a.log’ size 500M;

Database altered.



Update required parameters in primary pfile. Your primary pfile should be as below :

Primary pfile = $ORACLE_HOME/dbs/initprimary.ora


initPRIMARY.ora :

primary.__db_cache_size=520093696
primary.__java_pool_size=16777216
primary.__large_pool_size=16777216
primary.__oracle_base='/oracle/11g'#ORACLE_BASE set from environment
primary.__pga_aggregate_target=771751936
primary.__sga_target=855638016
primary.__shared_io_pool_size=0
primary.__shared_pool_size=285212672
primary.__streams_pool_size=0
*.audit_file_dest='/oracle/11g/admin/primary/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/oracle/11g/oradata/PRIMARY/controlfile/o1_mf_9q0v8cyw_.ctl','/oracle/11g/flash_recovery_area/PRIMARY/controlfile/o1_mf_9q0v8d1v_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/oracle/11g/oradata'
*.db_domain=''
*.db_name='primary'
*.db_recovery_file_dest='/oracle/11g/flash_recovery_area'
*.db_recovery_file_dest_size=5242880000
*.DB_UNIQUE_NAME='primary'
*.diagnostic_dest='/oracle/11g'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=primaryXDB)'
*.FAL_SERVER='standby'
*.local_listener='LISTENER_PRIMARY'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'
*.LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary'
*.LOG_ARCHIVE_DEST_2='SERVICE=standby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_MAX_PROCESSES=30
*.memory_target=1613758464
*.open_cursors=300
*.processes=150
*.REMOTE_LOGIN_PASSWORDFILE='EXCLUSIVE'
*.STANDBY_FILE_MANAGEMENT='AUTO'
*.undo_tablespace='UNDOTBS1'


initstandby.ora :

primary.__db_cache_size=671088640
primary.__java_pool_size=16777216
primary.__large_pool_size=16777216
primary.__oracle_base='/oracle/11g'#ORACLE_BASE set from environment
primary.__pga_aggregate_target=654311424
primary.__sga_target=973078528
primary.__shared_io_pool_size=0
primary.__shared_pool_size=251658240
primary.__streams_pool_size=0
*.audit_file_dest='/oracle/11g/admin/standby/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/oracle/11g/oradata/standby/control01.ctl','/oracle/11g/flash_recovery_area/standby/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='/oracle/11g/oradata/standby'
*.db_domain=''
*.db_name='primary'
*.db_recovery_file_dest='/oracle/11g/flash_recovery_area'
*.db_recovery_file_dest_size=5242880000
*.diagnostic_dest='/oracle/11g'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=standbyXDB)'
*.local_listener='LISTENER_STANDBY'
*.memory_target=1613758464
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
DB_UNIQUE_NAME='standby'
LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'
LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'
LOG_ARCHIVE_DEST_2='SERVICE=primary LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=primary'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_MAX_PROCESSES=30
FAL_SERVER=standby
#db_create_online_log_dest_1='/oracle/11g/oradata/standby'
STANDBY_FILE_MANAGEMENT=AUTO
db_file_name_convert=('/oracle/11g/oradata/PRIMARY','/oracle/11g/oradata/STANDBY')
log_file_name_convert=('/oracle/11g/oradata/PRIMARY','/oracle/11g/oradata/STANDBY')

Once you have updated standby pfile, bring up standby instance to nomount state.

[oracle@dev201 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Jun 7 12:06:04 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup nomount pfile='$ORACLE_HOME/dbs/initstandby.ora'

Your instance should be started without any error.


Next, we have to clone primary db from primary server to standby server. In order to achieve this, we can use any of the cloing of the method as per our covenience. Here we will use duplicate statement to replicate db. Make sure you have updated the parameters below in standby pfile if your directory structure is different.

db_file_name_convert='/oracle/11g/oradata/STANDBY','/oracle/11g/oradata/PRIMARY'
log_file_name_convert='/oracle/11g/oradata/STANDBY','/oracle/11g/oradata/PRIMARY'







Take backup of primary database and controlfile using RMAN as below :

[oracle@dev186 oracle]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Sat Jun 7 12:14:37 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PRIMARY (DBID=1684851363)


RMAN> backup current controlfile for standby;

Starting backup at 07-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=147 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including standby control file in backup set
channel ORA_DISK_1: starting piece 1 at 07-JUN-14
channel ORA_DISK_1: finished piece 1 at 07-JUN-14
piece handle=/oracle/11g/flash_recovery_area/PRIMARY/backupset/2014_06_07/o1_mf_ncnnf_TAG20140607T121717_9s5fcrs3_.bkp tag=TAG20140607T121717 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUN-14

RMAN> backup database plus archivelog;

Starting backup at 07-JUN-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oracle/11g/oradata/PRIMARY/datafile/o1_mf_system_9q0v6hgo_.dbf
input datafile file number=00002 name=/oracle/11g/oradata/PRIMARY/datafile/o1_mf_sysaux_9q0v6hkx_.dbf
input datafile file number=00005 name=/oracle/11g/oradata/PRIMARY/datafile/o1_mf_example_9q0v8sz0_.dbf
input datafile file number=00003 name=/oracle/11g/oradata/PRIMARY/datafile/o1_mf_undotbs1_9q0v6hl7_.dbf
input datafile file number=00004 name=/oracle/11g/oradata/PRIMARY/datafile/o1_mf_users_9q0v6hm1_.dbf
channel ORA_DISK_1: starting piece 1 at 07-JUN-14

Starting backup at 07-JUN-14
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=71 RECID=87 STAMP=849615566
channel ORA_DISK_1: starting piece 1 at 07-JUN-14
channel ORA_DISK_1: finished piece 1 at 07-JUN-14
piece handle=/oracle/11g/flash_recovery_area/PRIMARY/backupset/2014_06_07/o1_mf_annnn_TAG20140607T121926_9s5fhp63_.bkp tag=TAG20140607T121926 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07-JUN-14


once backup is finished, Move all your backup including controlfile backup to standby server using scp command. Move all backup pieces to flash_recovery_area in standy server.

FRA ==> /oracle/11g/flash_recovery_area but your backup pieces should be in the below as same as primary server, 

Move backup pieces to the follwing in standby server --> oracle/11g/flash_recovery_area/PRIMARY/backupset/2014_06_06


Before we duplicate standby db we have create following directory structure into standby server.

[oracle@dev201 oracle]$ mkdir -pr oracle/11g/flash_recovery_area/PRIMARY/backupset/2014_06_06

[oracle@dev201 oracle]$ mkdir -pr oracle/11g/flash_recovery_area/PRIMARY/onlinelog


[oracle@dev201 oracle]$ mkdir -pr oracle/11g/oradata/standby

Now connect both target and auxiliary servers using RMAN,


[oracle@dev201 trace]$ rman

Recovery Manager: Release 11.2.0.1.0 - Production on Sat Jun 7 12:27:59 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect auxiliray /

connected to target database: PRIMARY (DBID=1684851363)

RMAN> connect target sys/sys@primary

connected to auxiliary database: PRIMARY (DBID=1684851363)

RMAN> duplicate target database for standby nofilenamecheck dorecover;

once done.

Start MRP process in standby database,

SQL> alter database recover managed standy database disconnect;

once you issued, mrp bg process will be started in standby, confirm be the below :

[oracle@dev201 STANDBY]$ ps -ef | grep mrp

oracle    9543     1  0 09:28 ?        00:00:01 ora_mrp0_standby

once MRP process have been stared in standby, our standby db is all set receive redo log changes from primary. Now manually switch log file and check archive log sequences to make sure both have same count.

Connect to primary db and issue the below :

SQL>alter system switch logfile;

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     72
Next log sequence to archive   74
Current log sequence           74

Connect to standy db and issue the below :

SQL>archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     72
Next log sequence to archive   0
 Current log sequence           74




Check both the primary and standby alert logs for any errors. If not we have successfully configured physical standby and we can confirm it by the following queries,

DG Queries  :

Issue the following query to show information about the protection mode, the protection level, the role of the database, and switchover status:

SELECT DATABASE_ROLE, DB_UNIQUE_NAME INSTANCE, OPEN_MODE, PROTECTION_MODE, PROTECTION_LEVEL, SWITCHOVER_STATUS FROM V$DATABASE;

On the standby database, query the V$ARCHIVED_LOG view to identify existing files in the archived redo log.

SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

Or

SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;

On the standby database, query the V$ARCHIVED_LOG view to verify the archived redo log files were applied.

SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

Query the physical standby database to monitor Redo Apply and redo transport services activity at the standby site.

SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

To determine if real-time apply is enabled, query the RECOVERY_MODE column of the V$ARCHIVE_DEST_STATUS view.

SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;

The V$DATAGUARD_STATUS fixed view displays events that would typically be triggered by any message to the alert log or server process trace files.

SELECT MESSAGE FROM V$DATAGUARD_STATUS;

Hope this document helps! :) Happy learning! Cheers!

You cannot complete this task because one of the following events caused a loss of page data: A system failure has occurred "Front end is locked after 12.2 upgrade"

  If you have upgraded to Oracle E-Business Suite 12.2.10 Release Update Pack from Oracle E-Business Suite 12.2.6 Release Update Pack (or ea...