Thursday, September 26, 2024

Add responsibilities

 ./addresp.sh GV3T_ZU_Q9KLSSD1 SEETHA  "Requesting Approver"

 more ./addresp.sh

APPSPWD=$1


username=$2

respname="$3"


if [[ -z ${username} ]]

then

  echo "Enter Username "

  read username

fi


if [[ -z ${respname} ]]

then

  echo "Enter responsibility like System Administrtor "

  read respname

fi

PDBSID=`echo "$ORACLE_SID" | cut -c 1-6`

HOST="`hostname`"

. $ORACLE_HOME/"$PDBSID"_"$HOST".env

sqlplus -s apps/$APPSPWD@$ORACLE_SID << EOF

set serveroutput on

declare

v_userid fnd_user.user_id%type;

v_respid fnd_responsibility_tl.responsibility_id%type;

v_applid fnd_responsibility_tl.application_id%type;

begin


select user_id

into v_userid

from fnd_user

where user_name='${username}';


dbms_output.put_line('userid for $username is ' || v_userid);


select application_id, responsibility_id

into v_applid, v_respid

from fnd_responsibility_tl

where responsibility_name like '${respname}';


dbms_output.put_line('Resp id, Application id  for ${respname}  are ' || v_respid ||','|| v_applid);


fnd_user_resp_groups_api.Upload_Assignment(v_userid,v_respid,v_applid,0,sysdate,sysdate+90,'Comments');

exception

when others then

  dbms_output.put_line(sqlerrm);

end;

/


EOF


Parallel Query Validation

 

select distinct  'alter system kill session ' || '''' || sid || ',' || serial# || ',@' || s.inst_id || ''';' alter_statement, s.SQL_ID, s.CLIENT_IDENTIFIER,cast(s.SQL_EXEC_START as TIMESTAMP), SQL_EXEC_START,SQL_TEXT FROM gv$session s, gv$sql q  where s.sql_id = q.sql_id  AND s.status = 'ACTIVE' AND s.username = 'BIS_RT' and lower(CLIENT_IDENTIFIER) like '%@%gov%';

SELECT s.inst_id, s.sid,
       s.serial#,
       s.username,
       s.client_identifier,
       s.status,
       s.machine,
       s.logon_time,
       ROUND((SYSDATE - s.logon_time) * 24 * 60, 2) AS minutes_running,
       'IHS - Document View Report' program,
       q.sql_id
FROM gv$session s
LEFT JOIN gv$sql q
ON s.sql_id = q.sql_id AND s.inst_id = q.inst_id
WHERE s.username is not null
AND s.status = 'ACTIVE'
AND s.username = 'BIS_RT'
AND s.program like '%nqsserver%'
AND q.sql_fulltext LIKE '%Document View Report%'
AND sql_fulltext LIKE '%+%Parallel%(%16%)%'
--AND s.logon_time < SYSDATE - 10/(24*60) -- More than 10 minutes
ORDER BY minutes_running DESC;

Thursday, September 19, 2024

DOC IDs:

 DOC IDs:


Query To Get Enabled Trace/Log/Debug Profile Options (Doc ID 559618.1)

Google, Mozilla, and Apple choosing to no longer support Entrust as a publicly trusted certificate authority

Google, Mozilla, and Apple have all decided to stop trusting Entrust’s publicly issued certificates after specific cutoff dates , due to lon...