Wednesday, December 18, 2024

ECC Issues:

 ECC - Not working Node 1 unable to to connect


Timezone Issue:


1. Source $ECC_BASE/Oracle/quickInstall/env/ecc.env
2. Open $ECC_BASE/Oracle/quickInstall/EccConfig.properties
3. Change the below value:

From:
TIMEZONE=EST

To:
TIMEZONE=America/New_York

4. Go to $ECC_BASE/Oracle/quickInstall/env/ecc/ecc-config.properties and update below values.
From:

# Timezone set to sync the ECC with the source system timezone
timezone.id=EST

To:

# Timezone set to sync the ECC with the source system timezone
timezone.id=America/New_York

5. Save the files and run the following commands to run the script:

cd $ECC_BASE/Oracle/quickInstall
./createEnvFile.sh

6. Restart eccManaged services

7. Relaunch Application and log in with sysadmin and now try to access ECC Developer
NOTE: It is always recommended to use the “long form” of the Timezone which is outlined in the Globalization Guide for Oracle Applications Release 12 ( Doc ID 393861.1 ) under the time zone which is applicable for ECC as well.

Reference: ECC Developer Page Is Blank After Performing New Installation And Console Log Errors"Uncaught RangeError: Invalid time zone specified: XXX" ( Doc ID 2950249.1 )

Friday, December 13, 2024

OHS

 $FMW_HOME/webtier/instance/EBS_web_OHS*

find . -name *.log


$FMW_HOME/webtier/instance/EBS_web_OHS*/diagnostics/logs/OHS/EBS_web/EBS_web.log



[oracle@luframfebstl312 <RUN> ]$ diff mod_wl_ohs.conf mod_wl_ohs.conf_bkp_11141258

[oracle@luframfebstl312 <RUN> ]$ pwd

/u01/install/APPS/fs1/FMW_Home/webtier/instances/EBS_web_OHS1/config/OHS/EBS_web


Thursday, December 5, 2024

Y - Queries

 



-- Find concurrent request that had performance issue

select trunc((nvl(actual_completion_date, sysdate) - actual_start_date)*24*60, 2) runtime_minutes,frt.responsibility_name, fcpt.user_concurrent_program_name, fcpt.concurrent_program_name, fcr.actual_start_date, fcr.actual_completion_date, 

fcr.phase_code, fcr.status_code, fe.execution_file_name, fcr.argument_text, fcpt.executable_id

from fnd_concurrent_requests fcr

    ,apps.fnd_concurrent_programs_vl fcpt

    ,apps.fnd_responsibility_tl frt

    ,apps.fnd_executables fe

where fcpt.concurrent_program_id = fcr.concurrent_program_id

  and fe.executable_id = fcpt.executable_id

 -- and fcpt.user_concurrent_program_name like 'PSC GL Reference Update for 190  Type Invoices%'

--  and responsibility_name like '%PSC%'

  and fcr.responsibility_id = frt.responsibility_id

  and fcr.actual_start_date is not null

   and fcr.request_id='107472634'

--  and phase_code = 'R'

and request_date > sysdate - 90

order by fcr.actual_start_date desc 


718.03 PSC Grants Interface Grants PMS Synchronization Report (Un-reconciled) HHSGRTUN 8/3/2022 12:34:46 PM 8/4/2022 12:32:48 AM C C HHSGRTUN 2937, 3, 31-AUG-2022, , N 10469



-- Find sid/serial# based on start and end times

select session_id, session_serial#,sql_id,count(*)*10 runtime_sec, min(sample_time), max(sample_time)

from dba_hist_active_sess_history

where 1=1

  and sample_time > sysdate - 60

  and sample_time BETWEEN TO_DATE('03-AUG-2022 08:27','DD-MON-YYYY HH24:MI')

AND  TO_DATE('03-AUG-2022 11:32','DD-MON-YYYY HH24:MI') 

--and session_id=1026 and session_serial#=22860

group by session_id, session_serial#,sql_id--,-- module, 

order by min(sample_time) desc


8972 31528 e:PSCCUST:cp:psccust/PSCTC190GLUPD 23680 20/JUN/2022 7:30:37.907 PM 20/JUN/2022 10:48:14.575 PM


select session_id, session_serial#, module, sql_id, sql_plan_hash_value, count(*)*10 runtime_sec, min(sample_time), max(sample_time)

from dba_hist_active_sess_history

where 1=1

and (session_id, session_serial#) in ((5220,27142))

group by session_id, session_serial#, sql_id, sql_plan_hash_value, module

order by count(*)*10 desc


8972 31528 e:PSCCUST:cp:psccust/PSCTC190GLUPD 413kvqbrw070v 1309738701 23680 20/JUN/2022 7:30:37.907 PM 20/JUN/2022 10:48:14.575 PM


-- Look at history of sql plans for problem sql_id

select session_id, session_serial#, sql_id, sql_plan_hash_value, count(*)*10 runtime_sec, min(sample_time), max(sample_time)

from dba_hist_active_sess_history

where sql_id = 'a5tws7tsuc9zh'

group by session_id, session_serial#, sql_id, sql_plan_hash_value

order by min(sample_time) desc



select a.snap_id,begin_interval_time,end_interval_time,sql_id,plan_hash_value

from dba_hist_snapshot a, dba_hist_sqlstat b

where a.snap_id=b.snap_id

and a.dbid=b.dbid

and a.instance_number=b.instance_number

and b.sql_id='a5tws7tsuc9zh'

and a.begin_interval_time>sysdate-60

order by snap_id;



select 

  SQL_ID 

, PLAN_HASH_VALUE 

, sum(EXECUTIONS_DELTA) EXECUTIONS

, sum(ROWS_PROCESSED_DELTA) CROWS

, trunc(sum(CPU_TIME_DELTA)/1000000/60) CPU_MINS

, trunc(sum(ELAPSED_TIME_DELTA)/1000000/60)  ELA_MINS

from DBA_HIST_SQLSTAT 

where SQL_ID in (

'f1k7kq8an7ktn') 

group by SQL_ID , PLAN_HASH_VALUE

order by SQL_ID, CPU_MINS;


f1k7kq8an7ktn 287300685




select *

from dba_hist_sqlbind

where sql_id = '413kvqbrw070v'


-- Check for wait events

select NVL(a.event, 'ON CPU') AS event, a.session_id, a.session_serial#,

        COUNT(*)*10 AS total_wait_time, min(sample_time), max(sample_time)

from dba_hist_active_sess_history a

where 1=1

  and (session_id, session_serial#) in ((10408,34869))

group by NVL(a.event, 'ON CPU'),a.session_id, a.session_serial#


-- Get sql plans with runtimes for each plan 

WITH

p AS (

SELECT plan_hash_value

  FROM gv$sql_plan

 WHERE sql_id = :sql_id

   AND other_xml IS NOT NULL

 UNION

SELECT plan_hash_value

  FROM dba_hist_sql_plan

 WHERE sql_id = :sql_id

   AND other_xml IS NOT NULL ),

m AS (

SELECT plan_hash_value,

       SUM(elapsed_time)/SUM(executions) avg_et_secs

  FROM gv$sql

 WHERE sql_id = :sql_id

   AND executions > 0

 GROUP BY

       plan_hash_value ),

a AS (

SELECT plan_hash_value,

       SUM(elapsed_time_total)/SUM(executions_total) avg_et_secs

  FROM dba_hist_sqlstat

 WHERE sql_id = :sql_id

   AND executions_total > 0

 GROUP BY

       plan_hash_value )

SELECT p.plan_hash_value,

       ROUND(NVL(m.avg_et_secs, a.avg_et_secs)/1e6, 3) avg_et_secs

  FROM p, m, a

 WHERE p.plan_hash_value = m.plan_hash_value(+)

   AND p.plan_hash_value = a.plan_hash_value(+)

 ORDER BY

       avg_et_secs NULLS LAST;




SID of Concurrent Request:


select s.inst_id, fcr.request_id, fv.requestor, fv.Program cmgr_job,

p.PID,

p.SERIAL#,

p.USERNAME p_user,

p.SPID,

to_char(s.logon_time,'DD-MON-YY HH24:MI:SS') Logon_Time,

s.program,

s.command,

s.sid,

s.serial#,

s.username,

s.process,

s.machine,

s.action,

s.module

from apps.fnd_concurrent_requests fcr,

apps.FND_CONC_REQ_SUMMARY_V fv,

gv$session s,

gv$process p

where fcr.request_id = &request_id

and p.SPID = fcr.oracle_process_id

and s.process = fcr.OS_PROCESS_ID

and s.inst_id = p.inst_id

and p.addr = s.paddr

and fv.request_id = fcr.request_id

;



pause try to lock the same row in a different session here

with lo as (select /*+ materialize */ sid, row_wait_obj# from v$session where event like 'enq%')

select lo.sid, do.object_name, do.object_type, do.object_id, do.data_object_id, lo.row_wait_obj# 

from dba_objects do, lo

where do.object_id=lo.row_wait_obj#

   or do.data_object_id=lo.row_wait_obj#;



Bind Variable:


select INST_ID,SQL_ID,POSITION,NAME,VALUE_STRING from GV$SQL_BIND_CAPTURE where sql_id='c73qbuzd38n1b' and inst_id=1 order by POSITION


select * from sys.dba_hist_sqlbind t where t.sql_id='c73qbuzd38n1b';


 SELECT sql_id,  b.name BIND_NAME,  b.value_string BIND_STRING   from gv$sql t

JOIN gv$sql_bind_capture b USING (sql_id) WHERE b.value_string IS NOT NULL

AND sql_id ='c73qbuzd38n1b';



select 

sn.END_INTERVAL_TIME,

sb.NAME,

sb.VALUE_STRING 

from 

DBA_HIST_SQLBIND sb,

DBA_HIST_SNAPSHOT sn

where 

sb.sql_id='c73qbuzd38n1b' and

sb.WAS_CAPTURED='YES' and

sn.snap_id=sb.snap_id

order by 

sb.snap_id,

sb.NAME;




Buffer Gets:



SELECT


      s.sid


     ,s.serial#


     ,s.sql_id


     ,sq.sorts


     ,sq.DISK_READS


     ,sq.BUFFER_GETS


     ,sq.ROWS_PROCESSED


     ,sq.SQLTYPE


     ,sq.SQL_TEXT


FROM gv$session s   


    , gv$sql sq


WHERE s.sql_id = sq.sql_id and s.sid=11351 and rownum<10 order by sq.sorts desc


Monday, November 11, 2024

restore point

 SQL> select NAME,TIME,SCN,PDB_RESTORE_POINT,GUARANTEE_FLASHBACK_DATABASE from V$RESTORE_POINT;







SQL> show pdbs




    CON_ID CON_NAME                       OPEN MODE  RESTRICTED


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


         2 PDB$SEED                       READ ONLY  NO


         3 SRAM2I                         READ WRITE NO


SQL> alter session set container=SRAM2I;




Session altered.




SQL> alter pluggable database SRAM2I CLOSE;






Pluggable database altered.




SQL> SQL>


SQL> flashback pluggable database SRAM2I to restore point RESTORE_POINT2_REQ0088666;




Flashback complete.




SQL> alter pluggable database SRAM2I open resetlogs;




Pluggable database altered.




SQL> shut immediate;


Pluggable Database closed.








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


znfodRAMfsd011  $ srvctl stop database -d SRAM2IC


znfodRAMfsd011  $ srvctl start database -d SRAM2IC


znfodRAMfsd011  $ srvctl start listener -l SRAM2IC

Thursday, October 10, 2024

Tablespace

select df.tablespace_name "Tablespace",

totalusedspace "Used MB",

(df.totalspace - tu.totalusedspace) "Free MB",

df.totalspace "Total MB",

round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))

"Pct. Free"

from

(select tablespace_name,

round(sum(bytes) / 1048576) TotalSpace

from dba_data_files

group by tablespace_name) df,

(select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name

from dba_segments

group by tablespace_name) tu

where df.tablespace_name = tu.tablespace_name ;


alter tablespace SOAPRD_SOAINFRA add datafile size 2G autoextend on maxsize 20G;


alter tablespace SOADE3_STB add datafile size 2G autoextend on maxsize 20G;






Tuesday, October 8, 2024

G-Invoicing - ECC

 



G-Invoice:  G-Invoicing ECC Patch (Patch - 36861505, 36236796, 36393109, 35921608, 35921575, 36032737, 35921481, 35302496) - ECC Upgrade to V12


Sequence below

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

36236796

36393109

35921608

35921575

36032737

35921481

35302496

36861505



 July CU ECC Patch - 36861505
 July CU Servicing Patch - 36866950

  • grep -i ecc_ $CONTEXT_FILE

  • To start and Stop ECC
  • /dRAM4ei/applmgr/Oracle/quickInstall/bin/startAllEcc.sh
  • /dRAM4ei/applmgr/Oracle/quickInstall/bin/stopAllEcc.sh

  • more $ECC_BASE/Oracle/quickInstall/env/ecc.env|grep -i ebs

  • more $ECC_BASE/Oracle/quickInstall/env/ecc.env|grep -i ebs

  • ps -fu $LOGNAME

  • IT:

  • [oracle@lufRAMfebsdl613 app]$ sqlplus ecc/INT_3CCCLE_SIT3M@\"$ECC_DB_CONNECTION\"

  • $ pwd
  • /dRAM4ei/applmgr/Oracle/software/zookeeper/bin
  • $ ls -ltr
  • total 31
  • -rwx------. 1 apdRAM4ei aadRAM4ei 1385 Mar  1  2022 zkTxnLogToolkit.sh
  • -rwx------. 1 apdRAM4ei aadRAM4ei 6773 Mar  1  2022 zkServer.sh
  • -rwx------. 1 apdRAM4ei aadRAM4ei 2696 Mar  1  2022 zkEnv.sh
  • -rwx------. 1 apdRAM4ei aadRAM4ei 1534 Mar  1  2022 zkCli.sh
  • -rwx------. 1 apdRAM4ei aadRAM4ei 1937 Mar  1  2022 zkCleanup.sh
  • -rwx------. 1 apdRAM4ei aadRAM4ei  232 Mar  1  2022 README.txta

Wednesday, October 2, 2024

Audit Queries

 Audit:


select aud.audit_user_name UPDATED_BY, aud.audit_timestamp UPDATE_DATE, 
    (select distinct user_concurrent_program_name from APPS.FND_CONCURRENT_PROGRAMS_VL where aud.concurrent_program_id = CONCURRENT_PROGRAM_ID and last_update_date > to_date('10/01/2021','MM/DD/YYYY')) as program_name,
    decode(aud.audit_transaction_type,'U','(~) Update','I','(+) Insertion','D','(-) Deletion') as audit_type,
    (select application_name from apps.fnd_application_vl where application_id = aud.application_id) as program_app,
    aud.concurrent_program_name, aud.executable_application_id, aud.executable_id, aud.request_set_flag,
    aud.enabled_flag, aud.run_alone_flag, aud.queue_control_flag, aud.argument_method_code, aud.queue_method_code, aud.execution_method_code, aud.execution_options, aud.output_print_style, aud.print_flag,
    aud.srs_flag, aud.required_style, aud.save_output_flag, aud.printer_name, aud.minimum_width, aud.minimum_length, aud.request_priority, aud.iprog_id, aud.restart, aud.nls_compliant, aud.output_file_type, aud.enable_trace,
    aud.cd_parameter, aud.increment_proc, aud.mls_executable_app_id, aud.mls_executable_id, aud.enable_time_statistics, aud.security_group_id, aud.activity_summarizer, aud.program_type
from apps.FND_CONCURRENT_PROGRAMS_A aud
where audit_timestamp >= to_date('10/01/2023','MM/DD/YYYY')
    and audit_user_name not in ('APPS','SYSADMIN','ANONYMOUS','APPSMGR','HHSOPERATOR','UPA_SOLUTION','ORACLE12.2.0','CONCURRENT MANAGER')
order by aud.audit_timestamp;

An OCI Architect's First Walk Through Generative AI

Every enterprise architect eventually gets that request from leadership: "Can we use AI on our data — without shipping it off to some ...