Wednesday, September 30, 2020

list of dba users ACCOUNT_STATUS Expired

 


SQL> select USERNAME,ACCOUNT_STATUS,EXPIRY_DATE,PROFILE,LOCK_DATE from dba_users;


USERNAME                       ACCOUNT_STATUS                   EXPIRY_DA PROFILE                        LOCK_DATE

------------------------------ -------------------------------- --------- ------------------------------ ---------

SYS                            OPEN                             22-OCT-15 DEFAULT

SYSTEM                         OPEN                             30-AUG-17 DEFAULT

OUTLN                          OPEN                             03-OCT-15 DEFAULT

DBSNMP                         OPEN                             03-OCT-15 DEFAULT

ABM                            OPEN                             09-SEP-04 DEFAULT

AHL                            OPEN                             09-SEP-04 DEFAULT

ORDSYS                         OPEN                             03-OCT-15 DEFAULT

ORDPLUGINS                     OPEN                             03-OCT-15 DEFAULT

MDSYS                          OPEN                             03-OCT-15 DEFAULT

E-Business Suite : Responsibilities Are Not Visible When End Date Is Removed

1. Run the request ‘Sync responsibility role data into the WF table’.

2. Run the request “Synchronize WF LOCAL tables”.

3. Run the request “Workflow Directory Services User/Role Validation” (with parameters 10000, yes,yes, yes).

4. Have the user log off and back on and verify that the responsibility appears.


Query to check long running sql

 

Concurrent programs running for + hours

col PROGRAM for a12;
col ACTION for a12;
col MODULE  for a12;
col EVENT for a12;
select status,sid,serial#,module,program,action,event from v$session where logon_time < sysdate-0.125 and action like 'Concurrent Request%';
col PROGRAM for a12;
col ACTION for a12;
col MODULE  for a12;
col EVENT for a12;
select status,sid,serial#,module,program,action,event from v$session where logon_time < sysdate-0.050 and action like 'Concurrent Request%';

select * from v$session where logon_time < sysdate-0.050 and action like '%Concurrent Request%';
prompt Inactive form session with login time greater than 6 hours
prompt *********************************************************************************************************
select sid,serial#,module,action,event,to_char(logon_time,'dd:mm:yyyy hh24:mi:ss'),last_call_et/3600 "last call et in hours" from v$session where status likE 'INACTIVE' and logon_time < sysdate-0.25 and action like 'FRM:%' order by 
logon_time;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 HIGH RESOURCE CONSUMING SQL

select sql_text,
       username,
       disk_reads_per_exec,
       buffer_gets,
       disk_reads,
       parse_calls,
       sorts,
       executions,
       rows_processed,
       hit_ratio,
       first_load_time,
       sharable_mem,
       persistent_mem,
       runtime_mem,
       cpu_time,
       elapsed_time,
       address,
       hash_value
from
(select sql_text ,
        b.username ,
 round((a.disk_reads/decode(a.executions,0,1,
 a.executions)),2)
       disk_reads_per_exec,
       a.disk_reads ,
       a.buffer_gets ,
       a.parse_calls ,
       a.sorts ,
       a.executions ,
       a.rows_processed ,
       100 - round(100 *
       a.disk_reads/greatest(a.buffer_gets,1),2) hit_ratio,
       a.first_load_time ,
       sharable_mem ,
       persistent_mem ,
       runtime_mem,
       cpu_time,
       elapsed_time,
       address,
       hash_value
from
   sys.v_$sqlarea a,
   sys.all_users b
where
   a.parsing_user_id=b.user_id and
   b.username not in ('sys','system')
order by 3 desc)
where rownum < 21;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modukle name TA_auto_apply

If Actual and Target OPP processes do not match EBS

 Check from backend which ones are "ACTIVE"

SQL> select sid,serial#,program,module,status,process,logon_time from v$session where module like'%OPP%';


       SID    SERIAL# PROGRAM
---------- ---------- ------------------------------------------------
MODULE                                           STATUS   PROCESS      LOGON_TIM
------------------------------------------------ -------- ------------ ---------
      4748          1 JDBC Thin Client
FNDCPOPP                                         INACTIVE              15-JUL-20
      4750          3 JDBC Thin Client
FNDCPOPP                                         INACTIVE              15-JUL-20
      4753         17 JDBC Thin Client
FNDCPOPP                                         INACTIVE              15-JUL-20

       SID    SERIAL# PROGRAM
---------- ---------- ------------------------------------------------
MODULE                                           STATUS   PROCESS      LOGON_TIM
------------------------------------------------ -------- ------------ ---------
      5769         31 JDBC Thin Client
FNDCPOPP                                         ACTIVE                20-JUL-20
      5773         10 JDBC Thin Client
FNDCPOPP                                         ACTIVE                20-JUL-20
      5780          4 JDBC Thin Client
FNDCPOPP                                         ACTIVE                20-JUL-20

6 rows selected.



select sid,serial#,program,module,status,process,logon_time from v$session where module like'%OPP%'and status='INACTIVE';


ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;


alter system kill session '4748,1' immediate;

alter system kill session '4750,3' immediate;

alter system kill session '4753,17' immediate;


SQL> select sid,serial#,status,logon_time,module from v$session where module like'%OPP%';

  SID    SERIAL# STATUS   LOGON_TIM
---------- ---------- -------- ---------
MODULE
------------------------------------------------
      5769         31 ACTIVE   20-JUL-20
FNDCPOPP
      5773         10 ACTIVE   20-JUL-20
FNDCPOPP
      5780          4 ACTIVE   20-JUL-20
FNDCPOPP


Check from front end.


Actual and Target processes should both be 3.

Oracle Grant privilege to function


SQL> desc apps.xxta_inter_acces;

FUNCTION apps.xxta_inter_acces RETURNS NUMBER(38)

 Argument Name                  Type                    In/Out Default?

 ------------------------------ ----------------------- ------ --------

 P_SR                           VARCHAR2                IN

 P_TEL                          VARCHAR2                IN



SQL> create user xxalj identified by xxalj;


User created.


SQL> grant connect,resource to xxalj;


Grant succeeded.


SQL> grant select on dual to xxalj;


Grant succeeded.


SQL> conn apps/taapps11i

Connected.


grant execute on apps.xxta_inter_acces to xxalj;


SQL> conn xxalj/xxalj

Connected.


SQL> desc apps.xxta_inter_acces;

FUNCTION apps.xxta_inter_acces RETURNS NUMBER(38)

 Argument Name                  Type                    In/Out Default?

 ------------------------------ ----------------------- ------ --------

 P_SR                           VARCHAR2                IN

 P_TEL                          VARCHAR2                IN



OBJECT_NAME

--------------------------------------------------------------------------------

OWNER                          OBJECT_TYPE

------------------------------ -------------------

XXTA_INTER_ACCES

APPS                           FUNCTION


find username for request_id EBS

 select a.request_id,b.user_name from fnd_concurrent_requests a,fnd_user b where a.requested_by=b.user_id and a.request_id='&requestid';

how to delete Delete Trace Files

 oratest#df -k .

/db03                  (/dev/vgdb01/lvDB03    ) : 261776736 total allocated Kb

                                                   5561302 free allocated Kb

                                                  256215434 used allocated Kb

                                                        97 % allocation used


find /db03/oracle/10R2/admin/PROD_oratest/udump -mtime +15 -name "*.trc"|wc -l


find /db03/oracle/10R2/admin/PROD_oratest/udump -mtime +15 -name "*.trc" -exec rm "{}" ";"


oratest#df -k .

/db03                  (/dev/vgdb01/lvDB03    ) : 261564248 total allocated Kb

                                                   8765334 free allocated Kb

                                                  252798914 used allocated Kb

                                                        96 % allocation used


find /db03/oracle/10R2/admin/PROD_oratest/bdump -mtime +15 -name "*.trc"|wc -l


find /db03/oracle/10R2/admin/PROD_oratest/bdump -mtime +15 -name "*.trc" -exec rm "{}" ";"


oratest#df -k .

/db03                  (/dev/vgdb01/lvDB03    ) : 261560275 total allocated Kb

                                                   8825460 free allocated Kb

                                                  252734815 used allocated Kb

                                                        96 % allocation used


find /db03/oracle/10R2/admin/PROD_oratest/udump -mtime +35 -name "*.trc"|wc -l


find /db03/oracle/10R2/admin/PROD_oratest/udump -mtime +35 -name "*.trc" -exec rm "{}" ";"


oratest#df -k .

/db03                  (/dev/vgdb01/lvDB03    ) : 261474396 total allocated Kb

                                                  10118857 free allocated Kb

                                                  251355539 used allocated Kb

                                                        96 % allocation used

Delete Apache logs & rti files

 find /app01/oracle/prodcomn/conf/PROD_approd1/iAS/Apache/Apache/logs -type f -mtime +180|wc -l


approd1#df -k .

/app01                 (/dev/vgapp01/app01    ) : 102400000 total allocated Kb

                                                   2210727 free allocated Kb

                                                  100189273 used allocated Kb

                                                        97 % allocation used


find /app01/oracle/prodcomn/conf/PROD_approd1/iAS/Apache/Apache/logs -mtime +180 -name "access_log*"|wc -l


find /app01/oracle/prodcomn/conf/PROD_approd1/iAS/Apache/Apache/logs -mtime +180 -name "access_log*" -exec rm "{}" ";"


approd1#df -k .

/app01                 (/dev/vgapp01/app01    ) : 101759060 total allocated Kb

                                                  13011907 free allocated Kb

                                                  88747153 used allocated Kb

                                                        87 % allocation used


find /app01/oracle/prodcomn/conf/PROD_approd1/iAS/Apache/Apache/logs -mtime +365 -name "OracleSoapAuditLog*"|wc -l


find /app01/oracle/prodcomn/conf/PROD_approd1/iAS/Apache/Apache/logs -mtime +365 -name "OracleSoapAuditLog*" -exec rm "{}" ";"


find /app01/oracle/prodcomn/conf/PROD_approd1/iAS/Apache/Apache/logs -type f -mtime +365 |xargs rm -Rf {} \;

find /app01/oracle/prodcomn/conf/PROD_approd1/iAS/Apache/Apache/logs -type f -mtime +365|wc -l



===========Delete ".rti" and "f60dump" files from $APPLCSF/$APPLLOG===========

find $APPLCSF/$APPLLOG -mtime +1 -name "*.rti"|wc -l


find $APPLCSF/$APPLLOG -mtime +1 -name "*.rti" -exec rm "{}" ";"


find $APPLCSF/$APPLLOG -mtime +1 -name "f60*dump*"|wc -l


find $APPLCSF/$APPLLOG -mtime +1 -name "f60*dump*" -exec rm "{}" ";"

Query to find Concurrent programs running for more then 4 hours

 set line 200
set pagesize 500
col PROGRAM_NAME format a30
col concreq format a8
col Username format a10
col opid format a4
col dbuser format a6
SELECT SUBSTR(LTRIM(req.request_id),1,15) concreq,
           fcp.USER_CONCURRENT_PROGRAM_NAME "Program_Name",
                fu.user_name "Username",
               round((sysdate - actual_start_date) * 24 ,2) "Running_Hrs", 
           SUBSTR(proc.os_process_id,1,15) clproc,
           SUBSTR(LTRIM(proc.oracle_process_id),1,15) opid,
           SUBSTR(vsess.username,1,10) dbuser,
           SUBSTR(vproc.spid,1,10) svrproc,
           vsess.sid sid,
           vsess.serial# serial#
    FROM   fnd_concurrent_requests req,
           fnd_concurrent_processes proc,
           fnd_lookups look,
           fnd_lookups look1,
           v$process vproc,
           v$session vsess,
           fnd_concurrent_programs_vl fcp,
        fnd_user fu
    WHERE  req.controlling_manager = proc.concurrent_process_id(+)
    AND    req.status_code = look.lookup_code
    AND    look.lookup_type = 'CP_STATUS_CODE'
    AND    req.phase_code = look1.lookup_code
    AND    look1.lookup_type = 'CP_PHASE_CODE'
    AND    look1.meaning = 'Running'
    and    req.CONCURRENT_PROGRAM_ID = fcp.CONCURRENT_PROGRAM_ID
    AND    proc.oracle_process_id = vproc.pid(+)
    AND    vproc.addr = vsess.paddr(+)
    AND    fu.user_id = req.requested_by
    AND    round((sysdate - actual_start_date) * 24) > 4;

To find Blocking Session

 To find Blocking Session

========================================

col WAIT_CLASS for a12;

select blocking_session,sid,serial#,wait_class,seconds_in_wait,status

from v$session where blocking_session is not NULL order by blocking_session;




select sid,serial#,event,module,action,status,program,blocking_session,last_call_et/60 min from v$session where sid=&sid;



select p.spid,s.sid,s.serial#,s.status,s.last_call_et,s.module,s.osuser from V$process p,V$session s where s.paddr = p.addr and p.spid=&pid;



SQL> alter system kill session '5213,45198';


To find out work flow blocking session 


select sid,serial#,event,module,action,status,program,blocking_session,last_call_et from V$session where module like '%WFBG%';



**********************************************************************************

Blocking session 


select l1.sid, ' IS BLOCKING ', l2.sid

  from v$lock l1, v$lock l2

  where l1.block =1 and l2.request > 0

  and l1.id1=l2.id1

  and l1.id2=l2.id2;

********************************************************************************

BLocking session


select s1.username || '@' || s1.machine

   || ' ( SID=' || s1.sid || ' )  is blocking '

   || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status

   from v$lock l1, v$session s1, v$lock l2, v$session s2

   where s1.sid=l1.sid and s2.sid=l2.sid

   and l1.BLOCK=1 and l2.request > 0

   and l1.id1 = l2.id1

   and l2.id2 = l2.id2 ;

************************************************************************

Blocking session


select do.object_name,

  row_wait_obj#, row_wait_file#, row_wait_block#, row_wait_row#,

  dbms_rowid.rowid_create ( 1, ROW_WAIT_OBJ#, ROW_WAIT_FILE#, ROW_WAIT_BLOCK#, ROW_WAIT_ROW# )

  from v$session s, dba_objects do

  where sid=543

  and s.ROW_WAIT_OBJ# = do.OBJECT_ID ;



alter system kill session 'SID,SERIAL#';

Thursday, September 24, 2020

Configure Agents with OBIEE 12c and EBS Cookie Integration



1. Create a new session initialization block called 'EBS Initialize Session Cookies'

2. Click on 'Edit Data Source' and input the default Initialization String as:


select '-1', '0' from dual;


3. Select the Oracle EBS OLTP Connection Pool

4. Press 'Edit Target Data' button and create 2 variables: ICX_SESSION_COOKIE and ACF

5. Define session variable: ICX_SESSION_COOKIE:

6. Check the "Enable any user to set the value" checkbox

7. Check the 'Security Sensitive" checkbox

8. Set the Default Initializer to:

'-1'


9. Define session variable: ACF

10. Check the "Enable any user to set the value" checkbox

11. Check the "Security Sensitive" checkbox

12. Set the Default Initializer to:

'0'


13. Redefine the 'Execute on connect' query for the Oracle EBS OLTP Connection Pools as follows:


Declare /* valueof (NQ_SESSION.ACF) */ v_icx_session_cookie varchar2(100) := 'valueof(NQ_SESSION.ICX_SESSION_COOKIE)'; begin if v_icx_session_cookie <> '-1' then APP_SESSION.validate_icx_session(v_icx_session_cookie); end if; end;


14. Update the session variable initialization block 'EBS Security Context' query to be:


select FND_GLOBAL.RESP_ID,
FND_GLOBAL.RESP_APPL_ID,
FND_GLOBAL.SECURITY_GROUP_ID,
FND_GLOBAL.RESP_NAME,
FND_GLOBAL.USER_ID,
FND_GLOBAL.EMPLOYEE_ID,
NVL(FND_GLOBAL.USER_NAME,'IMPERSONATOR') from dual
where NVL(FND_GLOBAL.USER_NAME,'IMPERSONATOR') != 'GUEST'
NQS_PASSWORD_CLAUSE(and FND_GLOBAL.USER_NAME != 'GUEST')NQS_PASSWORD_CLAUSE


15. Restart OBIEE services.

Featured post

Migrate OCR & vote from external to normal or High redundancy in ASM

How to Move OCR & Vote from external to Normal or high. 1)  Create New diskgroup(CRS) with suitable redundancy for OCR and Voting files....

Popular Posts