Wednesday, August 31, 2016

ORACLE APPS SCRIPTS

CHECKING THE INCOMPATIBILITIES BETWEEN THE PROGRAMS:

SELECT a2.application_name, a1.user_concurrent_program_name, 
DECODE (running_type, 
'P', 'Program', 
'S', 'Request set', 
'UNKNOWN' 
) "Type", 
b2.application_name "Incompatible App", 
b1.user_concurrent_program_name "Incompatible_Prog", 
DECODE (to_run_type, 
'P', 'Program', 
'S', 'Request set', 
'UNKNOWN' 
) incompatible_type 
FROM apps.fnd_concurrent_program_serial cps, 
apps.fnd_concurrent_programs_tl a1, 
apps.fnd_concurrent_programs_tl b1, 
apps.fnd_application_tl a2, 
apps.fnd_application_tl b2 
WHERE a1.application_id = cps.running_application_id 
AND a1.concurrent_program_id = cps.running_concurrent_program_id 
AND a2.application_id = cps.running_application_id 
AND b1.application_id = cps.to_run_application_id 
AND b1.concurrent_program_id = cps.to_run_concurrent_program_id 
AND b2.application_id = cps.to_run_application_id 
AND a1.language = 'US' 
AND a2.language = 'US' 
AND b1.language = 'US' 
AND b2.language = 'US';

CHECKING THE DUPLICATED SCHEDULES OF THE SAME PROGRAM WITH THE SAME ARGUMENTS:

SELECT request_id, NAME, argument_text, user_name 
FROM (SELECT cr.request_id, 
DECODE (cp.user_concurrent_program_name, 
'Report Set', 'Report Set:' || cr.description, 
cp.user_concurrent_program_name 
) NAME, 
argument_text, fu.user_name 
FROM apps.fnd_concurrent_programs_tl cp, 
apps.fnd_concurrent_requests cr, 
apps.fnd_user fu 
WHERE cp.application_id = cr.program_application_id 
AND cp.concurrent_program_id = cr.concurrent_program_id 
AND cr.requested_by = fu.user_id 
AND cr.phase_code = 'P' 
AND cr.requested_start_date > SYSDATE 
AND cp.LANGUAGE = 'US' 
AND fu.user_name NOT LIKE '<User_name>%') t1 
WHERE EXISTS ( 
SELECT 1 
FROM (SELECT cr.request_id, 
DECODE (cp.user_concurrent_program_name, 
'Report Set', 'Report Set:' 
|| cr.description, 
cp.user_concurrent_program_name 
) NAME, 
argument_text, fu.user_name 
FROM apps.fnd_concurrent_programs_tl cp, 
apps.fnd_concurrent_requests cr, 
apps.fnd_user fu 
WHERE cp.application_id = cr.program_application_id 
AND cp.concurrent_program_id = 
cr.concurrent_program_id 
AND cr.requested_by = fu.user_id 
AND cr.phase_code = 'P' 
AND cr.requested_start_date > SYSDATE 
AND cp.LANGUAGE = 'US' 
AND fu.user_name NOT LIKE '<User_name>%') t2 
WHERE t1.NAME = t2.NAME 
AND t1.argument_text = t2.argument_text 
AND t1.user_name = t2.user_name 
GROUP BY NAME, argument_text, user_name 
HAVING COUNT (*) > 1) 
ORDER BY user_name, NAME;

CHECKING WHICH MANAGER IS GOING TO EXECUTE A PROGRAM:

SELECT user_concurrent_program_name, user_concurrent_queue_name 
FROM apps.fnd_concurrent_programs_tl fcp, 
apps.fnd_concurrent_queue_content fcqc, 
apps.fnd_concurrent_queues_tl fcq 
WHERE fcqc.type_application_id(+) = cp.application_id 
AND fcqc.type_id(+) = cp.concurrent_program_id 
AND fcqc.type_code(+) = 'P' 
AND fcqc.include_flag(+) = 'I' 
AND fcp.LANGUAGE = 'US' 
AND fcp.user_concurrent_program_name = '&USER_CONCURRENT_PROGRAM_NAME' AND NVL (fcqc.concurrent_queue_id, 0) = fcq.concurrent_queue_id 
AND NVL (fcqc.queue_application_id, 0) = fcq.application_id 

AND fcq.LANGUAGE = 'US';

Wednesday, August 24, 2016

Adcfgclone.pl failed to relink executables with "/usr/bin/ld: crt1.o: No such file: No such file or directory" error in R12.1.3 on OEL 6.4

ISSUE:

While running adcfgclone.pl for refresh new instance or server, getting below error.

 - Linking
rm -f oklist
/u03/dev/apps/tech_st/10.1.2/bin/ogcc -o oklist -L/u03/dev/apps/tech_st/10.1.2/network/lib/ -L/u03/dev/apps/tech_st/10.1.2/lib/ -L/u03/dev/apps/tech_st/10.1.2/lib/stubs/  /u03/dev/apps/tech_st/10.1.2/network/lib/snauk5pt.o /u03/dev/apps/tech_st/10.1.2/network/lib/s0nauk5l.o -lclntsh  `cat /u03/dev/apps/tech_st/10.1.2/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u03/dev/apps/tech_st/10.1.2/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10 -lmm  -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u03/dev/apps/tech_st/10.1.2/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u03/dev/apps/tech_st/10.1.2/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10    -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10  -lvsn10 -lcommon10 -lgeneric10  -lcore10 -lxml10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10   `cat /u03/dev/apps/tech_st/10.1.2/lib/sysliblist` -Wl,-rpath,/u03/dev/apps/tech_st/10.1.2/lib -lm    `cat /u03/dev/apps/tech_st/10.1.2/lib/sysliblist` -ldl -lm   -L/u03/dev/apps/tech_st/10.1.2/lib -L/u03/dev/apps/tech_st/10.1.2/lib/stubs/
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make: *** [oklist] Error 1


CAUSE:

glibc-devel (32 bit) RPM missing on this system.

SOLUTION:

glibc-devel was missing 
After installing required packages like glibc-devel customer is now able to manually compile sqlplus.

[root@dev Softwares]# ls -ltr glib*
-rwxr-xr-x 1 4294967294 4294967294 1011696 Jul  1 20:51 glibc-devel-2.12-1.192.el6.i686.rpm
[root@dev Softwares]# rpm -ivh glibc-devel-2.12-1.192.el6.i686.rpm
warning: glibc-devel-2.12-1.192.el6.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
Preparing...                ########################################### [100%]
   1:glibc-devel            ########################################### [100%]

Now run adcfgclone.pl again it should work.

Monday, August 22, 2016

ORA-28056: WRITING AUDIT RECORDS TO WINDOWS EVENT LOG FAILED IN WINDOWS

ISSUE:

ORA-04030: out of process memory when trying to allocate 816 bytes (callheap,temporary memory)
Thu Dec 19 09:13:31 2013
AUD: OS Error = 1502 encountered while writing audit record
Errors in file d:\app\obiee\diag\rdbms\orcl\orcl\trace\orcl_pmon_684.trc:
ORA-28056: Writing audit records to Windows Event Log failed
OSD-00001: additional error information
O/S-Error: (OS 1502) The event log file is full.

SOLUTION:

Clear the all Event Logs. Follow the below navigation to clear logs.

Control Panel --> Administrative Tools --> Event Viewer --> Clear All Events

Increase the event log size.

Open the CMD, do below steps

C:\Users>sqplus /nolog
SQL>connect as sysdba
SQL>startup

Thursday, August 18, 2016

sqlplus: error while loading shared libraries libclntsh.so.11.1 cannot restore segment prot after reloc: Permission denied

Issue:

[oracle@test ~]$ sqlplus '/as sysdba'
sqlplus: error while loading shared libraries: /data02/oracle/product/11.2.0/dbhome_2/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

Solution:

SELinux is enaled in server.Two options to resolve this issue:

Sol1:

Disable the SELinux

[root@test ~]# getenforce
Enforcing
[root@test ~]# setenforce 0
[root@test ~]# getenforce
Permissive

Sol2:

Allow Selinux to allow below command

[root@test ~]# chcon -t textrel_shlib_t '/data02/oracle/product/11.2.0/dbhome_2/lib/libclntsh.so.11.1'
[oracle@test ~]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Tue Apr 23 07:19:45 2013

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

Enter user-name: