Wednesday 20 December 2023

Query For List of Scheduled Concurrent Programs in Apps R12 

 select r.request_id,  

       p.user_concurrent_program_name ||

       case 

          when p.user_concurrent_program_name = 'Report Set' then 

            (select ' - ' || s.user_request_set_name  

              from apps.fnd_request_sets_tl s  

             where s.application_id = r.argument1  

               and s.request_set_id = r.argument2  

               and language = 'US'

            )  

          when p.user_concurrent_program_name = 'Check Periodic Alert' then 

            (select ' - ' || a.alert_name  

              from apps.alr_alerts a  

             where a.application_id = r.argument1  

               and a.alert_id = r.argument2  

               and language = 'US'

            )  

       end concurrent_program_name,  

       decode(c.class_type,  

              'P', 'Periodic',  

              'S', 'On Specific Days',  

              'X', 'Advanced',  

              c.class_type

             ) schedule_type,   

       case 

          when c.class_type = 'P' then 

            'Repeat every ' ||  

            substr(c.class_info, 1, instr(c.class_info, ':') - 1) ||  

            decode(substr(c.class_info, instr(c.class_info, ':', 1, 1) + 1, 1),  

                   'N', ' minutes',  

                   'M', ' months',  

                   'H', ' hours',  

                   'D', ' days') ||  

            decode(substr(c.class_info, instr(c.class_info, ':', 1, 2) + 1, 1),  

                  'S', ' from the start of the prior run',  

                  'C', ' from the completion of the prior run')  

          when c.class_type = 'S' then 

             nvl2(dates.dates, 'Dates: ' || dates.dates || '. ', null) ||  

             decode(substr(c.class_info, 32, 1), '1', 'Last day of month ') ||  

             decode(sign(to_number(substr(c.class_info, 33))),  

                    '1',  'Days of week: ' ||  

                    decode(substr(c.class_info, 33, 1), '1', 'Su ') ||  

                    decode(substr(c.class_info, 34, 1), '1', 'Mo ') ||  

                    decode(substr(c.class_info, 35, 1), '1', 'Tu ') ||  

                    decode(substr(c.class_info, 36, 1), '1', 'We ') ||  

                    decode(substr(c.class_info, 37, 1), '1', 'Th ') ||  

                    decode(substr(c.class_info, 38, 1), '1', 'Fr ') ||  

                    decode(substr(c.class_info, 39, 1), '1', 'Sa '))  

       end schedule,  

    r.requested_start_date next_run,  

       case 

          when p.user_concurrent_program_name != 'Report Set' and 

               p.user_concurrent_program_name != 'Check Periodic Alert' then 

               r.argument_text  

       end argument_text,  

       r.hold_flag on_hold,  

       c.date1 start_date,  

       c.date2 end_date,  

       c.class_info, user_name

  from apps.fnd_concurrent_requests r,  

       applsys.fnd_conc_release_classes c,  

       apps.fnd_concurrent_programs_tl p,  

       apps.fnd_user                    usr,

       (SELECT release_class_id,  

               substr(max(SYS_CONNECT_BY_PATH(s, ' ')), 2) dates  ,a

          FROM (select release_class_id,  

                       rank() over(partition by release_class_id order by s) a,  

                       s  

                  from (select c.class_info,  

                               l,  

                               c.release_class_id,  

                               decode(substr(c.class_info, l, 1), '1', to_char(l)) s  

                          from (select level l

                                  from dual

                               connect by level <= 31),  

                               apps.fnd_conc_release_classes c  

                         where c.class_type = 'S')  

                  where s is not null)  

         CONNECT BY PRIOR 

                     (a || release_class_id) = (a - 1) || release_class_id  

        group by release_class_id,a) dates

  where r.phase_code = 'P' 

    and c.application_id = r.release_class_app_id  

    and c.release_class_id = r.release_class_id  

    and nvl(c.date2, sysdate + 1) > sysdate  

    and c.class_type is not null 

    and p.concurrent_program_id = r.concurrent_program_id  

    and p.application_id = r.program_application_id  

    and p.language = 'US' 

    and dates.release_class_id(+) = r.release_class_id  

    and usr.user_id = requested_by

  order by requested_by,on_hold, next_run;

Query For Currently Login Users List in Apps EBS R12

 

SELECT DISTINCT icx.session_id,icx.user_id,fu.user_name,fu.description FROM icx_sessions icx, fnd_user fu WHERE     

disabled_flag != 'Y'

AND icx.pseudo_flag = 'N' AND (last_connect + 

DECODE (fnd_profile.VALUE ('ICX_SESSION_TIMEOUT'),

NULL, limit_time,

0   , limit_time,

fnd_profile.VALUE ('ICX_SESSION_TIMEOUT')/60) / 24) > SYSDATE

AND icx.counter < limit_connects

AND icx.user_id = fu.user_id;

Query For Oracle Application EBS R12 Naming User List


select * from fnd_user c where c.end_date is null 

and c.user_name not in ('APPSMGR','AME_INVALID_APPROVER','ASGADM','ASGUEST','GUEST','IEXADMIN','INDUSTRY DATA','IRC_EMP_GUEST','IRC_EXT_GUEST','MOBADM','MOBDEV','MOBILEADM','OP_CUST_CARE_ADMIN','OP_SYSADMIN','ORACLE12.0.0',

'ORACLE12.1.0','ORACLE12.2.0','ORACLE12.3.0','ORACLE12.4.0','ORACLE12.5.0','ORACLE12.6.0','ORACLE12.7.0','ORACLE12.8.0','ORACLE12.9.0','PORTAL30',

'PORTAL30_SSO','XML_USER','WIZARD','AUTOINSTALL');

How to Identify & Kill Zombie Process in Linux


Zombie Process Definition in Linux

In conclusion, a zombie process in Linux is a terminated child process that remains in the system's process table while waiting for its parent process to collect its exit status. A zombie process is a type of process that has completed its execution but still has an entry in the process table.

What is zombie process in Linux?

In the world of Linux, a zombie process refers to any process that is essentially removed from the system as 'defunct', but still somehow resides in the processor's memory as a 'zombie'.

Step-01 Find Zombie Processes :-

 $ ps aux | egrep "Z|defunct"

 USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

linuxdb  309480  0.0  0.0 112720  2248 pts/0    S+   09:36   0:00 grep -E --color=auto Z|defuct

polkitd  396842  0.0  0.0      0     0 ?        Z    Dec18   0:00 [pkla-check-auth] <defunct>

Step-02 Kill Zombie Processes :-

We can kill above process with two deferent way 

$ kill –s SIGCHLD  Parent_PID

OR

$ kill -9 Parent_PID