Please follow the steps from this Clone_Document
This blog is to share my experiences and learnings on Oracle Database,EBS,OCI & Ansible.
Monday, February 19, 2018
Saturday, December 9, 2017
R12.2 OHS was not coming up after unclean shutdown or due to server crash.
Issue:
R12.2 OHS was not coming up after unclean shutdown or due to server crash.
processes in Instance: EBS_web_TEST_OHS1
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
EBS_web_TEST | OHS | 6194 | Stop
OHS was in STOP state and we were not able to either bring down or bring up. It shows PID as 6194 which doens't exist in server.
In logs we were getting below errors.
Log file Location /u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/diagnostics/logs/OHS/EBS_web_TEST/
-- console~OHS~1.log:/u01/applmgr/TEST/fs1/FMW_Home/webtier/ohs/bin/apachectl hardstop: httpd (pid 6194?) not running.
EBS_web_TEST.log:[2017-12-08T14:24:32.4446+05:30] [OHS] [WARNING:32] [OHS-9999] [core.c] [host_id: acsebs.oracle.com] [host_addr: 192.168.1.8] [pid: 6194] [tid: 140126851569472] [user: applmgr] [VirtualHost: main] pid file
/u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/diagnostics/logs/OHS/EBS_web_TEST/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
Caution:
So it is very clear that OHS was not shutdown properly.Due to this some lock file or httpd.pid files with old pid exists. we have to remove this and bring up.
Solution:
a. First shutdown opmn process using adopmnctl.sh stop
b. Remove httpd.pid file from /u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/diagnostics/logs/OHS/EBS_web_TEST/
c. cd /u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/config/OPMN/opmn/states
d. grep 6194 * -- You will get the filename from this command.
e. Remove the file and try to start the OHS. It will come up.
R12.2 OHS was not coming up after unclean shutdown or due to server crash.
processes in Instance: EBS_web_TEST_OHS1
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
EBS_web_TEST | OHS | 6194 | Stop
OHS was in STOP state and we were not able to either bring down or bring up. It shows PID as 6194 which doens't exist in server.
In logs we were getting below errors.
Log file Location /u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/diagnostics/logs/OHS/EBS_web_TEST/
-- console~OHS~1.log:/u01/applmgr/TEST/fs1/FMW_Home/webtier/ohs/bin/apachectl hardstop: httpd (pid 6194?) not running.
EBS_web_TEST.log:[2017-12-08T14:24:32.4446+05:30] [OHS] [WARNING:32] [OHS-9999] [core.c] [host_id: acsebs.oracle.com] [host_addr: 192.168.1.8] [pid: 6194] [tid: 140126851569472] [user: applmgr] [VirtualHost: main] pid file
/u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/diagnostics/logs/OHS/EBS_web_TEST/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
Caution:
So it is very clear that OHS was not shutdown properly.Due to this some lock file or httpd.pid files with old pid exists. we have to remove this and bring up.
Solution:
a. First shutdown opmn process using adopmnctl.sh stop
b. Remove httpd.pid file from /u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/diagnostics/logs/OHS/EBS_web_TEST/
c. cd /u01/applmgr/TEST/fs1/FMW_Home/webtier/instances/EBS_web_TEST_OHS1/config/OPMN/opmn/states
d. grep 6194 * -- You will get the filename from this command.
e. Remove the file and try to start the OHS. It will come up.
Thursday, November 16, 2017
How to check If a patch is applied in R12.2
In eBusiness Suite (EBS) 12.2.x you cannot query the AD_BUGS table to check if patches have been applied.The AD_BUGS table may have entries for patches that were applied but later the patching cycle was aborted (not really applied).
To check whether a patch is really applied use the AD_PATCH.IS_PATCH_APPLIED pl/sql function.Using this API is an alternative method for users without access to Oracle Applications Manager's "Patching and Utilities" feature to determine if a certain patch is applied.
Query to Find in single app tier or shared application tier Environment:
select ad_patch.is_patch_applied('R12',-1,20034256) from dual;
Expected results:
EXPLICIT = applied
NOT APPLIED = not applied / aborted
To check Multiple patches,Please use below query:
SELECT adb.bug_number,ad_patch.is_patch_applied('R12',-1, adb.bug_number) FROM ad_bugs adb WHERE adb.bug_number in ('25820806','26720905',
'24591000','26482811','25828573','26400116','26720231','25994411');
To get output in human readable format:
set serveroutput on;
DECLARE
TYPE p_patch_array_type is varray(30) of varchar2(10);
p_patchlist p_patch_array_type;
p_patch_status varchar2(15);
p_appl_top_id number;
p_result varchar2(15);
p_instance varchar2(15);
procedure println(msg in varchar2)
is
begin
dbms_output.enable(1000000);
dbms_output.put_line(msg);
end;
BEGIN
p_patchlist:= p_patch_array_type('25820806','26720905','24591000','26482811','25828573','26400116','26720231','25994411','89989');
println('=============================');
for i in 1..p_patchlist.count
loop
p_patch_status := ad_patch.is_patch_applied('R12',-1,p_patchlist(i));
case p_patch_status
when 'EXPLICIT' then
p_result := 'APPLIED';
else
p_result := p_patch_status;
end case;
println('Patch ' || p_patchlist(i)|| ' - ' || ' - IS ' || p_result);
end loop;
println('.');
END;
/
Query to find patch information for a specific node in a multinode environment (1045 is the APPL_TOP ID):
Syntax: select AD_PATCH.IS_PATCH_APPLIED(\'$release\',\'$appltop_id\',\'$patch_no\',\'$language\') from dual;
SELECT adb.bug_number,ad_patch.is_patch_applied('R12', 1045, adb.bug_number) FROM ad_bugs adb WHERE adb.bug_number in (20034256);
To check whether a patch is really applied use the AD_PATCH.IS_PATCH_APPLIED pl/sql function.Using this API is an alternative method for users without access to Oracle Applications Manager's "Patching and Utilities" feature to determine if a certain patch is applied.
Query to Find in single app tier or shared application tier Environment:
select ad_patch.is_patch_applied('R12',-1,20034256) from dual;
Expected results:
EXPLICIT = applied
NOT APPLIED = not applied / aborted
To check Multiple patches,Please use below query:
SELECT adb.bug_number,ad_patch.is_patch_applied('R12',-1, adb.bug_number) FROM ad_bugs adb WHERE adb.bug_number in ('25820806','26720905',
'24591000','26482811','25828573','26400116','26720231','25994411');
To get output in human readable format:
set serveroutput on;
DECLARE
TYPE p_patch_array_type is varray(30) of varchar2(10);
p_patchlist p_patch_array_type;
p_patch_status varchar2(15);
p_appl_top_id number;
p_result varchar2(15);
p_instance varchar2(15);
procedure println(msg in varchar2)
is
begin
dbms_output.enable(1000000);
dbms_output.put_line(msg);
end;
BEGIN
p_patchlist:= p_patch_array_type('25820806','26720905','24591000','26482811','25828573','26400116','26720231','25994411','89989');
println('=============================');
for i in 1..p_patchlist.count
loop
p_patch_status := ad_patch.is_patch_applied('R12',-1,p_patchlist(i));
case p_patch_status
when 'EXPLICIT' then
p_result := 'APPLIED';
else
p_result := p_patch_status;
end case;
println('Patch ' || p_patchlist(i)|| ' - ' || ' - IS ' || p_result);
end loop;
println('.');
END;
/
Query to find patch information for a specific node in a multinode environment (1045 is the APPL_TOP ID):
Syntax: select AD_PATCH.IS_PATCH_APPLIED(\'$release\',\'$appltop_id\',\'$patch_no\',\'$language\') from dual;
SELECT adb.bug_number,ad_patch.is_patch_applied('R12', 1045, adb.bug_number) FROM ad_bugs adb WHERE adb.bug_number in (20034256);
APPL_TOP_ID -->you cat gen from ad_appl_tops table.
Wednesday, October 18, 2017
Virtual Box: Sharing Folders between Host and Virtual Server:
Install Guest Editions:
Devices-->Install Guest Editions-->Reboot the machine-->right click (Autorun)
If it errors out realted to kernel issue,Please follow below steps.
yum remove kernel-headers
cd /etc/yum.repos.d/
Please check the linux version and enable yum for that version.
vi public-yum-ol6.repo
enable the latest yum repository [public_ol6_latest] & public_ol6_u7_base]
yum remove kernel-headers
yum -y install kernel-uek-devel-$(uname -r)
Oracle VirtualBox:
Devices-->Shared Folders-->Add New Shared Folder button-->Give Folder Path & share name(Oracle_Apps_122_Linux64 )-->Click on Make permenent
Linux Guest:
Login as root
mount -t vboxsf Oracle_Apps_122_Linux64 /shared
Devices-->Install Guest Editions-->Reboot the machine-->right click (Autorun)
If it errors out realted to kernel issue,Please follow below steps.
yum remove kernel-headers
cd /etc/yum.repos.d/
Please check the linux version and enable yum for that version.
vi public-yum-ol6.repo
enable the latest yum repository [public_ol6_latest] & public_ol6_u7_base]
yum remove kernel-headers
yum -y install kernel-uek-devel-$(uname -r)
Oracle VirtualBox:
Devices-->Shared Folders-->Add New Shared Folder button-->Give Folder Path & share name(Oracle_Apps_122_Linux64 )-->Click on Make permenent
Linux Guest:
Login as root
mount -t vboxsf Oracle_Apps_122_Linux64 /shared
Wednesday, June 14, 2017
Install MONGODB 3.4 On LINUX 6
a)yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-gssapi krb5-libs libcurl libpcap net-snmp openldap openssl
b)Download Mongo DB & Extract The TAR
cd $HOME
curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.4.tgz
cd /mongo/
tar -zxvf /home/mongo/mongodb-linux-x86_64-3.4.4.tgz
cp -R -n mongodb-linux-x86_64-3.4.4/ mongodb
c)Add the PATH in /home/mongo/.bash_profile
PATH=/mongo/mongodb/bin:$PATH
d) Create the datafile folder /mongo/data. If we dont specify dbpath ,it will try to use the default value /data/db.
e)Start the Mongo DB.Run the mongod process at the system prompt.
mongod --dbpath /mongo/data --logpath /tmp/mongo.log --logappend --rest --fork
--dbpath -> Path to our datafiles.
--logpath -->Log file Path
--logappend --> Appending log content to the existing log.
--rest -->Which will enable http interface to the port 28017(default).We can access it http://localhost:28017
--fork --> It will create the child process and run in background.
If we use above command ,datafile from all our databases will be under /mongo/data. If we want to split the datafiles based on database,we have to
specify the parameter directoryperdb.It will create sub folder with dbname under dbpath.
Ex: mongod --dbpath /mongo/new_data --logpath /tmp/mongo.log --logappend --rest --directoryperdb
[mongo@r12 new_data]$ ls -ld *
drwxrwxr-x 2 mongo mongo 4096 Jun 10 12:38 admin
drwxrwxr-x 2 mongo mongo 4096 Jun 10 13:49 diagnostic.data
drwxrwxr-x 2 mongo mongo 4096 Jun 10 12:38 journal
drwxrwxr-x 2 mongo mongo 4096 Jun 10 12:38 local
b)Download Mongo DB & Extract The TAR
cd $HOME
curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.4.tgz
cd /mongo/
tar -zxvf /home/mongo/mongodb-linux-x86_64-3.4.4.tgz
cp -R -n mongodb-linux-x86_64-3.4.4/ mongodb
c)Add the PATH in /home/mongo/.bash_profile
PATH=/mongo/mongodb/bin:$PATH
d) Create the datafile folder /mongo/data. If we dont specify dbpath ,it will try to use the default value /data/db.
e)Start the Mongo DB.Run the mongod process at the system prompt.
mongod --dbpath /mongo/data --logpath /tmp/mongo.log --logappend --rest --fork
--dbpath -> Path to our datafiles.
--logpath -->Log file Path
--logappend --> Appending log content to the existing log.
--rest -->Which will enable http interface to the port 28017(default).We can access it http://localhost:28017
--fork --> It will create the child process and run in background.
If we use above command ,datafile from all our databases will be under /mongo/data. If we want to split the datafiles based on database,we have to
specify the parameter directoryperdb.It will create sub folder with dbname under dbpath.
Ex: mongod --dbpath /mongo/new_data --logpath /tmp/mongo.log --logappend --rest --directoryperdb
[mongo@r12 new_data]$ ls -ld *
drwxrwxr-x 2 mongo mongo 4096 Jun 10 12:38 admin
drwxrwxr-x 2 mongo mongo 4096 Jun 10 13:49 diagnostic.data
drwxrwxr-x 2 mongo mongo 4096 Jun 10 12:38 journal
drwxrwxr-x 2 mongo mongo 4096 Jun 10 12:38 local
Saturday, June 3, 2017
RMAN BASICS
Lets begin with RMAN overviews:
RMAN stands for Recovery Manager, this is client who performs not only backup and recovery for oracle database but also making DBA’s life easier in terms of automation, backup, restore and recovery of database. RMAN consist of some backup utilities and collaborated with your oracle database that combine play a role in database backup.
RMAN components:
Target Database:
Target database is the registered database with the RMAN, on which RMAN is performing backup and recovery operations. All operations performed and practiced ( i.e.metadata is also known as repository. ) by RMAN would be logged in database control file.
RMAN client:
RMAN client is nothing but the executable required to run RMAN and performers its desire task. RMAN client situated in ‘ORACLE_HOME/bin’. No extra efforts would be required to install this client, because this client installed automatically when oracle software being installed.
How RMAN Works Internally:
RMAN backup and recovery operation for a target database are managed by RMAN client. RMAN uses the target database control file to gather metadata about the target database and to store information about its own operations. The RMAN client itself does not perform backup, restore, or recovery operations. When you connect the RMAN client to a target database, RMAN allocates server sessions on the target instance and directs them to perform the operations.The work of backup and recovery is performed by server sessions running on the target database. A channel establishes a connection from the RMAN client to a target or auxiliary database instance by starting a server session on the instance.The channel reads data into memory, processes it, and writes it to the output device.
When you take a database backup using RMAN, you need to connect to the target database using RMAN Client.The RMAN client can use Oracle Net to connect to a target database, so it can be located on any host that is connected to the target host through Oracle Net. For backup you need to allocate explicit or implicit channel to the target database. An RMAN channel represents one stream of data to a device, and corresponds to one database server session. This session dynamically collect information of the files from the target database control file before taking the backup or while restoring.
For example If you give ‘ Backup database ‘ from RMAN, it will first get all the datafiles information from the controlfile. Then it will divide all the datafiles among the allocated channels. ( roughly equal size of work as per the datafile size ). Then it takes the backup in 2 steps. In the first step the channel will read all the Blocks of the entire datafile to find out all the formatted blocks to backup. Note : RMAN do not take backup of the un formatted blocks. In the second step it take backup of the formatted blocks. This is the best advantage of using RMAN as it only take backup of the required blocks. Lets say in a datafile of 100 MB size, there may be only 10 MB of use full data and rest 90 MB is free then RMAN will only take backup of those 10 MB
RMAN stands for Recovery Manager, this is client who performs not only backup and recovery for oracle database but also making DBA’s life easier in terms of automation, backup, restore and recovery of database. RMAN consist of some backup utilities and collaborated with your oracle database that combine play a role in database backup.
RMAN components:
Target Database:
Target database is the registered database with the RMAN, on which RMAN is performing backup and recovery operations. All operations performed and practiced ( i.e.metadata is also known as repository. ) by RMAN would be logged in database control file.
RMAN client:
RMAN client is nothing but the executable required to run RMAN and performers its desire task. RMAN client situated in ‘ORACLE_HOME/bin’. No extra efforts would be required to install this client, because this client installed automatically when oracle software being installed.
How RMAN Works Internally:
RMAN backup and recovery operation for a target database are managed by RMAN client. RMAN uses the target database control file to gather metadata about the target database and to store information about its own operations. The RMAN client itself does not perform backup, restore, or recovery operations. When you connect the RMAN client to a target database, RMAN allocates server sessions on the target instance and directs them to perform the operations.The work of backup and recovery is performed by server sessions running on the target database. A channel establishes a connection from the RMAN client to a target or auxiliary database instance by starting a server session on the instance.The channel reads data into memory, processes it, and writes it to the output device.
When you take a database backup using RMAN, you need to connect to the target database using RMAN Client.The RMAN client can use Oracle Net to connect to a target database, so it can be located on any host that is connected to the target host through Oracle Net. For backup you need to allocate explicit or implicit channel to the target database. An RMAN channel represents one stream of data to a device, and corresponds to one database server session. This session dynamically collect information of the files from the target database control file before taking the backup or while restoring.
For example If you give ‘ Backup database ‘ from RMAN, it will first get all the datafiles information from the controlfile. Then it will divide all the datafiles among the allocated channels. ( roughly equal size of work as per the datafile size ). Then it takes the backup in 2 steps. In the first step the channel will read all the Blocks of the entire datafile to find out all the formatted blocks to backup. Note : RMAN do not take backup of the un formatted blocks. In the second step it take backup of the formatted blocks. This is the best advantage of using RMAN as it only take backup of the required blocks. Lets say in a datafile of 100 MB size, there may be only 10 MB of use full data and rest 90 MB is free then RMAN will only take backup of those 10 MB
Tuesday, April 25, 2017
R12.2 Log file Locations
A change in Release 12.2 is that HTTP, Oracle WebLogic Server, and concurrent processing log files are not stored under $LOG_HOME as they were in previous releases:
- HTTP log files are located under the native instance home.
- Oracle WebLogic Server log files are located under the domain home.
- Concurrent processing log files are located on the non-editioned file system (fs_ne)
Name
|
Location
|
OHS
|
$IAS_ORACLE_HOME/instances/EBS_web_${TWO_TASK}_OHS2/diagnostics/logs/OHS/EBS_web_${TWO_TASK}/EBS_web_${TWO_TASK}.log
|
Weblogic Managed Server logfile
|
$EBS_DOMAIN_HOME/servers/<managed_servername>/logs
|
Concurrent processing log files
|
$NE_BASE/inst/${CONTEXT_NAME}/logs/appl/conc/log
|
adop(patching logfile)
|
$NE_BASE/EBSapps/log/adop
|
Adadmin logs
|
$NE_BASE/EBSapps/log/adadmin/log
|
Autoconfig log
|
$INST_TOP/admin/log
|
Subscribe to:
Posts (Atom)
How to Compile Forms , Reports & Custom.pll in R12.2
How to Compile Custom.pll cd $AU_TOP/resource cp CUSTOM.plx CUSTOM.plx_bkup cp CUSTOM.pll CUSTOM.pll_bkup frmcmp_batch module=CUSTOM.pl...
-
Prerequisites: a. Download JDK1.8 (jdk-8u281-linux-x64.tar.gz) from below link. https://www.oracle.com/java/technologies/javase/javase-j...
-
What is AD bridge The Microsoft Active Directory (AD) Bridge provides a link between your AD enterprise directory structure and Oracle Ident...
-
How to Compile Custom.pll cd $AU_TOP/resource cp CUSTOM.plx CUSTOM.plx_bkup cp CUSTOM.pll CUSTOM.pll_bkup frmcmp_batch module=CUSTOM.pl...