Monthly Archives: November 2013

DATABASE HANGS

ERROR MESSAGE IN ALERTLOG FILE:

ORACLE Instance PROD – Archival Error
ORA-16038: log 4 sequence# 9961 cannot be archived
ORA-19502: write error on file “”, block number  (block size=)
ORA-00312: online log 4 thread 1: ‘/u01/oradata/data01/PROD/redo04.log’
ORA-16014: log 4 sequence# 9961 not archived, no available destinations

CAUSE:  Default archive log destination is 100% used, There is no space to create additional archive log

POSSIBLE ISSUES BECAUSE of archiving is stuck:

1. Database Hangs
2. Users not able to connect to database
3. Not able to open the database
4. Archive  space related error in alertlog file(ORA-16038,ORA-16014,ORA-19809 )

POSSIBLE SOLUTIONS:

1. Increase the ARCHIVE DESTINATION size
2. Take backup of the archivelogs to different location.
3. Change archivelogs destination to some other mountpoint.
4. Delete archivelogs to make more space. ( should be the last option) and in case of standby database make sure those logs are already applied to standby.

Advertisements

Terminate runway process of cancel concurrent request

Even after cancel concurrent request, Resource related concurrent request process may not be released such processes are called RUNWAY processes. So we need to manually kill the processes from database.

Concurrent request id:

12345

Find OS Process id:

Select request_id,os_process_id from fnd_concurrent_requests where request_id=’3574145′;
REQUEST_ID   OS_PROCESS_ID
———-               ————
3574145                162

 Check runways:

select s.sid , s.serial# from v$session s , v$process p where s.paddr = p.addr and s.process =’162′;
SID    SERIAL#
—    ——-
46    1742

KILL RUNWAY PROCESS:

ALTER SYSTEM KILL SESSION ‘46,1742’;

FRM-92095: Oracle JInitiator version too low. Please install version 1.1.8.2

CAUSE: Latest version of Java installed and forms version is not compatible with currently installed JAVA

JRE_ERROR

SOLUTION:

1. Check the version of java installed in your system
2. If you already have latest version of JAVA, Please go and uninstall(via Control Panel > Add/Remove Software)
3. Download the latest version of 1.6 (like 1.6.0_25 to 1.6.0_29) and install.
4. Then try open the application again with same browser.

OR you can perform below steps:

Click on startà –> Control Panel

control_pannel

Click on programs

programs

Click on Java

java

Click on Java Tab as seen below

java_tab

Click on View

view

After clicking on View we see Runtime Parameters

We need to set -Djava.vendor=”Sun Microsystems Inc.” under Runtime Parameters

runtime_parameter

Click ok and click Apply.

Give a try if it resolves the problem !!

Thank You !!

Function not available to this responsibility : When accessing CUSTOM FORM

After fresh clone, Application technical team used to report that ‘Function not available to this responsibility’ error when they are trying to access custom form.

CAUSE:  Missing the entry of CUSTOM_TOP in default.env file

SOLUTION:

1. Login to APPLMGR user to application Linux server
[applmgr@EBSTEST]$ sudo su – applmgr

2. Go to $INST_TOP/ora/10.1.2/forms/server directory
[applmgr@EBSTEST]$ cd $INST_TOP/ora/10.1.2/forms/server

3. Add the missing CUSTOM_TOP entry to default.env
XXX_TOP=/U01/applmgr/r12/CUSTOM/xxX/12.0.0

4. Restart the middle tier services.

5. Retest the issue.

DATABASE SIZE (datafiles + tempfiles + redologfiles)

To get accurate size of the database, We have to combined the sizes of all datafiles, tempfiles and redologfiles.

select round ((a.data_size+b.temp_size+c.redo_size)/1024/1024/1024,2) “DB_size_in_GB”
from ( select sum(bytes) data_size
from dba_data_files ) a,
( select nvl(sum(bytes),0) temp_size
from dba_temp_files ) b,
( select sum(bytes) redo_size
from sys.v_$log ) c;

HOW TO FIND SYSADMIN PASSWORD – R12

Simple way to find out SYSADMIN password in R12, Please review below for the same

1) Connect to APPS USER
2) Create PACKAGE and PACKEGE BODY.
3) Query for PASSWORD by providing USERNAME

STEP 1:

$SQL> conn apps/welcome
Connected.

STEP 2:

CREATE OR REPLACE PACKAGE XXX_GET_PWD AS
FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
RETURN VARCHAR2;
END XXX_GET_PWD;
/

Package created.

CREATE OR REPLACE PACKAGE BODY XXX_GET_PWD AS
FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
RETURN VARCHAR2 AS
LANGUAGE JAVA NAME ‘oracle.apps.fnd.security.WebSessionManagerProc.decrypt
(java.lang.String,java.lang.String) return java.lang.String’;
END XXX_GET_PWD;

Package body created.

STEP 3:

SELECT Usr.User_Name,
Usr.Description,
XXX_GET_PWD.Decrypt (
(SELECT (SELECT XXX_GET_PWD.Decrypt (
Fnd_Web_Sec.Get_Guest_Username_Pwd,
Usertable.Encrypted_Foundation_Password)
FROM DUAL)
AS Apps_Password
FROM applsys.Fnd_User Usertable
WHERE Usertable.User_Name =
(SELECT SUBSTR (
Fnd_Web_Sec.Get_Guest_Username_Pwd,
1,
INSTR (Fnd_Web_Sec.Get_Guest_Username_Pwd,
‘/’)
– 1)
FROM DUAL)),
Usr.Encrypted_User_Password)
Password
FROM applsys.Fnd_User Usr
WHERE Usr.User_Name = ‘&User_Name’;
Enter value for user_name: SYSADMIN
old  21:  WHERE Usr.User_Name = ‘&User_Name’
new  21:  WHERE Usr.User_Name = ‘SYSADMIN’
USER_NAME     DESCRIPTION                   PASSWORD
————-         ——————–                 ——————–
SYSADMIN      System Administrator            sysadmin

TO FIND APPS PASSWORD, Check this…  https://oracledbamasters.wordpress.com/2013/11/11/how-to-find-apps-password-r12/

HOW TO FIND APPS PASSWORD – R12

Simple way to find out apps password in R12, Please review below for the same

1) Connect to SYSTEM or SYS USER
2) Create Function for to decrypt the encrypted password
3) Query for PASSWORD
4) Query for decrypt the password
5) Test the apps user connection

STEP 1:

[oracle@localhost]$sqlplus system/system_password
[oracle@localhost]$sqlplus / as sysdba

STEP 2:

$SQL>create FUNCTION apps.decrypt_get_pwd(in_chr_key IN VARCHAR2,in_chr_encrypted_pin IN VARCHAR2)
RETURN VARCHAR2 AS LANGUAGE JAVA NAME ‘oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String’;
/

Function created.

STEP 3:

$SQL>select ENCRYPTED_FOUNDATION_PASSWORD from apps.fnd_user where USER_NAME=’GUEST’;
ENCRYPTED_FOUNDATION_PASSWORD
——————————————————————————–
ZG342073DB4A6F66E5ABB79D0E8BD64A5D4830ED4BB250407DF1DB9EEE786F895B78FB6F260E0101
85B830B8F49C6ECC2FAF

STEP 4:

$SQL>SELECT apps.decrypt_get_pwd(‘GUEST/ORACLE’,’ZG342073DB4A6F66E5ABB79D0E8BD64A5D4830ED4BB250407DF1DB9EEE786F895B78FB6F260E010185B830B8F49C6ECC2FAF
‘) from dual;
APPS.DECRYPT_PIN_FUNC(‘GUEST/ORACLE’,’ZG342073DB4A6F66E5ABB79D0E8BD64A5D4830ED4B
——————————————————————————–
welcome

STEP 5:

$SQL> conn apps/welcome
Connected.

TO FIND SYSADMIN PASSWORD, Check this … https://oracledbamasters.wordpress.com/2013/11/11/how-to-find-sysadmin-password-r12/

cmclean.sql : Cleaning the Concurrent Manager tables

To cleanup running and pending requests we use cmclean.sql, If we stop concurrent managers using abort options then concurrent requests will be in running state ,Next when we start concurrent manager the processes will not start properly.

CMCLEAN will update below tables:
1) FND_CONCURRENT_QUEUES
2) FND_CONCURRENT_PROCESSES
3) FND_CONCURRENT_REQUESTS
4) FND_CONFLICTS_DOMAIN
5) FND_CONCURRENT_CONFLICT_SETS

GET CMCLEAN SCRIPT FROM ORACLE NOTEID:
Concurrent Processing – cmclean.sql – Non Destructive Script to Clean Concurrent Manager Tables [ID 134007.1]

—- SCRIPT —-
****************

REM
REM FILENAME
REM cmclean.sql
REM DESCRIPTION
REM Clean out the concurrent manager tables
REM NOTES
REM Usage: sqlplus @cmclean
REM
REM
REM $Id: cmclean.sql,v 1.4 2001/04/07 15:55:07 pferguso Exp $
REM
REM
REM +======================================================================+
set verify off;
set head off;
set timing off
set pagesize 1000
column manager format a20 heading ‘Manager short name’
column pid heading ‘Process id’
column pscode format a12 heading ‘Status code’
column ccode format a12 heading ‘Control code’
column request heading ‘Request ID’
column pcode format a6 heading ‘Phase’
column scode format a6 heading ‘Status’
WHENEVER SQLERROR EXIT ROLLBACK;
DOCUMENT
WARNING : Do not run this script without explicit instructions
from Oracle Support
*** Make sure that the managers are shut down ***
*** before running this script ***
*** If the concurrent managers are NOT shut down, ***
*** exit this script now !! ***
#
accept answer prompt ‘If you wish to continue type the word ”dual”: ‘
set feed off
select null from &answer;
set feed on
REM Update process status codes to TERMINATED
prompt
prompt ————————————————————————
prompt — Updating invalid process status codes in FND_CONCURRENT_PROCESSES
set feedback off
set head on
break on manager
SELECT concurrent_queue_name manager,
concurrent_process_id pid,
process_status_code pscode
FROM fnd_concurrent_queues fcq, fnd_concurrent_processes fcp
WHERE process_status_code not in (‘K’, ‘S’)
AND fcq.concurrent_queue_id = fcp.concurrent_queue_id
AND fcq.application_id = fcp.queue_application_id;
set head off
set feedback on
UPDATE fnd_concurrent_processes
SET process_status_code = ‘K’
WHERE process_status_code not in (‘K’, ‘S’);
REM Set all managers to 0 processes
prompt
prompt ————————————————————————
prompt — Updating running processes in FND_CONCURRENT_QUEUES
prompt — Setting running_processes = 0 and max_processes = 0 for all managers
UPDATE fnd_concurrent_queues
SET running_processes = 0, max_processes = 0;
REM Reset control codes
prompt
prompt ————————————————————————
prompt — Updating invalid control_codes in FND_CONCURRENT_QUEUES
set feedback off
set head on
SELECT concurrent_queue_name manager,
control_code ccode
FROM fnd_concurrent_queues
WHERE control_code not in (‘E’, ‘R’, ‘X’)
AND control_code IS NOT NULL;
set feedback on
set head off
UPDATE fnd_concurrent_queues
SET control_code = NULL
WHERE control_code not in (‘E’, ‘R’, ‘X’)
AND control_code IS NOT NULL;
REM Also null out target_node for all managers
UPDATE fnd_concurrent_queues
SET target_node = null;
REM Set all ‘Terminating’ requests to Completed/Error
REM Also set Running requests to completed, since the managers are down
prompt
prompt ————————————————————————
prompt — Updating any Running or Terminating requests to Completed/Error canceled by CMCLEAN
set feedback off
set head on
SELECT request_id request,
phase_code pcode,
status_code scode
FROM fnd_concurrent_requests
WHERE status_code = ‘T’ OR phase_code = ‘R’
ORDER BY request_id;
set feedback on
set head off
UPDATE fnd_concurrent_requests
SET phase_code = ‘C’, status_code = ‘E’
WHERE status_code =’T’ OR phase_code = ‘R’;
REM Set all Runalone flags to ‘N’
REM This has to be done differently for Release 10
prompt
prompt ————————————————————————
prompt — Updating any Runalone flags to ‘N’
prompt
set serveroutput on
set feedback off
declare
c pls_integer := dbms_sql.open_cursor;
upd_rows pls_integer;
vers varchar2(50);
tbl varchar2(50);
col varchar2(50);
statement varchar2(255);
begin
select substr(release_name, 1, 2)
into vers
from fnd_product_groups;
if vers >= 11 then
tbl := ‘fnd_conflicts_domain’;
col := ‘runalone_flag’;
else
tbl := ‘fnd_concurrent_conflict_sets’;
col := ‘run_alone_flag’;
end if;
statement := ‘update ‘ || tbl || ‘ set ‘ || col || ‘=”N” where ‘ || col || ‘ = ”Y”’;
dbms_sql.parse(c, statement, dbms_sql.native);
upd_rows := dbms_sql.execute(c);
dbms_sql.close_cursor(c);
dbms_output.put_line(‘Updated ‘ || upd_rows || ‘ rows of ‘ || col || ‘ in ‘ || tbl || ‘ to ”N”’);
end;
/
prompt
prompt ————————————————————————
prompt Updates complete.
prompt Type commit now to commit these updates, or rollback to cancel.
prompt ————————————————————————
prompt
set feedback on
REM <= Last REM statment —————————————————–
Disclaimer
EXCEPT WHERE EXPRESSLY PROVIDED OTHERWISE, THE INFORMATION, SOFTWARE,
PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS. ORACLE EXPRESSLY DISCLAIMS
ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NON-INFRINGEMENT. ORACLE MAKES NO WARRANTY THAT: (A) THE RESULTS
THAT MAY BE OBTAINED FROM THE USE OF THE SOFTWARE WILL BE ACCURATE OR
RELIABLE; OR (B) THE INFORMATION, OR OTHER MATERIAL OBTAINED WILL MEET YOUR
EXPECTATIONS. ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE DOWNLOADED OR
OTHERWISE OBTAINED IS DONE AT YOUR OWN DISCRETION AND RISK. ORACLE SHALL HAVE
NO RESPONSIBILITY FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT
RESULTS FROM THE DOWNLOAD OF ANY CONTENT, MATERIALS, INFORMATION OR SOFTWARE.
ORACLE RESERVES THE RIGHT TO MAKE CHANGES OR UPDATES TO THE SOFTWARE AT ANY
TIME WITHOUT NOTICE.
Limitation of Liability
IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE,
DATA OR USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN
CONTRACT OR TORT, ARISING FROM YOUR ACCESS TO, OR USE OF, THE SOFTWARE.
SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY.
ACCORDINGLY, SOME OF THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.