Showing posts with label Oracle Applications Administration. Show all posts
Showing posts with label Oracle Applications Administration. Show all posts

Query to find out modules which will be affected by a specific patch



Query to find out modules which will be affected by a specific patch.

select distinct aprb.application_short_name as "Affected Modules" from ad_applied_patches aap, ad_patch_drivers apd, ad_patch_runs apr, ad_patch_run_bugs aprb where aap.applied_patch_id = apd.applied_patch_id and apd.patch_driver_id = apr.patch_driver_id and apr.patch_run_id = aprb.patch_run_id and aprb.applied_flag = 'Y' and aap.patch_name in ('1234','5678')



Query to find out patches nodewise.

select aap.patch_name, aat.name, apr.end_date,apr.SUCCESS_FLAG from ad_applied_patches aap, ad_patch_drivers apd, ad_patch_runs apr, ad_appl_tops aat where aap.applied_patch_id = apd.applied_patch_id and apd.patch_driver_id = apr.patch_driver_id and aat.appl_top_id = apr.appl_top_id and aap.patch_name like '%12345%'

TKPROF

TKPROF

Obtain the trace file. The below will give the location on the database server:

select name, value from v$diag_info where name like '%Trace%';
OR
select name, value from v$parameter where name like 'user_dump_dest'

2. Convert to TKPROF

tkprof <filename.trc> <output_filename_SORT.txt> explain=apps/<password> sort='(prsela,exeela,fchela)' 

lsnrctl: error while loading shared libraries: /u01/Oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

lsnrctl: error while loading shared libraries: /u01/Oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

When starting listener got error :-
[oracle@otm bin]$ lsnrctl
lsnrctl: error while loading shared libraries: /u01/Oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

Solution :-
The sestatus command provides a configurable view into the status of SELinux.

You can use the command getenforce to see the current mode of SELinux. To disable SELinux temporarily you can use the command setenforce Permissive. In permissive mode the denials will still occur and will be logged but the operations will not be blocked. Permissive mode is the recommend mode by Oracle Support.

For permanent change

[root@otm ]# cd /etc
[root@otm ]# ls -alh grub.conf
lrwxrwxrwx 1 root root 22 Aug 25 16:25 grub.conf -> ../boot/grub/grub.conf
[root@otm etc]# cp grub.conf grub.conf_ORG
[root@otm etc]# ll grub*
lrwxrwxrwx 1 root root 22 Aug 25 16:25 grub.conf -> ../boot/grub/grub.conf
-rw------- 1 root root 865 Aug 25 17:04 grub.conf_ORG

vi grub.conf


To change from enforcing to permissive we will add enforcing=0 to end of the line beginning with kernel.
Example