Tuesday, November 15, 2022

 Find Client IP Address logged in to EBS 12

Below query will provide the list of all application users connected to EBS with their client IP-Addresses.

SELECT distinct 

        d.user_name

       ,c.CLIENTIP

FROM fnd_logins c, 

       fnd_user d

WHERE d.user_id = c.user_id

AND c.end_time IS NULL;

Friday, February 18, 2022

 Execute/Run Tuning Advisor from backend

step1 : login as sysdba or with user with tuning advisor priv

Step 2: Identify the sql for which you want to run tuning advisor

e.g I am using sql-id cxa9cy8vz51gw

step 3: Create Tuning Task

BEGIN

l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (

sql_id => 'cxa9cy8vz51gw',

scope => DBMS_SQLTUNE.scope_comprehensive,

time_limit => 500,

task_name => 'cxa9cy8vz51gw_tuning_task11',

description => 'Tuning task1 for statement cxa9cy8vz51gw');

DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);

END;

Step 4:Execute Tuning task:

EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'cxa9cy8vz51gw_tuning_task11');

Step 5: Get the Tuning advisor report.

set long 65536

set longchunksize 65536

set linesize 100

select dbms_sqltune.report_tuning_task('cxa9cy8vz51gw_tuning_task11') from dual;