Wednesday 14 August 2013

Determining the Patch Set Update Version


Patch Set Updates are referenced by their 5-place version number. The following OPatch commands are a simple way to determine the latest PSU installed in the Oracle Home.

For Database PSUs, enter the following command:

opatch lsinventory -bugs_fixed | egrep -i 'PSU|DATABASE PATCH SET UPDATE'

A list will be output, and the highest release version reported is the current PSU installed. In the following example output, 11.2.0.2.6 is the installed Database PSU:

10248523   13696224  Fri Mar 30 14:00:25 EDT 2012   DATABASE PSU 11.2.0.2.1
11724916   13696224  Fri Mar 30 14:00:25 EDT 2012   DATABASE PSU 11.2.0.2.2 (INCLUDES CPUAPR2011)
12419331   13696224  Fri Mar 30 14:00:25 EDT 2012   DATABASE PSU 11.2.0.2.3 (INCLUDES CPUJUL2011)
12827726   13696224  Fri Mar 30 14:00:25 EDT 2012   DATABASE PSU 11.2.0.2.4 (INCLUDES CPUOCT2011)
13343424   13696224  Fri Mar 30 14:00:25 EDT 2012   DATABASE PATCH SET UPDATE 11.2.0.2.5 (INCLUDES CPUJAN2012)
13696224   13696224  Fri Mar 30 14:00:25 EDT 2012   DATABASE PATCH SET UPDATE 11.2.0.2.6 (INCLUDES CPUAPR2012)


For CRS (Cluster Ready Services) PSUs, enter the following command:

opatch lsinventory -bugs_fixed | grep -i 'TRACKING BUG' | grep -i 'PSU'


For GI (Grid Infrastructure) PSUs, enter the following command:

opatch lsinventory -bugs_fixed | grep -i 'GRID INFRASTRUCTURE PATCH SET UPDATE'

For Enterprise Manager Agent PSUs, enter the following command:
opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER' | grep -i 'AGENT'

For Enterprise Manager OMS PSUs, enter the following command:
opatch lsinventory -bugs_fixed | grep -i 'ENTERPRISE MANAGER' | grep -i 'OMS'

For WebLogic Server PSUs, enter the following commands, where WL_HOME is the path of the WebLogic home:
$ . $WL_HOME/server/bin/SetWLSEnv.sh 
$ java weblogic.version
In the following example output, 10.3.4.0.1 is the installed WebLogic Server PSU.
WebLogic Server 10.3.4.0.1 PSU Patch for Bug11677325 Wed Feb 23 10:52:30 IST 2011
WebLogic Server 10.3.4.0  Fri Dec 17 20:47:33 PST 2010 1384255

Tuesday 13 August 2013

ORA-15097: cannot SHUTDOWN ASM instance with connected client.

While stopping the ASM instance , on any or all of the nodes (three nodes in my current environment), I got the the below error.


ORA-15097: cannot SHUTDOWN ASM instance with connected client.

I had to do a ps-ef | grep of the grid user, and kill (kill -9 ) a process that was taking up the connection to the ASM instance. I had to do this in all the three servers, then only could execute the below commands.



  export ORACLE_SID=+ASM1
sqlplus / as sysasm
shutdown immediate

  export ORACLE_SID=+ASM2
sqlplus / as sysasm
shutdown immediate

  export ORACLE_SID=+ASM3
sqlplus / as sysasm
shutdown immediate

De-installation of Oracle Grid Software 11g R2

After the installation of Oracle Grid Infrastructure ASM, it was decided that we need to change the location of the Grid Base Location and Grid Home location (due to various issues).
So, as briefly said below, we had to UNINSTALL ORACLE GRID INFRASTRUCTURE SOFTWARE. 

Environment

This is 11.2.0.1 ASM 11gR2 in Oracle Enterprise Linux 5.8

We have 3 node RAC.

SCAN address is configured in RAC.

So, after stopping the database, and cleanly removing the database, we now need to uninstall ASM CLEANLY.

So, went to Grid software Home, 

e.g. $GRID_HOME/deinstall
then ran
./deinstall

This will take some time to run, as it will connect to all the other nodes as well. It will then come to a stage, where it will ask to run some scripts, The first script will have to be run from the third node, the second node, and then the last script will have to be run from the primary node, i.e. this node where we are executing the deinstall command Those scripts will have to be executed as root user or a user with administrative privileges.

After the script is run, there will not be any processes running from the secondary nodes.

Come back to the primary node, and complete the activity, which will also delete the Oracle Homes and do a clean deletion of the Grid Base location, the Grid Home location and the Oracle Inventory in all the three nodes.


In short, one command ./deinstall (and 3 subcommands) will deinstall everything, and remove all the binaries, and will also remove the Oracle Inventory. Clever !!

I rebooted the 3 servers as well, just for a satisfaction of my mind.

Now, off for the installation of Grid Software.

Wednesday 17 July 2013

Unable to flush restart file in aiurof()

While doing adpatch for HRMS RUP 6 patch (16000686) in R12.1.3 instance, I could see that the patch session was frozen.

I tried the usual checks on the database node to see if there was any space issue or if the archive log destination is full, but there were no problem from that side. 

I then looked at adctrl

Adctrl was bringing the below.

Enter your choice [1] :


        Control
Worker  Code      Context            Filename                    Status
------  --------  -----------------  --------------------------  --------------
     1  Run       AutoPatch R120                                 Wait
     2  Run       AutoPatch R120                                 Wait
     3  Run       AutoPatch R120                                 Wait
     4  Run       AutoPatch R120                                 Wait
     5  Run       AutoPatch R120                                 Wait
     6  Run       AutoPatch R120                                 Wait
     7  Run       AutoPatch R120                                 Wait
     8  Run       AutoPatch R120                                 Wait
     9  Run       AutoPatch R120                                 Wait
    10  Run       AutoPatch R120                                 Wait
    11  Run       AutoPatch R120                                 Wait
    12  Run       AutoPatch R120                                 Wait
    13  Run       AutoPatch R120                                 Wait
    14  Run       AutoPatch R120                                 Wait
    15  Run       AutoPatch R120                                 Wait
    16  Run       AutoPatch R120                                 Wait
    17  Run       AutoPatch R120                                 Wait
    18  Run       AutoPatch R120                                 Wait
    19  Run       AutoPatch R120                                 Wait
    20  Run       AutoPatch R120                                 Wait
    21  Run       AutoPatch R120                                 Wait
    22  Run       AutoPatch R120                                 Wait
    23  Run       AutoPatch R120                                 Wait
    24  Run       AutoPatch R120                                 Wait
    25  Run       AutoPatch R120                                 Wait
    26  Run       AutoPatch R120                                 Wait
    27  Run       AutoPatch R120                                 Wait
    28  Run       AutoPatch R120                                 Wait
    29  Run       AutoPatch R120                                 Wait
    30  Run       AutoPatch R120                                 Wait
    31  Run       AutoPatch R120                                 Wait
    32  Run       AutoPatch R120     gh52doup.pkb                Assigned



I looked at what is there in the worker 32.
cd $APPL_TOP/admin/$TWO_TASK/log

tail -100 adwork032.log | more

Below is the log.

Time when worker started job: Wed Jul 17 2013 17:16:01


Start time for file is: Wed Jul 17 2013 17:16:01

package /u01/PATC/oracle/apps/apps_st/appl/ben/12.0.0/patch/115/sql/bendsgel.pkb

Done deactivating PL/SQL compilation.

Statement executed.

Done resetting PL/SQL compilation.


Time when worker completed job: Wed Jul 17 2013 17:16:01


Time when worker started job: Wed Jul 17 2013 17:16:02

AD Worker error:
Unable to flush restart file in aiurof()

Error opening worker restart file in aijwro().

Time when worker failed: Wed Jul 17 2013 17:16:02

AD Worker is complete.

Errors and warnings are listed in the log file
/u01/PATC/oracle/apps/apps_st/appl/admin/EBSPATCH/log/adwork032.log

and in other log files in the same directory.



------------------- 

So, I went back to adctrl, and did the command to restart the worker 32. 


                    AD Controller Menu
     ---------------------------------------------------

     1.    Show worker status

     2.    Tell worker to restart a failed job

     3.    Tell worker to quit

     4.    Tell manager that a worker failed its job

     5.    Tell manager that a worker acknowledges quit

     6.    Restart a worker on the current machine

     7.    Exit







Enter your choice [1] : 6


You chose 6 - Restart a worker on the current machine.
Before you enter the worker number below, make sure that there is no
worker process already running with that worker number.

Enter the worker number(s)/range(s) or 'all' for all workers,
or press [Return] to go back to the menu : 32

Control code changed to 'Startup' for worker 32.
Review the messages above, then press [Return] to continue.

                    AD Controller Menu
     ---------------------------------------------------

     1.    Show worker status

     2.    Tell worker to restart a failed job

     3.    Tell worker to quit

     4.    Tell manager that a worker failed its job

     5.    Tell manager that a worker acknowledges quit

     6.    Restart a worker on the current machine

     7.    Exit







Enter your choice [1] :


        Control
Worker  Code      Context            Filename                    Status
------  --------  -----------------  --------------------------  --------------
     1  Run       AutoPatch R120                                 Wait
     2  Run       AutoPatch R120                                 Wait
     3  Run       AutoPatch R120                                 Wait
     4  Run       AutoPatch R120                                 Wait
     5  Run       AutoPatch R120                                 Wait
     6  Run       AutoPatch R120                                 Wait
     7  Run       AutoPatch R120                                 Wait
     8  Run       AutoPatch R120                                 Wait
     9  Run       AutoPatch R120                                 Wait
    10  Run       AutoPatch R120                                 Wait
    11  Run       AutoPatch R120                                 Wait
    12  Run       AutoPatch R120                                 Wait
    13  Run       AutoPatch R120                                 Wait
    14  Run       AutoPatch R120                                 Wait
    15  Run       AutoPatch R120                                 Wait
    16  Run       AutoPatch R120                                 Wait
    17  Run       AutoPatch R120                                 Wait
    18  Run       AutoPatch R120                                 Wait
    19  Run       AutoPatch R120                                 Wait
    20  Run       AutoPatch R120                                 Wait
    21  Run       AutoPatch R120                                 Wait
    22  Run       AutoPatch R120                                 Wait
    23  Run       AutoPatch R120                                 Wait
    24  Run       AutoPatch R120                                 Wait
    25  Run       AutoPatch R120                                 Wait
    26  Run       AutoPatch R120                                 Wait
    27  Run       AutoPatch R120                                 Wait
    28  Run       AutoPatch R120                                 Wait
    29  Run       AutoPatch R120                                 Wait
    30  Run       AutoPatch R120                                 Wait
    31  Run       AutoPatch R120                                 Wait
    32  Run       AutoPatch R120     gh52doup.pkb                Running

Review the messages above, then press [Return] to continue.



After that was done, the patch session started resuming normally. 

Thursday 9 February 2012

Doing an scp shows "RSA host key for server has changed and you have requested strict checking."

As I was trying to do an SCP command, I got the below Warning.

[root@ajai_test03 /]# scp -r RPM_Patches ajai_test01:/u03/FROM_ajai_test03_IMP
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
3a:9f:30:9b:da:80:f8:6f:12:a9:86:84:91:ae:0e:d7.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:5
RSA host key for ajai_test01 has changed and you have requested strict checking.
Host key verification failed.
lost connection


==================

This was because of a previous RSA key present in the file  -  /root/.ssh/known_hosts.

I had to remove the key of the server it was pointing at, after that I was able to connect again.

Below is the step to remove the RSA key.
-----------------------------------------------------
[root@ajai_test03 /]# ssh-keygen -R ajai_test01
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
[root@ajai_test03 /]#
[root@ajai_test03 /]#
[root@ajai_test03 /]#

===========================================================

After this has  been done, I tried doing the scp transfer again, and I was  able to transfer the files accordingly.



[root@ajai_test03 /]#
[root@ajai_test03 /]#
[root@ajai_test03 /]#

[root@ajai_test03 /]#
[root@ajai_test03 /]#
[root@ajai_test03 /]# scp -r RPM_Patches ajai_test01:/u03/FROM_ajai_test03_IMP
The authenticity of host 'ajai_test01 (192.18.5.54)' can't be established.
RSA key fingerprint is 3a:9f:30:9b:da:80:f8:6f:12:a9:86:84:91:ae:0e:d7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ajai_test01,192.18.5.54' (RSA) to the list of known hosts.
root@ajai_test01's password:
sun-javadb-core-10.5.3-0.2.i386.rpm                                                                                         100% 3886KB   3.8MB/s   00:00
numactl-devel-0.9.8-11.el5.x86_64.rpm                                                                                       100%   17KB  16.7KB/s   00:00
unixODBC-2.2.11-7.1.i386.rpm                                                                                                100%  832KB 831.5KB/s   00:00
unixODBC-devel-2.2.11-7.1.x86_64.rpm                                                                                        100%  793KB 793.3KB/s   00:00
glibc-headers-2.5-49.x86_64.rpm                                                                                             100%  592KB 591.6KB/s   00:00
libaio-devel-0.3.106-5.x86_64.rpm                                                                                           100%   11KB  11.4KB/s   00:00
gdbm-1.8.0-26.2.1.i386.rpm                                                                                                  100%   27KB  27.1KB/s   00:00
gcc-4.1.2-48.el5.x86_64.rpm                                                                                                 100% 5393KB   5.3MB/s   00:01
unixODBC-2.2.11-7.1.x86_64.rpm                                                                                              100%  837KB 836.7KB/s   00:00
p6078836_101330_LINUX.zip                                                     


==============


Tuesday 10 May 2011

Oracle apps upgrade db connection listener problem ORA-27101

Scenario : Upgraded the Database to 11.2.0.2 in an Oracle EBS environment.

Connection via sqlplus is working fine.

Manually configured the listener. Checked tnsping. Tnsping is working fine with the status as ok.

However when connecting to the Database for doing the other post activities, the failure occurs, and upon investigation, it has been found out that the actual connectivity via a tnsnames.ora is not occurring properly.

This has been verified by the following:

[devora@linux_server03 ~]$ sqlplus apps/apps@migr
SQL*Plus: Release 11.2.0.2.0 Production on Tue May 10 14:30:43 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0

Enter user-name:


=======

To resolve it :-


SQL> ALTER SYSTEM SET LOCAL_LISTENER="(address=(protocol=TCP)(host=linux_server03) (port=1528))" SID='MIGR';
System altered.
SQL>

or

you can add the below entry in the init.ora file and save it..

 LOCAL_LISTENER=MIGR


=======

Always ensure that you start the listener and then only start the Database for Oracle EBS (non-rac) environment.

Thursday 17 March 2011

Users and Responsibilities in Oracle E-Business Suite

Getting to know all Oracle Users and their responsbilities within E-Business Suite? Yes, this will be required during audit purposes and also to keep a track of who has what and whether they should be using that responsibility or not.



select fu.user_name, fu.description,fu.start_date,fu.end_date,
fu.email_address, fr.responsibility_name,  furg.START_DATE, 
furg.END_DATE from fnd_user_resp_groups_direct furg,
fnd_user fu, fnd_responsibility_tl fr
-- where fu.user_name = ‘&user_name’
where furg.user_id = fu.user_id
and furg.responsibility_id = fr.responsibility_id
and fr.language = userenv('LANG')
order by 1
 

Friday 11 March 2011

Applying PSU in Oracle Database? Check whether they have any patch conflicts

You would be better off to resolve the conflicts while applying the PSU Patches on the test environment than ignoring the conflicts, which can cause serious harm at a later stage.

To check if a particular patch has got any conflicts, run the below command from the patch directory.

$ cd 10248636
$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0
Central Inventory : /u02/oracle/FEB/DB_TIER/db/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.5.1
OUI version : 10.2.0.4.0
OUI location : /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/oui
Log file location : /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/cfgtoollogs/opatch/opatch2011-03-11_08-57-14AM.log

Patch history file: /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/cfgtoollogs/opatch/opatch_history.txt

Invoking prereq "checkconflictagainstohwithdetail"

ZOP-40: The patch(es) has conflicts with other patches installed in the Oracle Home (or) among themselves.

Prereq "checkConflictAgainstOHWithDetail" failed.

Summary of Conflict Analysis:

There are no patches that can be applied now.

Following patches have conflicts. Please contact Oracle Support and get the merged patch of the patches :
9032412, 10248636

Following patches will be rolled back from Oracle Home on application of the patches in the given list :
9032412

Conflicts/Supersets for each patch are:

Patch : 10248636

Conflict with 9032412
Conflict details:
/u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/lib/libserver10.a:/kwqit.o

OPatch succeeded.


=============================================================================================================================================================

=====================================================================----------------------------------------------


$ cd 10248636
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Invoking OPatch 10.2.0.5.1

Oracle Interim Patch Installer version 10.2.0.5.1
Copyright (c) 2010, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0
Central Inventory : /u02/oracle/FEB/DB_TIER/db/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.5.1
OUI version : 10.2.0.4.0
OUI location : /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/oui
Log file location : /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/cfgtoollogs/opatch/opatch2011-03-11_08-57-31AM.log

Patch history file: /u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/cfgtoollogs/opatch/opatch_history.txt

Invoking prereq "checkconflictagainstohwithdetail"

ZOP-40: The patch(es) has conflicts with other patches installed in the Oracle Home (or) among themselves.

Prereq "checkConflictAgainstOHWithDetail" failed.

Summary of Conflict Analysis:

There are no patches that can be applied now.

Following patches have conflicts. Please contact Oracle Support and get the merged patch of the patches :
9032412, 10248636

Following patches will be rolled back from Oracle Home on application of the patches in the given list :
9032412

Conflicts/Supersets for each patch are:

Patch : 10248636

Conflict with 9032412
Conflict details:
/u02/oracle/FEB/DB_TIER/db/tech_st/10.2.0/lib/libserver10.a:/kwqit.o

OPatch succeeded.
$

-----------------

The above shows that there is a conflict if I were to apply the patch 10248636.
So, I resolve the conflict, or I open an SR with Oracle and send across the log file as well as my inventory in detail so I can get a merged patch .


-----

To get your detailed inventory, execute the below command...

$ opatch lsinventory -detail








Monday 3 January 2011

Environment Variable - NLS_LANG in Windows Server 2008

After a new server  - Windows Server 2008 was built, and after the Oracle client was setup, the application that was talking to the database was not fetching the data.
Some of the tables were not displaying data, and as a result there were problems.

Oracle Apps tables wont display data, unless the correct environment variables are set.

a) You would need to add the nls_lang to the  system variables under the environment variables.



Adding NLS_LANG for Oracle environment
 

b) You would need to log off and log back in to get the settings in place.

c) Check your Oracle environment, if they have been in place. You may have to change the setting in registry, and in Win 2008 server, it is in --> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_OraClient11g_home1





Now users should be able to get the desired output from viewing the tables via command prompt, or with other tools.


d) Using SQLDeveloper, the developers were crying that they were not able to see the data.

Solution? You would need to change the NLS Settings in the SQL Developer to view the appropriate data.


I was astonished the next day when I came and the developer told me that he was not able to see the data. He searched in and out in the registry for any links to developer, but could not get it working.

SOLUTION: Change the NLS settings by going to SQL Developer -->  tools --> preferences --> databases --> NLS


SQL Developer NLS_LANG settings for NLS
Below is what was done in my laptop to view data from tables.




Friday 26 February 2010

Current users logged into Oracle E-Business Suite

From time to time, before I bring down the E-Business Suite Applications, I do check on the number of users who are currently in the system. I would then need to inform the users and then bring down the applications, or rather bring them down if no one is around.

The Script that I use to check on the number of users, if any and then bring down the applicaitons is shown below..


select distinct fu.user_name User_Name, fu.email_address emailid,
fu.description, TO_CHAR(IC.FIRST_CONNECT,'dd-Mon-rrrr HH24:mi:ss')"First Accessed",
TO_CHAR(IC.LAST_CONNECT,'dd-Mon-rrrr HH24:mi:ss')"Last Accessed", ic.nls_territory, FVL.RESPONSIBILITY_NAME "RESPONSIBILITY NAME", fr.RESPONSIBILITY_KEY "Responsibility Key", ic.function_type,ic.time_out, fu.user_id, fu.employee_id,
ic.responsibility_application_id, ic.responsibility_id, ic.org_id, ic.counter, fr.menu_id, ic.disabled_flag
from fnd_user fu,
fnd_responsibility fr, icx_sessions ic, fnd_responsibility_VL FVL
where fu.user_id = ic.user_id AND
FR.RESPONSIBILITY_KEY=FVL.RESPONSIBILITY_KEY AND
fr.responsibility_id = ic.responsibility_id AND
ic.disabled_flag='N' AND
ic.responsibility_id is not null AND
ic.last_connect > sysdate - (ic.time_out/60)/96
order by "Last Accessed" desc;

===

Below is another way of checking the current users within Oracle E-Business Suite.

====


set lin 999
select distinct ic.disabled_flag,
  fu.user_name User_Name,
  fr.RESPONSIBILITY_KEY Responsibility,
  fu.user_id,
  fu.description,
  fu.employee_id,
  ic.responsibility_application_id,
  ic.responsibility_id,
  ic.function_type,
  ic.counter,
  ic.first_connect,
  ic.last_connect,
  ic.nls_territory,
  ic.time_out,
  fr.menu_id,
  fr.responsibility_key
from fnd_user fu,
  fnd_responsibility fr,
  icx_sessions ic
where fu.user_id          = ic.user_id
and fr.responsibility_id  = ic.responsibility_id
and ic.disabled_flag      ='N'
and IC.RESPONSIBILITY_ID is not null
and ic.last_connect  > sysdate - (ic.time_out/60)/96;



===============

Sometimes, I would need to check the number of users who were accessing the EBS in the last 24 hours. They may have logged out. But the below script is much handy in finding the users who logged in the past.


SELECT DISTINCT fu.user_name User_Name,fu.email_address emailid,
TO_CHAR(IC.FIRST_CONNECT,'dd-Mon-rrrr HH24:mi:ss')"First Accessed",
TO_CHAR(IC.LAST_CONNECT,'dd-Mon-rrrr HH24:mi:ss')"Last Accessed",FVL.RESPONSIBILITY_NAME "RESPONSIBILITY NAME", fr.RESPONSIBILITY_KEY "Responsibility Key", ic.function_type FROM fnd_user fu,
fnd_responsibility fr, icx_sessions ic, fnd_responsibility_VL FVL
WHERE fu.user_id = ic.user_id AND
FR.RESPONSIBILITY_KEY=FVL.RESPONSIBILITY_KEY AND
fr.responsibility_id = ic.responsibility_id AND
ic.disabled_flag='N' AND
ic.responsibility_id IS NOT NULL AND
ic.last_connect LIKE SYSDATE
order by "Last Accessed" desc;


Hope the above helps..

Regards,
Ajai Mundackal

Monday 9 March 2009

Saturday 17 January 2009

Performance Gathering of your Oracle Portal

Oracle Portal is doing marvels.
You had it rolled out or you are in the development state. You would like to have some people access the portal . Now you want to know the performance of your portal. Here is where Oracle has come with some Portal performance scripts that will help you gather the necessary information of your portal.

Below are the steps that you need to do to get the performance pretty running.

Step 1 - Ensure you are familiar with this site (http://www.oracle.com/technology/products/ias/portal/performance_10g1014.html)
You may also have a look at the readme of the scripts

Step 2 - Download the scripts
You will have to download these scripts and place it in a directory of your Portal server.

Installation of Performance Scripts

a) Copy the Zip file to a directory within the server and uninstall the directory into a location within the server (D:\Ajai\portal_performance\perf).

b) In a database within the server or a different database ( if one is available which is recommended), do the necessary activities.

a. Create tablespace to load the tables.
create tablespace OWA_PERF_LOG datafile 'D:\ORACLE\ORADATA\AJ10GDB\OWA_PERF_LOG01.DBF' size 50M autoextend on extent management local segment space management auto;

b. Create tablespace to load the Indexes.
create tablespace OWA_PERF_LOG_INDEX datafile 'D:\ORACLE\ORADATA\AJ10GDB\OWA_PERF_LOG_INDEX01.DBF' size 50M autoextend on extent management local segment space management auto;

c. Create tablespace to load the Materialized Views.
create tablespace OWA_PERF_LOG_MAT_VIEWS datafile 'D:\ORACLE\ORADATA\AJ10GDB\OWA_PERF_LOG_MAT_VIEWS01.DBF' size 50M autoextend on extent management local segment space management auto;

d. Create a default tablespace for the owa_perf user.
create tablespace OWA_PERF_TBS datafile 'D:\ORACLE\ORADATA\AJ10GDB\OWA_PERF_TBS01.DBF' size 50M autoextend on extent management local segment space management auto;

e. Grant proper privileges to this user.
GRANT RESOURCE, CREATE SESSION, CREATE MATERIALIZED VIEW, CREATE SYNONYM TO owa_perf;

f. Go to the Directory where the zip file has been unzipped and install from the directory of perf.
cd D:\Ajai\portal_performance\perf

sqlplus owa_perf/owa_perf@AJ10GDB


g. Install the scripts from this directory. During installation, the script will ask to enter value 1, value 2. Leave both the values as blank, if partitioning is not required. Give proper names for the tablespaces when prompted.
Below example shows how the scripts are installed.
@install/install.sql
Enter value for 1:
Enter value for 2:
Enter value for table_tablespace: OWA_PERF_LOG
Enter value for index_tablespace: OWA_PERF_LOG_INDEX
Enter value for mview_tablespace: OWA_PERF_LOG_MAT_VIEWS

This will install the performance related tables into the database.

Changes required on the server to enable logging

a) Make changes to httpd.conf file. Ensure you have a backup of the file before making any changes to the configuration.
Internal Application Server – D:\oracle\dmzportal\Apache\Apache\conf\httpd.conf

1) Change from

#
ErrorLog "D:\oracle\oramidtier\Apache\Apache\bin\rotatelogs logs/error_log 43200"
#

To

#
# ErrorLog "D:\oracle\oramidtier\Apache\Apache\bin\rotatelogs logs/error_log 43200"
ErrorLog D:\oracle\oramidtier\Apache\Apache\logs\error_log
#


2) Set the LogLevel to info.

#
LogLevel info
OraLogMode odl
#




External Application Server - D:\oracle\dmzportal\Apache\Apache\conf\httpd.conf


1) Change from

#
ErrorLog "D:\oracle\dmzportal\Apache\Apache\bin\rotatelogs logs/error_log 43200"
#

To

#
# ErrorLog "D:\oracle\dmzportal\Apache\Apache\bin\rotatelogs logs/error_log 43200"
ErrorLog D:\oracle\dmzportal\Apache\Apache\logs\error_log
#


2) Set the LogLevel to info.

#
LogLevel info
OraLogMode odl
#

b) Make changes to web.xml file
Ensure you have a backup of the file before making any changes to the configuration. Ensure the logmode is set to perf for the different servlets and pages in the web.xml directory. This is required for the information to be logged accordingly. The same changes have to be made to the Internal and External Application Server.

Internal Application Server – D:\oracle\oramidtier\j2ee\OC4J_Portal\applications\portal\portal\WEB-INF\web.xml
External Application Server – D:\oracle\dmzportal\j2ee\OC4J_Portal\applications\portal\portal\WEB-INF\web.xml


e.g.


RepositoryServlet
oracle.webdb.repository.servlet.RepositoryServlet

logmode
perf




PortalServlet
oracle.webdb.portal.servlet.PortalServlet

logmode
perf




page
oracle.webdb.page.ParallelServlet

logmode
perf




c) Make changes to orion-web.xml file
Ensure you have a backup of the file before making any changes to the configuration. Ensure the directory names are specific to the web provider in the orion-web.xml file.

Internal Application Server – D:\oracle\oramidtier\j2ee\OC4J_Portal\application-deployments\portal\portal\orion-web.xml
External Application Server – D:\oracle\dmzportal\j2ee\OC4J_Portal\application-deployments\portal\portal\orion-web.xml

e.g.







d) Make changes to Oracle Application Server Web Cache
Changes has to be made to the Oracle Applications Server Web Cache so that the access logs are getting logged into the logs properly.

I. Start the Oracle Web Cache Manager by the URL given below.
Internal Application Server – http://int_portal.ajdomain.com:9400/webcacheadmin
External Application Server – http://ext_portal.ajdomain.com:9400/webcacheadmin

II. In the navigator pane, select "Logging and Diagnostics" > "Access Logs".
The Access Log page appears in the right pane.

III. In the Access Log page, under "Site-Specific Access Log Configuration", verify that the access_log is using the "End-User Performance Monitoring Format" format style, and that ESI Fragment Requests are being logged.

IV. If not, select it and hit the "Edit Selected" button.
Select "Yes" for "Enabled".
Select "Log" for "ESI Fragment Requests".
Select the "End-User Performance Monitoring Format" format style.
Choose "Submit".



V. In the Web Cache Manager main window, choose "Apply Changes".
.


VI. Restart Web Cache.



Ensure the above changes are being done to the Applications in the Internal Application Server and the External Applications Server.


e) Stop and Start the Middle Tier Services for the changes to take effect.
The Application Server Console and the opmn services have to be stopped and started for the changes to take effect.

Running of Performance Scripts

a) After starting the Oracle Portal, navigate through a few pages. This is to gather statistics on the pages that have been used for navigation.

b) Ensure that the performance scripts have access to the log files. If not, the log files will need to be copied to a location from where the performance scripts will have access. This is required to load the details from the log into the database.
Access to the error_log, access_log and application.log file are required. The scripts would require “perl utility” to load the details in the log to the database. Once loaded, data can be retrieved from the tables in the owa_perf schema which will help in analyzing the performance of the portal.

c) Create the necessary temp directory that will be required during the execution of the scripts. This is required to log the information during the loading activity by the sqlloader.

d) Ensure that proper path has been given and the environment variables have been set before loading the data from the logs into the database.
e.g.
set ORACLE_HOME=D:\oracle\orainfra
set ORACLE_SID=AJ10GDB
set PATH=D:\oracle\orainfra\OPatch;D:\oracle\orainfra\opmn\bin;D:\oracle\orainfra\perl\5.6.1\bin\MSWin32-x86;%PATH%

e) Ensure that you are in the directory from where the loadlogs.pl script is residing.
e.g.
cd D:\Ajai\portal_performance\perf\loader

f) Ensure that the parameters below are available before loading
1) version – 9.0.4
2) logical host name – (name identified as the logical host)
internal application server - aj_portal_internal.ajdomain.com
external application server – aj_portal_external.com
3) userid/pwd and tnsname for the database to get connected - owa_perf/owa_perf@AJ10GDB
4) Temp Directory (The directory where the temp files are written to) - D:\oracle\temp

g) Run the loadlogs.pl. Ensure that you are in the directory of the scripts/ loader, before running the scripts. Ensure that the parameters are proper when carrying out with the activity, else the script will fail to execute properly. The parameter –delete_old_logs are given to delete the existing logs into the database. If the logs are not being deleted, this parameter can be avoided. But this has to be done carefully, else duplicate entries will get loaded into the database.

E.g. Internal Application Server

perl loadlogs.pl -version 9.0.4 -logical_host aj_portal_internal.ajdomain.com -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -webcache_logfile D:\oracle\oramidtier\webcache\logs\access_log -delete_old_logs

perl loadlogs.pl -logical_host aj_portal_internal.ajdomain.com -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -http_logfile D:\oracle\oramidtier\Apache\Apache\logs\error_log -delete_old_logs

perl loadlogs.pl -logical_host aj_portal_internal.ajdomain.com_1 -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -oc4j_logfile D:\oracle\oramidtier\j2ee\OC4J_Portal\application-deployments\portal\OC4J_Portal_default_island_1\application.log -delete_old_logs

perl loadlogs.pl -logical_host aj_portal_internal.ajdomain.com_2 -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -oc4j_logfile D:\oracle\oramidtier\j2ee\OC4J_Portal\application-deployments\portal\OC4J_Portal_default_island_2\application.log -delete_old_logs


E.g. External Application Server

perl loadlogs.pl -version 9.0.4 -logical_host aj_portal_external.com -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -webcache_logfile D:\oracle\dmzportal\webcache\logs\access_log -delete_old_logs

perl loadlogs.pl -logical_host aj_portal_external.com -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -http_logfile D:\oracle\dmzportal\Apache\Apache\logs\error_log -delete_old_logs

perl loadlogs.pl -logical_host aj_portal_external.com_1 -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -oc4j_logfile D:\oracle\dmzportal\j2ee\OC4J_Portal\application-deployments\portal\OC4J_Portal_default_island_1\application.log -delete_old_logs

perl loadlogs.pl -logical_host aj_portal_external.com_2 -connection owa_perf/owa_perf@AJ10GDB -temp_dir D:\oracle\temp -oc4j_logfile D:\oracle\dmzportal\j2ee\OC4J_Portal\application-deployments\portal\OC4J_Portal_default_island_2\application.log -delete_old_logs

The above scripts will load the data from the mentioned directories into the database.

h) Run the below command to get the reports generated from the logs that were loaded into the database.
cd D:\Ajai\portal_performance\perf\scripts

sqlplus owa_perf/owa_perf@AJ10GDB @reports.sql


i) To access the reports, double click on the reports.html directory that will load the reports. The reports.html will be in the scripts directory.
cd D:\Ajai\portal_performance\perf\scripts

Thursday 15 November 2007

Internet access for your Oracle Applications

Oracle only supports those Applications with a minimum of 11.5.9 version to be made Internet Accessible. Relevant patches and updates must also be met, inorder for the support to take place.
But, that itself wont make the Applications safe enough to make it Externally Deployable.

Oracle E-Business Suite within DMZ must be carried out after a careful planning, and it is advisable to have an external application server for the external purposes.

DMZ can be done in a better way if a reverse proxy server is configured to talk to the external application server.

Steps to configure Oracle Applications to make it externally Deployable within DMZ.
Step 1 - Only Internal application Server and Database.
1) Run pre - clone steps for the internal application server.

step 2 - Copy the internal application server to the external box.
1) run post clone on the external application server.
2) run addnode to add this node within the E-business Suite.

step 3- Prepare for DMZ (with Standalone Apache Server that acts as the Reverse proxy server)
1) Setup the Apache Server to act as the standalone Reverse Proxy server (Note 287176.1)

step 4 -
1) Run sqlplus / @/patch/115/sql/txkChangeProfH.sql SERVRESP

2) Update Node Trust Level

3) Upgrade list of responsibilities

4) Update Home Page Mode to Framework

5) Update Oracle E-Business Suite Applications Context File

6) Run AutoConfig and Restart Oracle HTTP Server

7) After a few changes in the Reverse proxy server, the oracle applications will be available for external access.


P.s.- I shall explain more in detail in the future posts...