28 December, 2015

How to find the locked objects and Kill the Session in Oracle

Step-1 Run the following SQL query to find out the list of objects that has been locked

SELECT aob.object_name
,aob.object_id
,b.process
,b.session_id
FROM all_objects aob, v$locked_object b
WHERE aob.object_id = b.object_id

OR

SELECT aob.object_name
,aob.object_id
,b.process
,b.session_id
FROM all_objects aob, v$locked_object b
,V$session a
WHERE aob.object_id = b.object_id
and a.sid=b.session_id ;


Step-2 Now run the following SQL query with session id (from step-1)

SELECT SID, SERIAL#  FROM v$session WHERE SID = <SESSION_ID>
Note <SID> <SERIAL#>

 
Step-3 Run the following Query to kill the session with session_id and Serial no (from step-2)

ALTER SYSTEM KILL SESSION '<SID> ,<SERIAL#>';

24 December, 2015

FRM-92050: Failed to connect to server







APPLIES TO:

Oracle Applications Technology Stack - Version 11.5.0 to 11.5.10.2 [Release 11.5 to 11.5.10]
Information in this document applies to any platform.

SYMPTOMS

Oracle E-Business Suite 11i instance forms fail to launch with error:
FRM-92050: Failed to connect to server

CAUSE

This error may be caused due to the forms server being stopped, or have crashed.
The status of the forms server can be checked with the following command:

$COMMON_TOP/admin/scripts/adfrmctl.sh status

Furthermore, once the forms server starts there should be at least one f60servm, 
and f60webmx process, which can be checked with the following commands:

ps -ef | grep f60servm
ps -ef | grep f60webmx

If the above returns no results then the forms server is stopped.

SOLUTION

To resolve the issue start the forms server with the following command, 
and then confirm that the forms server is Alive:

$COMMON_TOP/admin/scripts/adfrmctl.sh start

 If the above command is not successful, or if the forms server is stopped right after being started, 
check that the environment is certified and that it meets the general requirements for the specific OS 
per Doc ID 316806.1.

 The forms server can also fail to start due to ports conflict.

 To check the port used for the forms server follow the steps below:

 1) Go to OAM Home page

 2) In the Applications System Status table, click the link of the app server in the HOST column.

 3) On the page Oracle Applications Hosts: <your_hostname>, click the "View configuration" button.

 Confirm there are no other processes using ports that should be used by E-Business, 
this can be done with a tool such as netstat. If there are ports being used in conflict with 
the forms server resolve the port conflict and try to start the forms server again.

 If the forms server still fail to start, after resolving the port conflict, see Doc ID 299187 
to further troubleshoot the forms server.
 

23 December, 2015

Proxy Error

Encountered this error while opening forms in one of the freshly built instance




Proxy Error

The proxy server received an invalid response from an upstream server.

The proxy server could not handle the request GET /pls/OTST/fnd_icx_launch.launch.

Reason: Could not connect to remote machine: Connection refused



Cause:

T[applmgr@otstapp3 logs]$ grep -i pid $CONTEXT_FILE
         <fndreviverpiddir oa_var="s_fndreviverpiddir">/d03/oratst/otstappl/fnd/11.5.0/log</fndreviverpiddir>
         <lock_pid_dir oa_var="s_lock_pid_dir">/var/opt/oracle/otst/logs</lock_pid_dir>
         <web_pid_file oa_var="s_web_pid_file">/var/opt/oracle/otst/logs/httpd.pid</web_pid_file>
         <httpd_pls_pid_file oa_var="s_httpd_pls_pid_file">/var/opt/oracle/otst/log/httpd_pls.pid</httpd_pls_pid_file>
      <rapidwizloc oa_var="s_rapidwizloc">/stage/Stage11i/startCD/Disk1/rapidwiz</rapidwizloc>
      <oa_environment type="rapid_install">
[applmgr@otstapp3 logs]$

The customized location/path of httlp_pls.pid was invalid.
Instead of logs it was log


Changed it in context_file, saved and ran autoconfig


Started and the issue was resolved

21 December, 2015

Comparing RPM packages installed on two hosts, without using temporary files

When setting up a new Linux server, it's often interesting to compare the list of packages that are installed on the new server, with the list of packages installed on an existing server. You can use the following command line, which makes use of Bash supports for process substitution, to show the difference between packages installed on the local host and on the remote host.
# ssh root@remotehost 'rpm -qa | sort' | diff -u <(rpm -qa | sort) -

If the above command gives no output, it means that the two hosts have identical packages installed.
If you want to disregard the package version differences in the comparison, then you will need to use something like this:
# ssh root@remotehost 'rpm -qa --queryformat "%{NAME}\n" | sort' | diff -u <(rpm -qa --queryformat "%{NAME}\n" | sort) -



Following Paul Waterman's comment, I did try out his rpmscomp Perl script, and I did find it useful. So I would recommend you also give it a try:

20 December, 2015

Oracle EBS – Changing Main Form’s Heading – Site Name Profile Option

Site Name Profile Option
Many a time you want to change the Main window’s heading to show purpose of instance or any special info etc….
Set the profile option: to your needs and log in/out of Applications to pick up the changes.‘Site Name’

image
image

19 December, 2015

Finding Remaining Time using SID

Select
a.sid,
a.serial#,
b.status,
a.opname,
to_char(a.START_TIME,' dd-Mon-YYYY HH24:mi:ss') START_TIME,
to_char(a.LAST_UPDATE_TIME,' dd-Mon-YYYY HH24:mi:ss') LAST_UPDATE_TIME,
a.time_remaining as "Time Remaining Sec" ,
a.time_remaining/60 as "Time Remaining Min",
a.time_remaining/60/60 as "Time Remaining HR"
From v$session_longops a, v$session b
where a.sid = b.sid
and a.sid =&sid
And time_remaining > 0;

17 December, 2015

Table Complete description

=== connected as sysdba === 

SQL> 
set pagesize 9000 
set linesize 80 
set long 100000 
-- spool rcindscr.sql 

SELECT dbms_metadata.get_ddl('TABLE','<TABLE_NAME>','<SCHEMA_NAME>') FROM dual; 

Example: SQL> SELECT dbms_metadata.get_ddl('TABLE','OE_ORDER_LINES_ALL','ONT') FROM dual; 

Finding OPP Manager log for a concurrent request

=> Use below query to find the OPP manager log for a concurrent request.  SELECT fcpp.concurrent_request_id req_id, fcp.node_name, fcp.lo...