Oracle January 2021 Critical Patch Advisory - PL/SQL detailed changes

Oracle January 2021 Critical Patch Advisory changed objects performed by each database patch.

For more details and the catalog, check the main post: Dissecting 210119 BP, PSU, RU and RUR

What exactly changed for each?
(click to see detailed line changes)

Changed Objects

P.S:
> = Added Lines
< = Removed Lines

12.1.0.2

SYS.DBMS_AWR_REPORT_LAYOUT - PACKAGE BODY (BP):
8754,8779c8754,8782
<    'select b.latch_name                                      name
<          , e.gets    - b.gets                                gets
<          , to_number(decode(e.gets, b.gets, null,
<            (e.misses - b.misses) * 100/(e.gets - b.gets)))   missed
<          , to_number(decode(e.misses, b.misses, null,
<            (e.sleeps - b.sleeps)/(e.misses - b.misses)))     sleeps
<          , (e.wait_time - b.wait_time)/1000000               wt
<          , e.immediate_gets - b.immediate_gets               nowai
<          , to_number(decode(e.immediate_gets,
<                             b.immediate_gets, null,
<                             (e.immediate_misses - b.immediate_misses) * 100 /
<                             (e.immediate_gets   - b.immediate_gets)))   imiss
<      from  dba_hist_latch b
<          , dba_hist_latch e
<      where b.snap_id         = :bid
<        and e.snap_id         = :eid
<        and b.dbid            = :dbid
<        and e.dbid            = :dbid
<        and b.instance_number = :inst_num
<        and e.instance_number = :inst_num
<        and b.latch_hash      = e.latch_hash
<        and (   e.gets           - b.gets
<              + e.immediate_gets - b.immediate_gets
<            ) > 0
<      order by b.latch_name';
< 
---
>   'with latch_aggr as
>          (select  latch_hash,latch_name,snap_id,
>                   sum(gets) gets, sum(misses) misses, sum(sleeps) sleeps,
>                   sum(wait_time)         wait_time,
>                   sum(immediate_gets)    immediate_gets,
>                   sum(immediate_misses)  immediate_misses
>           from    dba_hist_latch
>           where   dbid  = :dbid
>                   and instance_number = :inst_num
>                   and snap_id in (:bid, :eid)
>           group by latch_hash,latch_name,snap_id )
>       select sp1.latch_name   name,
>              sp2.gets - sp1.gets          gets,
>              to_number(decode(sp2.gets, sp1.gets, null,
>              (sp2.misses - sp1.misses) * 100/(sp2.gets - sp1.gets)))   missed
>              , to_number(decode(sp2.misses, sp1.misses, null,
>              (sp2.sleeps - sp1.sleeps)/(sp2.misses - sp1.misses)))     sleeps
>              , (sp2.wait_time - sp1.wait_time)/1000000               wt
>              , sp2.immediate_gets - sp1.immediate_gets               nowai
>              , to_number(decode(sp2.immediate_gets,
>                         sp1.immediate_gets, null,
>                         (sp2.immediate_misses - sp1.immediate_misses) * 100 /
>                         (sp2.immediate_gets   - sp1.immediate_gets)))   imiss
>        from latch_aggr sp1, latch_aggr sp2
>        where  sp1.snap_id = :bid and sp2.snap_id = :eid 
>               and ( sp2.gets - sp1.gets 
>                   + sp2.immediate_gets - sp1.immediate_gets ) > 0
>               and sp1.latch_name = sp2.latch_name
>        order by sp1.latch_name';
SYS.DBMS_SQLPATCH - PACKAGE BODY (BP):
682a683,705
>     
>     
>     
>     
>     
>     
>     DECLARE
>        REG_INV_CNT NUMBER;
>     BEGIN
>         SELECT COUNT(*) INTO REG_INV_CNT FROM DBA_OBJECTS
>           WHERE OBJECT_NAME = 'DBMS_REGISTRY_SYS'
>           AND OBJECT_TYPE = 'PACKAGE BODY' AND STATUS != 'VALID';
>         IF REG_INV_CNT = 1 THEN
>           DEBUG_PUT_LINE('DBMS_REGISTRY_SYS package body is NOT VALID, compiling it');
>           EXECUTE IMMEDIATE 'alter package sys.dbms_registry_sys compile body reuse settings';
>         ELSE
>           DEBUG_PUT_LINE('DBMS_REGISTRY_SYS package body is VALID: ' || REG_INV_CNT);
>         END IF;
>     EXCEPTION
>         WHEN OTHERS THEN
>         RAISE;
>     END;
> 
SYS.DBMS_SQLPATCH - PACKAGE BODY (PSU):
607a608,630
>     
>     
>     
>     
>     
>     
>     DECLARE
>        REG_INV_CNT NUMBER;
>     BEGIN
>         SELECT COUNT(*) INTO REG_INV_CNT FROM DBA_OBJECTS
>           WHERE OBJECT_NAME = 'DBMS_REGISTRY_SYS'
>           AND OBJECT_TYPE = 'PACKAGE BODY' AND STATUS != 'VALID';
>         IF REG_INV_CNT = 1 THEN
>           DEBUG_PUT_LINE('DBMS_REGISTRY_SYS package body is NOT VALID, compiling it');
>           EXECUTE IMMEDIATE 'alter package sys.dbms_registry_sys compile body reuse settings';
>         ELSE
>           DEBUG_PUT_LINE('DBMS_REGISTRY_SYS package body is VALID: ' || REG_INV_CNT);
>         END IF;
>     EXCEPTION
>         WHEN OTHERS THEN
>         RAISE;
>     END;
> 
SYS.DBMS_STATS - PACKAGE BODY (BP):
22886a22887,22890
>       
>       SAFE_COMMIT(OWNER, TABNAME, NULL, FALSE, 
>                   TRUE, 
>                   COMMITFREE);
22889a22894
>           COMMITFREE = FALSE AND
22905,22907d22909
<         SAFE_COMMIT(OWNER, TABNAME, NULL, FALSE, 
<                     TRUE, 
<                     COMMITFREE);
SYS.DBA_TABLESPACE_USAGE_METRICS - VIEW (BP):
11c11,12
<         t.ts# = tstat.kttetstsn
---
>         t.ts# = tstat.kttetstsn and
>         (tstat.con_id is NULL or tstat.con_id = sys_context('USERENV', 'CON_ID'))
SYS.USER_ROLE_PRIVS - VIEW (BP):
50c50
<        EXISTS (select 1 from
---
>       (EXISTS (select 1 from
55,57c55,57
<           EXISTS (select 1 from sys.proxy_role_info$ pr, sys.user$ u where
<                   p.client# = pr.client# and p.proxy# = pr.proxy# and
<             ((BITAND(p.flags,4) > 0 and
---
>        EXISTS (select 1 from sys.proxy_role_info$ pr, sys.user$ u where
>                p.client# = pr.client# and p.proxy# = pr.proxy# and
>                ((BITAND(p.flags,4) > 0 and
60c60,67
<               (pr.role# = u.user# and u.name != groles.granted_role)))))))
---
>               (pr.role# = u.user# and u.name != groles.granted_role)))))) or
>               /* it could be a RAS proxy session. Since xs$proxy_role is not yet created,
>                * assume RAS proxy session if no row found in proxy_info$.
>                */
>        NOT EXISTS (select 1 from
>                    sys.proxy_info$ p where
>                    p.client#=userenv('SCHEMAID') and
>                    p.proxy# = sys_context('userenv', 'proxy_userid'))))

18.0.0.0

GSMADMIN_INTERNAL.DBMS_GSM_CLOUDADMIN - PACKAGE BODY (18.11RUR):
3113c3113
<  
---
> 
3697c3697
<     PUBKEY    RAW(2000);
---
>     PUBKEY    RAW(4000);
GSMADMIN_INTERNAL.DBMS_GSM_NOPRIV - PACKAGE BODY (18.11RUR):
106c106,108
<     EXECUTE IMMEDIATE 'SELECT count(private_key) FROM gsmadmin_internal.cloud'
---
>     EXECUTE IMMEDIATE 
>     'SELECT count(*) 
>       FROM gsmadmin_internal.cloud where private_key is not null'
GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN - PACKAGE BODY (18.11RUR):
347a348
> 
371a373
> 
375a378
> 
380a384
> 
1488c1492
<   LOC_PUBKEY         RAW(2000);
---
>   LOC_PUBKEY         RAW(4000);
1976d1979
< 
5708c5711
<   LOC_PUBKEY          RAW(2000);
---
>   LOC_PUBKEY          RAW(4000);
21325c21328
<     STMT  VARCHAR2(2000);
---
>     STMT  VARCHAR2(4000);
21341c21344
<     TMPVAR RAW(2000);
---
>     TMPVAR RAW(4000);
21981d21983
< 
SYS.DBMS_BACKUP_RESTORE - PACKAGE (18.12RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.12.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.12.01.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.12.00.00', '.');
<   msn  CONSTANT NUMBER := instr('18.12.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.12.00.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('18.12.01.00', '.');
>   msn  CONSTANT NUMBER := instr('18.12.01.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('18.12.01.00', '.', msn + 1);
29c29
<                            to_number(substr('18.12.00.00', 1, fsn - 1));
---
>                            to_number(substr('18.12.01.00', 1, fsn - 1));
31c31
<                to_number(substr('18.12.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.12.01.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.12.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.12.01.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.12.00.00',  psn + 1));
---
>                              to_number(substr('18.12.01.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (18.11RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.11.01.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.11.02.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.11.01.00', '.');
<   msn  CONSTANT NUMBER := instr('18.11.01.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.11.01.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('18.11.02.00', '.');
>   msn  CONSTANT NUMBER := instr('18.11.02.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('18.11.02.00', '.', msn + 1);
29c29
<                            to_number(substr('18.11.01.00', 1, fsn - 1));
---
>                            to_number(substr('18.11.02.00', 1, fsn - 1));
31c31
<                to_number(substr('18.11.01.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.11.02.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.11.01.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.11.02.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.11.01.00',  psn + 1));
---
>                              to_number(substr('18.11.02.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (RU):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.12.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.13.00.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.12.00.00', '.');
<   msn  CONSTANT NUMBER := instr('18.12.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.12.00.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('18.13.00.00', '.');
>   msn  CONSTANT NUMBER := instr('18.13.00.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('18.13.00.00', '.', msn + 1);
29c29
<                            to_number(substr('18.12.00.00', 1, fsn - 1));
---
>                            to_number(substr('18.13.00.00', 1, fsn - 1));
31c31
<                to_number(substr('18.12.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.13.00.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.12.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.13.00.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.12.00.00',  psn + 1));
---
>                              to_number(substr('18.13.00.00',  psn + 1));
SYS.DBMS_REGISTRY - PACKAGE (RU):
13c13
<                                '18.12.0.0.0';
---
>                                '18.13.0.0.0';
SYS.DBMS_REGISTRY - PACKAGE (18.12RUR):
13c13
<                                '18.12.0.0.0';
---
>                                '18.12.1.0.0';
SYS.DBMS_REGISTRY - PACKAGE (18.11RUR):
13c13
<                                '18.11.1.0.0';
---
>                                '18.11.2.0.0';
SYS.DBMS_AWR_REPORT_LAYOUT - PACKAGE BODY (RU):
9591a9592
>                   and snap_id in (:bid, :eid)
SYS.DBMS_RCVMAN - PACKAGE BODY (RU):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.12.00.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.13.00.00'; 
SYS.DBMS_RCVMAN - PACKAGE BODY (18.11RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.11.01.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.11.02.00'; 
SYS.DBMS_RCVMAN - PACKAGE BODY (18.12RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.12.00.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.12.01.00'; 
SYS.DBMS_SQLTUNE - PACKAGE BODY (RU):
11248a11249,11251
>   
>     MIN_SAMPLE_TIME TIMESTAMP; 
>     MAX_SAMPLE_TIME TIMESTAMP; 
11291c11294,11296
<                         BND_BUCKET_INTERVAL   NUMBER)
---
>                         BND_BUCKET_INTERVAL   NUMBER,
>                         MIN_SAMPLE_TIME       TIMESTAMP,
>                         MAX_SAMPLE_TIME       TIMESTAMP)
11758c11763,11764
<                            (SELECT ASH0.*
---
>                             (SELECT 
>                                    ASH0.*
11760c11766,11769
<                             WHERE  ((SESSION_ID           = BND_SESSION_ID AND
---
>                             WHERE  SAMPLE_TIME BETWEEN 
>                                    MIN_SAMPLE_TIME AND MAX_SAMPLE_TIME AND  
>                                     (
>                                      (SESSION_ID           = BND_SESSION_ID AND
11763,11766c11772,11775
<                                     (BND_PX_MODE         = 'yes' AND
<                                      QC_INSTANCE_ID       = BND_INST_ID AND
<                                      QC_SESSION_ID        = BND_SESSION_ID AND
<                                      QC_SESSION_SERIAL# = BND_SESSION_SERIAL)))
---
>                                      (BND_PX_MODE         = 'yes' AND
>                                       QC_INSTANCE_ID       = BND_INST_ID AND
>                                       QC_SESSION_ID        = BND_SESSION_ID AND
>                                       QC_SESSION_SERIAL# = BND_SESSION_SERIAL)))
12080a12090,12093
>     MIN_SAMPLE_TIME := CAST(INTERVAL_START AS TIMESTAMP);
>     MAX_SAMPLE_TIME := CAST(INTERVAL_END AS TIMESTAMP) 
>                           + NUMTODSINTERVAL(1, 'SECOND');
> 
12139c12152,12154
<                                      BUCKET_CALC_INTERVAL) 
---
>                                      BUCKET_CALC_INTERVAL,
>                                      MIN_SAMPLE_TIME,
>                                      MAX_SAMPLE_TIME) 
12514a12530
>     NONEMPTY_HIST_REP                  NUMBER;
13123c13139,13145
<       RETURN;  
---
>       SELECT EXISTSNODE(REPORT_XML, '/report/sql_monitor_report') 
>       INTO NONEMPTY_HIST_REP FROM DUAL;
> 
>       
>       IF (NONEMPTY_HIST_REP = 1) THEN
>         RETURN;
>       END IF; 
13124a13147,13148
>       
>       REPORT_XML := NULL; 
13576,13577c13600,13602
<     IF (SYS_CONTEXT('userenv', 'con_id') <= 1 AND 
<         TARGET_REPORT_ID IS NOT NULL AND TARGET_REPORT_ID != 0) 
---
>     IF ((REPORT_ID IS NULL OR REPORT_ID = 0)
>         AND TARGET_REPORT_ID IS NOT NULL 
>         AND TARGET_REPORT_ID != 0) 
13583a13609
>     
13585c13611,13620
<         RETURN;  
---
>         SELECT EXISTSNODE(REPORT_XML, '/report/sql_monitor_report') 
>         INTO NONEMPTY_HIST_REP FROM DUAL;
> 
>         
>         IF (NONEMPTY_HIST_REP = 1) THEN
>           RETURN;
>         END IF; 
>       
>         
>         REPORT_XML := NULL;          
13809c13844,13847
<       (SELECT INST_ID,
---
>       ( SELECT * 
>          FROM 
>          TABLE(GV$(CURSOR(
>               SELECT USERENV('instance') AS INST_ID,
13927,13928c13965,13966
<        FROM   GV$SQL_MONITOR MO1
<        WHERE  MO1.INST_ID BETWEEN I_REPORT_SQL_MONITOR_XML.TARGET_INST_ID_LOW
---
>        FROM   V$SQL_MONITOR MO1
>        WHERE  USERENV('INSTANCE') BETWEEN I_REPORT_SQL_MONITOR_XML.TARGET_INST_ID_LOW
13951c13989,13991
<                                      MO1.PX_SERVER#)))),
---
>                                      MO1.PX_SERVER#)))
>        )))                               
>       ),
17629,17647c17669,17699
<                  (SELECT   LO.SQL_PLAN_LINE_ID            PLAN_LINE_ID,
<                            DECODE(SUM(LO.TOTALWORK), 0, NULL,
<                                  ROUND(SUM(LO.SOFAR)*100/SUM(LO.TOTALWORK)))
<                                                           PERCENT_COMPLETE,
<                            MAX(LO.TIME_REMAINING)         TIME_REMAINING
<                   FROM     GV$SESSION_LONGOPS LO,
<                            MONITOR_DATA MO
<                WHERE    (I_REPORT_SQL_MONITOR_XML.TARGET_IS_RUNNING = 'Y'
<                             OR I_REPORT_SQL_MONITOR_XML.TARGET_STATUS = 
<                                         'DONE (ERROR)')
<                     AND    LO.SQL_ID
<                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_ID
<                     AND    LO.SQL_EXEC_START
<                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_START
<                     AND    LO.SQL_EXEC_ID
<                            = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_ID
<                     AND    LO.INST_ID     = MO.INST_ID
<                     AND    LO.SID         = MO.SID
<                   GROUP BY LO.SQL_PLAN_LINE_ID) LO,
---
>                 (SELECT  LO2.SQL_PLAN_LINE_ID PLAN_LINE_ID,
>                         DECODE(SUM(LO2.TOTALWORK), 0, NULL,
>                                    ROUND(SUM(LO2.SOFAR)*100/SUM(LO2.TOTALWORK)))
>                                                             PERCENT_COMPLETE,
>                         MAX(LO2.TIME_REMAINING)       TIME_REMAINING
>                  FROM   MONITOR_DATA MO,
>                        (SELECT * 
>                         FROM  
>                           TABLE( 
>                             GV$(CURSOR( 
>                               SELECT USERENV('instance') INST_ID, 
>                                  SQL_PLAN_LINE_ID,
>                                  TOTALWORK,
>                                  SOFAR, 
>                                  TIME_REMAINING,
>                                  SID
>                               FROM   V$SESSION_LONGOPS L    
>                               WHERE  (I_REPORT_SQL_MONITOR_XML.TARGET_IS_RUNNING = 'Y'
>                                       OR I_REPORT_SQL_MONITOR_XML.TARGET_STATUS = 
>                                                 'DONE (ERROR)')
>                                      AND   L.SQL_ID
>                                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_ID
>                                      AND   L.SQL_EXEC_START
>                                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_START
>                                      AND   L.SQL_EXEC_ID
>                                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_ID
>                             )))) LO2
>                  WHERE
>                        LO2.INST_ID    = MO.INST_ID
>                  AND   LO2.SID        = MO.SID
>                  GROUP BY LO2.SQL_PLAN_LINE_ID ) LO, 
17866c17918
<                                      A.INST_ID * 1000000 + A.SID ES,
---
>                                      A.INST_ID_USERENV * 1000000 + A.SID ES,
17868c17920,17938
<                               FROM GV$SQL_PLAN_MONITOR A) PLM,
---
>                               FROM 
>                                 (SELECT * FROM TABLE(GV$(CURSOR( 
>                                    SELECT USERENV('instance') INST_ID_USERENV, 
>                                           A0.*
>                                    FROM V$SQL_PLAN_MONITOR A0
>                                    WHERE   
>                                     A0.SQL_ID = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_ID
>                                     AND A0.SQL_EXEC_START 
>                                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_START
>                                     AND A0.SQL_EXEC_ID
>                                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_ID
>                                     AND  USERENV('instance')
>                                              BETWEEN 
>                                          I_REPORT_SQL_MONITOR_XML.TARGET_INST_ID_LOW
>                                              AND 
>                                          I_REPORT_SQL_MONITOR_XML.TARGET_INST_ID_HIGH
>                                  )))
>                                 ) A
>                               ) PLM,
17870,17877c17940,17941
<                     WHERE    PLM.SQL_ID = 
<                                 I_REPORT_SQL_MONITOR_XML.TARGET_SQL_ID
<                       AND    PLM.SQL_EXEC_START
<                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_START
<                       AND    PLM.SQL_EXEC_ID
<                          = I_REPORT_SQL_MONITOR_XML.TARGET_SQL_EXEC_ID
<                       AND    PLM.INST_ID         = MO.INST_ID
<                       AND    PLM.INST_ID
---
>                     WHERE    PLM.INST_ID_USERENV         = MO.INST_ID
>                       AND    PLM.INST_ID_USERENV
SYS.DBA_TABLESPACE_USAGE_METRICS - VIEW (RU):
11c11,12
<         t.ts# = tstat.kttetstsn
---
>         t.ts# = tstat.kttetstsn and
>         (tstat.con_id is NULL or tstat.con_id = sys_context('USERENV', 'CON_ID'))
SYS.USER_ROLE_PRIVS - VIEW (RU):
71,74d70
<       (groles.default_role = 'YES' /* password protected roles cannot be enabled in proxy session so should not
<                                       be displayed here. Secure application roles though, should be displayed. */
<        or EXISTS (select 1 from sys.user$ u where u.name = groles.granted_role and u.password = 'APPLICATION'))
<       and /* password protected roles cannot be enabled in proxy session so should not be displayed here */

19.0.0.0

CTXSYS.DRIREPZ - PACKAGE BODY (RU):
192,193c192,194
<       PFX := LTRIM(DRIUTL.MAKE_PFX(NULL, IDX.IDX_NAME, '$', IXP.IXP_ID) ,'"')||'%';
<     ELSE
---
>       PFX := LTRIM(DRIUTL.MAKE_PFX(NULL, IDX.IDX_NAME, '$', IXP.IXP_ID,
>                                    FALSE, IDX.IDX_ID) ,'"')||'%';
>   ELSE
312a314,315
>         
>         SIZELN(NULL, NULL, LTKA, LTKU, LTBA, LTBU);
411a415,417
>     ELSE
>       
>       SIZELN(NULL, NULL, TKA, TKU, TBA, TBU);
CTXSYS.DRISGP - PACKAGE BODY (RU):
1777c1777
<     ELSIF (SEARCH = 'TEXTVALUE') THEN
---
>     ELSIF (SEARCH = 'TEXT_VALUE') THEN
CTXSYS.DRIXMD - PACKAGE BODY (RU):
6054c6054,6055
<   ELSIF ((CURRENT_STATE.TEXT = '1') AND (CURRENT_STATE.SEARCH_ON = 'NONE')) THEN
---
>   ELSIF ((CURRENT_STATE.TEXT = '1') AND (CURRENT_STATE.SEARCH_ON = 'NONE'))
>   THEN
6056c6057
<       ITRANSIT := DRIXMD.I_TRANSIT_NONE;
---
>       ITRANSIT := DRIXMD.I_TRANSIT_NONE_TO_FULL;
6066c6067,6068
<   ELSIF ((CURRENT_STATE.TEXT = '0') AND (CURRENT_STATE.SEARCH_ON <> 'NONE')) THEN
---
>   ELSIF ((CURRENT_STATE.TEXT = '0') AND (CURRENT_STATE.SEARCH_ON <> 'NONE'))
>   THEN
6078c6080,6081
<   ELSIF ((CURRENT_STATE.TEXT = '1') AND (CURRENT_STATE.SEARCH_ON <> 'NONE')) THEN
---
>   ELSIF ((CURRENT_STATE.TEXT = '1') AND (CURRENT_STATE.SEARCH_ON <> 'NONE'))
>   THEN
CTXSYS.DRVDDL - PACKAGE BODY (RU):
2851c2851,2852
<   SS_STATE DRIXMD.SS_METADATA;
---
>   L_IDX            DR_DEF.IDX_REC;
>   SS_STATE         DRIXMD.SS_METADATA;
2853c2854,2856
<   TRANSITION NUMBER := 0;
---
>   HAS_P            BOOLEAN := FALSE;
>   FULLREINDEX      BOOLEAN := FALSE;
>   TRANSITION       NUMBER := 0;
2875a2879,2880
>   
>   HAS_P := DRIXMD.INDEXHASPTABLE(IDX.IDX_ID);
2914a2920,2931
>     
>     IF ((CHECKTRANSITIONFOR(TRANSITION, 'S_TRANSIT')
>           = DRIXMD.S_TRANSIT_NONE_TO_FULL) AND
>         (CHECKTRANSITIONFOR(TRANSITION, 'I_TRANSIT')
>           = DRIXMD.I_TRANSIT_NONE_TO_FULL)) THEN
>       FULLREINDEX := TRUE;
> 
>       DRVXTAB.DROP_INDEX_TABLES(IDX, HAS_P, NULL, FALSE, TRUE, TRUE);
>       DRIXMD.SETINDEXSTATUS(IDX.IDX_ID, 0, DRIXMD.STATE_NO_INDEX);
>       DRIDML.DEREGISTER(IDX.IDX_ID, UNLOCK=>FALSE);
>     END IF;
> 
2925,2929c2942,2952
<       
<       IF (PARA > 1) THEN
<         PARALLELINDEXPOPULATE(IDX.IDX_ID, IA, PARA,
<                               (DRVDDL.CREATE_OP + DRVDDL.PARALLEL_OP),
<                               IDXMEM);
---
>       IF (NOT FULLREINDEX) THEN
>         
>         IF (PARA > 1) THEN
>           PARALLELINDEXPOPULATE(IDX.IDX_ID, IA, PARA,
>                                 (DRVDDL.CREATE_OP + DRVDDL.PARALLEL_OP),
>                                 IDXMEM);
>         ELSE
>           DRVDISP.EXECTRUST(IDX.IDX_OWNER, IDX.IDX_NAME, NULL,
>                             DRILIST.CMD_INDEX_RESUME, DRVDDL.CREATE_OP,
>                             TO_CHAR(IDXMEM));
>         END IF;
2931,2933c2954,2956
<         DRVDISP.EXECTRUST(IDX.IDX_OWNER, IDX.IDX_NAME, NULL,
<                           DRILIST.CMD_INDEX_RESUME, DRVDDL.CREATE_OP,
<                           TO_CHAR(IDXMEM));
---
>         
>         L_IDX := DRIXMD.GETINDEXRECBYID(IDX.IDX_ID);
>         INDEXRESUME(IA, L_IDX, PARA, IDXMEM, FALSE, TRUE, TRUE);
GSMADMIN_INTERNAL.DBMS_GSM_CLOUDADMIN - PACKAGE BODY (19.8RUR):
3186c3186
<  
---
> 
3780c3780
<     PUBKEY    RAW(2000);
---
>     PUBKEY    RAW(4000);
GSMADMIN_INTERNAL.DBMS_GSM_NOPRIV - PACKAGE BODY (19.8RUR):
106c106,108
<     EXECUTE IMMEDIATE 'SELECT count(private_key) FROM gsmadmin_internal.cloud'
---
>     EXECUTE IMMEDIATE 
>     'SELECT count(*) 
>       FROM gsmadmin_internal.cloud where private_key is not null'
GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN - PACKAGE BODY (19.8RUR):
347a348
> 
378a380
> 
383a386
> 
1501c1504
<   LOC_PUBKEY         RAW(2000);
---
>   LOC_PUBKEY         RAW(4000);
2008d2010
< 
5911c5913
<   LOC_PUBKEY          RAW(2000);
---
>   LOC_PUBKEY          RAW(4000);
11649a11652
> 
21918c21921
<     STMT  VARCHAR2(2000);
---
>     STMT  VARCHAR2(4000);
21934c21937
<     TMPVAR RAW(2000);
---
>     TMPVAR RAW(4000);
22651d22653
< 
MDSYS.SDO_DROP_USER - TRIGGER (RU):
6a7,8
>    invalid_identifier exception;
>    pragma exception_init(invalid_identifier, -00902);
15a18
>    if sys.dbms_standard.dictionary_obj_type = 'USER' THEN
17,29c20,28
<    stmt := 'select mdsys.sdo_util.SpatialActive from dual';
<    begin
<      execute immediate stmt into is_active;
<      exception
<        when package_invalidated then
<          is_active := 0;
<        when package_not_found then
<          is_active := 0;
<        when object_not_found then
<          is_active := 0;
<        when others then
<          is_active := 0;
<          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
---
>      stmt := 'select SYS.SpatialActive from sys.dual';
>      begin
>        execute immediate stmt into is_active;
>        exception
>          when invalid_identifier then
>            is_active := 1;
>          when others then
>            is_active := 0;
>            SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
31,34c30,33
<    end;
<    if ( is_active = 0 ) then
<      return;
<    end if;
---
>      end;
>      if ( is_active = 0 ) then
>        return;
>      end if;
36d34
<    if sys.dbms_standard.dictionary_obj_type = 'USER' THEN
MDSYS.SDO_TOPO_DROP_FTBL - TRIGGER (RU):
9,10c9,10
<    package_not_found exception;
<    pragma exception_init(package_not_found, -04043);
---
>    invalid_identifier exception;
>    pragma exception_init(invalid_identifier, -00904);
13,28d12
<    stmt := 'select mdsys.sdo_util.SpatialActive from dual';
<    begin
<      execute immediate stmt into is_active;
<      exception
<        when package_not_found then
<          is_active := 0;
<        when others then
<          is_active := 0;
<          SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
<                                   'EXCEPTION[prvtgmd.sql(' || $$PLSQL_LINE || ')3]: ' || SQLERRM);
<    end;
<    if ( is_active = 0 ) then
<      return;
<    end if;
< 
< 
32a17,32
> 
>     stmt := 'select sys.SpatialActive from sys.dual';
>     begin
>       execute immediate stmt into is_active;
>       exception
>         when invalid_identifier then
>           is_active := 0;
>         when others then
>           is_active := 0;
>           SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
>                                   'EXCEPTION[prvtgmd.sql(' || $$PLSQL_LINE || ')3]: ' || SQLERRM);
>     end;
>     if ( is_active = 0 ) then
>       return;
>     end if;
> 
SYS.DBMS_ASH - PACKAGE (RU):
57a58
>   , LOCAL_ROLE        VARCHAR(16)
121c122
<   REPORT_INTERNAL_VERSION CONSTANT VARCHAR2(64) := '47';
---
>   REPORT_INTERNAL_VERSION CONSTANT VARCHAR2(64) := '48';
124c125
<   OMC_TIME_FORMAT CONSTANT VARCHAR2(30) := 'MM/DD/YYYY HH24:MI:SS';
---
>   ASH_TIME_FORMAT CONSTANT VARCHAR2(30) := 'MM/DD/YYYY HH24:MI:SS';
129c130
<   OMC_ALLOWED_ERR_RATIO CONSTANT NUMBER := 1;
---
>   ASH_ALLOWED_ERR_RATIO CONSTANT NUMBER := 1;
138,147c139,148
<   OMC_LOW_RESOLUTION CONSTANT VARCHAR2(10) := 'LOW';
<   OMC_LOW_BUCKETS CONSTANT NUMBER := 120;
<   OMC_LOW_ROWS_PER_BUCKET CONSTANT NUMBER := 20;
<   OMC_MED_RESOLUTION CONSTANT VARCHAR2(10) := 'MEDIUM';
<   OMC_MED_BUCKETS CONSTANT NUMBER := 180;
<   OMC_MED_ROWS_PER_BUCKET CONSTANT NUMBER := 35;
<   OMC_HIGH_RESOLUTION CONSTANT VARCHAR2(10) := 'HIGH';
<   OMC_HIGH_BUCKETS CONSTANT NUMBER := 360;
<   OMC_HIGH_ROWS_PER_BUCKET CONSTANT NUMBER := 50;
<   OMC_MAX_RESOLUTION CONSTANT VARCHAR2(10) := 'MAX';
---
>   ASH_LOW_RESOLUTION CONSTANT VARCHAR2(10) := 'LOW';
>   ASH_LOW_BUCKETS CONSTANT NUMBER := 120;
>   ASH_LOW_ROWS_PER_BUCKET CONSTANT NUMBER := 20;
>   ASH_MED_RESOLUTION CONSTANT VARCHAR2(10) := 'MEDIUM';
>   ASH_MED_BUCKETS CONSTANT NUMBER := 180;
>   ASH_MED_ROWS_PER_BUCKET CONSTANT NUMBER := 35;
>   ASH_HIGH_RESOLUTION CONSTANT VARCHAR2(10) := 'HIGH';
>   ASH_HIGH_BUCKETS CONSTANT NUMBER := 360;
>   ASH_HIGH_ROWS_PER_BUCKET CONSTANT NUMBER := 50;
>   ASH_MAX_RESOLUTION CONSTANT VARCHAR2(10) := 'MAX';
151c152
<   OMC_DEF_RT_MIN_BUCKET_SIZE CONSTANT NUMBER := 10;
---
>   ASH_DEF_RT_MIN_BUCKET_SIZE CONSTANT NUMBER := 10;
154c155
<   OMC_DEF_HIST_MIN_BUCKET_SIZE CONSTANT NUMBER := 10;
---
>   ASH_DEF_HIST_MIN_BUCKET_SIZE CONSTANT NUMBER := 10;
157c158
<   OMC_DEF_SQLTEXT_LEN CONSTANT NUMBER := 200;
---
>   ASH_DEF_SQLTEXT_LEN CONSTANT NUMBER := 200;
476c477,478
<     , RESOLUTION      IN VARCHAR2 := 'medium')
---
>     , RESOLUTION      IN VARCHAR2 := 'medium'
>     , INCLUDE_BG      IN VARCHAR2 := 'n')
504c506,507
<     , RESOLUTION      IN VARCHAR2 := 'medium')
---
>     , RESOLUTION      IN VARCHAR2 := 'medium'
>     , INCLUDE_BG      IN VARCHAR2 := 'n')
532c535,536
<     , RESOLUTION      IN VARCHAR2 := 'medium')
---
>     , RESOLUTION      IN VARCHAR2 := 'medium'
>     , INCLUDE_BG      IN VARCHAR2 := 'n')
SYS.DBMS_BACKUP_RESTORE - PACKAGE (RU):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '19.09.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '19.10.00.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('19.09.00.00', '.');
<   msn  CONSTANT NUMBER := instr('19.09.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('19.09.00.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('19.10.00.00', '.');
>   msn  CONSTANT NUMBER := instr('19.10.00.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('19.10.00.00', '.', msn + 1);
29c29
<                            to_number(substr('19.09.00.00', 1, fsn - 1));
---
>                            to_number(substr('19.10.00.00', 1, fsn - 1));
31c31
<                to_number(substr('19.09.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('19.10.00.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('19.09.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('19.10.00.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('19.09.00.00',  psn + 1));
---
>                              to_number(substr('19.10.00.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (19.8RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '19.08.01.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '19.08.02.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('19.08.01.00', '.');
<   msn  CONSTANT NUMBER := instr('19.08.01.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('19.08.01.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('19.08.02.00', '.');
>   msn  CONSTANT NUMBER := instr('19.08.02.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('19.08.02.00', '.', msn + 1);
29c29
<                            to_number(substr('19.08.01.00', 1, fsn - 1));
---
>                            to_number(substr('19.08.02.00', 1, fsn - 1));
31c31
<                to_number(substr('19.08.01.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('19.08.02.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('19.08.01.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('19.08.02.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('19.08.01.00',  psn + 1));
---
>                              to_number(substr('19.08.02.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (19.9RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '19.09.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '19.09.01.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('19.09.00.00', '.');
<   msn  CONSTANT NUMBER := instr('19.09.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('19.09.00.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('19.09.01.00', '.');
>   msn  CONSTANT NUMBER := instr('19.09.01.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('19.09.01.00', '.', msn + 1);
29c29
<                            to_number(substr('19.09.00.00', 1, fsn - 1));
---
>                            to_number(substr('19.09.01.00', 1, fsn - 1));
31c31
<                to_number(substr('19.09.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('19.09.01.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('19.09.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('19.09.01.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('19.09.00.00',  psn + 1));
---
>                              to_number(substr('19.09.01.00',  psn + 1));
SYS.DBMS_CAPTURE_ADM_INTERNAL - PACKAGE (RU):
246a247,252
>   
>   
>   
>   FUNCTION IS_NEW_INSTANCE_ALLOWED
>   RETURN BOOLEAN;
> 
SYS.DBMS_PERF - PACKAGE (RU):
75a76,79
>   --     db_tz        (IN) - database timezone; used to convert to UTC
>   --                         if NULL, timezone from sysdate will be
>   --                         used. perfhubrpt will provide the input's dbid
>   --                         using this parameter.
96a101
>     db_tz                IN varchar2 default null,
122a128
>     db_tz                IN varchar2 default null,
190a197,200
>   --     db_tz        (IN) - database timezone; used to convert to UTC
>   --                         if NULL, timezone from sysdate will be
>   --                         used. perfhubrpt will provide the input's dbid
>   --                         using this parameter.
210a221
>     db_tz                IN varchar2 default null,
SYS.DBMS_REGISTRY - PACKAGE (19.9RUR):
13c13
<                                '19.9.0.0.0';
---
>                                '19.9.1.0.0';
SYS.DBMS_REGISTRY - PACKAGE (RU):
13c13
<                                '19.9.0.0.0';
---
>                                '19.10.0.0.0';
SYS.DBMS_REGISTRY - PACKAGE (19.8RUR):
13c13
<                                '19.8.1.0.0';
---
>                                '19.8.2.0.0';
SYS.DBMS_REPORT - PACKAGE (RU):
23c23,25
< 
---
>   CONTENT_TYPE_CSS      CONSTANT        NUMBER := 5;
>   CONTENT_TYPE_JS       CONSTANT        NUMBER := 6;
>   CONTENT_TYPE_SVG      CONSTANT        NUMBER := 7;
SYS.DBMS_SWRF_INTERNAL - PACKAGE (RU):
739a740,755
> PROCEDURE REDEFINE_PARTITIONS(DBID    NUMBER,
>                               TBID    NUMBER DEFAULT NULL,
>                               TIMEOUT NUMBER DEFAULT NULL);
> 
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
SYS.DBMS_UMF_PROTECTED - PACKAGE (RU):
45a46,51
>   KEUQDSVERTYPE_NULL       CONSTANT BINARY_INTEGER := 0;
>   KEUQDSVERTYPE_PRE120202  CONSTANT BINARY_INTEGER := 1;
>   KEUQDSVERTYPE_POST120202 CONSTANT BINARY_INTEGER := 2;
>   KEUQDSVERTYPE_MAXNUM     CONSTANT BINARY_INTEGER := 3;
> 
>   
SYS.DBMS_XS_SIDP - PACKAGE (RU):
14a15,26
> PROCEDURE DODHEXCHANGE2
>         ( MPKEY         IN  VARCHAR2,
>           MTID          IN  RAW,
>           SPKEY         OUT VARCHAR2,
>           SSKEYH        OUT RAW) ;
> 
> PROCEDURE DODHEXCHANGE3
>         ( MPKEY         IN  VARCHAR2,
>           MTID          IN  RAW,
>           SPKEY         OUT VARCHAR2,
>           SSKEYH        OUT RAW) ;
> 
SYS.PRVT_AWR_VIEWER - PACKAGE (RU):
423a424,426
>   
>   
>   
438a442
>     DB_TZ             IN VARCHAR2       DEFAULT NULL,
441a446,530
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   FUNCTION FETCH_TOPSQL_XML(
>     START_TIME        IN DATE           DEFAULT NULL,
>     END_TIME          IN DATE           DEFAULT NULL,
>     INST_ID           IN NUMBER         DEFAULT NULL,
>     DBID              IN NUMBER         DEFAULT NULL,
>     IS_REALTIME       IN NUMBER         DEFAULT NULL,
>     TOP_N_DETAIL      IN NUMBER         DEFAULT NULL,
>     OUTER_START_TIME  IN DATE           DEFAULT NULL,
>     OUTER_END_TIME    IN DATE           DEFAULT NULL,
>     COMPRESS_XML      IN BINARY_INTEGER DEFAULT NULL,
>     SHOW_SQL          IN NUMBER         DEFAULT 0,
>     DB_TZ             IN VARCHAR2       DEFAULT NULL,
>     IS_OMX            IN NUMBER         DEFAULT 0)
>  RETURN XMLTYPE;
> 
970a1060,1061
>   
>   
973d1063
<     DBID            IN NUMBER             DEFAULT NULL,
977a1068,1069
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
1007a1100,1101
>   
>   
1010d1103
<     DBID            IN NUMBER             DEFAULT NULL,
1014a1108,1109
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
1044a1140,1141
>   
>   
1047d1143
<     DBID            IN NUMBER             DEFAULT NULL,
1051a1148,1149
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
1081a1180,1181
>   
>   
1084d1183
<     DBID            IN NUMBER             DEFAULT NULL,
1088a1188,1189
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
1104a1206,1209
>   
>   
>   
>   
1106a1212,1213
>     INST_ID_LOW  IN NUMBER   DEFAULT NULL,
>     INST_ID_HIGH IN NUMBER   DEFAULT NULL,
1120a1228,1230
>   
>   
>   
1122c1232,1234
<     SHOW_SQL        IN NUMBER   DEFAULT NULL)
---
>     INST_ID_LOW  IN NUMBER DEFAULT NULL,
>     INST_ID_HIGH IN NUMBER DEFAULT NULL,
>     SHOW_SQL     IN NUMBER DEFAULT NULL)
1150a1263,1270
>   
>   
>   
>   
>   
>   
>   
>   
1152,1158c1272,1280
<     SERVICE_TYPE   IN VARCHAR2 DEFAULT NULL,
<     IS_REALTIME    IN NUMBER   DEFAULT 1,
<     DBID           IN NUMBER   DEFAULT NULL,
<     START_TIME     IN DATE     DEFAULT NULL,
<     END_TIME       IN DATE     DEFAULT NULL,
<     REPORT_LEVEL   IN VARCHAR2 DEFAULT NULL,
<     SHOW_SQL       IN NUMBER   DEFAULT 0)
---
>     SERVICE_TYPE IN VARCHAR2 DEFAULT NULL,
>     IS_REALTIME  IN NUMBER   DEFAULT 1,
>     DBID         IN NUMBER   DEFAULT NULL,
>     INST_ID      IN NUMBER   DEFAULT NULL,
>     START_TIME   IN DATE     DEFAULT NULL,
>     END_TIME     IN DATE     DEFAULT NULL,
>     REPORT_LEVEL IN VARCHAR2 DEFAULT NULL,
>     DB_TZ        IN VARCHAR2 DEFAULT NULL,
>     SHOW_SQL     IN NUMBER   DEFAULT 0)
SYS.PRVT_EMX - PACKAGE (RU):
27a28,31
>   TYPE LOCALES_ARRAY IS TABLE OF VARCHAR2(5) INDEX BY VARCHAR2(7);
> 
>   
>   
431a436,448
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   FUNCTION OMX_LOCALES
>   RETURN LOCALES_ARRAY;
SYS.DBMS_ASH - PACKAGE BODY (RU):
29,30c29,30
<              TO_CHAR(CONTEXT.DIAG_START_TIME, OMC_TIME_FORMAT) AS "start_time",
<              TO_CHAR(L_END_TIME, OMC_TIME_FORMAT) AS "end_time",
---
>              TO_CHAR(CONTEXT.DIAG_START_TIME, ASH_TIME_FORMAT) AS "start_time",
>              TO_CHAR(L_END_TIME, ASH_TIME_FORMAT) AS "end_time",
130a131
>     DBMS_OUTPUT.PUT_LINE('local_role = ' || CONTEXT.LOCAL_ROLE);
138c139
<          TO_CHAR(CONTEXT.MINAVAILTIMEUTC, OMC_TIME_FORMAT));
---
>          TO_CHAR(CONTEXT.MINAVAILTIMEUTC, ASH_TIME_FORMAT));
140c141
<          TO_CHAR(CONTEXT.MAXAVAILTIMEUTC, OMC_TIME_FORMAT));
---
>          TO_CHAR(CONTEXT.MAXAVAILTIMEUTC, ASH_TIME_FORMAT));
142c143
<          TO_CHAR(CONTEXT.BEGINTIMEUTC, OMC_TIME_FORMAT));
---
>          TO_CHAR(CONTEXT.BEGINTIMEUTC, ASH_TIME_FORMAT));
144c145
<          TO_CHAR(CONTEXT.ENDTIMEUTC, OMC_TIME_FORMAT));
---
>          TO_CHAR(CONTEXT.ENDTIMEUTC, ASH_TIME_FORMAT));
161c162
<          TO_CHAR(CONTEXT.DISKENDTIMEUTC, OMC_TIME_FORMAT));
---
>          TO_CHAR(CONTEXT.DISKENDTIMEUTC, ASH_TIME_FORMAT));
405a407
>              , CONTEXT.LOCAL_ROLE AS "local_role"
412c414
<              , TO_CHAR(CONTEXT.MINAVAILTIMEUTC,OMC_TIME_FORMAT) 
---
>              , TO_CHAR(CONTEXT.MINAVAILTIMEUTC,ASH_TIME_FORMAT) 
414c416
<              , TO_CHAR(CONTEXT.MAXAVAILTIMEUTC,OMC_TIME_FORMAT)
---
>              , TO_CHAR(CONTEXT.MAXAVAILTIMEUTC,ASH_TIME_FORMAT)
416,417c418,419
<              , TO_CHAR(CONTEXT.BEGINTIMEUTC,OMC_TIME_FORMAT) AS "beginTimeUTC"
<              , TO_CHAR(CONTEXT.ENDTIMEUTC,OMC_TIME_FORMAT) AS "endTimeUTC"
---
>              , TO_CHAR(CONTEXT.BEGINTIMEUTC,ASH_TIME_FORMAT) AS "beginTimeUTC"
>              , TO_CHAR(CONTEXT.ENDTIMEUTC,ASH_TIME_FORMAT) AS "endTimeUTC"
433c435
<              , TO_CHAR(CONTEXT.DISKENDTIMEUTC,OMC_TIME_FORMAT) 
---
>              , TO_CHAR(CONTEXT.DISKENDTIMEUTC,ASH_TIME_FORMAT) 
468,469c470,471
<              ,TO_CHAR(CONTEXT.MINAVAILTIMEUTC,OMC_TIME_FORMAT) AS "min_time"
<              ,TO_CHAR(CONTEXT.MAXAVAILTIMEUTC,OMC_TIME_FORMAT) AS "max_time"
---
>              ,TO_CHAR(CONTEXT.MINAVAILTIMEUTC,ASH_TIME_FORMAT) AS "min_time"
>              ,TO_CHAR(CONTEXT.MAXAVAILTIMEUTC,ASH_TIME_FORMAT) AS "max_time"
536c538
<       CONTEXT.RESOLUTION := OMC_MAX_RESOLUTION;
---
>       CONTEXT.RESOLUTION := ASH_MAX_RESOLUTION;
538c540
<       CONTEXT.RESOLUTION := OMC_LOW_RESOLUTION;
---
>       CONTEXT.RESOLUTION := ASH_LOW_RESOLUTION;
540c542
<       CONTEXT.RESOLUTION := OMC_HIGH_RESOLUTION;
---
>       CONTEXT.RESOLUTION := ASH_HIGH_RESOLUTION;
542c544
<       CONTEXT.RESOLUTION := OMC_MED_RESOLUTION;
---
>       CONTEXT.RESOLUTION := ASH_MED_RESOLUTION;
548a551,555
> 
>     
>     
>     
>     
556a564,570
>     
>     
>     
>     CONTEXT.LOCAL_ROLE := 
>        NVL(SUBSTR(SYS_CONTEXT('USERENV','DATABASE_ROLE'),1,16), 'PRIMARY');
>     
>     
587,588c601,602
<         OR (CONTEXT.LOCAL_CONDBID IS NOT NULL 
<             AND DBID = CONTEXT.LOCAL_CONDBID)) THEN
---
>         OR (CONTEXT.LOCAL_CONDBID IS NOT NULL AND DBID = CONTEXT.LOCAL_CONDBID))
>       THEN
641c655
<       L_MIN_SIZE := OMC_DEF_RT_MIN_BUCKET_SIZE;
---
>       L_MIN_SIZE := ASH_DEF_RT_MIN_BUCKET_SIZE;
643c657
<       L_MIN_SIZE := OMC_DEF_HIST_MIN_BUCKET_SIZE;
---
>       L_MIN_SIZE := ASH_DEF_HIST_MIN_BUCKET_SIZE;
650,652c664,666
<         (CASE WHEN CONTEXT.RESOLUTION = OMC_LOW_RESOLUTION THEN OMC_LOW_BUCKETS
<               WHEN CONTEXT.RESOLUTION = OMC_MED_RESOLUTION THEN OMC_MED_BUCKETS
<               ELSE OMC_HIGH_BUCKETS END);
---
>         (CASE WHEN CONTEXT.RESOLUTION = ASH_LOW_RESOLUTION THEN ASH_LOW_BUCKETS
>               WHEN CONTEXT.RESOLUTION = ASH_MED_RESOLUTION THEN ASH_MED_BUCKETS
>               ELSE ASH_HIGH_BUCKETS END);
658,659c672,677
<     CONTEXT.LASTBUCKETSIZE := 
<         GREATEST(0, L_DIFF_SEC - (L_SIZE * CONTEXT.BUCKETCOUNT));
---
>     IF CONTEXT.BUCKETINTERVAL * CONTEXT.BUCKETCOUNT = L_DIFF_SEC THEN
>       CONTEXT.LASTBUCKETSIZE := 0;
>     ELSE
>       CONTEXT.LASTBUCKETSIZE := 
>          L_DIFF_SEC - (CONTEXT.BUCKETINTERVAL * (CONTEXT.BUCKETCOUNT-1));
>     END IF;
774a793,798
>     
>     IF CONTEXT.IS_LOCAL AND CONTEXT.LOCAL_ROLE <> 'PRIMARY' THEN
>       CONTEXT.DISKENABLE := FALSE;
>       RETURN;
>     END IF;
> 
823c847
<     IF L_END_SNAP_ID IS NOT NULL THEN
---
>     IF CONTEXT.ENDSNAPID IS NOT NULL THEN
830c854
<       USING CONTEXT.DBID, L_END_SNAP_ID;
---
>       USING CONTEXT.DBID, LEAST(CONTEXT.ENDSNAPID, L_MAX_SNAP_ID);
966c990
<        OMC_ALLOWED_ERR_RATIO * CONTEXT.MEMSIZEDAYS >= L_REQUESTED_DAYS THEN
---
>        ASH_ALLOWED_ERR_RATIO * CONTEXT.MEMSIZEDAYS >= L_REQUESTED_DAYS THEN
1008c1032
<       CONTEXT.BEGINTIMEUTC := TO_DATE(BEGIN_TIME_UTC, OMC_TIME_FORMAT);
---
>       CONTEXT.BEGINTIMEUTC := TO_DATE(BEGIN_TIME_UTC, ASH_TIME_FORMAT);
1010c1034
<         CONTEXT.ENDTIMEUTC := TO_DATE(END_TIME_UTC, OMC_TIME_FORMAT);
---
>         CONTEXT.ENDTIMEUTC := TO_DATE(END_TIME_UTC, ASH_TIME_FORMAT);
1036c1060
<     IF (CONTEXT.MEMSIZEDAYS-L_MEM_GAP) >= OMC_ALLOWED_ERR_RATIO * L_REQUESTED_DAYS THEN
---
>     IF (CONTEXT.MEMSIZEDAYS-L_MEM_GAP) >= ASH_ALLOWED_ERR_RATIO * L_REQUESTED_DAYS THEN
1060c1084
<          OMC_ALLOWED_ERR_RATIO * L_REQUESTED_DAYS) AND
---
>          ASH_ALLOWED_ERR_RATIO * L_REQUESTED_DAYS) AND
1596,1597c1620,1621
<    CONTEXT.BEGINTIMEUTC := TO_DATE(P_BEGIN_TIME_UTC, OMC_TIME_FORMAT);
<    CONTEXT.ENDTIMEUTC := TO_DATE(P_END_TIME_UTC, OMC_TIME_FORMAT);
---
>    CONTEXT.BEGINTIMEUTC := TO_DATE(P_BEGIN_TIME_UTC, ASH_TIME_FORMAT);
>    CONTEXT.ENDTIMEUTC := TO_DATE(P_END_TIME_UTC, ASH_TIME_FORMAT);
1645c1669
<     L_NOW := TO_CHAR(SYS_EXTRACT_UTC(SYSTIMESTAMP), OMC_TIME_FORMAT);
---
>     L_NOW := TO_CHAR(SYS_EXTRACT_UTC(SYSTIMESTAMP), ASH_TIME_FORMAT);
1947c1971
<        , TO_CHAR(SYS_EXTRACT_UTC(SYSTIMESTAMP), OMC_TIME_FORMAT)
---
>        , TO_CHAR(SYS_EXTRACT_UTC(SYSTIMESTAMP), ASH_TIME_FORMAT)
2056,2057c2080
<            AND  CAST(@ASH_T_COL@ AS DATE)@TZ_SHIFT@ < @END_TIME_D@
<            AND  a.session_type = 'FOREGROUND'
---
>            AND  CAST(@ASH_T_COL@ AS DATE)@TZ_SHIFT@ < @END_TIME_D@ @AND_FG_ONLY@
2185,2190d2207
<       
<       
<       
<       
<       
<       
2221,2222c2238
<       AND  @ASH_T_COL@ @TZ_SHIFT@ < @END_TIME_T@
<       AND  a.session_type = 'FOREGROUND'
---
>       AND  @ASH_T_COL@ @TZ_SHIFT@ < @END_TIME_T@ @AND_FG_ONLY@
2418,2419c2434,2435
<                TO_CHAR(CONTEXT.BEGINTIMEUTC,OMC_TIME_FORMAT) AS "begin_time",
<                TO_CHAR(CONTEXT.ENDTIMEUTC,OMC_TIME_FORMAT) AS "end_time",
---
>                TO_CHAR(CONTEXT.BEGINTIMEUTC,ASH_TIME_FORMAT) AS "begin_time",
>                TO_CHAR(CONTEXT.ENDTIMEUTC,ASH_TIME_FORMAT) AS "end_time",
3757c3773
<         L_LOCAL_SOURCE := '''STANDARD''';
---
>         L_LOCAL_SOURCE := '''NON-CDB''';
3767c3783
<         L_LOCAL_SOURCE := '''STANDARD''';
---
>         L_LOCAL_SOURCE := '''NON-CDB''';
4206,4210c4222,4226
<         (CASE WHEN CONTEXT.RESOLUTION = OMC_LOW_RESOLUTION 
<                    THEN OMC_LOW_ROWS_PER_BUCKET
<               WHEN CONTEXT.RESOLUTION = OMC_MED_RESOLUTION 
<                    THEN OMC_MED_ROWS_PER_BUCKET
<               ELSE OMC_HIGH_ROWS_PER_BUCKET END);
---
>         (CASE WHEN CONTEXT.RESOLUTION = ASH_LOW_RESOLUTION 
>                    THEN ASH_LOW_ROWS_PER_BUCKET
>               WHEN CONTEXT.RESOLUTION = ASH_MED_RESOLUTION 
>                    THEN ASH_MED_ROWS_PER_BUCKET
>               ELSE ASH_HIGH_ROWS_PER_BUCKET END);
4229a4246
>     L_MEM_SAMPLE_RATIO VARCHAR2(100) := NULL;
4262c4279
<           L_TPR := L_TPR || ' * ai.disk_filter_ratio';
---
>           L_MEM_SAMPLE_RATIO := ' * ai.disk_filter_ratio';
4265c4282
<           L_TPR := L_TPR || ' * 10';
---
>           L_MEM_SAMPLE_RATIO := ' * 10';
4266a4284
>         L_TPR := L_TPR || L_MEM_SAMPLE_RATIO;
4310,4312d4327
<       IF CONTEXT.DISKENABLE THEN
<         L_SQLTEXT := ' AND a.is_awr_sample = ''Y'' AND bitand(a.flags,128)=0 ';
<       END IF;
4316c4331
<       IF CONTEXT.SAMPLE_RATIO > 1 THEN
---
>       IF CONTEXT.SAMPLE_RATIO > 1 OR L_MEM_SAMPLE_RATIO IS NOT NULL THEN
4319c4334,4335
<            || a.sample_id ,1000000, 0) <= (1000000 / ' || CONTEXT.SAMPLE_RATIO || ') ';
---
>            || a.sample_id ,1000000, 0) <= (1000000 / (' || CONTEXT.SAMPLE_RATIO 
>            || L_MEM_SAMPLE_RATIO || ')) ';
4475,4478d4490
<         L_SQLTEXT := REPLACE(L_SQLTEXT, '@MEM_BOUND_TABLE@', ', sample_id_bounds');
<         L_SQLTEXT := REPLACE(L_SQLTEXT, '@MEM_BOUND_PRED@', 
< ' AND a.instance_number = sample_id_bounds.inst_id AND 
<   (sample_id_bounds.min_sample_id IS NULL OR sample_id_bounds.min_sample_id > a.sample_id) ');
4487a4500,4506
>       END IF;
>       IF CONTEXT.MEMENABLE THEN
>         L_SQLTEXT := REPLACE(L_SQLTEXT, '@MEM_BOUND_TABLE@', ', sample_id_bounds');
>         L_SQLTEXT := REPLACE(L_SQLTEXT, '@MEM_BOUND_PRED@', 
> ' AND a.instance_number = sample_id_bounds.inst_id AND 
>   (sample_id_bounds.min_sample_id IS NULL OR sample_id_bounds.min_sample_id > a.sample_id) ');
>       ELSE 
4490a4510
> 
4538c4558
<   (SELECT * FROM mem_source UNION ALL SELECT * FROM disk_source )) ';
---
>   (SELECT * FROM mem_source UNION ALL SELECT * FROM disk_source)) ';
4614c4634
<                  substr(max(name),15) as name
---
>                  substr(name,15) as name
4622d4641
<             )
4896c4915
<        OR CONTEXT.RESOLUTION = OMC_MAX_RESOLUTION THEN
---
>        OR CONTEXT.RESOLUTION = ASH_MAX_RESOLUTION THEN
5027c5046
<     INTO L_TEXT, L_COMMAND_ID USING OMC_DEF_SQLTEXT_LEN, P_SQLID;
---
>     INTO L_TEXT, L_COMMAND_ID USING ASH_DEF_SQLTEXT_LEN, P_SQLID;
5084c5103
<     USING OMC_DEF_SQLTEXT_LEN, P_SQLID, P_DBID;
---
>     USING ASH_DEF_SQLTEXT_LEN, P_SQLID, P_DBID;
5749c5768
<             L_AWR_INFO, L_RESOLUTION);
---
>             L_AWR_INFO, L_RESOLUTION, L_INCLUDE_BG);
5754c5773
<             L_RESOLUTION);
---
>             L_RESOLUTION, L_INCLUDE_BG);
5759c5778
<             L_RESOLUTION);
---
>             L_RESOLUTION, L_INCLUDE_BG);
5847c5866,5867
<     , RESOLUTION IN VARCHAR2 := 'medium')
---
>     , RESOLUTION IN VARCHAR2 := 'medium'
>     , INCLUDE_BG      IN VARCHAR2 := 'n')
5854c5874,5875
<                NVL(SHOW_SQL,'n'), NVL(VERBOSE_XML,'n'),'n',INSTANCE_NUMBER,'n',
---
>                NVL(SHOW_SQL,'n'), NVL(VERBOSE_XML,'n'),
>                NVL(INCLUDE_BG,'n'),INSTANCE_NUMBER,'n',
5864a5886
>             ,NVL(INCLUDE_BG,'n') AS "include_bg"
5897c5919,5920
<     , RESOLUTION IN VARCHAR2 := 'medium')
---
>     , RESOLUTION IN VARCHAR2 := 'medium'
>     , INCLUDE_BG      IN VARCHAR2 := 'n')
5904,5905c5927,5929
<                      TO_DATE(BEGIN_TIME_UTC, OMC_TIME_FORMAT),
<                      BUCKET_SIZE, NVL(SHOW_SQL,'n'), NVL(VERBOSE_XML,'n'), 'n', 
---
>                      TO_DATE(BEGIN_TIME_UTC, ASH_TIME_FORMAT),
>                      BUCKET_SIZE, NVL(SHOW_SQL,'n'), NVL(VERBOSE_XML,'n'), 
>                      NVL(INCLUDE_BG,'n'), 
5916a5941
>             ,NVL(INCLUDE_BG,'n') AS "include_bg"
5949c5974,5975
<     , RESOLUTION IN VARCHAR2 := 'medium')
---
>     , RESOLUTION IN VARCHAR2 := 'medium'
>     , INCLUDE_BG      IN VARCHAR2 := 'n')
5957c5983,5984
<                   NVL(SHOW_SQL,'n'), NVL(VERBOSE_XML,'n'), 'n', 
---
>                   NVL(SHOW_SQL,'n'), NVL(VERBOSE_XML,'n'), 
>                   NVL(INCLUDE_BG,'n'), 
5971a5999
>             ,NVL(INCLUDE_BG,'n') AS "include_bg"
6081c6109
<                      TO_DATE(BEGIN_TIME_UTC, OMC_TIME_FORMAT),
---
>                      TO_DATE(BEGIN_TIME_UTC, ASH_TIME_FORMAT),
SYS.DBMS_AUTO_INDEX_INTERNAL - PACKAGE BODY (RU):
511a512,517
>   TYPE AI_SESSION_CONTEXT IS RECORD (
>      INDEX_KEY_LENGTH_CHECK     NUMBER  
>                    
>   );
> 
>   
631a638,680
>   
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   PROCEDURE ALTER_SESSION(
>     PARAM       VARCHAR2, 
>     OLD_VALUE   NUMBER, 
>     NEW_VALUE   NUMBER);
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   PROCEDURE SET_SESSION_CTX_AI(
>     ORIG_SESSION_CTX_AI IN OUT NOCOPY AI_SESSION_CONTEXT);
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
>   PROCEDURE RESET_SESSION_CTX_AI(
>     ORIG_SESSION_CTX_AI AI_SESSION_CONTEXT);
7542a7592,7593
>     
>     ORIG_SESSION_CTX_AI AI_SESSION_CONTEXT;
7543a7595,7596
>     
>     SET_SESSION_CTX_AI(ORIG_SESSION_CTX_AI);
7602a7656,7658
>     
>     
>     RESET_SESSION_CTX_AI(ORIG_SESSION_CTX_AI);
7606a7663
>     
7607a7665
>       RESET_SESSION_CTX_AI(ORIG_SESSION_CTX_AI);
7613a7672
>       RESET_SESSION_CTX_AI(ORIG_SESSION_CTX_AI);
10697c10756,10831
<   END SET_DROPPED_INDEX_STATUS;                              
---
>   END SET_DROPPED_INDEX_STATUS;
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   PROCEDURE ALTER_SESSION(
>     PARAM       VARCHAR2, 
>     OLD_VALUE   NUMBER, 
>     NEW_VALUE   NUMBER) 
>   IS
>     SAFE_PARAM  VARCHAR2(128);
>   BEGIN
>     IF (OLD_VALUE IS NULL OR OLD_VALUE != NEW_VALUE) THEN
>       SAFE_PARAM := DBMS_ASSERT.ENQUOTE_NAME(PARAM, TRUE);
>       EXECUTE IMMEDIATE 'ALTER SESSION SET '||SAFE_PARAM||' = '
>                          ||TO_NUMBER(NEW_VALUE);
>     END IF;
>   END ALTER_SESSION;
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   PROCEDURE SET_SESSION_CTX_AI(
>     ORIG_SESSION_CTX_AI IN OUT NOCOPY AI_SESSION_CONTEXT) 
>   IS 
>   BEGIN
>     
>     
>     ORIG_SESSION_CTX_AI.INDEX_KEY_LENGTH_CHECK := 
>       TO_NUMBER(DBMS_STATS_INTERNAL.GET_PARAMETER_VAL(
>                  '_bug29504103_runtime_index_key_length_check'));
> 
>     ALTER_SESSION('_bug29504103_runtime_index_key_length_check', 
>                   ORIG_SESSION_CTX_AI.INDEX_KEY_LENGTH_CHECK, 0);
>   END SET_SESSION_CTX_AI;
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
>   PROCEDURE RESET_SESSION_CTX_AI(
>     ORIG_SESSION_CTX_AI AI_SESSION_CONTEXT) 
>   IS
>     CURR_VALUE  NUMBER;   
>   BEGIN
>     
>     
>     CURR_VALUE := TO_NUMBER(DBMS_STATS_INTERNAL.GET_PARAMETER_VAL(
>                   '_bug29504103_runtime_index_key_length_check'));
> 
>     ALTER_SESSION('_bug29504103_runtime_index_key_length_check', CURR_VALUE, 
>                   ORIG_SESSION_CTX_AI.INDEX_KEY_LENGTH_CHECK);    
>   END RESET_SESSION_CTX_AI;
>                             
SYS.DBMS_AWR_REPORT_LAYOUT - PACKAGE BODY (RU):
9692a9693
>                   and snap_id in (:bid, :eid)
SYS.DBMS_CAPTURE_ADM - PACKAGE BODY (RU):
170c170,178
< 
---
>  
>     
>     IF (NOT DBMS_CAPTURE_ADM_INTERNAL.IS_NEW_INSTANCE_ALLOWED AND
>         (DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE OR 
>           UPPER(CAPTURE_CLASS) = 'GOLDENGATE') AND
>         DBMS_LOGREP_UTIL.IS_PDB_ENABLED) THEN
>       DBMS_LOGREP_UTIL.RAISE_SYSTEM_ERROR(-23604);
>     END IF;
>  
489a498,512
>     
>     
>     IF (NOT DBMS_CAPTURE_ADM_INTERNAL.IS_NEW_INSTANCE_ALLOWED AND
>         DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE AND
>         DBMS_LOGREP_UTIL.IS_PDB_ENABLED) THEN
>       DBMS_LOGREP_UTIL.RAISE_SYSTEM_ERROR(-23604);
>     END IF;
> 
>     
>     IF DBMS_LOGREP_UTIL.IS_PDB_ENABLED AND
>        NOT DBMS_LOGREP_UTIL.IS_ROOT_PDB AND
>        SYS_CONTEXT('USERENV','CLOUD_SERVICE') IS NULL THEN
>       DBMS_LOGREP_UTIL.RAISE_SYSTEM_ERROR(
>         DBMS_XSTREAM_ADM_UTL.NON_ROOT_CONTAINER_NUM);
>     END IF;
SYS.DBMS_CAPTURE_ADM_INTERNAL - PACKAGE BODY (RU):
2074a2075,2078
>       
>       
>       
>       EXECUTE IMMEDIATE 'ALTER SYSTEM ARCHIVE LOG CURRENT';
2077,2081d2080
<     
<     
<     
<     EXECUTE IMMEDIATE 'ALTER SYSTEM ARCHIVE LOG CURRENT';
< 
3058a3058,3097
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   FUNCTION IS_NEW_INSTANCE_ALLOWED
>   RETURN BOOLEAN IS
>     PARAM_VALUE            NUMBER  := 65535;
>     CAPTURE_COUNT          NUMBER  := 0; 
>   BEGIN
>     DBMS_LOGREP_UTIL.WRITE_TRACE(
>       'dbms_capture_adm_internal.is_new_instance_allowed()+', 
>        DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
> 
>     SELECT COUNT(*) INTO CAPTURE_COUNT
>       FROM DBA_CAPTURE
>      WHERE UPPER(PURPOSE) LIKE '%GOLDENGATE CAPTURE%';
> 
>     BEGIN
>       SELECT VALUE INTO PARAM_VALUE
> 	FROM V$PARAMETER 
>        WHERE UPPER(NAME) = '_MAX_GG_EXTRACTS';
>     EXCEPTION
>       WHEN NO_DATA_FOUND THEN
>         PARAM_VALUE := 65535;       
>     END;
>     
>     DBMS_LOGREP_UTIL.WRITE_TRACE(
>       'dbms_capture_adm_internal.is_new_instance_allowed()+ ' ||
>       'param_value: ' || PARAM_VALUE || ' capture_count: '|| CAPTURE_COUNT, 
>        DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
> 
>     RETURN (CAPTURE_COUNT < PARAM_VALUE);
>   END IS_NEW_INSTANCE_ALLOWED;
SYS.DBMS_CAPTURE_ADM_IVK - PACKAGE BODY (RU):
67,69c67,70
<         IF (NOT DBMS_LOGREP_UTIL.IS_ROOT_PDB) THEN
<             DBMS_LOGREP_UTIL.RAISE_SYSTEM_ERROR(
<               DBMS_XSTREAM_ADM_UTL.NON_ROOT_CONTAINER_NUM);
---
>         IF (NOT DBMS_LOGREP_UTIL.IS_ROOT_PDB AND
>             NOT DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE) THEN
>           DBMS_LOGREP_UTIL.RAISE_SYSTEM_ERROR(
>             DBMS_XSTREAM_ADM_UTL.NON_ROOT_CONTAINER_NUM);
SYS.DBMS_CAPTURE_PROCESS - PACKAGE BODY (RU):
602a603,608
>     PDBUID           NUMBER;
>     PDBCAPTURE       BOOLEAN;
>     SEQB             NUMBER;
>     SEQE             NUMBER;
>     DUPLICATE_LOG    EXCEPTION;
>     PRAGMA           EXCEPTION_INIT(DUPLICATE_LOG, -1289);
625a632,635
>     PDBUID := 0;
>     PDBCAPTURE := FALSE;
>     SEQB := 0;
>     SEQE := 0;
640,649c650,679
<         SELECT COUNT(*)
<         INTO   FLAG
<         FROM   V$ARCHIVED_LOG 
<         WHERE  FIRST_CHANGE#     = FIRST_SCN
<         AND    RESETLOGS_CHANGE# = RSTLG_CNT
<         AND    RESETLOGS_TIME    = RSTLG_TIME
<         AND    STANDBY_DEST      = 'NO'
<         AND    DICTIONARY_BEGIN  = 'YES'
<         AND    NAME IS NOT NULL
<         AND    STATUS = 'A';
---
>         IF (DBMS_LOGREP_UTIL.IS_PDB_ENABLED AND
>             NOT DBMS_LOGREP_UTIL.IS_ROOT_PDB) THEN
>           
>           SELECT CON_UID INTO PDBUID FROM V$CONTAINERS
>             WHERE CON_ID = SYS_CONTEXT('USERENV', 'CON_ID');
>           SELECT THREAD_ID, SEQUENCE#_BEGIN, SEQUENCE#_END
>             INTO THREAD,SEQB, SEQE
>             FROM SYS.LOGMNR_BUILDLOG
>             WHERE
>             CONTAINER_UID = PDBUID AND
>             RESETLOGS_CHANGE# = RSTLG_CNT AND
>             MARKED_LOG_FILE_LOW_SCN = FIRST_SCN AND
>             CURRENT_BUILD_STATE = 0 AND
>             COMPLETION_STATUS = 0;
>           IF (SEQB <> 0 AND SEQE <> 0) THEN
>             PDBCAPTURE := TRUE;
>             FLAG := 1;
>           END IF;
>         ELSE
>           SELECT COUNT(*)
>           INTO   FLAG
>           FROM   V$ARCHIVED_LOG 
>           WHERE  FIRST_CHANGE#     = FIRST_SCN
>           AND    RESETLOGS_CHANGE# = RSTLG_CNT
>           AND    RESETLOGS_TIME    = RSTLG_TIME
>           AND    STANDBY_DEST      = 'NO'
>           AND    DICTIONARY_BEGIN  = 'YES'
>           AND    NAME IS NOT NULL
>           AND    STATUS = 'A';
>         END IF;
681,724c711,723
<       DBMS_LOGREP_UTIL.WRITE_TRACE('querying v$archived_log for redo files',
<                                    DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
< 
<       
<       SELECT THREAD#, SEQUENCE#, DICTIONARY_BEGIN, DICTIONARY_END, 
<              NAME, NEXT_CHANGE#, DEST_ID
<       INTO   THREAD, SEQ, DICT_B, DICT_E, FILE_NAME, END_SCN, DEST_ID
<       FROM   V$ARCHIVED_LOG
<       WHERE  FIRST_CHANGE#     = FIRST_SCN
<       AND    RESETLOGS_CHANGE# = RSTLG_CNT
<       AND    RESETLOGS_TIME    = RSTLG_TIME
<       AND    STANDBY_DEST      = 'NO'
<       AND    DICTIONARY_BEGIN  = 'YES'
<       AND    NAME IS NOT NULL
<       AND    STATUS            = 'A'
<       AND    ROWNUM            = 1
<       AND    DEST_ID = (SELECT MAX(DEST_ID) FROM V$ARCHIVED_LOG 
< 	                WHERE  FIRST_CHANGE#     = FIRST_SCN
< 		        AND    RESETLOGS_CHANGE# = RSTLG_CNT
< 		        AND    RESETLOGS_TIME    = RSTLG_TIME
< 		        AND    STANDBY_DEST      = 'NO'
<                         AND    DICTIONARY_BEGIN  = 'YES'
<                         AND    NAME IS NOT NULL
< 	                AND    STATUS            = 'A');
< 
<       IF (DICT_E LIKE '%NO%') THEN
<         DBMS_LOGREP_UTIL.WRITE_TRACE(
<           'wait_for_dictionary_dump, didnt get end yet',
<                 DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
< 
<         
<         
<         WHILE (DICT_E LIKE '%NO%') LOOP
<           FLAG := 0;
<           SEQ  := SEQ + 1; 
< 
<           WHILE (FLAG = 0) LOOP
<             BEGIN 
<               FLAG := 1;
<               
<               SELECT DICTIONARY_BEGIN, DICTIONARY_END, NAME, NEXT_CHANGE# 
<               INTO   DICT_B, DICT_E, FILE_NAME, END_SCN
<               FROM   V$ARCHIVED_LOG 
<               WHERE  FIRST_CHANGE#    >= FIRST_SCN
---
>       IF (PDBCAPTURE = TRUE) THEN
>         DBMS_LOGREP_UTIL.WRITE_TRACE('per-PDB capture ' ||
>                                      'querying v$archived_log for redo files',
>                                      DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
>         SEQ := SEQB;
>         WHILE (SEQ <= SEQE) LOOP
>         BEGIN
>           SELECT NAME INTO FILE_NAME
>           FROM (
>             SELECT NAME
>             FROM V$ARCHIVED_LOG
>             WHERE    RESETLOGS_CHANGE# =  RSTLG_CNT
>               AND    RESETLOGS_TIME    =  RSTLG_TIME
727,728d725
<               AND    RESETLOGS_CHANGE# = RSTLG_CNT
<               AND    RESETLOGS_TIME    = RSTLG_TIME
730d726
<               AND    NAME IS NOT NULL
732,747c728,755
<               AND    ROWNUM            = 1;
<             EXCEPTION WHEN NO_DATA_FOUND THEN
<               DBMS_LOGREP_UTIL.WRITE_TRACE(
<                 'LOOP: waiting for the file with sequence#:' || SEQ ||
<                 ' thread#:' || THREAD || ' to be added',
<                 DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
< 
<               FLAG := 0;
<               MISSING_LOG_INFO := 'THREAD# ' || THREAD ||
<                                   ' SEQUENCE# ' || SEQ;
<               
<               RETURN;
<             END;
<           END LOOP; 
<         END LOOP; 
<       END IF; 
---
>               AND    NAME IS NOT NULL
>             UNION
>             SELECT MEMBER
>             FROM V$LOGFILE
>             WHERE IS_RECOVERY_DEST_FILE = 'NO'
>               AND TYPE = 'ONLINE'
>               AND STATUS IS NULL
>               AND GROUP# =
>                  (SELECT MAX(GROUP#)
>                   FROM V$LOG
>                   WHERE THREAD# = THREAD
>                     AND SEQUENCE# = SEQ
>                     AND ARCHIVED = 'NO')
>             )
>           WHERE ROWNUM = 1;
> 
>           SEQ  := SEQ + 1;
>           DBMS_CAPTURE_ADM_INTERNAL.ADD_LOGFILE(CANON_CAPTURE_NAME,
>                                                 FILE_NAME,
>                                                 TRUE);
>         EXCEPTION
>         WHEN DUPLICATE_LOG THEN
>           NULL;
>         WHEN NO_DATA_FOUND THEN
>           DBMS_LOGREP_UTIL.WRITE_TRACE(
>             'LOOP: waiting for the file with sequence#:' || SEQ ||
>             ' thread#:' || THREAD || ' to be added',
>             DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
749,755c757,831
<       
<       FOR REC IN ALL_DICT_LOGS(FIRST_SCN, END_SCN, DEST_ID, RSTLG_CNT, RSTLG_TIME) LOOP
<         DBMS_LOGREP_UTIL.WRITE_TRACE(
<           REC.LOG_FILE_NAME || ' is about to be added to ' ||
<            CANON_CAPTURE_NAME ||
<           ' streams capture process.',
<           DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
---
>           FLAG := 0;
>           MISSING_LOG_INFO := 'THREAD# ' || THREAD ||
>                               ' SEQUENCE# ' || SEQ;
>           RETURN;
>         END;
>         END LOOP;
>         
>       ELSE
>         DBMS_LOGREP_UTIL.WRITE_TRACE('querying v$archived_log for redo files',
>                                      DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
> 
>         
>         SELECT THREAD#, SEQUENCE#, DICTIONARY_BEGIN, DICTIONARY_END, 
>                NAME, NEXT_CHANGE#, DEST_ID
>         INTO   THREAD, SEQ, DICT_B, DICT_E, FILE_NAME, END_SCN, DEST_ID
>         FROM   V$ARCHIVED_LOG
>         WHERE  FIRST_CHANGE#     = FIRST_SCN
>         AND    RESETLOGS_CHANGE# = RSTLG_CNT
>         AND    RESETLOGS_TIME    = RSTLG_TIME
>         AND    STANDBY_DEST      = 'NO'
>         AND    DICTIONARY_BEGIN  = 'YES'
>         AND    NAME IS NOT NULL
>         AND    STATUS            = 'A'
>         AND    ROWNUM            = 1
>         AND    DEST_ID = (SELECT MAX(DEST_ID) FROM V$ARCHIVED_LOG 
>                           WHERE  FIRST_CHANGE#     = FIRST_SCN
>                           AND    RESETLOGS_CHANGE# = RSTLG_CNT
>                           AND    RESETLOGS_TIME    = RSTLG_TIME
>                           AND    STANDBY_DEST      = 'NO'
>                           AND    DICTIONARY_BEGIN  = 'YES'
>                           AND    NAME IS NOT NULL
>                           AND    STATUS            = 'A');
> 
>         IF (DICT_E LIKE '%NO%') THEN
>           DBMS_LOGREP_UTIL.WRITE_TRACE(
>             'wait_for_dictionary_dump, didnt get end yet',
>                   DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
> 
>           
>           
>           WHILE (DICT_E LIKE '%NO%') LOOP
>             FLAG := 0;
>             SEQ  := SEQ + 1; 
> 
>             WHILE (FLAG = 0) LOOP
>               BEGIN 
>                 FLAG := 1;
>                 
>                 SELECT DICTIONARY_BEGIN, DICTIONARY_END, NAME, NEXT_CHANGE# 
>                 INTO   DICT_B, DICT_E, FILE_NAME, END_SCN
>                 FROM   V$ARCHIVED_LOG 
>                 WHERE  FIRST_CHANGE#    >= FIRST_SCN
>                 AND    THREAD#           = THREAD
>                 AND    SEQUENCE#         = SEQ
>                 AND    RESETLOGS_CHANGE# = RSTLG_CNT
>                 AND    RESETLOGS_TIME    = RSTLG_TIME
>                 AND    STANDBY_DEST      = 'NO'
>                 AND    NAME IS NOT NULL
>                 AND    STATUS            = 'A'
>                 AND    ROWNUM            = 1;
>               EXCEPTION WHEN NO_DATA_FOUND THEN
>                 DBMS_LOGREP_UTIL.WRITE_TRACE(
>                   'LOOP: waiting for the file with sequence#:' || SEQ ||
>                   ' thread#:' || THREAD || ' to be added',
>                   DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
> 
>                 FLAG := 0;
>                 MISSING_LOG_INFO := 'THREAD# ' || THREAD ||
>                                     ' SEQUENCE# ' || SEQ;
>                 
>                 RETURN;
>               END;
>             END LOOP; 
>           END LOOP; 
>         END IF; 
758,765c834,850
<         DBMS_CAPTURE_ADM_INTERNAL.ADD_LOGFILE(CANON_CAPTURE_NAME,
<                                               REC.LOG_FILE_NAME,
<                                               TRUE);
<         DBMS_LOGREP_UTIL.WRITE_TRACE(
<           REC.LOG_FILE_NAME || ' was added to ' || CANON_CAPTURE_NAME ||
<           ' streams capture process.',
<           DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
<       END LOOP;   
---
>         FOR REC IN ALL_DICT_LOGS(FIRST_SCN, END_SCN, DEST_ID, RSTLG_CNT, RSTLG_TIME) LOOP
>           DBMS_LOGREP_UTIL.WRITE_TRACE(
>             REC.LOG_FILE_NAME || ' is about to be added to ' ||
>              CANON_CAPTURE_NAME ||
>             ' streams capture process.',
>             DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
> 
>           
>           DBMS_CAPTURE_ADM_INTERNAL.ADD_LOGFILE(CANON_CAPTURE_NAME,
>                                                 REC.LOG_FILE_NAME,
>                                                 TRUE);
>           DBMS_LOGREP_UTIL.WRITE_TRACE(
>             REC.LOG_FILE_NAME || ' was added to ' || CANON_CAPTURE_NAME ||
>             ' streams capture process.',
>             DBMS_LOGREP_UTIL.TRACE_FLAG_PUBLISH);
>         END LOOP;   
>       END IF;
SYS.DBMS_DBFS_CONTENT - PACKAGE BODY (RU):
370,372c370,374
<             ' store_name= ', STORE_NAME,
<             ' path= ', PATH,
<             ' suid= ' , SUID);
---
>             ' store_name=', STORE_NAME,
>             ' path=', PATH,
>             ' suid=', SUID,
>             ' schema_name=', SCHEMA_NAME,
>             ' use_schema=', CASE WHEN USE_SCHEMA THEN 'TRUE' ELSE 'FALSE' END);
731c733
<         TRACE(3, 'pl/sql props: count=' || PROPS.COUNT);
---
>         TRACE(3, 'showProps: props.count=' || PROPS.COUNT);
940a943,948
>         TRACE(3,'createGetattrView:' ||
>              ' store_name= ' || STORE_NAME || 
>              ' store_mount= ' || STORE_MOUNT || 
>                  ' pkg= '         || PKG         ||
>                  ' view_name= '   || VIEW_NAME);
> 
959a968
>         TRACE(3, 'createGetattrView:' || ' view_name= ' || VIEW_NAME);
973a983,990
>         TRACE(3, 'recreateGetattrView:' ||
>                  ' store_name = ' || STORE_NAME  ||
>                  ' store_mount= ' || STORE_MOUNT ||
>                  ' pkg= '         || PKG         ||
>                  ' view_name= '   || VIEW_NAME   ||
>                  ' store_owner= ' || STORE_OWNER
>              );
> 
1007,1010c1024,1031
<         TRACE(3, 'dropGetattrView: store_name = ' || STORE_NAME ||
<               ' store_mount= ' || STORE_MOUNT || 
<               ' pkg= ' || PKG ||
<               ' view_name= '|| VIEW_NAME);
---
>         TRACE(3, 'dropGetattrView:'||
>                  ' store_name = '  || STORE_NAME  ||
>                  ' store_mount = ' || STORE_MOUNT || 
>                  ' pkg = '         || PKG         ||
>                  ' view_name= '    || VIEW_NAME   || 
>                  ' store_owner= '  || STORE_OWNER
>              );
> 
1869,1872c1890,1895
<         TRACE(3, 'unregisterStore: store_name = ' || STORE_NAME ||
<                ' store_owner= ' || STORE_OWNER ||
<                ' unregisterStore.store_name= ' ||
<                UNREGISTERSTORE.STORE_NAME);
---
>         TRACE(1, 'unregisterStore: store_name = ' || STORE_NAME
>               || 'store_owner = '                 || STORE_OWNER 
>               || 'ignore_unknown = '              
>               || (CASE IGNORE_UNKNOWN WHEN TRUE THEN 'true' ELSE 'false' END)
>               || 'force = '       
>               || (CASE FORCE WHEN TRUE THEN 'true' ELSE 'false' END));
1880a1904
>                 TRACE(3, 'unregisterStore: rws.store_mount' || RWS.STORE_MOUNT);
1984a2009,2019
>         TRACE(3, 'mountStore: store_name = ' || STORE_NAME
>               || 'store_mount = '            || STORE_MOUNT
>               || 'singleton = '              
>               || (CASE SINGLETON WHEN TRUE THEN 'true' ELSE 'false' END)
>               || 'principal = '              || PRINCIPAL
>               || 'owner = '                  || OWNER
>               || 'acl = '                    || ACL 
>               || 'asof = '                   || ASOF 
>               || 'read_only = '             
>               || (CASE READ_ONLY WHEN TRUE THEN 'true' ELSE 'false' END));
> 
1995a2031
>         TRACE(3, 'mountStore: view_name = ' || VIEW_NAME);
2077a2114,2118
>         TRACE(3, 'remountStore: store_name = ' || STORE_NAME
>               || 'store_mount = '              || STORE_MOUNT 
>               || 'ignore_unknown = ' 
>               || (CASE IGNORE_UNKNOWN WHEN TRUE THEN 'true' ELSE 'false' END));
> 
2118a2160
>                 TRACE(3, 'remountStore: nmatch' || NMATCH);
2243a2286
>         ERROR_CODE NUMBER;
2244a2288,2293
>        TRACE(1, 'unmountStore:' ||
>             ' store_name=' || STORE_NAME  ||
>             ' store_mount='  || STORE_MOUNT  ||
>             ' ignore_unknown=' || 
>             CASE WHEN IGNORE_UNKNOWN THEN 'TRUE' ELSE 'FALSE' END);
> 
2286a2336,2339
>                 TRACE(3, 'nmatch=' || NMATCH ||
>                      'rws.store_mount=' || RWS.STORE_MOUNT ||
>                      'rws.store_name=' || RWS.STORE_NAME);
> 
2313a2367,2368
>                 ERROR_CODE := SQLCODE;
>                 TRACE(1, 'unmountStore error: '|| ERROR_CODE);
2406a2462,2464
>         TRACE(1, 'registerClient: ' ||
>              ' client_info=' || CLIENT_INFO ||
>              ' client_data=' || CLIENT_DATA);
3033a3092
>         ERROR_CODE  NUMBER;
3036,3037d3094
<         TRACE(3, 'spaceUsage:path= '|| PATH ||
<               ' store_name = ' || STORE_NAME);
3039,3043c3096,3100
<         TRACE(3, 'spaceUsage:path= '|| PATH ||
<               ' store_name = ' || STORE_NAME ||
<               ' sqpath.store_name  = '|| SQPATH.STORE_NAME  ||
<               ' sqpath.store_mount= ' || SQPATH.STORE_MOUNT ||
<               ' sqpath.store_path= ' || SQPATH.STORE_PATH);
---
>         TRACE(1, 'spaceUsage: path='|| PATH ||
>               ' store_name=' || STORE_NAME ||
>               ' sqpath.store_name='|| SQPATH.STORE_NAME  ||
>               ' sqpath.store_mount=' || SQPATH.STORE_MOUNT ||
>               ' sqpath.store_path=' || SQPATH.STORE_PATH);
3065a3123
>                 TRACE(3, 'rws_p.provider_pkg=' || RWS_P.PROVIDER_PKG);
3079a3138
>                     TRACE(3, 'rws_s.store_name=' || RWS_S.STORE_NAME);
3101a3161,3162
>                 ERROR_CODE := SQLCODE;
>                 TRACE(1, 'spaceUsage error: '|| ERROR_CODE);
SYS.DBMS_DBFS_CONTENT_ADMIN - PACKAGE BODY (RU):
536a537
>             TRACE(3, 'registerStore_sql: invalid store name');
565a567,568
>             TRACE(3, 'registerStore_sql: updated the dbfs$_store table '
>                   || 'and updated the context with given input parameters');
657a661
>             
722a727
>               || ' force'           || B2V(FORCE)
731c736
<                         PRAGMA      EXCEPTION_INIT(INVALID_SCHEMA,
---
>                     PRAGMA      EXCEPTION_INIT(INVALID_SCHEMA,
735c740
<             
---
>  
851a857,858
>         TRACE(3, 'mountStore_sql:' || 'mount=' || MOUNT);
> 
859a867,871
>         TRACE(3, 'mountStore_sql:' 
>               || 'nmounts =' || NMOUNTS
>               || 'nsingle =' || NSINGLE
>              );
> 
906a919,920
>             TRACE(3, 'mountStore_sql: updated the dbfs$_mounts table '
>                   || 'and updated the context with given input parameters');
984c998
<               || ' owner='       || SOWNER
---
>               || ' owner='       || OWNER
990a1005
>               || ' sowner='      || SOWNER
SYS.DBMS_DBFS_SFS - PACKAGE BODY (RU):
5670a5671,5682
>         DBMS_DBFS_CONTENT.TRACE(2, 'store =' || STORE_NAME);
>         DBMS_DBFS_CONTENT.TRACE(2, 'blksize =' || BLKSIZE);
>         DBMS_DBFS_CONTENT.TRACE(2,
>             'tbytes=' || TBYTES || ' ' ||
>             'ubytes=' || UBYTES || ' ' ||
>             'fbytes=' || FBYTES);
>         DBMS_DBFS_CONTENT.TRACE(2,
>             'nfile=' || NFILE || ' ' ||
>             'ndir='  || NDIR  || ' ' ||
>             'nlink=' || NLINK || ' ' ||
>             'nref='  || NREF);
>         DBMS_DBFS_CONTENT.TRACE(2, 'useEstimate =' || USEESTIMATE);
5750a5763,5768
> 
>         DBMS_DBFS_CONTENT.TRACE(2,
>             'nfile=' || NFILE || ' ' ||
>             'ndir='  || NDIR  || ' ' ||
>             'nlink=' || NLINK || ' ' ||
>             'nref='  || NREF);
SYS.DBMS_DST - PACKAGE BODY (RU):
512c512
<      CUR                        IN  INTEGER,
---
>      QUOTED_SCHEMAS             IN  VARCHAR2,
523d522
<     QUOTED_SCHEMAS       VARCHAR2(32767) := NULL;
531c530,555
<   BEGIN   
---
>     CUR                  INTEGER;
>     TYPE DBMS_ID_ARRAY IS TABLE OF DBMS_ID INDEX BY PLS_INTEGER;
>     OWNER_NAME_LIST      DBMS_ID_ARRAY;
>     TABLE_NAME_LIST      DBMS_ID_ARRAY;
>     LOG_NAME_LIST        DBMS_ID_ARRAY;
>     ROW_COUNT            INTEGER := 0;
>     I                    INTEGER := 1;
>   BEGIN
>     
>     CUR := DBMS_SQL.OPEN_CURSOR;
> 
>     
>     DBMS_SYS_SQL.PARSE_AS_USER(CUR, 
>       'SELECT u.name owner, o.name table_name, 
>               (SELECT log FROM sys.mlog$ 
>                WHERE mowner = u.name AND 
>                      master = o.name) log_name
>        FROM sys.tab$ t, sys.obj$ o, sys.user$ u
>        WHERE t.obj# = o.obj# AND
>              o.owner# = u.user# AND
>              BITAND(t.property, 137438953472) = 137438953472 AND
>              SUBSTR(UPPER(o.name), 1, 6) != ''MLOG$_''' ||
>        CASE WHEN QUOTED_SCHEMAS IS NULL THEN ''
>        ELSE ' AND u.name IN (' || QUOTED_SCHEMAS || ')' END,
>       DBMS_SQL.NATIVE, 0);
> 
541,542c565
<       
<       TABLE_LIST := NULL;
---
>       ROW_COUNT := ROW_COUNT + 1;
547a571,586
>       OWNER_NAME_LIST(ROW_COUNT) := OWNER_NAME;
>       TABLE_NAME_LIST(ROW_COUNT) := TABLE_NAME;
>       LOG_NAME_LIST(ROW_COUNT) := LOG_NAME;
> 
>     END LOOP;
> 
>     DBMS_SQL.CLOSE_CURSOR(CUR);
>  
>     WHILE I <= ROW_COUNT LOOP
>       OWNER_NAME := OWNER_NAME_LIST(I);
>       TABLE_NAME := TABLE_NAME_LIST(I);
>       LOG_NAME := LOG_NAME_LIST(I);
> 
>       
>       TABLE_LIST := NULL;
> 
564a604
>       I := I + 1;
880d919
<     CUR                  INTEGER;
967,969d1005
<     
<     CUR := DBMS_SQL.OPEN_CURSOR;
< 
971,990c1007,1008
<       
<       
<       DBMS_SYS_SQL.PARSE_AS_USER(CUR,
<         'SELECT v.owner, v.table_name, v.log_name
<          FROM
<            (SELECT u.name owner, o.name table_name, 
<                   (SELECT log FROM sys.mlog$ 
<                    WHERE mowner = u.name AND 
<                          master = o.name) log_name
<             FROM sys.tab$ t, sys.obj$ o, sys.user$ u
<             WHERE t.obj# = o.obj# AND
<                  o.owner# = u.user# AND
<                  BITAND(t.property, 137438953472) = 137438953472 AND
<                  SUBSTR(UPPER(o.name), 1, 6) != ''MLOG$_'' AND
<                  u.name IN (' || QUOTED_SCHEMAS || ')' ||
<            ') v, sys.snap$ s ' ||
<          'WHERE s.sowner(+) = v.owner AND s.vname(+) = v.table_name ' ||
<          'ORDER BY s.vname NULLS FIRST', DBMS_SQL.NATIVE, 0);
< 
<       DBMS_DST.UPGRADE_TABLE_INTERNAL(CUR, NUM_OF_FAILURES, UPGRADE_DATA,
---
>       DBMS_DST.UPGRADE_TABLE_INTERNAL(QUOTED_SCHEMAS,
>                              NUM_OF_FAILURES, UPGRADE_DATA,
995d1012
<       DBMS_SQL.CLOSE_CURSOR(CUR);
998,1006c1015,1016
<       WHEN NO_DATA_FOUND THEN
<         IF DBMS_SQL.IS_OPEN(CUR) THEN
<           DBMS_SQL.CLOSE_CURSOR(CUR);
<         END IF;
<       WHEN OTHERS THEN
<         IF DBMS_SQL.IS_OPEN(CUR) THEN
<           DBMS_SQL.CLOSE_CURSOR(CUR);
<         END IF;
<         RAISE;
---
>       WHEN NO_DATA_FOUND THEN NULL;
>       WHEN OTHERS THEN RAISE;
1052d1061
<     CUR                  INTEGER;
1113,1115d1121
<     
<     CUR := DBMS_SQL.OPEN_CURSOR;
< 
1117,1130c1123
<       
<       DBMS_SYS_SQL.PARSE_AS_USER(CUR,
<           'SELECT u.name owner, o.name table_name, 
<                   (SELECT log FROM sys.mlog$ 
<                    WHERE mowner = u.name AND 
<                          master = o.name) log_name
<            FROM sys.tab$ t, sys.obj$ o, sys.user$ u
<            WHERE t.obj# = o.obj# AND
<                  o.owner# = u.user# AND
<                  BITAND(t.property, 137438953472) = 137438953472 AND
<                  SUBSTR(UPPER(o.name), 1, 6) != ''MLOG$_''',
<            DBMS_SQL.NATIVE, 0);
< 
<       DBMS_DST.UPGRADE_TABLE_INTERNAL(CUR, NUM_OF_FAILURES, UPGRADE_DATA,
---
>       DBMS_DST.UPGRADE_TABLE_INTERNAL(NULL, NUM_OF_FAILURES,UPGRADE_DATA,
1135d1127
<       DBMS_SQL.CLOSE_CURSOR(CUR);
1138,1146c1130,1131
<      WHEN NO_DATA_FOUND THEN
<        IF DBMS_SQL.IS_OPEN(CUR) THEN
<          DBMS_SQL.CLOSE_CURSOR(CUR);
<        END IF;
<      WHEN OTHERS THEN
<        IF DBMS_SQL.IS_OPEN(CUR) THEN
<          DBMS_SQL.CLOSE_CURSOR(CUR);
<        END IF;
<        RAISE;
---
>      WHEN NO_DATA_FOUND THEN NULL;
>      WHEN OTHERS THEN RAISE;
SYS.DBMS_EXTENDED_TTS_CHECKS - PACKAGE BODY (RU):
221d220
< 
275a275,276
>   IOTTYPE       KUPCC.T_IOTTYPE;
>   INDEXNAME     KUPCC.T_ID;
286c287,334
<   IF OBJTYPE = 'TABLE' THEN
---
>   
>   SELECT DECODE(BITAND(T.PROPERTY, 64), 64, 'IOT',
>          DECODE(BITAND(T.PROPERTY, 512), 512, 'IOT_OVERFLOW',
>          DECODE(BITAND(T.FLAGS, 536870912), 536870912, 'IOT_MAPPING', NULL)))
>   INTO   IOTTYPE
>   FROM   SYS.USER$ U, SYS.TS$ TS, SYS.TAB$ T, SYS.OBJ$ O
>   WHERE  O.OWNER# = U.USER# AND O.OBJ# = T.OBJ# AND T.TS# = TS.TS# AND
>          O.NAME = OBJNAME AND U.NAME = SCHEMANAME;
> 
>   IF IOTTYPE IS NOT NULL THEN
>     SELECT TABLESPACE_NAME, INDEX_NAME
>     INTO   TSNAME, INDEXNAME
>     FROM   SYS.DBA_INDEXES
>     WHERE  TABLE_NAME = OBJNAME AND TABLE_OWNER = SCHEMANAME AND
>            INDEX_TYPE = 'IOT - TOP';
> 
>     
>     
>     
>     IF TSNAME IS NOT NULL THEN
>       RETURN TSNAME;
>     ELSIF OBJTYPE = 'TABLE' THEN
>       
>       
>       
>       
>       
>       RETURN GET_TABLESPACE_INDPART(OBJNUM, SCHEMANAME, INDEXNAME, SUBNAME,
>                                     'INDEX');
>     ELSIF OBJTYPE = 'TABLE PARTITION' THEN
>       
>       
>       
>       
>       
>       
>       RETURN GET_TABLESPACE_INDPART(OBJNUM, SCHEMANAME, INDEXNAME, SUBNAME,
>                                     'INDEX PARTITION');
>     ELSE  DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR(DBMS_PLUGTS.INTERNAL_ERROR_NUM,
>                                             'dbms_extended_tts_checks3',
>                                             OBJNUM);
>     END IF;
> 
>   
>   
>   
>   
>   ELSIF OBJTYPE = 'TABLE' THEN
975,1057d1022
< 
< 
< 
< --++
< FUNCTION GET_XMLINDEX_SECOBJ(
<   OBJNUM        IN NUMBER)
<   RETURN OBJREC_TAB_T IS
< 
<   SECOBJ        OBJREC_T;
<   GSECOBJ_LIST  OBJREC_TAB_T;
<   GNUMSECOBJ    BINARY_INTEGER := 0;
< 
<   CURSOR CSECOBJS(OBJNUM NUMBER) IS
<     
<         SELECT /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
<                OB2.SUBNAME, US2.NAME, 'TABLE'
<         FROM   SYS.TTS_OBJ_VIEW OB1, SYS.USER$ US1, SYS.TTS_OBJ_VIEW OB2,
<                SYS.USER$ US2, SYS.SECOBJ$ SEC
<         WHERE  OB1.OBJ# = OBJNUM AND OB1.OWNER# = US1.USER# AND
<                SEC.OBJ# = OBJNUM AND OB2.OBJ# = SEC.SECOBJ# AND
<                OB2.OWNER# = US2.USER# AND OB2.TYPE# =2
<     UNION ALL
<     
<         SELECT /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
<                OB2.SUBNAME, US2.NAME, 'TABLE PARTITION'
<         FROM   SYS.TTS_OBJ_VIEW OB1, SYS.USER$ US1, 
<                SYS.TTS_OBJ_VIEW OB2, SYS.USER$ US2, SYS.SECOBJ$ SEC
<         WHERE  OB1.OBJ# = OBJNUM AND OB1.OWNER# = US1.USER# AND 
<                SEC.OBJ# = OBJNUM AND OB2.NAME = 
<                                      (SELECT  /*+ all_rows */ OB3.NAME
<                                       FROM OBJ$ OB3
<                                       WHERE  OB3.OBJ# = SEC.SECOBJ# AND
<                                              OB3.TYPE# = 2) AND 
<                OB2.OWNER# = US2.USER#  AND OB2.TYPE# = 19
<     UNION ALL
<     
<         SELECT  /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
<                OB2.SUBNAME, US2.NAME, 'INDEX'
<         FROM   SYS.TTS_OBJ_VIEW OB1, SYS.USER$ US1, SYS.TTS_OBJ_VIEW OB2,
<                SYS.USER$ US2, SYS.SECOBJ$ SEC, SYS.IND$ I
<         WHERE  OB1.OBJ# = OBJNUM AND OB1.OWNER# = US1.USER# AND
<                SEC.OBJ# = OBJNUM AND OB2.OBJ# = I.OBJ# AND
<                I.BO# = SEC.SECOBJ# AND OB2.OWNER# = US2.USER# AND OB2.TYPE# = 1
<     UNION ALL
<     
<         SELECT /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
<                OB2.SUBNAME, US2.NAME, 'INDEX PARTITION'
<         FROM   SYS.TTS_OBJ_VIEW OB1, SYS.USER$ US1, SYS.TTS_OBJ_VIEW OB2,
<                SYS.USER$ US2, SYS.SECOBJ$ SEC, SYS.INDPART$ IP, SYS.IND$ I
<         WHERE  OB1.OBJ# = OBJNUM AND OB1.OWNER# = US1.USER# AND
<                SEC.OBJ# = OBJNUM AND OB2.OBJ# = IP.OBJ# AND 
<                IP.BO# = I.OBJ# AND I.BO# = SEC.SECOBJ# AND 
<                OB2.OWNER# = US2.USER# AND OB2.TYPE# = 20;
< BEGIN
< 
<   DBMS_PLUGTS.SENDTRACEMSG('In get_xmlindex_secobj');
<   OPEN CSECOBJS(OBJNUM);
<   LOOP
<     FETCH CSECOBJS
<     INTO  SECOBJ;
<     EXIT WHEN CSECOBJS%NOTFOUND;
< 
<     
<     
<     
<     GNUMSECOBJ := GNUMSECOBJ + 1;
<     GSECOBJ_LIST(GNUMSECOBJ) := SECOBJ;
<   END LOOP;
<   CLOSE CSECOBJS;
< 
<   RETURN GSECOBJ_LIST;
< END GET_XMLINDEX_SECOBJ;
< 
< --++
< 
< 
< 
< 
< 
< 
< 
< 
< 
1075d1039
<   IS_XMLIDX     NUMBER;
1126,1144c1090,1093
<     BEGIN
<       IS_XMLIDX := 0;
<       EXECUTE IMMEDIATE 
<         'SELECT 1 FROM xdb.xdb$dxptab WHERE idxobj# = :1 AND ROWNUM = 1'
<         INTO    IS_XMLIDX
<         USING   OBJNUM;
<     EXCEPTION
<       
<       WHEN OTHERS THEN
<         IF SQLCODE = -942 THEN
<           NULL;
<         END IF;
<     END;
< 
<     IF IS_XMLIDX = 0 THEN
<       OBJLIST := GET_DOMAIN_INDEX_SECOBJ(OBJNUM);
<     ELSE
<       OBJLIST := GET_XMLINDEX_SECOBJ(OBJNUM);
<     END IF;
---
>     
>     
>     
>     OBJLIST := GET_DOMAIN_INDEX_SECOBJ(OBJNUM);
1164c1113,1115
<       IF (LIST_IN = 0 OR
---
>       
>       
>       IF (LIST_IN = 0 OR 
1166c1117
<           ((IS_XMLIDX = 1) AND (TABLE_IN = 1) AND (LIST_IN = 2))) THEN
---
>           (LIST_IN = 2 AND TABLE_IN = 1)) THEN
1487c1438
<         (MTABLE_IN > 0AND TABLE_IN = 0 AND FULL_CHECK = TRUE)) THEN
---
>         (MTABLE_IN > 0 AND TABLE_IN = 0 AND FULL_CHECK = TRUE)) THEN
1643c1594
< 
---
>   
1711a1663,1665
> 
> 
> 
1721,1723c1675,1678
<   CURSOR        CSECOBJS IS
<         SELECT US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME, OB2.SUBNAME, US2.NAME,
<                DECODE(OB2.TYPE#, 2, 'TABLE' )
---
>   CURSOR CSECOBJS(OBJNUM NUMBER) IS
>     
>         SELECT /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
>                OB2.SUBNAME, US2.NAME, 'TABLE'
1728,1729c1683,1715
<                OB2.OWNER# = US2.USER# AND OB2.TYPE# = 2;
< 
---
>                OB2.OWNER# = US2.USER# AND OB2.TYPE# =2
>     UNION ALL
>     
>         SELECT /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
>                OB2.SUBNAME, US2.NAME, 'TABLE PARTITION'
>         FROM   SYS.TTS_OBJ_VIEW OB1, SYS.USER$ US1, 
>                SYS.TTS_OBJ_VIEW OB2, SYS.USER$ US2, SYS.SECOBJ$ SEC
>         WHERE  OB1.OBJ# = OBJNUM AND OB1.OWNER# = US1.USER# AND 
>                SEC.OBJ# = OBJNUM AND OB2.NAME = 
>                                      (SELECT  /*+ all_rows */ OB3.NAME
>                                       FROM OBJ$ OB3
>                                       WHERE  OB3.OBJ# = SEC.SECOBJ# AND
>                                              OB3.TYPE# = 2) AND 
>                OB2.OWNER# = US2.USER#  AND OB2.TYPE# = 19
>     UNION ALL
>     
>         SELECT  /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
>                OB2.SUBNAME, US2.NAME, 'INDEX'
>         FROM   SYS.TTS_OBJ_VIEW OB1, SYS.USER$ US1, SYS.TTS_OBJ_VIEW OB2,
>                SYS.USER$ US2, SYS.SECOBJ$ SEC, SYS.IND$ I
>         WHERE  OB1.OBJ# = OBJNUM AND OB1.OWNER# = US1.USER# AND
>                SEC.OBJ# = OBJNUM AND OB2.OBJ# = I.OBJ# AND
>                I.BO# = SEC.SECOBJ# AND OB2.OWNER# = US2.USER# AND OB2.TYPE# = 1
>     UNION ALL
>     
>         SELECT /*+ all_rows */ US1.NAME, OB1.NAME, OB2.OBJ#, OB2.NAME,
>                OB2.SUBNAME, US2.NAME, 'INDEX PARTITION'
>         FROM   SYS.TTS_OBJ_VIEW OB1, SYS.USER$ US1, SYS.TTS_OBJ_VIEW OB2,
>                SYS.USER$ US2, SYS.SECOBJ$ SEC, SYS.INDPART$ IP, SYS.IND$ I
>         WHERE  OB1.OBJ# = OBJNUM AND OB1.OWNER# = US1.USER# AND
>                SEC.OBJ# = OBJNUM AND OB2.OBJ# = IP.OBJ# AND 
>                IP.BO# = I.OBJ# AND I.BO# = SEC.SECOBJ# AND 
>                OB2.OWNER# = US2.USER# AND OB2.TYPE# = 20;
1737c1723
<   OPEN CSECOBJS;
---
>   OPEN CSECOBJS(OBJNUM);
SYS.DBMS_IJOB - PACKAGE BODY (RU):
181a182
>     CT_NEXT_DATE        TIMESTAMP WITH TIME ZONE;
195a197,203
>     
>     
>     
>     
>     SELECT CAST(NEXT_DATE AS TIMESTAMP WITH TIME ZONE) AT TIME ZONE
>       (SELECT TO_CHAR(SYSTIMESTAMP,'tzr') FROM SYS.DUAL) 
>     INTO CT_NEXT_DATE FROM SYS.DUAL;
201c209
<         WHAT, NEXT_DATE, INTERVAL, NULL, BROKEN);
---
>         WHAT, CT_NEXT_DATE, INTERVAL, NULL, BROKEN);
SYS.DBMS_LOGMNR_INTERNAL - PACKAGE BODY (RU):
1315a1316
> NAMEOFBUILD             VARCHAR2(384) ; 
1321,1323d1321
< DB_OPENREADWRITE        BOOLEAN := FALSE; 
< TEMPCOUNT               NUMBER;
< CDB                     NUMBER;
1333a1332,1336
> DBOPENREADWRITEG        BOOLEAN := FALSE; 
> ISACDBG                 BOOLEAN; 
> ISROOTBUILDG            BOOLEAN; 
>      
> 
1340c1343
< MAX_BUILDLOG_RECS   CONSTANT INTEGER := 1000;
---
> MAX_BUILDLOG_RECS   CONSTANT INTEGER := 5000;
1477a1481,1714
> 
> 
> 
>   PROCEDURE DOINTBUILDSETGLOBALS(TRACE_ENABLED IN BOOLEAN)
>   IS
>     CUR       NUMBER;
>     IGNORE    NUMBER;
>     CNTCDBYES NUMBER;
>     CNTRDWR   NUMBER;
> 
>     FUNCTION BOOLSTRING(B IN BOOLEAN)
>     RETURN VARCHAR2 IS
>     BEGIN
>       IF B THEN
>         RETURN 'TRUE';
>       ELSE
>         RETURN 'FALSE';
>       END IF;
>     END BOOLSTRING;
> 
>   BEGIN
>      
>      
>      
>      
>      
>      
> 
>     SELECT COUNT(*) INTO CNTCDBYES FROM V$DATABASE WHERE CDB = 'YES';
>     ISACDBG := (CNTCDBYES <> 0);
> 
>     
>     ISROOTBUILDG := (ISACDBG AND
>                     ('CDB$ROOT' = SYS_CONTEXT('USERENV','CON_NAME')));
> 
>     
> 
> 
> 
> 
>    
>     SELECT COUNT(1) INTO CNTRDWR
>     FROM SYS.V$DATABASE
>     WHERE OPEN_MODE = 'READ WRITE';
>     DBOPENREADWRITEG := (0 <> CNTRDWR);
> 
>     IF TRACE_ENABLED THEN
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                          TO_CHAR(SYSDATE, 'Dy Mon DD HH24:MI:SS YYYY'));
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                          'doIntBuildSetGlobals : ' ||
>                          'isAcdbG=' || BOOLSTRING(ISACDBG) ||
>                          ', isRootBuildG=' || BOOLSTRING(ISROOTBUILDG) ||
>                          ', dbOpenReadWriteG=' || BOOLSTRING(DBOPENREADWRITEG));
>     END IF;
> 
>   END DOINTBUILDSETGLOBALS;
> 
> 
>   PROCEDURE DOINTBLDGETFIRSTSEQ#(TRACE_ENABLED       IN  BOOLEAN,
>                                  LOCKDOWNSCN         IN  NUMBER,
>                                  THREADIDLOC         OUT NUMBER,
>                                  SEQUENCENOBEGLOC    OUT NUMBER,
>                                  BUILDDATEBEGLOC     OUT VARCHAR2)
>   IS
>     CUR       NUMBER;
>     IGNORE    NUMBER;
>   BEGIN
>     
> 
> 
>     IF LOCKDOWNSCN IS NULL THEN
>       THREADIDLOC := NULL;
>       SEQUENCENOBEGLOC := NULL;
>       BUILDDATEBEGLOC := NULL;
> 
>     ELSE
>       
>       CUR := DBMS_SQL.OPEN_CURSOR;
>       BEGIN 
>         DBMS_SQL.PARSE (CUR,
>           'select THREAD#, ' ||
>           '       SEQUENCE#, ' ||
>           '       to_char(scn_to_timestamp(:input_scn), ' ||
>           '               ''MM/DD/YYYY HH24:MI:SS'') as TIME_ASOF_SCN ' ||
>           'from (select V.THREAD#, V.SEQUENCE# ' ||
>           '      from SYS.V$LOG V, V$INSTANCE I ' ||
>           '      where V.THREAD# = I.THREAD# and ' ||
>           '            :input_scn between V.FIRST_CHANGE# and V.NEXT_CHANGE# ' ||
>           '    union  ' ||
>           '      select V.THREAD#, V.SEQUENCE# ' ||
>           '      from SYS.V$ARCHIVED_LOG V, V$INSTANCE I ' ||
>           '      where V.THREAD# = I.THREAD# and ' ||
>           '            :input_scn between V.FIRST_CHANGE# and V.NEXT_CHANGE#) ' ||
>           'where rownum = 1',
>           DBMS_SQL.V7);
> 
>         DBMS_SQL.BIND_VARIABLE (CUR, ':input_scn', LOCKDOWNSCN); 
> 
>         DBMS_SQL.DEFINE_COLUMN(CUR, 1, THREADIDLOC); 
>         DBMS_SQL.DEFINE_COLUMN(CUR, 2, SEQUENCENOBEGLOC); 
>         DBMS_SQL.DEFINE_COLUMN(CUR, 3, BUILDDATEBEGLOC, 22);
>         IGNORE := DBMS_SQL.EXECUTE_AND_FETCH(CUR);
>         DBMS_SQL.COLUMN_VALUE(CUR, 1, THREADIDLOC); 
>         DBMS_SQL.COLUMN_VALUE(CUR, 2, SEQUENCENOBEGLOC);
>         DBMS_SQL.COLUMN_VALUE(CUR, 3, BUILDDATEBEGLOC);
>         IGNORE := DBMS_SQL.FETCH_ROWS (CUR);
>         DBMS_SQL.CLOSE_CURSOR (CUR);
> 
>         EXCEPTION
>         WHEN OTHERS THEN
>           IF DUMPDEBUGMSGS THEN
>               DBMS_OUTPUT.PUT_LINE ('doIntBldGetBldLogAttrs ERROR ' ||
>                                      SQLCODE || ' ' || SQLERRM);
>           END IF;
>           DBMS_SQL.CLOSE_CURSOR (CUR);
>           RAISE;
>       END;
> 
>     END IF;
> 
>     IF TRACE_ENABLED THEN
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                         'doIntBldGetFirstSeq# : ' ||
>                         '  threadIdLoc=' || THREADIDLOC ||
>                         ', sequenceNoBegLoc=' || SEQUENCENOBEGLOC ||
>                         ', buildDateBegLoc=' || BUILDDATEBEGLOC);
>     END IF;
> 
>   END DOINTBLDGETFIRSTSEQ#;
> 
> 
>   
>   PROCEDURE DOINTBLDGETBLDLOGATTRS(TRACE_ENABLED       IN  BOOLEAN,
>                                    LOCKDOWNSCN         IN  NUMBER,
>                                    DBIDLOC             OUT NUMBER,
>                                    CONTAINERIDLOC      OUT NUMBER,
>                                    CONTAINERUIDLOC     OUT NUMBER,
>                                    CONTAINERNAMELOC    OUT VARCHAR2,
>                                    RESETLOGSCHANGE#LOC OUT NUMBER,
>                                    RESETLOGSTIMELOC    OUT DATE,
>                                    THREADIDLOC         OUT NUMBER,
>                                    SEQUENCENOBEGLOC    OUT NUMBER,
>                                    BUILDDATEBEGLOC     OUT VARCHAR2)
>   IS
>     CUR       NUMBER;
>     IGNORE    NUMBER;
> 
>   BEGIN 
>     BEGIN
>       
>       CUR := DBMS_SQL.OPEN_CURSOR;
>       DBMS_SQL.PARSE (CUR, 'SELECT DBID, CON_ID, CON_UID, NAME
>                             FROM SYS.V$CONTAINERS
>                             WHERE CON_ID = (SELECT MIN(CON_ID)
>                                             FROM SYS.V$CONTAINERS)', 
>                       DBMS_SQL.V7);
>       DBMS_SQL.DEFINE_COLUMN(CUR, 1, DBIDLOC); 
>       DBMS_SQL.DEFINE_COLUMN(CUR, 2, CONTAINERIDLOC); 
>       DBMS_SQL.DEFINE_COLUMN(CUR, 3, CONTAINERUIDLOC); 
>       DBMS_SQL.DEFINE_COLUMN(CUR, 4, CONTAINERNAMELOC, 384); 
>       IGNORE := DBMS_SQL.EXECUTE_AND_FETCH(CUR);
>       DBMS_SQL.COLUMN_VALUE(CUR, 1, DBIDLOC); 
>       DBMS_SQL.COLUMN_VALUE(CUR, 2, CONTAINERIDLOC); 
>       DBMS_SQL.COLUMN_VALUE(CUR, 3, CONTAINERUIDLOC); 
>       DBMS_SQL.COLUMN_VALUE(CUR, 4, CONTAINERNAMELOC); 
>       IGNORE := DBMS_SQL.FETCH_ROWS (CUR);
>       DBMS_SQL.CLOSE_CURSOR (CUR);
> 
>     EXCEPTION
>     WHEN OTHERS THEN
>         IF DUMPDEBUGMSGS THEN
>             DBMS_OUTPUT.PUT_LINE ('ERROR_1 ' || SQLCODE || '  ' || SQLERRM);
>         END IF;
>         DBMS_SQL.CLOSE_CURSOR (CUR);
>         RAISE;
>     END;
> 
>     
>     CUR := DBMS_SQL.OPEN_CURSOR;
>     BEGIN 
>       DBMS_SQL.PARSE (CUR, 'SELECT RESETLOGS_CHANGE#, RESETLOGS_TIME
>                             FROM SYS.V$DATABASE', 
>                       DBMS_SQL.V7);
>       DBMS_SQL.DEFINE_COLUMN(CUR, 1, RESETLOGSCHANGE#LOC); 
>       DBMS_SQL.DEFINE_COLUMN(CUR, 2, RESETLOGSTIMELOC); 
>       IGNORE := DBMS_SQL.EXECUTE_AND_FETCH(CUR);
>       DBMS_SQL.COLUMN_VALUE(CUR, 1, RESETLOGSCHANGE#LOC); 
>       DBMS_SQL.COLUMN_VALUE(CUR, 2, RESETLOGSTIMELOC);
>       IGNORE := DBMS_SQL.FETCH_ROWS (CUR);
>       DBMS_SQL.CLOSE_CURSOR (CUR);
> 
>     EXCEPTION
>     WHEN OTHERS THEN
>         IF DUMPDEBUGMSGS THEN
>             DBMS_OUTPUT.PUT_LINE ('ERROR_2 ' || SQLCODE || '  ' || SQLERRM);
>         END IF;
>         DBMS_SQL.CLOSE_CURSOR (CUR);
>         RAISE;
>     END;
> 
>     DOINTBLDGETFIRSTSEQ#(TRACE_ENABLED    => TRACE_ENABLED,
>                          LOCKDOWNSCN      => LOCKDOWNSCN,
>                          THREADIDLOC      => THREADIDLOC,
>                          SEQUENCENOBEGLOC => SEQUENCENOBEGLOC,
>                          BUILDDATEBEGLOC  => BUILDDATEBEGLOC);
> 
>     IF TRACE_ENABLED THEN
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                          TO_CHAR(SYSDATE, 'Dy Mon DD HH24:MI:SS YYYY'));
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                          'doIntBldGetBldLogAttrs : ' ||
>                          '  lockdownScn=' || LOCKDOWNSCN ||
>                          ', sequenceNoBegLoc=' || SEQUENCENOBEGLOC ||
>                          ', buildDateBegLoc=' || BUILDDATEBEGLOC);
>     END IF;
> 
>   END DOINTBLDGETBLDLOGATTRS;
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
1644a1882,1884
> 
> 
> 
1650c1890,1892
<                            TRACE_ENABLED BOOLEAN)
---
>                            TRACE_ENABLED IN BOOLEAN,
>                            IN_BUILD_OP   IN NUMBER,
>                            NAMEOFBUILD IN VARCHAR2)
1663c1905,1915
< 
---
>     L_SCN_END_OF_BLD    NUMBER := NULL;
>     L_DBID              NUMBER;
>     L_CONTAINER_ID      NUMBER;
>     L_CONTAINER_UID     NUMBER;
>     L_CONTAINER_NAME    VARCHAR2(384);
>     L_RESETLOGS_CHANGE# NUMBER;
>     L_RESETLOGS_TIME    DATE;
>     L_THREAD_ID         NUMBER;
>     L_SEQUENCE#_BEGIN   NUMBER;
>     L_BUILD_DATE_BEGIN  VARCHAR2(22);
>     
1664a1917
> 
1671c1924,1926
<                        DB_TXN_SCNBAS ||', '|| LOCKDOWNSCN ||')');
---
>                        DB_TXN_SCNBAS ||', '|| LOCKDOWNSCN ||
>                        ', TRUE, ' || IN_BUILD_OP || ', ' ||
>                        NAMEOFBUILD || ')');
1674c1929,1961
<   IF (DB_OPENREADWRITE) THEN
---
>   
>   DOINTBLDGETBLDLOGATTRS(  TRACE_ENABLED       => TRACE_ENABLED,
>                            LOCKDOWNSCN         => LOCKDOWNSCN,
>                            DBIDLOC             => L_DBID,
>                            CONTAINERIDLOC      => L_CONTAINER_ID,
>                            CONTAINERUIDLOC     => L_CONTAINER_UID,
>                            CONTAINERNAMELOC    => L_CONTAINER_NAME,
>                            RESETLOGSCHANGE#LOC => L_RESETLOGS_CHANGE#,
>                            RESETLOGSTIMELOC    => L_RESETLOGS_TIME,
>                            THREADIDLOC         => L_THREAD_ID,
>                            SEQUENCENOBEGLOC    => L_SEQUENCE#_BEGIN,
>                            BUILDDATEBEGLOC     => L_BUILD_DATE_BEGIN);
> 
>   
>   IF TRACE_ENABLED THEN
>     DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                        TO_CHAR(SYSDATE, 'Dy Mon DD HH24:MI:SS YYYY'));
>     DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                         'Logminer Bld: ls_rec_startbuild : ' ||
>                         'l_scn_end_of_bld=NULL' ||
>                         ', l_dbid=' || L_DBID ||
>                         ', l_container_id=' || L_CONTAINER_ID ||
>                         ', l_container_uid=' || L_CONTAINER_UID ||
>                         ', l_container_name=' || L_CONTAINER_NAME ||
>                         ', l_resetlogs_change#=' || L_RESETLOGS_CHANGE# ||
>                         ', l_resetlogs_time=' ||
>                       TO_CHAR(L_RESETLOGS_TIME, 'Dy Mon DD HH24:MI:SS YYYY') ||
>                         ', l_thread_id=' || L_THREAD_ID ||
>                         ', l_sequence#_begin=' || L_SEQUENCE#_BEGIN ||
>                         ', l_build_date_begin=' || L_BUILD_DATE_BEGIN);
>   END IF;
> 
>   IF (DBOPENREADWRITEG) THEN
1742,1743c2029,2032
<               CDB_XID)
<               VALUES (:xid_bind, to_char(sysdate,''MM/DD/YYYY HH24:MI:SS''), 
---
>               CDB_XID, SCN_END_OF_BLD, DBID, CONTAINER_ID,
>               CONTAINER_UID, CONTAINER_NAME, RESETLOGS_CHANGE#,
>               RESETLOGS_TIME, THREAD_ID, SEQUENCE#_BEGIN, BUILD_NAME, BUILD_OP)
>               VALUES (:xid_bind, :build_date, 
1745c2034,2038
<               :low_scn_bind, :cdb_xid_bind )' ,DBMS_SQL.V7);
---
>               :low_scn_bind, :cdb_xid_bind, :scn_end_of_bld, :dbid,
>               :container_id, :container_uid, :container_name,
>               :resetlogs_change#, :resetlogs_time, :thread_id,
>               :sequence#_begin, :build_name, :build_op)',
>                       DBMS_SQL.V7);
1746a2040
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':build_date', L_BUILD_DATE_BEGIN); 
1750a2045,2058
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':scn_end_of_bld',
>                                 L_SCN_END_OF_BLD);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':dbid', L_DBID);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':container_id', L_CONTAINER_ID);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':container_uid', L_CONTAINER_UID);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':container_name', L_CONTAINER_NAME);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':resetlogs_change#',
>                                 L_RESETLOGS_CHANGE#);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':resetlogs_time', L_RESETLOGS_TIME);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':thread_id', L_THREAD_ID);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':sequence#_begin',
>                                 L_SEQUENCE#_BEGIN);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':build_name', NAMEOFBUILD);
>         DBMS_SQL.BIND_VARIABLE (DEST_CUR, ':build_op', IN_BUILD_OP);
1823a2132
>   CMD           VARCHAR2(1024);
1835c2144
<   IF (DB_OPENREADWRITE) THEN
---
>   IF (DBOPENREADWRITEG) THEN
1841,1858c2150,2174
<         IF LOW_SCN IS NULL THEN
<             DBMS_SQL.PARSE (CUR, 'UPDATE SYS.LOGMNR_BUILDLOG set 
<                 CURRENT_BUILD_STATE = '  || STATE || 
<                 ', COMPLETION_STATUS = ' ||  STATUS ||
<                 ' WHERE INITIAL_XID = :xid_bind', 
<                 DBMS_SQL.V7);
<         ELSE
<             DBMS_SQL.PARSE (CUR, 'UPDATE SYS.LOGMNR_BUILDLOG set 
<                 CURRENT_BUILD_STATE = ' || STATE || 
<                 ', MARKED_LOG_FILE_LOW_SCN = ' || LOW_SCN ||
<                 ', COMPLETION_STATUS = '||  STATUS ||
<                 ' WHERE INITIAL_XID = :xid_bind', 
<                 DBMS_SQL.V7);
<         END IF;
<         DBMS_SQL.BIND_VARIABLE(CUR, ':xid_bind', XID);
<         IGNORE := DBMS_SQL.EXECUTE (CUR);
<         COMMIT;
<         DBMS_SQL.CLOSE_CURSOR (CUR);
---
>       CMD := 'UPDATE SYS.LOGMNR_BUILDLOG set ' ||
>                       '  CURRENT_BUILD_STATE = '  || STATE || 
>                       ', COMPLETION_STATUS = ' ||  STATUS;
>       IF NOT(LOW_SCN IS NULL) THEN
>         CMD := CMD || ', MARKED_LOG_FILE_LOW_SCN = ' || LOW_SCN;
>       END IF;
>       IF BUILD_STATE_SUCCESS = STATUS THEN
>         CMD := CMD || ', SEQUENCE#_END = '                           ||
>                            '(SELECT SEQUENCE# '                      ||
>                             'FROM SYS.V$THREAD T, SYS.V$INSTANCE I ' ||
>                             'WHERE T.INSTANCE = I.INSTANCE_NAME)'    ||
>                        ', SCN_END_OF_BLD = ' ||
>                                   '(SELECT CURRENT_SCN FROM SYS.V$DATABASE)';
>       END IF;
>       CMD := CMD || ' WHERE INITIAL_XID = :xid_bind';
> 
>       IF TRACE_ENABLED THEN
>         DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE, CMD);
>       END IF;
> 
>       DBMS_SQL.PARSE (CUR, CMD, DBMS_SQL.V7);
>       DBMS_SQL.BIND_VARIABLE(CUR, ':xid_bind', XID);
>       IGNORE := DBMS_SQL.EXECUTE (CUR);
>       COMMIT;
>       DBMS_SQL.CLOSE_CURSOR (CUR);
3920c4236,4237
<                       DB_TXN_SCNBAS,  UNWINDTOSCN, TRACE_ENABLED);
---
>                       DB_TXN_SCNBAS,  UNWINDTOSCN, TRACE_ENABLED,
>                       BUILD_OP, NAMEOFBUILD);
3934c4251,4252
<            DICT_PRELOCK=>1, DICT_END=>0, 
---
>            DICT_PRELOCK=>1,
>            DICT_END=>0, 
3939c4257,4258
<             DICT_PRELOCK=>0, DICT_END=>0, 
---
>             DICT_PRELOCK=>0,
>             DICT_END=>0, 
3949c4268,4273
<   IF (DB_OPENREADWRITE) THEN
---
>   IF (DBOPENREADWRITEG) THEN
>     IF TRACE_ENABLED THEN
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                          'bld_make_unwind_to_scn:1 ');
>     END IF;
> 
3951c4275,4278
<     DBMS_SQL.PARSE (CUR, 'UPDATE SYS.LOGMNR_BUILDLOG set 
---
>    
>    
>    
>    DBMS_SQL.PARSE (CUR, 'UPDATE SYS.LOGMNR_BUILDLOG set 
3953,3955c4280,4282
<                          ' , COMPLETION_STATUS = 0,
<                             MARKED_LOG_FILE_LOW_SCN = ' || UNWINDTOSCN ||
<                           ' WHERE INITIAL_XID = :xid_bind', 
---
>                           ', COMPLETION_STATUS = 0'                       ||
>                           ', MARKED_LOG_FILE_LOW_SCN = ' || UNWINDTOSCN ||
>                           ' WHERE INITIAL_XID = :xid_bind',
3958a4286,4292
>     DBMS_SQL.CLOSE_CURSOR( CUR );
>     COMMIT;
> 
>     IF TRACE_ENABLED THEN
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                          'bld_make_unwind_to_scn:2 ');
>     END IF;
3959a4294,4309
>     
>     
>     
>     CUR := DBMS_SQL.OPEN_CURSOR;
>     DBMS_SQL.PARSE (CUR, 'UPDATE SYS.LOGMNR_BUILDLOG set '                ||
>                           '  SEQUENCE#_END = '                            ||
>                                  '(SELECT SEQUENCE# '                     ||
>                                   'FROM SYS.V$THREAD T, SYS.V$INSTANCE I '||
>                                   'WHERE T.INSTANCE = I.INSTANCE_NAME)'   ||
>                            ', SCN_END_OF_BLD = '                          ||
>                            ' (SELECT CURRENT_SCN FROM SYS.V$DATABASE)'    ||
>                            ' WHERE INITIAL_XID = :xid_bind', 
>                     DBMS_SQL.V7);
>     DBMS_SQL.BIND_VARIABLE(CUR, ':xid_bind', BLDLOGID_INITXID);
>     IGNORE := DBMS_SQL.EXECUTE (CUR);
>     DBMS_SQL.CLOSE_CURSOR( CUR );
3960a4311,4316
> 
>     IF TRACE_ENABLED THEN
>       DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                          'bld_make_unwind_to_scn:3 ');
>     END IF;
> 
3965c4321
<   IF (CDB <> 0) THEN
---
>   IF (ISACDBG) THEN
4140c4496,4497
<                         DB_TXN_SCNBAS, LOCKDOWNSCN, TRACE_ENABLED);
---
>                         DB_TXN_SCNBAS, LOCKDOWNSCN, TRACE_ENABLED,
>                         BUILD_OP, NAMEOFBUILD);
4288a4646,4650
>   THREADIDLOC      NUMBER;
>   SEQUENCENOBEGLOC NUMBER;
>   BUILDDATEBEGLOC  VARCHAR2(22);
> 
> 
4330c4692
< BEGIN
---
> BEGIN   
4357c4719
<   IF (NOT DB_OPENREADWRITE) THEN
---
>   IF (NOT DBOPENREADWRITEG) THEN
4488a4851,4856
>     DOINTBLDGETFIRSTSEQ#(TRACE_ENABLED    => TRACE_ENABLED,
>                          LOCKDOWNSCN      => LOCKDOWNSCN,
>                          THREADIDLOC      => THREADIDLOC,
>                          SEQUENCENOBEGLOC => SEQUENCENOBEGLOC,
>                          BUILDDATEBEGLOC  => BUILDDATEBEGLOC);
> 
4507a4876,4879
>     IF NOT ISROOTBUILDG THEN
>       FLAGS := FLAGS + 32;   
>     END IF;
> 
4523c4895,4896
<                          ', scn: '||TO_CHAR(LOCKDOWNSCN, 'TM')||
---
>                          ', LockDownscn: '||TO_CHAR(LOCKDOWNSCN, 'TM')||
>                          ', sequenceNoBegLoc: '|| TO_CHAR(SEQUENCENOBEGLOC, 'TM')||
4524a4898
>                          ', pdb_dbid: ' || TO_CHAR(PDB_DBID, 'TM') ||
4534c4908
<             0,              
---
>             SEQUENCENOBEGLOC, 
4606c4980,4981
<                         DB_TXN_SCNBAS, LOCKDOWNSCN, TRACE_ENABLED);
---
>                         DB_TXN_SCNBAS, LOCKDOWNSCN, TRACE_ENABLED,
>                         BUILD_OP, NAMEOFBUILD);
5149d5523
<         
5150a5525,5526
>      
>    
5156,5159d5531
< 
< 
< 
<   
5838c6210
<      IF DB_OPENREADWRITE THEN
---
>      IF DBOPENREADWRITEG THEN
5882c6254
<       IF DB_OPENREADWRITE THEN
---
>       IF DBOPENREADWRITEG THEN
7671a8044,8046
>     KRVX_STATUS_NOT_IN_ROOT EXCEPTION;
>     PRAGMA EXCEPTION_INIT(KRVX_STATUS_NOT_IN_ROOT,    -65040);  
> 
7680a8056,8062
>   IF (ISACDBG AND NOT ISROOTBUILDG) THEN
>     RAISE KRVX_STATUS_NOT_IN_ROOT;
>   END IF;
> 
> 
> 
> 
7861,7872d8242
< 
<     
< 
< 
< 
< 
<    
<     SELECT COUNT(1) INTO TEMPCOUNT
<     FROM SYS.V$DATABASE
<     WHERE OPEN_MODE = 'READ WRITE';
<     DB_OPENREADWRITE := (0 <> TEMPCOUNT);
< 
7944c8314,8316
<     SELECT COUNT(*) INTO CDB FROM V$DATABASE WHERE CDB = 'YES';
---
> 
> 
>     DOINTBUILDSETGLOBALS(TRACE_ENABLED);
7950,7951c8322,8330
<       IF (CDB <> 0) THEN
<         CDB_LOCKDOWN(BUILD_OP, BLDLOGID_INITXID, LOCKDOWNSCN);
---
>       IF (ISACDBG) THEN
>         IF (ISROOTBUILDG) THEN
>           CDB_LOCKDOWN(BUILD_OP, BLDLOGID_INITXID, LOCKDOWNSCN);
>         ELSE
>           BLD_MAKE_UNWIND_TO_SCN(TRACE_ENABLED=>TRACE_ENABLED,
>                                  MARK_LOG_HEADER=>FALSE,
>                                  BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                                  UNWINDTOSCN=>LOCKDOWNSCN);
>         END IF;
7957,7958c8336,8349
<       IF (CDB <> 0) THEN
<         CDB_LOCKDOWN(BUILD_OP, BLDLOGID_INITXID, LOCKDOWNSCN);
---
>       IF (ISACDBG) THEN
>         IF (ISROOTBUILDG) THEN
>           CDB_LOCKDOWN(BUILD_OP, BLDLOGID_INITXID, LOCKDOWNSCN);
>         ELSE
>           
>           BLD_LOCKDOWN_SWITCH_LOG(TRACE_ENABLED=>TRACE_ENABLED,
>                                   BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                                   LOCKDOWNSCNOUT=>LOCKDOWNSCN,
>                                   RELEASE_LOCKS=>TRUE,
>                                   MARK_BEGIN=>FALSE,
>                                   PARTIAL_BUILD=>FALSE,
>                                   CDB_XID=>NULL,
>                                   USE_SAVEPOINTS=>FALSE);
>         END IF;
7965,7966c8356,8384
<       IF (CDB <> 0) THEN
<         CDB_BUILD(TRACE_ENABLED, BLDLOGID_INITXID, LOCKDOWNSCN, 2 );
---
>       IF (ISACDBG) THEN
>         IF (ISROOTBUILDG) THEN
>           CDB_BUILD(TRACE_ENABLED, BLDLOGID_INITXID, LOCKDOWNSCN,
>                     2 );
>         ELSE
>           
>           
>           BLD_LOCKDOWN_SWITCH_LOG(TRACE_ENABLED=>TRACE_ENABLED,
>                                   BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                                   LOCKDOWNSCNOUT=>LOCKDOWNSCN,
>                                   RELEASE_LOCKS=>RELEASE_LOCKS,
>                                   MARK_BEGIN=>FALSE,
>                                   PARTIAL_BUILD=>FALSE,
>                                   CDB_XID=>NULL,
>                                   USE_SAVEPOINTS=>FALSE);
>           BLD_GATHER(LOCKDOWNSCN=>LOCKDOWNSCN,
>                      TRACE_ENABLED=>TRACE_ENABLED,
>                      MUST_LOAD=>FALSE,
>                      MUST_LOCK=>FALSE,
>                      NO_DDLS=>FALSE,
>                      SRC_IS_MIG=>FALSE,
>                      BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                      NEW_TRANSACTION=>RELEASE_LOCKS,
>                      MARK_END=>FALSE,
>                      COMMIT_WORK=>TRUE,
>                      PLUG_IN_BUILD=>FALSE,
>                      ADD_PDB_BUILD=>FALSE,
>                      CDB_XID=>NULL);
>         END IF;
7974c8392
<       IF (CDB <> 0) THEN
---
>       IF (ISROOTBUILDG) THEN
7976a8395
>         
7982,7983c8401,8428
<       IF (CDB <> 0) THEN
<         CDB_BUILD(TRACE_ENABLED, BLDLOGID_INITXID, LOCKDOWNSCN, 0 );
---
>       IF (ISACDBG) THEN
>         IF (ISROOTBUILDG) THEN
>           CDB_BUILD(TRACE_ENABLED, BLDLOGID_INITXID, LOCKDOWNSCN,
>                     0 );
>         ELSE
>           
>           BLD_LOCKDOWN_SWITCH_LOG(TRACE_ENABLED=>TRACE_ENABLED,
>                                   BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                                   LOCKDOWNSCNOUT=>LOCKDOWNSCN,
>                                   RELEASE_LOCKS=>RELEASE_LOCKS,
>                                   MARK_BEGIN=>FALSE,
>                                   PARTIAL_BUILD=>FALSE,
>                                   CDB_XID=>NULL,
>                                   USE_SAVEPOINTS=>FALSE);
>           BLD_GATHER(LOCKDOWNSCN=>LOCKDOWNSCN,
>                      TRACE_ENABLED=>TRACE_ENABLED,
>                      MUST_LOAD=>FALSE,
>                      MUST_LOCK=>FALSE,
>                      NO_DDLS=>FALSE,
>                      SRC_IS_MIG=>FALSE,
>                      BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                      NEW_TRANSACTION=>RELEASE_LOCKS,
>                      MARK_END=>FALSE,
>                      COMMIT_WORK=>TRUE,
>                      PLUG_IN_BUILD=>FALSE,
>                      ADD_PDB_BUILD=>FALSE,
>                      CDB_XID=>NULL);
>         END IF;
8032,8033c8477,8503
<       IF (CDB <> 0) THEN
<         CDB_SPECIAL_BUILD(LS_SPECIAL);
---
>       IF (ISACDBG) THEN
>         IF (ISROOTBUILDG) THEN
>           CDB_SPECIAL_BUILD(LS_SPECIAL);
>         ELSE
>           
>           BLD_LOCKDOWN_SWITCH_LOG(TRACE_ENABLED=>TRACE_ENABLED,
>                                   BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                                   LOCKDOWNSCNOUT=>LOCKDOWNSCN,
>                                   RELEASE_LOCKS=>FALSE,
>                                   MARK_BEGIN=>FALSE,
>                                   PARTIAL_BUILD=>FALSE,
>                                   CDB_XID=>NULL,
>                                   USE_SAVEPOINTS=>FALSE);
>           BLD_GATHER(LOCKDOWNSCN=>LOCKDOWNSCN,
>                      TRACE_ENABLED=>TRACE_ENABLED,
>                      MUST_LOAD=>TRUE,
>                      MUST_LOCK=>FALSE,
>                      NO_DDLS=>FALSE,
>                      SRC_IS_MIG=>FALSE,
>                      BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                      NEW_TRANSACTION=>RELEASE_LOCKS,
>                      MARK_END=>FALSE,
>                      COMMIT_WORK=>TRUE,
>                      PLUG_IN_BUILD=>FALSE,
>                      ADD_PDB_BUILD=>FALSE,
>                      CDB_XID=>NULL);
>         END IF;
8042,8043c8512,8538
<       IF (CDB <> 0) THEN
<         CDB_SPECIAL_BUILD(LS_SPECIAL_2);
---
>       IF (ISACDBG) THEN
>         IF (ISROOTBUILDG) THEN
>           CDB_SPECIAL_BUILD(LS_SPECIAL_2);
>         ELSE
>           
>           BLD_LOCKDOWN_SWITCH_LOG(TRACE_ENABLED=>TRACE_ENABLED,
>                                   BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                                   LOCKDOWNSCNOUT=>LOCKDOWNSCN,
>                                   RELEASE_LOCKS=>FALSE,
>                                   MARK_BEGIN=>FALSE,
>                                   PARTIAL_BUILD=>FALSE,
>                                   CDB_XID=>NULL,
>                                   USE_SAVEPOINTS=>FALSE);
>           BLD_GATHER(LOCKDOWNSCN=>LOCKDOWNSCN,
>                      TRACE_ENABLED=>TRACE_ENABLED,
>                      MUST_LOAD=>TRUE,
>                      MUST_LOCK=>FALSE,
>                      NO_DDLS=>FALSE,
>                      SRC_IS_MIG=>FALSE,
>                      BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                      NEW_TRANSACTION=>RELEASE_LOCKS,
>                      MARK_END=>FALSE,
>                      COMMIT_WORK=>TRUE,
>                      PLUG_IN_BUILD=>FALSE,
>                      ADD_PDB_BUILD=>FALSE,
>                      CDB_XID=>NULL);
>         END IF;
8062,8063c8557,8583
<       IF (CDB <> 0) THEN
<         CDB_SPECIAL_BUILD(LS_SPECIAL_3);
---
>       IF (ISACDBG) THEN
>         IF (ISROOTBUILDG) THEN
>           CDB_SPECIAL_BUILD(LS_SPECIAL_3);
>         ELSE
>           
>           BLD_LOCKDOWN_SWITCH_LOG(TRACE_ENABLED=>TRACE_ENABLED,
>                                   BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                                   LOCKDOWNSCNOUT=>LOCKDOWNSCN,
>                                   RELEASE_LOCKS=>FALSE,
>                                   MARK_BEGIN=>FALSE,
>                                   PARTIAL_BUILD=>FALSE,
>                                   CDB_XID=>NULL,
>                                   USE_SAVEPOINTS=>FALSE);
>           BLD_GATHER(LOCKDOWNSCN=>LOCKDOWNSCN,
>                      TRACE_ENABLED=>TRACE_ENABLED,
>                      MUST_LOAD=>TRUE,
>                      MUST_LOCK=>FALSE,
>                      NO_DDLS=>FALSE,
>                      SRC_IS_MIG=>TRUE,
>                      BLDLOGID_INITXID=>BLDLOGID_INITXID,
>                      NEW_TRANSACTION=>RELEASE_LOCKS,   
>                      MARK_END=>FALSE,
>                      COMMIT_WORK=>TRUE,
>                      PLUG_IN_BUILD=>FALSE,
>                      ADD_PDB_BUILD=>FALSE,
>                      CDB_XID=>NULL);
>         END IF;
SYS.DBMS_LOGREP_UTIL - PACKAGE BODY (RU):
301c301,302
<     IF ((IS_PDB_ENABLED) AND (NOT IS_ROOT_PDB)) THEN
---
>     IF ((IS_PDB_ENABLED) AND (NOT IS_ROOT_PDB) AND
>         NOT DBMS_XSTREAM_GG_ADM.IS_GOLDENGATE) THEN
SYS.DBMS_PERF - PACKAGE BODY (RU):
996a997,1001
>   
>   
>   
>   
>   
1011a1017
>     DB_TZ                IN VARCHAR2 DEFAULT NULL,
1049c1055
<     L_TZ             VARCHAR2(10)    := NULL;
---
>     L_TZ             VARCHAR2(50)    := NULL;
1071c1077,1079
< 
---
>     
>     
>     L_TOPSQL_XML         XMLTYPE;
1082a1091
>     L_DATEDIFF             NUMBER; 
1157a1167,1175
>         
>         
>         
>         
>         
>         
>         
>         P_ADDM     := 1;
> 
1189d1206
<         
1314d1330
<       
1469c1485,1493
<     L_TZ := DBMS_SQLTUNE_UTIL2.GET_TZ_OFFSET();
---
>     IF(DB_TZ IS NULL) THEN
>       L_TZ := DBMS_SQLTUNE_UTIL2.GET_TZ_OFFSET();
>     ELSE
>       
>       
>       L_TZ := DB_TZ; 
> 
>     END IF;
>  
1715,1716c1739,1741
<       
<       L_WORKLOAD_XML := DBMS_REPORT.TRANSFORM_REPORT_XML(
---
>       IF (IS_OMX = 0) THEN 
>         
>         L_WORKLOAD_XML := DBMS_REPORT.TRANSFORM_REPORT_XML(
1727a1753
>                                    DB_TZ        => L_TZ,
1729a1756,1795
>       
>       ELSE
>         L_DATEDIFF := L_OUTER_END_TIME - L_OUTER_START_TIME;
>         
>         
>         L_WORKLOAD_XML := SYS.PRVT_AWR_VIEWER.REPORT_WORKLOAD(
>                           SERVICE_TYPE => 
>                                   DBMS_SQLTUNE_UTIL2.GET_CLOUD_SERVICE_TYPE(),
>                           IS_REALTIME  => L_IS_REALTIME,
>                           START_TIME => CASE WHEN L_DATEDIFF <= 1 THEN
>                                         L_OUTER_START_TIME ELSE
>                                         L_SELECTED_START_TIME END,
>                           END_TIME =>   CASE WHEN L_DATEDIFF <= 1 THEN
>                                         L_OUTER_END_TIME ELSE
>                                         L_SELECTED_END_TIME END,
>                           DBID => L_DBID,
>                           REPORT_LEVEL => 'none+wait+rsrcmgr+sysmetric',
>                           DB_TZ =>  L_TZ,
>                           SHOW_SQL => NULL);
>         
>         L_TOPSQL_XML := SYS.PRVT_AWR_VIEWER.FETCH_TOPSQL_XML(
>                         START_TIME        =>  L_SELECTED_START_TIME,
>                         END_TIME          =>  L_SELECTED_END_TIME,
>                         INST_ID           =>  INST_ID,
>                         DBID              =>  L_DBID,
>                         IS_REALTIME       =>  L_IS_REALTIME,
>                         TOP_N_DETAIL      =>  L_WORKLOAD_SQL_DETAIL,
>                         OUTER_START_TIME  =>  L_OUTER_START_TIME,
>                         OUTER_END_TIME    =>  L_OUTER_END_TIME,
>                         COMPRESS_XML      =>  L_COMPRESS_XML,
>                         SHOW_SQL          =>  NULL,
>                         DB_TZ             =>  L_TZ,
>                         IS_OMX            =>  IS_OMX);
>         
>         L_WORKLOAD_XML := L_WORKLOAD_XML.APPENDCHILDXML(XML_ROOT,
>                               L_TOPSQL_XML);
>         
>         L_WORKLOAD_XML := DBMS_REPORT.TRANSFORM_REPORT_XML(L_WORKLOAD_XML,
>                               ZLIB2BASE64 => L_COMPRESS_XML);
>       END IF;
1737c1803,1805
<       IF (L_IS_REALTIME = 1) THEN
---
>       
>       
>       IF (L_IS_REALTIME = 1 OR SYSDATE - L_SELECTED_START_TIME <= 2/24) THEN 
2035a2104
>     DB_TZ                IN VARCHAR2 DEFAULT NULL,
2060a2130
>                       db_tz              => :db_tz                ,
2083a2154
>         DBMS_SQL.BIND_VARIABLE(CUR_NUM, 'db_tz', DB_TZ);
2117a2189
>           DB_TZ              => DB_TZ,
2221a2294
>     DB_TZ                IN VARCHAR2 DEFAULT NULL,
2251c2324
<     L_TZ              VARCHAR2(10)    := NULL;
---
>     L_TZ              VARCHAR2(50) := NULL;
2518c2591,2596
<     L_TZ := DBMS_SQLTUNE_UTIL2.GET_TZ_OFFSET();
---
>     IF (DB_TZ IS NULL) THEN
>       L_TZ := DBMS_SQLTUNE_UTIL2.GET_TZ_OFFSET();
>     ELSE
>       
>       L_TZ := DB_TZ;
>     END IF;
2678c2756,2758
<       IF (L_IS_REALTIME = 1) THEN
---
>       
>       
>       IF (L_IS_REALTIME = 1 OR SYSDATE - L_SELECTED_START_TIME <= 2/24) THEN 
SYS.DBMS_PICKLER - PACKAGE BODY (RU):
139a140,142
>   
>   
>   
141c144
<     SELECT U.NAME, NULL, O.NAME, O.TYPE#, NULL
---
>     SELECT U.NAME, NULL, O.NAME, O.TYPE#, NULL  
146c149,150
<           O.OWNER# = U.USER#
---
>           O.OWNER# = U.USER# AND
>           D.INDEX# = 0
148c152
<     SELECT U.NAME, O.NAME, 
---
>     SELECT U.NAME, O.NAME,                      
SYS.DBMS_RCVMAN - PACKAGE BODY (RU):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '19.09.00.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '19.10.00.00'; 
8813a8814
> 
13687a13689
>   DEB(DEB_ENTER, 'computeUntilSCN');
13711a13714
>   DEB(DEB_IN,'Post log_history search mySCN = ' || MYSCN);
13734a13738
>   DEB(DEB_IN,'Post backup_datafile mySCN = ' || MYSCN);
13759a13764
>   DEB(DEB_IN,'Post datafile_copy search mySCN = ' || MYSCN);
13783a13789
>   DEB(DEB_IN,'Post fuzzytime filtering  mySCN = ' || MYSCN);
13795a13802
>   DEB(DEB_IN,'Post kccfe search1 mySCN = ' || MYSCN);
13803a13811
>   DEB(DEB_IN,'Post kccfe search2 mySCN = ' || MYSCN);
13827a13836
>   DEB(DEB_IN,'Post proxy_datafile checks mySCN = ' || MYSCN);
13828a13838
>   DEB(DEB_EXIT, 'computeUntilSCN');
15404a15415,15431
> PROCEDURE PRINTCONTROLREC IS
> BEGIN
>     DEB(DEB_ENTER, 'printControlRec');
> 
>     FOR ITEM IN (SELECT TYPE, RECORD_SIZE, RECORDS_TOTAL, RECORDS_USED
>          FROM V$CONTROLFILE_RECORD_SECTION ORDER BY 1)
>     LOOP 
>          DEB(DEB_PRINT, 'RecordType =' || ITEM.TYPE);
>          DEB(DEB_PRINT, 'Record_Size :'||TO_CHAR(ITEM.RECORD_SIZE));
>          DEB(DEB_PRINT, 'Records_Total :'||TO_CHAR(ITEM.RECORDS_TOTAL));
>          DEB(DEB_PRINT, 'Records_Used :'||TO_CHAR(ITEM.RECORDS_USED));
>     END LOOP;
> 
>     DEB(DEB_EXIT);
> END PRINTCONTROLREC;
> 
> 
15415a15443
>    PRINTCONTROLREC();
16011a16040
>    DEB(DEB_IN,'debug:before compute being called:untilSCN = ' || UNTILSCN);
26777a26807
>     DEB(DEB_IN, 'setting lbObsoleteRetention to FALSE');
27110a27141,27142
>              DEB(DEB_IN, 'full_df_backup set to TRUE 
>                           lbRec.file_type='|| LBREC.FILE_TYPE);
27114a27147,27148
>                 DEB(DEB_IN, 'full_df_backup set to TRUE 
>                           lbRec.file_type='|| LBREC.FILE_TYPE);
SYS.DBMS_RCVMAN - PACKAGE BODY (19.8RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '19.08.01.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '19.08.02.00'; 
SYS.DBMS_RCVMAN - PACKAGE BODY (19.9RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '19.09.00.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '19.09.01.00'; 
SYS.DBMS_REPORT - PACKAGE BODY (RU):
62a63
>   CS_AL32UTF8           CONSTANT VARCHAR2(8) := 'AL32UTF8';
73c74
< 
---
>  
318a320,322
>     EXCEPTION
>     WHEN NO_DATA_FOUND THEN
>       RETURN NULL;
319a324,325
>     WHEN OTHERS THEN
>       RAISE;
350a357,359
>     EXCEPTION
>     WHEN NO_DATA_FOUND THEN
>       RETURN NULL;
351a361,362
>     WHEN OTHERS THEN
>       RAISE;
387a399,406
> 
>     EXCEPTION
>     WHEN NO_DATA_FOUND THEN
>       P_BEGIN_SNAP := NULL;
>       P_END_SNAP := NULL;
> 
>     WHEN OTHERS THEN
>       RAISE;
824a844,848
>     LOCALE            VARCHAR2(8);
>     LANG              VARCHAR2(64);
>     CURRENTLANG       VARCHAR2(8);
>     CURRENTCS         VARCHAR2(64);
>     LOCALELIST        PRVT_EMX.LOCALES_ARRAY;
826c850
< 
---
>     LOCALELIST := PRVT_EMX.OMX_LOCALES();
830a855,882
>     IF (PARAMS.EXISTS('locale')) THEN
>       LOCALE := PARAMS('locale');
> 
>       
>       IF (LOCALELIST.EXISTS(LOCALE)) THEN
>         LOCALE := LOCALELIST(LOCALE);
>         LANG := UTL_I18N.MAP_LANGUAGE_FROM_ISO(LOCALE);
>         BEGIN 
>           SELECT PROPERTY_VALUE INTO CURRENTCS
>           FROM DATABASE_PROPERTIES 
>           WHERE PROPERTY_NAME = 'NLS_CHARACTERSET';
>         EXCEPTION
>           WHEN NO_DATA_FOUND THEN
>             
>             LANG := NULL;
>           WHEN OTHERS THEN
>             RAISE;
>         END;
> 
>         
>         IF ((LANG IS NOT NULL) AND (CURRENTCS = CS_AL32UTF8))THEN
>           EXECUTE IMMEDIATE 'alter session set NLS_LANGUAGE = ' || 
>                   DBMS_ASSERT.ENQUOTE_LITERAL(LANG) || '';
>         END IF;
>       END IF;
>     END IF;
> 
>     
903c955
< 
---
>  
2355a2408,2413
>     EXCEPTION
>     WHEN NO_DATA_FOUND THEN
>       RETURN NULL;
> 
>     WHEN OTHERS THEN
>       RAISE;
2427a2486,2490
>     END IF;
>   
>     
>     IF (P_BEGIN_SNAP = P_END_SNAP) THEN
>       P_BEGIN_SNAP := GET_PREV_SNAP_ID(P_END_SNAP, P_DBID);
SYS.DBMS_SNAP_INTERNAL - PACKAGE BODY (RU):
1458a1459,1464
>     
>     
>     IF OBJ_TYPE = 'TABLE' THEN
>       DBMS_METADATA.SET_TRANSFORM_PARAM(THANDLE,'SIZE_BYTE_KEYWORD', TRUE);
>     END IF;
> 
SYS.DBMS_SPM_INTERNAL - PACKAGE BODY (RU):
69a70,73
>   NON_CDB_ENV                CONSTANT NUMBER     := 0;
>   CDB_ROOT                   CONSTANT NUMBER     := 1;  
> 
>   
6282,6283c6286,6288
<      IF (SYS_CONTEXT('userenv', 'con_id') != 0 AND
<          SYS_CONTEXT('userenv', 'con_id') <= 2 ) THEN
---
>      
>      IF (SYS_CONTEXT('userenv', 'con_id') != NON_CDB_ENV AND
>          SYS_CONTEXT('userenv', 'con_id') = CDB_ROOT ) THEN
SYS.DBMS_SQLTUNE - PACKAGE BODY (RU):
12789,12793c12789
<     
<     
<     
<     IF (SYS_CONTEXT('userenv', 'con_id') <= 1 AND 
<         REPORT_ID IS NOT NULL AND REPORT_ID != 0) 
---
>     IF (REPORT_ID IS NOT NULL AND REPORT_ID != 0) 
12996a12993
>     NONEMPTY_HIST_REP                  NUMBER;
13603c13600,13611
<       RETURN;  
---
> 
>       
>       SELECT EXISTSNODE(REPORT_XML, '/report/sql_monitor_report') 
>       INTO NONEMPTY_HIST_REP FROM DUAL;
> 
>       
>       IF (NONEMPTY_HIST_REP = 1) THEN
>         RETURN;
>       END IF; 
> 
>       
>       REPORT_XML := NULL;
14049,14053c14057,14059
<       
<       
<       
<       IF (SYS_CONTEXT('userenv', 'con_id') <= 1 AND 
<         TARGET_REPORT_ID IS NOT NULL AND TARGET_REPORT_ID != 0) 
---
>       IF ((REPORT_ID IS NULL OR REPORT_ID = 0) 
>           AND TARGET_REPORT_ID IS NOT NULL 
>           AND TARGET_REPORT_ID != 0) 
14058,14060c14064,14073
<         IF (REPORT_XML IS NOT NULL) THEN
<           RETURN;  
<         END IF;   
---
>         SELECT EXISTSNODE(REPORT_XML, '/report/sql_monitor_report') 
>         INTO NONEMPTY_HIST_REP FROM DUAL;
> 
>         
>         IF (NONEMPTY_HIST_REP = 1) THEN
>           RETURN;
>         END IF; 
>       
>         
>         REPORT_XML := NULL;     
SYS.DBMS_STATS - PACKAGE BODY (RU):
23314a23315,23320
>           
>           
>           
>           
>           
>           
31443a31450
>     CHTMINMAX COLHISTTAB;  
31647a31655,31693
> 
>                 
>                 
>                 
>                 
>                 
>                 
>                 
>                 
>                 
>                 
>                 
>                 IF (CHTNEW.COUNT > 0 AND 
>                     (CHTNEW(1).ENVAL IS NULL OR
>                      CHTNEW(CHTNEW.COUNT).ENVAL IS NULL)) THEN
>                   CHTMINMAX := COLHISTTAB();
>                   CHTMINMAX.EXTEND(2);
>                   CHTMINMAX(1) := COLHISTREC(1, NULL,
>                                              CHTNEW(1).EDVAL,
>                                              CHTNEW(1).ENVAL,
>                                              CHTNEW(1).EAVAL, NULL);
>                   CHTMINMAX(2) := COLHISTREC(1, NULL,
>                                              CHTNEW(CHTNEW.COUNT).EDVAL,
>                                              CHTNEW(CHTNEW.COUNT).ENVAL,
>                                              CHTNEW(CHTNEW.COUNT).EAVAL, NULL);
>                   NORM_AND_CONV_HISTOGRAMS(CHTMINMAX, 1, CHTMINMAX.COUNT);
> 
>                   CHTNEW(1).EDVAL := CHTMINMAX(1).EDVAL;
>                   CHTNEW(1).ENVAL := CHTMINMAX(1).ENVAL;
>                   CHTNEW(1).EAVAL := CHTMINMAX(1).EAVAL;
> 
>                   CHTNEW(CHTNEW.COUNT).EDVAL :=
>                     CHTMINMAX(CHTMINMAX.COUNT).EDVAL;
>                   CHTNEW(CHTNEW.COUNT).ENVAL :=
>                     CHTMINMAX(CHTMINMAX.COUNT).ENVAL;
>                   CHTNEW(CHTNEW.COUNT).EAVAL :=
>                     CHTMINMAX(CHTMINMAX.COUNT).EAVAL;
>                 END IF;
> 
SYS.DBMS_SWRF_INTERNAL - PACKAGE BODY (RU):
494a495,521
> PROCEDURE REDEFINE_PARTITIONS(DBID    NUMBER,
>                               TBID    NUMBER DEFAULT NULL,
>                               TIMEOUT NUMBER DEFAULT NULL) IS
> EXTERNAL
> NAME "kewrpcp_compact_partitions"
> WITH CONTEXT
> PARAMETERS(CONTEXT,
>            DBID     OCINUMBER,
>            DBID     INDICATOR SB4,
>            TBID     OCINUMBER,
>            TBID     INDICATOR SB4,
>            TIMEOUT  OCINUMBER,
>            TIMEOUT  INDICATOR SB4)
> LIBRARY DBMS_SWRF_LIB;
> 
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
SYS.DBMS_TTS - PACKAGE BODY (RU):
1544a1545
> 
1546a1548,1550
>   
>   
>   
1554a1559,1560
>   
>   
1557a1564,1565
>   
>   
1575a1584,1585
>   
>   
1589,1590c1599
<          IF SQLCODE = 19563
<          THEN
---
>          IF SQLCODE = 19563 THEN
1598a1608,1609
>   
>   
1616c1627,1629
< 
---
>   
>   
>   
1632a1646,1648
>   
>   
>   
1633a1650
> 
SYS.DBMS_UMF_PROTECTED - PACKAGE BODY (RU):
79a80,89
>   FUNCTION PSF_VALIDATE_DSVER(DSVER IN BINARY_INTEGER)
>   RETURN BOOLEAN;
> 
>   
> 
> 
> 
> 
> 
> 
773a784,797
>   FUNCTION PSF_VALIDATE_DSVER(DSVER IN BINARY_INTEGER)
>   RETURN BOOLEAN
>   IS
>   BEGIN
>     RETURN (DSVER >= KEUQDSVERTYPE_NULL AND DSVER < KEUQDSVERTYPE_MAXNUM);
>   END PSF_VALIDATE_DSVER;
> 
>   
> 
> 
> 
> 
> 
> 
832a857,863
>     END IF;
> 
>     
>     IF PSF_VALIDATE_DSVER(DS_VER_TYPE) = FALSE THEN
>       RAISE_APPLICATION_ERROR(DBMS_UMF_INTERNAL.ERR_INTERNAL,
>                               'Invalid dataset version type ' ||
>                               DS_VER_TYPE);
SYS.DBMS_XS_SIDP - PACKAGE BODY (RU):
46a47,96
>  PROCEDURE DODHEXCHANGE2
>         ( MPKEY     IN  VARCHAR2,
>           MTID      IN  RAW,
>           SPKEY     OUT VARCHAR2,
>           SSKEYH    OUT RAW)
>     IS EXTERNAL NAME "kzxsidp_tc_doDHExchange2"
>        PARAMETERS
>        (CONTEXT,
>         MPKEY                         STRING,
>         MPKEY         INDICATOR       SB4,
>         MPKEY         LENGTH          UB4,
>         MTID                          OCIRAW,
>         MTID          INDICATOR       SB4,
>         MTID          LENGTH          UB4,
>         SPKEY                         STRING,
>         SPKEY         INDICATOR       SB4,
>         SPKEY         MAXLEN          UB4,
>         SPKEY         LENGTH          UB4,
>         SSKEYH                        OCIRAW,
>         SSKEYH        INDICATOR       SB4,
>         SSKEYH        MAXLEN          UB4,
>         SSKEYH        LENGTH          UB4)
>     LIBRARY DBMS_RXS_LIB
>     WITH CONTEXT;
> 
>  PROCEDURE DODHEXCHANGE3
>         ( MPKEY     IN  VARCHAR2,
>           MTID      IN  RAW,
>           SPKEY     OUT VARCHAR2,
>           SSKEYH    OUT RAW)
>     IS EXTERNAL NAME "kzxsidp_tc_doDHExchange3"
>        PARAMETERS
>        (CONTEXT,
>         MPKEY                         STRING,
>         MPKEY         INDICATOR       SB4,
>         MPKEY         LENGTH          UB4,
>         MTID                          OCIRAW,
>         MTID          INDICATOR       SB4,
>         MTID          LENGTH          UB4,
>         SPKEY                         STRING,
>         SPKEY         INDICATOR       SB4,
>         SPKEY         MAXLEN          UB4,
>         SPKEY         LENGTH          UB4,
>         SSKEYH                        OCIRAW,
>         SSKEYH        INDICATOR       SB4,
>         SSKEYH        MAXLEN          UB4,
>         SSKEYH        LENGTH          UB4)
>     LIBRARY DBMS_RXS_LIB
>     WITH CONTEXT;
> 
SYS.PRVTEMX_ADMIN - PACKAGE BODY (RU):
1771,1772c1771,1775
<                   nvl(fs.free_bytes, 
<                   nvl((fi0.bytes - fs.used_bytes), fi0.user_bytes)) free_bytes
---
>                   CASE WHEN fi0.tablespace_type = 'DATA' THEN
>                          nvl(fs.free_bytes, 0)
>                        ELSE
>                          nvl((fi0.bytes - fs.used_bytes), fi0.user_bytes)
>                   END free_bytes
1774c1777,1778
<             (select df.tablespace_name, df.relative_fno, df.file_name,
---
>             (select df.tablespace_name, 'DATA' tablespace_type, 
>                     df.relative_fno, df.file_name,
1780c1784,1785
<              select tf.tablespace_name, tf.relative_fno, tf.file_name,
---
>              select tf.tablespace_name, 'TEMP' tablespace_type, 
>                     tf.relative_fno, tf.file_name,
SYS.PRVTEMX_CELL - PACKAGE BODY (RU):
14c14
<   G_TOP_N_REASONS     CONSTANT   NUMBER := 5;
---
>   G_TOP_N_REASONS     CONSTANT   NUMBER := 10;
205c205,207
<     <stat id="470" name="fclwelig" type="reqs" cat="12-fc_lwrej"/>
---
>     <!-- bug30441717: use all reasons to get the category sum -->
>     <stat id="470" name="fclwelig" type="reqs" cat="12-fc_lwrej" 
>       in_cat_sum="Y"/>
208,216c210,226
<     <stat id="472" name="fclwrejcglwth" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="473" name="fclwrejflwr" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="474" name="fclwrejlwth" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="475" name="fclwrejmxlm" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="476" name="fclwrejgllm" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="477" name="fclwrejflbs" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="478" name="fclwrejkpcl" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="479" name="fclwrejiormlm" type="reqs" cat="12-fc_lwrej"/>
<     <stat id="480" name="fclwrejiormhd" type="reqs" cat="12-fc_lwrej"/>
---
>     <stat id="472" name="fclwrejcglwth" type="reqs" 
>       cat="12-fc_lwrej" in_cat_sum="Y"/>
>     <stat id="473" name="fclwrejflwr" type="reqs"
>       cat="12-fc_lwrej" in_cat_sum="Y"/>
>     <stat id="474" name="fclwrejlwth" type="reqs" 
>       cat="12-fc_lwrej" in_cat_sum="Y"/>
>     <stat id="475" name="fclwrejmxlm" type="reqs" 
>       cat="12-fc_lwrej" in_cat_sum="Y"/>
>     <stat id="476" name="fclwrejgllm" type="reqs" 
>       cat="12-fc_lwrej" in_cat_sum="Y"/>
>     <stat id="477" name="fclwrejflbs" type="reqs" 
>       cat="12-fc_lwrej" in_cat_sum="Y"/>
>     <stat id="478" name="fclwrejkpcl" type="reqs" 
>       cat="12-fc_lwrej" in_cat_sum="Y"/>
>     <!-- stat 479 has been deleted; remove from output -->
>     <stat id="480" name="fclwrejiormhd" type="reqs" 
>       cat="12-fc_lwrej" in_cat_sum="Y"/> 
278a289,338
> 
>   SQLSTMT_DISK_NAMES CONSTANT VARCHAR2(32767) := q'[
>     select /*+ materialize */
>           dbid, snap_id, cell_hash, disk_id, disk_name, disk
>       from dba_hist_cell_disk_name
>      where dbid    = :dbid
>        and snap_id = :eid]';
> 
>   SQLSTMT_DISK_NAMES_2 CONSTANT VARCHAR2(32767) := q'[
>     select /*+ materialize */
>            dbid, snap_id, cell_hash, disk_id, disk_name, disk disk_type
>       from dba_hist_cell_disk_name
>      where (dbid = :dbid1 and snap_id = :eid1)
>         or (dbid = :dbid2 and snap_id = :eid2)]';
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   SQLSTMT_MAX_FACTOR CONSTANT VARCHAR2(32767) := q'[
>         select dbid, snap_id, cellhash cell_hash, 
>                case 
>                when upper(extractvalue(xmltype(confval),'//makeModel'))
>                     like '%X7%EXTREME_FLASH%'
>                  or upper(extractvalue(xmltype(confval),'//makeModel'))
>                     like '%X8%EXTREME_FLASH%'
>                then 0.5
>                else 1
>                 end max_factor_iops,
>                case 
>                when upper(extractvalue(xmltype(confval),'//makeModel'))
>                     like '%X7%EXTREME_FLASH%'
>                then 0.5
>                when upper(extractvalue(xmltype(confval),'//makeModel'))
>                     like '%X8%EXTREME_FLASH%'
>                then 0.8
>                else 1
>                 end max_factor_mbps
>           from dba_hist_cell_config_detail
>          where dbid     = :dbid
>            and snap_id  = :eid
>            and conftype = 'CELL']';
> 
2195a2256
>     
2201c2262,2264
<                    like '%X7%EXTREME_FLASH%'
---
>                     like '%X7%EXTREME_FLASH%'
>                  or upper(extractvalue(xmltype(confval),'//makeModel'))
>                     like '%X8%EXTREME_FLASH%'
2222,2227c2285
<       with disk_names as (
<         select /*+ materialize */
<                dbid, snap_id, cell_hash, disk_id, disk_name, disk
<           from dba_hist_cell_disk_name
<          where dbid    = :dbid
<            and snap_id = :eid)
---
>       with disk_names as ( #SQLSTMT_DISK_NAMES# )
2257,2260d2314
<     
<     
<     
<     
2262,2273c2316
<       with cell_type as (
<         select dbid, snap_id, cellhash cell_hash, 
<                case 
<                when upper(extractvalue(xmltype(confval),'//makeModel'))
<                    like '%X7%EXTREME_FLASH%'
<                then 0.5
<                else 1
<                 end max_factor
<           from dba_hist_cell_config_detail
<          where dbid     = :dbid
<            and snap_id  = :eid
<            and conftype = 'CELL')
---
>       with cell_type as ( #SQLSTMT_MAX_FACTOR# )
2287c2330,2331
<                            max_factor as "max_factor")),
---
>                            max_factor_iops as "max_factor_iops",
>                            max_factor_mbps as "max_factor_mbps")),
2313c2357,2358
<                  nullif(max(max_factor),1) max_factor,
---
>                  nullif(max(max_factor_iops),1) max_factor_iops,
>                  nullif(max(max_factor_mbps),1) max_factor_mbps,
2326,2330c2371,2376
<                      max_flash_iops * max_factor max_flash_iops, 
<                      max_flash_mbps * max_factor max_flash_mbps,
<                      max_cell_flash_iops * max_factor max_cell_flash_iops, 
<                      max_cell_flash_mbps * max_factor max_cell_flash_mbps, 
<                      max_factor,
---
>                      max_flash_iops * max_factor_iops max_flash_iops, 
>                      max_flash_mbps * max_factor_mbps max_flash_mbps,
>                      max_cell_flash_iops * max_factor_iops 
>                                                          max_cell_flash_iops, 
>                      max_cell_flash_mbps * max_factor_mbps max_cell_flash_mbps,
>                      max_factor_iops, max_factor_mbps,
2352c2398,2401
<     SQLSTMT_CURR_IOPS := I_REPLACE_DBA_HIST(SQLSTMT_CURR_IOPS, P_DBID);
---
>     SQLSTMT_CURR_IOPS := 
>       I_REPLACE_DBA_HIST(
>         REPLACE(SQLSTMT_CURR_IOPS, '#SQLSTMT_DISK_NAMES#', SQLSTMT_DISK_NAMES),
>         P_DBID);
2354c2403,2406
<     SQLSTMT_CAPACITY := I_REPLACE_DBA_HIST(SQLSTMT_CAPACITY, P_DBID);
---
>     SQLSTMT_CAPACITY := 
>       I_REPLACE_DBA_HIST(
>         REPLACE(SQLSTMT_CAPACITY, '#SQLSTMT_MAX_FACTOR#', SQLSTMT_MAX_FACTOR),
>         P_DBID);
2766,2783c2818,2819
<       with disk_names as (
<         select /*+ materialize */
<                dbid, snap_id, cell_hash, disk_id, disk_name, disk
<           from dba_hist_cell_disk_name
<          where dbid    = :dbid
<            and snap_id = :eid),
<       cell_type as (
<         select dbid, snap_id, cellhash cell_hash, 
<                case 
<                when upper(extractvalue(xmltype(confval),'//makeModel'))
<                    like '%X7%EXTREME_FLASH%'
<                then 0.5
<                else 1
<                 end max_factor
<           from dba_hist_cell_config_detail
<          where dbid     = :dbid
<            and snap_id  = :eid
<            and conftype = 'CELL'),
---
>       with disk_names as ( #SQLSTMT_DISK_NAMES# ),
>       cell_type as ( #SQLSTMT_MAX_FACTOR# ),
3089c3125,3126
<                                                     ct.max_factor)  max_iops,
---
>                                                     ct.max_factor_iops) 
>                                                                      max_iops,
3093c3130,3131
<                                                    ct.max_factor)  max_mbps,
---
>                                                    ct.max_factor_mbps)  
>                                                                      max_mbps,
3096c3134
<                                                          ct.max_factor)
---
>                                                          ct.max_factor_iops)
3100c3138
<                                                          ct.max_factor)
---
>                                                          ct.max_factor_mbps)
3335a3374,3375
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_DISK_NAMES#',SQLSTMT_DISK_NAMES);
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_MAX_FACTOR#',SQLSTMT_MAX_FACTOR);
3435,3452c3475,3476
<       with disk_names as (
<         select /*+ materialize */
<                dbid, snap_id, cell_hash, disk_id, disk_name, disk
<           from dba_hist_cell_disk_name
<          where dbid    = :dbid
<            and snap_id = :eid),
<        cell_type as (
<         select dbid, snap_id, cellhash cell_hash, 
<                case 
<                when upper(extractvalue(xmltype(confval),'//makeModel'))
<                    like '%X7%EXTREME_FLASH%'
<                then 0.5
<                else 1
<                 end max_factor
<           from dba_hist_cell_config_detail
<          where dbid     = :dbid
<            and snap_id  = :eid
<            and conftype = 'CELL'),
---
>       with disk_names as ( #SQLSTMT_DISK_NAMES# ),
>        cell_type as ( #SQLSTMT_MAX_FACTOR# ),
3676c3700
<                                                           ct.max_factor) 
---
>                                                           ct.max_factor_iops) 
3680c3704
<                                                           ct.max_factor) 
---
>                                                           ct.max_factor_mbps) 
3901a3926,3927
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_DISK_NAMES#',SQLSTMT_DISK_NAMES);
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_MAX_FACTOR#',SQLSTMT_MAX_FACTOR);
4244,4263c4270
<     SQLSTMT_SRV_IO_OUT_CELL1 CONSTANT VARCHAR2(32767) := q'[
<       with disk_names as (
<         select /*+ materialize */
<                dbid, snap_id, cell_hash, disk_id, disk_name, disk
<           from dba_hist_cell_disk_name
<          where dbid    = :dbid
<            and snap_id = :eid),
<       cell_type as (
<         select dbid, snap_id, cellhash cell_hash, 
<                case 
<                when upper(extractvalue(xmltype(confval),'//makeModel'))
<                    like '%X7%EXTREME_FLASH%'
<                then 0.5
<                else 1
<                 end max_factor
<           from dba_hist_cell_config_detail
<          where dbid     = :dbid
<            and snap_id  = :eid
<            and conftype = 'CELL'),
<       base_stats as (-- get averages per disk on each cell
---
>     SQLSTMT_BASE_STATS CONSTANT VARCHAR2(32767) := q'[
4351,4352c4358
<          group by s.dbid, s.cell_hash, dn.disk),]';
< 
---
>          group by s.dbid, s.cell_hash, dn.disk]';
4356,4358c4362,4363
<     SQLSTMT_SRV_IO_OUT_CELL2 CONSTANT VARCHAR2(32767) := q'[    
<       cell_stats as (
<         -- compute buckets to determine outliers, find low/high
---
>     
>     SQLSTMT_CELL_STATS CONSTANT VARCHAR2(32767) := q'[
4373d4377
< 
4884c4888
<                                                   ct.max_factor)  max_iops,
---
>                                                   ct.max_factor_iops) max_iops,
4888c4892
<                                                   ct.max_factor)  max_mbps,
---
>                                                   ct.max_factor_mbps) max_mbps,
4891c4895
<                                                        ct.max_factor)  
---
>                                                        ct.max_factor_iops)  
4895c4899
<                                                        ct.max_factor)  
---
>                                                        ct.max_factor_mbps)  
4922c4926
<                          and dt.snap_id   = ct.snap_id)))), ]';
---
>                          and dt.snap_id   = ct.snap_id)))]';
4924,4925c4928
<     SQLSTMT_SRV_IO_OUT_CELL3 CONSTANT VARCHAR2(32767) := q'[
<       outlier_stats as (
---
>     SQLSTMT_OUTLIER_STATS CONSTANT VARCHAR2(32767) := q'[
5081c5084
<           from cell_stats)]';
---
>           from cell_stats]';
5084,5085c5087,5092
<     
<     SQLSTMT_SRV_IO_OUT_CELL4 CONSTANT VARCHAR2(32767) := q'[
---
>     SQLSTMT_SRV_IO_OUT_CELL CONSTANT VARCHAR2(32767) := q'[
>       with disk_names as ( #SQLSTMT_DISK_NAMES# ),
>       cell_type as ( #SQLSTMT_MAX_FACTOR# ),
>       base_stats as ( #SQLSTMT_BASE_STATS# ),
>       cell_stats as ( #SQLSTMT_CELL_STATS# ),
>       outlier_stats as ( #SQLSTMT_OUTLIER_STATS# )
5447,5461c5454,5459
< 
< 
< 
< 
< 
< 
< 
< 
<     L_QRY := SQLSTMT_SRV_IO_OUT_CELL1;
<     DBMS_LOB.WRITEAPPEND(L_QRY, LENGTH(SQLSTMT_SRV_IO_OUT_CELL2),
<                                 SQLSTMT_SRV_IO_OUT_CELL2);  
<     DBMS_LOB.WRITEAPPEND(L_QRY, LENGTH(SQLSTMT_SRV_IO_OUT_CELL3),
<                                 SQLSTMT_SRV_IO_OUT_CELL3);  
<     DBMS_LOB.WRITEAPPEND(L_QRY, LENGTH(SQLSTMT_SRV_IO_OUT_CELL4),
<                                 SQLSTMT_SRV_IO_OUT_CELL4);  
---
>     L_QRY := SQLSTMT_SRV_IO_OUT_CELL;
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_DISK_NAMES#', SQLSTMT_DISK_NAMES);
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_MAX_FACTOR#',SQLSTMT_MAX_FACTOR);
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_BASE_STATS#', SQLSTMT_BASE_STATS);
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_CELL_STATS#', SQLSTMT_CELL_STATS);
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_OUTLIER_STATS#', SQLSTMT_OUTLIER_STATS);
5559,5580c5557
<     
<     SQLSTMT_SRV_IO_OUT_DISK1 CONSTANT VARCHAR2(32767) := q'[
<       with disk_names as (
<         select /*+ materialize */
<                dbid, snap_id, cell_hash, disk_id, disk_name, disk
<           from dba_hist_cell_disk_name
<          where dbid    = :dbid
<            and snap_id = :eid),
<       cell_type as (
<         select dbid, snap_id, cellhash cell_hash, 
<                case 
<                when upper(extractvalue(xmltype(confval),'//makeModel'))
<                    like '%X7%EXTREME_FLASH%'
<                then 0.5
<                else 1
<                 end max_factor
<           from dba_hist_cell_config_detail
<          where dbid     = :dbid
<            and snap_id  = :eid
<            and conftype = 'CELL'),
<       disk_stats as (
<         -- compute buckets to determine outliers, find low/high
---
>     SQLSTMT_DISK_STATS CONSTANT VARCHAR2(32767) := q'[
6011c5988
<                                                        ct.max_factor) 
---
>                                                        ct.max_factor_iops) 
6015c5992
<                                                        ct.max_factor) 
---
>                                                        ct.max_factor_mbps) 
6131,6134c6108,6110
<                          and dt.snap_id   = ct.snap_id)))), ]';
<         
<     SQLSTMT_SRV_IO_OUT_DISK2 CONSTANT VARCHAR2(32767) := q'[
<       outlier_stats as (
---
>                          and dt.snap_id   = ct.snap_id)))]';
> 
>     SQLSTMT_OUTLIER_STATS CONSTANT VARCHAR2(32767) := q'[
6223c6199
<           from disk_stats)]';
---
>           from disk_stats]';
6225,6226c6201,6205
<     
<     SQLSTMT_SRV_IO_OUT_DISK3 CONSTANT VARCHAR2(32767) := q'[
---
>     SQLSTMT_SRV_IO_OUT_DISK CONSTANT VARCHAR2(32767) := q'[
>       with disk_names as ( #SQLSTMT_DISK_NAMES# ),
>       cell_type as ( #SQLSTMT_MAX_FACTOR# ),
>       disk_stats as ( #SQLSTMT_DISK_STATS# ),
>       outlier_stats as ( #SQLSTMT_OUTLIER_STATS# )
6536,6539c6515,6521
<     L_QRY := SQLSTMT_SRV_IO_OUT_DISK1 || 
<              SQLSTMT_SRV_IO_OUT_DISK2 ||
<              SQLSTMT_SRV_IO_OUT_DISK3;
<                  
---
>     L_QRY := SQLSTMT_SRV_IO_OUT_DISK;
>     
>     L_QRY := REPLACE(L_QRY, '#SQLSTMT_DISK_NAMES#', SQLSTMT_DISK_NAMES);
>     L_QRY := REPLACE(L_QRY, '#SQLSTMT_MAX_FACTOR#', SQLSTMT_MAX_FACTOR);
>     L_QRY := REPLACE(L_QRY, '#SQLSTMT_DISK_STATS#', SQLSTMT_DISK_STATS);
>     L_QRY := REPLACE(L_QRY, '#SQLSTMT_OUTLIER_STATS#', SQLSTMT_OUTLIER_STATS);
>     
7038a7021
>                                           242, 'smiohd',
7054a7038
>                        242,
7209a7194
>                             when e.metric_id = 239 then 'flrw'
7221c7206
<                    and e.metric_id between 220 and 238)
---
>                    and e.metric_id between 220 and 239)
7340a7326,7328
>              -- keep tmp_rq by category to get total rejections
> 	     nullif(tmp_rq,0)	tmp_rq,
> 	     nullif(tmp_rqps,0) tmp_rqps,
7394c7382,7385
<              100*spc_s/decode(cat_spc_s,0,null,cat_spc_s)  spc_pct_s,
---
>              100*spc_s/decode(cat_spc_s,0,null,cat_spc_s)    spc_pct_s,
> 	     -- keep tmp_rq by category for rejections
> 	     nullif(tmp_rq_s,0)	tmp_rq_s,
> 	     nullif(tmp_rqps_s,0) tmp_rqps_s,
7524c7515
<                       -- start columns for deriving partial writes
---
>                       -- start columns for deriving partial writes,rejections
7527c7518,7521
<                            and stat_name in ('fciowf','fciowow')
---
>                            and stat_name in ('fciowf','fciowow',
>                                  'fclwrej','fclwrejcglwth','fclwrejflwr',
>                                  'fclwrejlwth','fclwrejmxlm','fclwrejgllm',
>                                  'fclwrejflbs','fclwrejkpcl','fclwrejiormhd')
7540c7534,7537
<                            and stat_name in ('fciowf','fciowow')
---
>                            and stat_name in ('fciowf','fciowow',
>                                  'fclwrej','fclwrejcglwth','fclwrejflwr',
>                                  'fclwrejlwth','fclwrejmxlm','fclwrejgllm',
>                                  'fclwrejflbs','fclwrejkpcl','fclwrejiormhd')
7818a7816,7826
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
7820,7823c7828,7840
<       select #IDCOL# id, s.dbid, c.cell_name, s.reason_name,
<              s.bytes/#BTOMB# mb, s.byps/#BTOMB# mbps, rn_by, pct_by,
<              s.rq, s.rqps, rn_rq, pct_rq,
<              cell_rn_rq, cell_rn_by
---
>       select #IDCOL# id, s.dbid, 
>              decode(s.cell_hash, null, 'All', c.cell_name) cell_name,
>              s.reason_name,
>              rq, rqps, bytes/#BTOMB# mb, byps/#BTOMB# mbps,
>              rq/decode(rq_s,0,null,rq_s) pct_rq, 
>              bytes/decode(by_s,0,null,by_s) pct_by,
>              rn_rq, rn_by,
>              -- cell rank and totals
>              cell_rn_rq, cell_rn_by,
>              rq_s, by_s/#BTOMB# mb_s,
>              num_cells,
>              -- ordering to ensure 'All' is the first cell
>              decode(s.cell_hash, null, 0, 1) ordno
7825,7829c7842,7845
<          (select -- compute rank for bytes and requests
<                  -- break ties using the other metric (reqs/bytes), cell_hash
<                  dbid, cell_hash, reason_name, 
<                  bytes, rq, byps, rqps,
<                  -- rank within cell
---
>          (select dbid, cell_hash, reason_name,
>                  rq, bytes, rqps, byps, 
>                  rq_s, by_s,
>                  -- rank reasons within each cell
7836,7841c7852
<                  -- ratio within cell
<                  ratio_to_report(bytes) over 
<                         (partition by dbid, cell_hash) pct_by,
<                  ratio_to_report(rq) over 
<                         (partition by dbid, cell_hash) pct_rq,
<                  -- rank of cell over all cells
---
>                  -- rank cells for diff-diff
7843,7844c7854,7855
<                    over (order by cell_rq desc, cell_by desc, 
<                                  cell_hash) cell_rn_rq,
---
>                    over (order by rq_s desc, by_s desc, 
>                                cell_hash nulls first) cell_rn_rq,
7846,7849c7857,7860
<                    over (order by cell_by desc, cell_rq desc,
<                                  cell_hash) cell_rn_by
< 
<             from (-- calculate cell total and per second rates
---
>                    over (order by by_s desc, rq_s desc,
>                                cell_hash nulls first) cell_rn_by,
>                  count(distinct cell_hash) over () num_cells
>             from (
7851,7924c7862,7946
<                      bytes, rq, 
<                      bytes/:duration#ID# byps,
<                      rq/:duration#ID#    rqps,
<                      sum(rq) over (partition by dbid, cell_hash) cell_rq,
<                      sum(bytes) over (partition by dbid, cell_hash) cell_by
<                 from (-- remove scrub from internal IO 
<                   select dbid, cell_hash, reason_name,
<                          case when reason_id = 0
<                               then greatest(0,
<                                      bytes - 
<                                        sum(scrub_by) 
<                                          over (partition by dbid, cell_hash))
<                               else bytes
<                           end bytes,
<                          case when reason_id = 0
<                               then greatest(0,
<                                      rq - 
<                                        sum(scrub_rq) 
<                                          over (partition by dbid, cell_hash))
<                               else rq
<                           end rq
<                     from (-- get delta values and scrub IO
<                       select e.dbid, e.cell_hash,
<                              e.reason_id, e.reason_name,
<                              e.bytes    - nvl(b.bytes,0)    bytes,
<                              e.requests - nvl(b.requests,0) rq,
<                              0 scrub_by, 0 scrub_rq
<                         from dba_hist_cell_ioreason b,
<                              dba_hist_cell_ioreason e
<                        where e.dbid        = :dbid#ID#
<                          and b.snap_id (+) = :bid#ID#
<                          and e.snap_id     = :eid#ID#
<                          and e.dbid        = b.dbid (+)
<                          and e.cell_hash   = b.cell_hash (+)
<                          and e.incarnation_num = b.incarnation_num (+)
<                          and e.reason_id   = b.reason_id (+)
<                        union all
<                       select e.dbid, e.cell_hash, 
<                              -1 reason_id, 'scrub IO' reason_name,
<                              sum(
<                                decode(
<                                  e.metric_id, 
<                                  361, e.metric_value - nvl(b.metric_value,0), 
<                                  0)) bytes,
<                              sum(
<                                decode(
<                                  e.metric_id, 
<                                  360, e.metric_value - nvl(b.metric_value,0),
<                                  0)) rq,
<                              -- add columns so se can recalculate internal IO
<                              sum(
<                                decode(
<                                  e.metric_id, 
<                                  361, e.metric_value - nvl(b.metric_value,0),
<                                  0)) scrub_by,
<                              sum(
<                                decode(
<                                  e.metric_id, 
<                                  360, e.metric_value - nvl(b.metric_value,0), 
<                                  0)) scrub_rq
<                         from dba_hist_cell_global b,
<                              dba_hist_cell_global e
<                        where e.dbid          = :dbid
<                          and b.snap_id (+)   = :bid
<                          and e.snap_id       = :eid
<         		 and e.dbid	   = b.dbid (+)
<         		 and e.cell_hash   = b.cell_hash (+)
<         		 and e.incarnation_num = b.incarnation_num (+)
<                          and e.metric_id   = b.metric_id (+)
<                          and e.metric_id between 360 and 361
<                        group by e.dbid, e.cell_hash)))) s
<        where s.dbid      = c.dbid
<          and s.cell_hash = c.cell_hash
<          and c.snap_id   = :eid#ID#]';
---
>                      rq, bytes, rqps, byps,
>                      -- cell totals
>                      max(rq) over (partition by cell_hash) rq_s,
>                      max(bytes) over (partition by cell_hash) by_s
>                 from (-- calculate cell total and per second rates
>                       -- cube to get totals for cell
>                  select dbid, cell_hash, reason_name, 
>                         sum(rq) rq, sum(bytes) bytes, 
>                         sum(rq)/:duration#ID#  rqps,
>                         sum(bytes)/:duration#ID# byps
>                    from (-- remove scrub from internal IO 
>                      select dbid, cell_hash, reason_name,
>                             case when reason_id = 0
>                                  then greatest(0,
>                                         bytes - 
>                                           sum(scrub_by) over
>                                             (partition by dbid, cell_hash))
>                                  else bytes
>                              end bytes,
>                             case when reason_id = 0
>                                  then greatest(0,
>                                         rq - 
>                                           sum(scrub_rq) over
>                                             (partition by dbid, cell_hash))
>                                  else rq
>                              end rq
>                        from (-- get delta values and scrub IO
>                          select e.dbid, e.cell_hash,
>                                 e.reason_id, e.reason_name,
>                                 e.bytes    - nvl(b.bytes,0)    bytes,
>                                 e.requests - nvl(b.requests,0) rq,
>                                 0 scrub_by, 0 scrub_rq
>                            from dba_hist_cell_ioreason b,
>                                 dba_hist_cell_ioreason e
>                           where e.dbid        = :dbid#ID#
>                             and b.snap_id (+) = :bid#ID#
>                             and e.snap_id     = :eid#ID#
>                             and e.dbid        = b.dbid (+)
>                             and e.cell_hash   = b.cell_hash (+)
>                             and e.incarnation_num = b.incarnation_num (+)
>                             and e.reason_id   = b.reason_id (+)
>                           union all
>                          select e.dbid, e.cell_hash, 
>                                 -1 reason_id, 'scrub IO' reason_name,
>                                 sum(
>                                   decode(
>                                     e.metric_id, 
>                                     361, 
>                                     e.metric_value - nvl(b.metric_value,0), 
>                                     0)) bytes,
>                                 sum(
>                                   decode(
>                                     e.metric_id, 
>                                     360, 
>                                     e.metric_value - nvl(b.metric_value,0),
>                                     0)) rq,
>                                 -- add columns to recalculate internal IO
>                                 sum(
>                                   decode(
>                                     e.metric_id, 
>                                     361, 
>                                     e.metric_value - nvl(b.metric_value,0),
>                                     0)) scrub_by,
>                                 sum(
>                                   decode(
>                                     e.metric_id, 
>                                     360, 
>                                     e.metric_value - nvl(b.metric_value,0), 
>                                     0)) scrub_rq
>                            from dba_hist_cell_global b,
>                                 dba_hist_cell_global e
>                           where e.dbid          = :dbid
>                             and b.snap_id (+)   = :bid
>                             and e.snap_id       = :eid
>            		 and e.dbid	   = b.dbid (+)
>            		 and e.cell_hash   = b.cell_hash (+)
>            		 and e.incarnation_num = b.incarnation_num (+)
>                             and e.metric_id   = b.metric_id (+)
>                             and e.metric_id between 360 and 361
>                           group by e.dbid, e.cell_hash))
>                   group by dbid, cube(reason_name, cell_hash)))
>            where reason_name is not null) s
>        where s.dbid      = c.dbid (+)
>          and s.cell_hash = c.cell_hash (+)
>          and c.snap_id (+)  = :eid#ID#]';
9030a9053
>                xmlelement("statname",'flrw'),
10956a10980,10987
>                           -- add XML for total rejections
>                           case when category = '12-fc_lwrej'
>                                 and max(tmp_rq_s) is not null
>                           then xmlelement("stat",
>                                  xmlattributes('fclwrejtot'      as "name",
>                                    round(max(tmp_rq_s),2)      as "rq",
>                                    round(max(tmp_rqps_s),2)    as "rqps"))
>                            end,
10984a11016,11017
>                        max(tmp_rq_s)      tmp_rq_s,
>                        max(tmp_rqps_s)    tmp_rqps_s,
11156a11190,11197
>                                -- add XML for total rejections
>                                case when category = '12-fc_lwrej'
>                                      and max(tmp_rq) is not null
>                                then xmlelement("stat",
>                                       xmlattributes('fclwrejtot'    as "name",
>                                         round(max(tmp_rq),2)      as "rq",
>                                         round(max(tmp_rqps),2)    as "rqps"))
>                                 end,
11449c11490
<               xmlagg(cell_xml order by cell_name))
---
>               xmlagg(cell_xml order by ordno, cell_name))
11451c11492,11493
< 	  select cell_name,
---
>           select cell_name,
>                  max(ordno) ordno,
11453,11468c11495,11513
<                   xmlattributes(cell_name as "name"),
< 		 xmlagg(
<                    xmlelement("reason",
<                     xmlattributes(reason_name as "name"),
<                     xmlelement("stat",
<                      xmlattributes('rq'      as "name",
<                        rq                    as "value",
<                        round(100*pct_rq,2)   as "pct",
<                        round(rqps,2)         as "psec",
<                        rn_rq                 as "rn")),
<                     xmlelement("stat",
<                      xmlattributes('mb'    as "name",
<                        round(mb,2)         as "value",
<                        round(100*pct_by,2) as "pct",
<                        round(mbps,2)       as "psec",
<                        rn_by               as "rn")))
---
>                    xmlattributes(cell_name as "name",
>                      case when cell_name = 'All'
>                           then max(num_cells)
>                       end                  as "num_cells"),
>                    xmlagg(
>                      xmlelement("reason",
>                         xmlattributes(reason_name as "name"),
>                         xmlelement("stat",
>                           xmlattributes('rq'      as "name",
>                             rq                    as "value",
>                             round(100*pct_rq,2)   as "pct",
>                             round(rqps,2)         as "psec",
>                             rn_rq                 as "rn")),
>                         xmlelement("stat",
>                           xmlattributes('mb'    as "name",
>                             round(mb,2)         as "value",
>                             round(100*pct_by,2) as "pct",
>                             round(mbps,2)       as "psec",
>                             rn_by               as "rn")))
11470c11515
< 	    from io_reasons
---
>             from io_reasons
11473,11474c11518,11519
< 	   group by cell_name)]';
<       
---
>            group by cell_name)]';
>           
11506c11551
<          USING P_DURATION, P_DURATION,
---
>          USING P_DURATION, P_DURATION, 
11993a12039
>           and b.instance_number (+) = e.instance_number
14239,14244c14285
<     with disk_names as  (
<         select /*+ materialize */
<                dbid, snap_id, cell_hash, disk_id, disk_name, disk disk_type
<           from dba_hist_cell_disk_name
<          where (dbid = :dbid1 and snap_id = :eid1)
<             or (dbid = :dbid2 and snap_id = :eid2)),
---
>     with disk_names as ( #SQLSTMT_DISK_NAMES_2# ),
14749a14791
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_DISK_NAMES_2#',SQLSTMT_DISK_NAMES_2);
14847,14853c14889
<     with disk_names as  (
<             select /*+ materialize */
<                    dbid, snap_id, cell_hash, disk_id, disk_name, disk disk_type
<               from dba_hist_cell_disk_name
<              where (dbid = :dbid1 and snap_id = :eid1)
<                 or (dbid = :dbid2 and snap_id = :eid2)
<     ),
---
>     with disk_names as  ( #SQLSTMT_DISK_NAMES_2# ),
15329a15366
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_DISK_NAMES_2#',SQLSTMT_DISK_NAMES_2);
16824,16830c16861
<     with disk_names as  (
<             select /*+ materialize */
<                    dbid, snap_id, cell_hash, disk_id, disk_name, disk disk_type
<               from dba_hist_cell_disk_name
<              where (dbid = :dbid1 and snap_id = :eid1)
<                 or (dbid = :dbid2 and snap_id = :eid2)
<     ),
---
>     with disk_names as  ( #SQLSTMT_DISK_NAMES_2# ),
16980a17012
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_DISK_NAMES_2#',SQLSTMT_DISK_NAMES_2);
18066,18072c18098
<     with disk_names as	(
< 	    select /*+ materialize */
< 		   dbid, snap_id, cell_hash, disk_id, disk_name, disk disk_type
< 	      from dba_hist_cell_disk_name
< 	     where (dbid = :dbid1 and snap_id = :eid1)
< 		or (dbid = :dbid2 and snap_id = :eid2)
<     ),
---
>     with disk_names as	( #SQLSTMT_DISK_NAMES_2# ),
18222a18249
>     L_QRY := REPLACE(L_QRY,'#SQLSTMT_DISK_NAMES_2#',SQLSTMT_DISK_NAMES_2);
20563c20590,20593
<                                            max(sp1_cell_name) as "name")),
---
>                                            max(sp1_cell_name) as "name",
>                                 case when max(sp1_cell_name) = 'All'
>                                      then max(sp1_num_cells)
>                                  end                          as "num_cells")),
20566c20596,20599
<                                            max(sp2_cell_name) as "name"))),
---
>                                            max(sp2_cell_name) as "name",
>                                 case when max(sp2_cell_name) = 'All'
>                                      then max(sp2_num_cells)
>                                  end                         as "num_cells"))),
20573a20607
>                        sp1_num_cells, sp2_num_cells,
20615c20649,20651
<                            sp2.pct_rq - sp1.pct_rq                 pct_rq_diff
---
>                            sp2.pct_rq - sp1.pct_rq                 pct_rq_diff,
>                            sp1.num_cells sp1_num_cells,
>                            sp2.num_cells sp2_num_cells
20634c20670,20673
<                                            max(sp1_cell_name) as "name")),
---
>                                            max(sp1_cell_name) as "name",
>                                case when max(sp1_cell_name) = 'All'
>                                     then max(sp1_num_cells)
>                                 end as "num_cells")),
20637c20676,20679
<                                            max(sp2_cell_name) as "name"))),
---
>                                            max(sp2_cell_name) as "name",
>                                case when max(sp2_cell_name) = 'All'
>                                     then max(sp2_num_cells)
>                                 end as "num_cells"))),
20643a20686
>                        sp1_num_cells, sp2_num_cells,
20685c20728,20730
<                            sp2.pct_by - sp1.pct_by                 pct_by_diff
---
>                            sp2.pct_by - sp1.pct_by                 pct_by_diff,
>                            sp1.num_cells sp1_num_cells, 
>                            sp2.num_cells sp2_num_cells
SYS.PRVTEMX_DBHOME - PACKAGE BODY (RU):
1154a1155,1157
>          case 
>          -- for non-CDB and root
>          when :b_con_id in (0, 1) then
1209c1212,1232
<          ),
---
>          )
>         -- else for CDB PDB 
>         else 
>          (select
>                xmlelement(
>                  "cpu",
>                  xmlattributes(
>                    bg_cpu_usage             as "bg",
>                    fg_cpu_usage             as "fg"),
>                  null)
>              from
>              (
>                select userenv('INSTANCE') inst_id,
>                     round(avg(decode(metric_id, 18006, value, null)),2) fg_cpu_usage,
>                     round(avg(decode(metric_id, 18008, value, null)),2) bg_cpu_usage
>                from sys.v_$con_sysmetric 
>                where metric_id in (18006, 18008) 
>              )
>              where inst_id between :b_inst_id_low and :b_inst_id_high
>          )
>          end,
1515a1539,1540
>                         B_CON_ID,
>                         B_INST_ID_LOW, B_INST_ID_HIGH, 
SYS.PRVT_ASH_OMX - PACKAGE BODY (RU):
115c115,116
<                           RESOLUTION      => RESOLUTION);
---
>                           RESOLUTION      => RESOLUTION,
>                           INCLUDE_BG      => INCLUDE_BG);
126c127,128
<                           RESOLUTION      => RESOLUTION);
---
>                           RESOLUTION      => RESOLUTION,
>                           INCLUDE_BG      => INCLUDE_BG);
139c141,142
<                           RESOLUTION      => RESOLUTION);        
---
>                           RESOLUTION      => RESOLUTION,
>                           INCLUDE_BG      => INCLUDE_BG);        
SYS.PRVT_AWR_VIEWER - PACKAGE BODY (RU):
1304,1305c1304,1305
<             from awr_root_database_instance di,
<                  awr_root_snapshot s
---
>             from sys.awr_root_database_instance di,
>                  sys.awr_root_snapshot s
1358,1359c1358,1359
<             from awr_root_pdb_instance dc,
<                  awr_root_snapshot s
---
>             from sys.awr_root_pdb_instance dc,
>                  sys.awr_root_snapshot s
1432,1439c1432,1449
<     IF (P_CON_ID = 0 OR P_CON_ID > 2) THEN
<       EXECUTE IMMEDIATE L_QRY
<         BULK COLLECT INTO P_CGRP_MAP
<         USING P_AWR_PERIOD.M_DBID,
<               P_AWR_PERIOD.M_BEGIN_SNAP, P_AWR_PERIOD.M_END_SNAP,
<               SYS.DBMS_SQLTUNE_UTIL0.CDBCON_ID_TO_DBID(P_CON_ID),
<               P_AWR_PERIOD.M_INST_ID_LOW, P_AWR_PERIOD.M_INST_ID_HIGH,
<               P_AWR_PERIOD.M_INST_ID_LIST;
---
> 
>     
>     IF (DBMS_SQLTUNE_UTIL2.RESOLVE_DATABASE_TYPE(P_AWR_PERIOD.M_DBID) != 
>         DBMS_SQLTUNE_UTIL2.DB_TYPE_IMP) THEN
>       
>       IF (P_CON_ID = 0 OR P_CON_ID > 2) THEN
>         EXECUTE IMMEDIATE L_QRY
>           BULK COLLECT INTO P_CGRP_MAP
>           USING P_AWR_PERIOD.M_DBID,
>                 P_AWR_PERIOD.M_BEGIN_SNAP, P_AWR_PERIOD.M_END_SNAP,
>                 SYS.DBMS_SQLTUNE_UTIL0.CDBCON_ID_TO_DBID(P_CON_ID),
>                 P_AWR_PERIOD.M_INST_ID_LOW, P_AWR_PERIOD.M_INST_ID_HIGH,
>                 P_AWR_PERIOD.M_INST_ID_LIST;
>       
>       ELSE
>         
>         P_CGRP_MAP := PRVT_AWRV_INSTTAB();
>       END IF;
1443c1453,1468
<       P_CGRP_MAP := PRVT_AWRV_INSTTAB();
---
>       IF ((DBMS_SQLTUNE_UTIL2.IS_IMPORTED_PDB(P_AWR_PERIOD.M_DBID)
>            = DBMS_SQLTUNE_UTIL2.STR_YES) OR
>           (DBMS_SQLTUNE_UTIL2.IS_IMPORTED_CDB(P_AWR_PERIOD.M_DBID) 
>            = DBMS_SQLTUNE_UTIL2.STR_NO)) THEN
>         EXECUTE IMMEDIATE L_QRY
>           BULK COLLECT INTO P_CGRP_MAP
>           USING P_AWR_PERIOD.M_DBID,
>                 P_AWR_PERIOD.M_BEGIN_SNAP, P_AWR_PERIOD.M_END_SNAP,
>                 P_AWR_PERIOD.M_DBID,
>                 P_AWR_PERIOD.M_INST_ID_LOW, P_AWR_PERIOD.M_INST_ID_HIGH,
>                 P_AWR_PERIOD.M_INST_ID_LIST;
>       
>       ELSE
>         
>         P_CGRP_MAP := PRVT_AWRV_INSTTAB();
>       END IF;
1732c1757
<                 from awr_root_snapshot s
---
>                 from sys.awr_root_snapshot s
1900c1925
<                 from awr_root_database_instance';
---
>                 from sys.awr_root_database_instance';
1905c1930
<                 from awr_root_database_instance';
---
>                 from sys.awr_root_database_instance';
1923,1924c1948,1949
<      ' from awr_root_sysstat  y,
<             awr_root_snapshot s
---
>      ' from sys.awr_root_sysstat  y,
>             sys.awr_root_snapshot s
1950,1951c1975,1976
<        ' from awr_root_sys_time_model t,
<               awr_root_snapshot       s
---
>        ' from sys.awr_root_sys_time_model t,
>               sys.awr_root_snapshot       s
1976,1977c2001,2002
<        ' from awr_root_osstat y,
<               awr_root_snapshot s
---
>        ' from sys.awr_root_osstat y,
>               sys.awr_root_snapshot s
2013c2038
<        ' from awr_root_snapshot     s,
---
>        ' from sys.awr_root_snapshot     s,
2025,2026c2050,2051
<                 from awr_root_system_event s,
<                      awr_root_bg_event_summary bg
---
>                 from sys.awr_root_system_event s,
>                      sys.awr_root_bg_event_summary bg
2054,2055c2079,2080
<        ' from awr_root_system_event e,
<               awr_root_snapshot     s
---
>        ' from sys.awr_root_system_event e,
>               sys.awr_root_snapshot     s
2110,2111c2135,2136
<         from awr_root_iostat_detail d, 
<              awr_root_snapshot      s
---
>         from sys.awr_root_iostat_detail d, 
>              sys.awr_root_snapshot      s
2143,2144c2168,2169
<         from awr_root_iostat_function f, 
<              awr_root_snapshot        s
---
>         from sys.awr_root_iostat_function f, 
>              sys.awr_root_snapshot        s
2175,2176c2200,2201
<       ' from awr_root_iostat_filetype f, 
<              awr_root_snapshot        s
---
>       ' from sys.awr_root_iostat_filetype f, 
>              sys.awr_root_snapshot        s
2219,2220c2244,2245
<       ' from awr_root_iostat_filetype f,  
<              awr_root_snapshot      s 
---
>       ' from sys.awr_root_iostat_filetype f,  
>              sys.awr_root_snapshot      s 
2262,2263c2287,2288
<         from awr_root_iostat_function f, 
<              awr_root_snapshot        s
---
>         from sys.awr_root_iostat_function f, 
>              sys.awr_root_snapshot        s
2319c2344
<         from awr_root_sqlstat q
---
>         from sys.awr_root_sqlstat q
2356c2381
<         from awr_root_sqlstat q
---
>         from sys.awr_root_sqlstat q
2392c2417
<         from awr_root_sqlstat q
---
>         from sys.awr_root_sqlstat q
2423c2448
<         from awr_root_sqlstat q
---
>         from sys.awr_root_sqlstat q
2444c2469
<          from awr_root_sgastat s
---
>          from sys.awr_root_sgastat s
2453c2478
<          from awr_root_mem_dynamic_comp m
---
>          from sys.awr_root_mem_dynamic_comp m
2475c2500
<                 from awr_root_sqltext t
---
>                 from sys.awr_root_sqltext t
2482,2483c2507,2508
<                 from awr_root_sqltext t,
<                      awr_root_sqlcommand_name c
---
>                 from sys.awr_root_sqltext t,
>                      sys.awr_root_sqlcommand_name c
2675c2700
<           FROM AWR_PDB_SNAPSHOT
---
>           FROM SYS.AWR_PDB_SNAPSHOT
2680c2705
<           FROM AWR_ROOT_SNAPSHOT
---
>           FROM SYS.AWR_ROOT_SNAPSHOT
2712c2737
<                 FROM AWR_PDB_SNAPSHOT
---
>                 FROM SYS.AWR_PDB_SNAPSHOT
2724c2749
<                 FROM AWR_ROOT_SNAPSHOT
---
>                 FROM SYS.AWR_ROOT_SNAPSHOT
3284c3309
<                    awr_root_snapshot s
---
>                    sys.awr_root_snapshot s
3391c3416
<         from awr_root_stat_name
---
>         from sys.awr_root_stat_name
3408c3433
<         from awr_root_stat_name
---
>         from sys.awr_root_stat_name
3445c3470
<                   from awr_root_event_name
---
>                   from sys.awr_root_event_name
3484c3509
<               from awr_root_event_name
---
>               from sys.awr_root_event_name
4079c4104
<           from awr_root_sqlstat s
---
>           from sys.awr_root_sqlstat s
5151c5176
<         SELECT STAT_ID INTO L_STAT_ID FROM AWR_PDB_STAT_NAME 
---
>         SELECT STAT_ID INTO L_STAT_ID FROM SYS.AWR_PDB_STAT_NAME 
5158c5183
<           FROM AWR_ROOT_STAT_NAME 
---
>           FROM SYS.AWR_ROOT_STAT_NAME 
6122,6123c6147,6148
<         from awr_root_osstat y,
<              awr_root_snapshot s
---
>         from sys.awr_root_osstat y,
>              sys.awr_root_snapshot s
6861c6886
<             from awr_root_pgastat s
---
>             from sys.awr_root_pgastat s
6869c6894
<             from awr_root_sgastat s
---
>             from sys.awr_root_sgastat s
7148c7173
<           from awr_root_tbspc_space_usage s,
---
>           from sys.awr_root_tbspc_space_usage s,
7152c7177
<                  from awr_root_tablespace ts,
---
>                  from sys.awr_root_tablespace ts,
7154c7179
<                         from awr_root_datafile
---
>                         from sys.awr_root_datafile
7158c7183
<                         from awr_root_tempfile
---
>                         from sys.awr_root_tempfile
7390c7415
<                   from awr_root_sqlstat s
---
>                   from sys.awr_root_sqlstat s
7800c7825
<                      from awr_root_sqltext t
---
>                      from sys.awr_root_sqltext t
8150c8175
<                         from awr_root_sqlstat s
---
>                         from sys.awr_root_sqlstat s
8375c8400
<               from awr_root_database_instance di,
---
>               from sys.awr_root_database_instance di,
8379c8404
<                       from awr_root_snapshot s
---
>                       from sys.awr_root_snapshot s
8530c8555
<           from awr_root_sysmetric_summary
---
>           from sys.awr_root_sysmetric_summary
9315,9316c9340,9341
<                FROM AWR_PDB_DATABASE_INSTANCE DI,
<                     AWR_PDB_SNAPSHOT S
---
>                FROM SYS.AWR_PDB_DATABASE_INSTANCE DI,
>                     SYS.AWR_PDB_SNAPSHOT S
9339,9340c9364,9365
<                    FROM AWR_ROOT_DATABASE_INSTANCE DI,
<                         AWR_ROOT_SNAPSHOT S
---
>                    FROM SYS.AWR_ROOT_DATABASE_INSTANCE DI,
>                         SYS.AWR_ROOT_SNAPSHOT S
11673c11698
<           from awr_root_rsrc_pdb_metric
---
>           from sys.awr_root_rsrc_pdb_metric
11696c11721
<                           from awr_root_rsrc_metric m
---
>                           from sys.awr_root_rsrc_metric m
12032c12057
<                                      from awr_root_snapshot
---
>                                      from sys.awr_root_snapshot
12055c12080
<                                    from awr_root_snapshot
---
>                                    from sys.awr_root_snapshot
12137c12162
<                              from awr_root_database_instance di
---
>                              from sys.awr_root_database_instance di
13143c13168
<             from awr_root_active_sess_history s
---
>             from sys.awr_root_active_sess_history s
13191c13216
<             from awr_root_active_sess_history s
---
>             from sys.awr_root_active_sess_history s
13241c13266
<             from awr_root_active_sess_history s
---
>             from sys.awr_root_active_sess_history s
14375c14400
<           from awr_root_database_instance di,
---
>           from sys.awr_root_database_instance di,
14377c14402
<                 from awr_root_snapshot s
---
>                 from sys.awr_root_snapshot s
14410c14435
<                     from awr_root_active_sess_history s
---
>                     from sys.awr_root_active_sess_history s
14449c14474
<             from  awr_root_rsrc_pdb_metric s 
---
>             from  sys.awr_root_rsrc_pdb_metric s 
14626c14651
<           from awr_root_database_instance di,
---
>           from sys.awr_root_database_instance di,
14628c14653
<                 from awr_root_snapshot s
---
>                 from sys.awr_root_snapshot s
14815c14840
<                   from awr_root_sga s
---
>                   from sys.awr_root_sga s
14827c14852
<                   from awr_root_pgastat s
---
>                   from sys.awr_root_pgastat s
16081c16106
<     L_ISLOCAL         BOOLEAN;
---
>     L_IS_LOCAL         BOOLEAN;
16130c16155
<       L_ISLOCAL := TRUE;
---
>       L_IS_LOCAL := TRUE;
16132c16157
<       L_ISLOCAL := FALSE;
---
>       L_IS_LOCAL := FALSE;
16141c16166
<     IF (NOT(L_ISLOCAL) AND IS_REALTIME = G_TIMEPICKER_REALTIME) THEN
---
>     IF (NOT(L_IS_LOCAL) AND IS_REALTIME = G_TIMEPICKER_REALTIME) THEN
16560a16586,16591
>   
>   
>   
>   
>   
>   
16575a16607
>     DB_TZ             IN VARCHAR2       DEFAULT NULL,
16578a16611
> 
16626c16659
<     L_ISLOCAL         BOOLEAN;    
---
>     L_IS_LOCAL         BOOLEAN;    
16703c16736
<       L_ISLOCAL := TRUE;
---
>       L_IS_LOCAL := TRUE;
16705c16738
<       L_ISLOCAL := FALSE;
---
>       L_IS_LOCAL := FALSE;
16714c16747
<     IF (NOT(L_ISLOCAL) AND IS_REALTIME = G_TIMEPICKER_REALTIME) THEN
---
>     IF (NOT(L_IS_LOCAL) AND IS_REALTIME = G_TIMEPICKER_REALTIME) THEN
16725,16758d16757
< 
<     IF (L_ISLOCAL) THEN
<         IF (DBMS_SQLTUNE_UTIL2.RESOLVE_DATABASE_TYPE(L_DBID) 
<          IN (DBMS_SQLTUNE_UTIL2.DB_TYPE_PDB, 
<                 DBMS_SQLTUNE_UTIL2.DB_TYPE_IMP)) 
<         THEN
<           EXECUTE IMMEDIATE 
<              'select extract(day    from snap_interval) * 24*60 +
<                      extract(hour   from snap_interval) * 60    +
<                      extract(minute from snap_interval) 
<               from awr_pdb_wr_control
<               where dbid = :1'
<             INTO L_SNAPINT_MINS
<             USING L_DBID;
<         ELSE 
<           EXECUTE IMMEDIATE 
<              'select extract(day    from snap_interval) * 24*60 +
<                      extract(hour   from snap_interval) * 60    +
<                      extract(minute from snap_interval) 
<               from awr_root_wr_control
<               where dbid = :1'
<             INTO L_SNAPINT_MINS
<             USING L_DBID;
<         END IF;
<     ELSE
<       
<       L_SNAPINT_MINS := 60;
<     END IF;
<     
< 
<     
<     L_USEASH := FALSE;
< 
<     
16760,16762c16759
< 
<       L_TOPSQL_XML := NULL;
<     
---
>       L_TOPSQL_XML := NULL;	
16766d16762
< 
16768,16838c16764,16777
<         IF (IS_REALTIME IS NULL OR IS_REALTIME = G_TIMEPICKER_HISTORICAL) THEN
<           
<           IF (L_START_TIME IS NOT NULL AND L_END_TIME IS NOT NULL AND
<              (L_END_TIME - L_START_TIME)*24*60 < L_SNAPINT_MINS) 
<           THEN
<             L_USEASH := TRUE;
<           END IF;
<           
<           
<         ELSE
<           L_USEASH := TRUE;
<         END IF;
< 
< 
<         IF (L_USEASH) THEN
<           SELECT XMLELEMENT("region_data",
<                    XMLAGG(
<                      XMLELEMENT("stattype",
<                        XMLATTRIBUTES('topsql' AS "name",
<                                      '10' AS "topn",
<                                      'ash'   AS "source"))))
<             INTO L_TOPSQL_XML
<             FROM SYS.DUAL;
< 
<             
<             IF (L_END_TIME IS NULL) THEN
<               L_END_TIME := SYSDATE;
<             END IF;
< 
<             IF (L_START_TIME IS NULL) THEN
<               L_START_TIME := L_END_TIME - 1/24;
<             END IF;
< 
<             L_TOPSQL_XML := L_TOPSQL_XML.APPENDCHILDXML('/*/stattype',
<                               SYS.DBMS_ASH_INTERNAL.REPORT_ASHVIEWER_XML(
<                                 DBID          => L_DBID,
<                                 INST_ID       => L_INST_ID,
<                                 BEGIN_TIME    => 
<                                   TO_CHAR(L_START_TIME,'hh24:mi:ss mm/dd/yyyy'),
<                                 END_TIME      => 
<                                   TO_CHAR(L_END_TIME,'hh24:mi:ss mm/dd/yyyy'),
<                                 REPORT_LEVEL  =>'<sqlid,wait_class>{treemap}', 
<                                 PARENT_REPORT => 'topsql'));
<                         
<         ELSE
< 
<           
<           L_TOPSQL_XML := I_REP_AWRDATA_XML(
<                             START_TIME       => L_START_TIME,
<                             END_TIME         => L_END_TIME,
<                             TIMEPICKER_START => NULL,
<                             TIMEPICKER_END   => NULL,
<                             INSTANCE_LIST    => L_INSTANCE_LIST,
<                             DBID             => L_DBID,
<                             BUCKET_MAX_COUNT => 1,  
<                             TIME_MODEL       => 'no',
<                             WAIT_CLASS       => 'no',
<                             WAIT_EVENT       => 'no',
<                             EVENT_CLASS      => 'no',
<                             SYSSTAT          => 'no',
<                             SQLSTAT          => 'EM_TOP_SQL',
<                             OSSTAT           => 'no',
<                             IOSTAT           => 'no',
<                             MEMORY           => 'no',
<                             SPACE            => 'no',
<                             KEY_STATISTICS   => 'no',
<                             INST_DETAIL      => L_SHOW_INST_DETAIL,
<                             MEMBERS          => 'no',
<                             SUMMARY          => 'no',
<                             SHOW_SQL         => SHOW_SQL);
<         END IF;
---
>         L_TOPSQL_XML := PRVT_AWR_VIEWER.FETCH_TOPSQL_XML(
> 		            START_TIME        =>  L_START_TIME,
> 			    END_TIME          =>  L_END_TIME,
> 			    INST_ID           =>  INST_ID,
> 			    DBID              =>  DBID,
> 			    IS_REALTIME       =>  IS_REALTIME,
> 			    TOP_N_DETAIL      =>  TOP_N_DETAIL,
> 			    OUTER_START_TIME  =>  OUTER_START_TIME,
> 			    OUTER_END_TIME    =>  OUTER_END_TIME,
> 			    COMPRESS_XML      =>  COMPRESS_XML,
> 			    SHOW_SQL          =>  SHOW_SQL,
>                             DB_TZ             =>  DB_TZ,
>                             IS_OMX            =>  IS_OMX
> 		);
16842a16782
>     
16915,16916c16855
<     
<     IF (L_TOPSQL_XML IS NOT NULL) THEN 
---
>     IF (L_TOPSQL_XML IS NOT NULL) THEN
16918c16857
<     END IF; 
---
>     END IF;
16920c16859
< 
---
>     
16928a16868,17155
>     IF (L_REPORT_XML IS NULL) THEN
>       
>       L_REPORT_XML :=
>         PRVT_REPORT_TAGS.BUILD_REPORT_TAG(
>           DBMS_REPORT.BUILD_REPORT_REFERENCE_STRUCT(
>             'awrv','topsql',L_REF_PARAMS),
>           NULL, NULL);
>     END IF;
> 
>     IF (L_SET_ENV) THEN
>       
>       DBMS_REPORT.RESTORE_REPORT_ENV(L_ORIG_ENV);
>     END IF;
> 
>  
>     
>     RETURN L_REPORT_XML;
> 
>   END REPORT_TOPSQL_XML;
> 							   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   FUNCTION FETCH_TOPSQL_XML(
>     START_TIME        IN DATE           DEFAULT NULL,
>     END_TIME          IN DATE           DEFAULT NULL,
>     INST_ID           IN NUMBER         DEFAULT NULL,
>     DBID              IN NUMBER         DEFAULT NULL,
>     IS_REALTIME       IN NUMBER         DEFAULT NULL,
>     TOP_N_DETAIL      IN NUMBER         DEFAULT NULL,
>     OUTER_START_TIME  IN DATE           DEFAULT NULL,
>     OUTER_END_TIME    IN DATE           DEFAULT NULL,
>     COMPRESS_XML      IN BINARY_INTEGER DEFAULT NULL,
>     SHOW_SQL          IN NUMBER         DEFAULT 0,
>     DB_TZ             IN VARCHAR2       DEFAULT NULL,
>     IS_OMX            IN NUMBER         DEFAULT 0)
>   RETURN XMLTYPE
>   IS
> 
>     
>     L_TOPSQL_XML     XMLTYPE;
>     L_SQL_XML        XMLTYPE;
>     L_MAIN_XML       XMLTYPE;				
> 
>     
>     L_START_TIME     DATE := START_TIME;
>     L_END_TIME       DATE := END_TIME;
>     L_DBID           NUMBER;
>     L_INST_ID        NUMBER;
>     L_INST_ID_LOW    NUMBER;
>     L_INST_ID_HIGH   NUMBER;
>     L_INSTANCE_LIST  VARCHAR2(32);
>     L_COMPRESS_XML   BINARY_INTEGER := COMPRESS_XML;
> 
>     
>     L_SHOW_INST_DETAIL CONSTANT NUMBER := 0;
> 
>     
>     L_SNAPINT_MINS     NUMBER;
> 							   
>     
>     L_IS_LOCAL         BOOLEAN := TRUE;    
> 
>     
>     L_AWR_PERIOD PRVT_AWRV_METADATA;
>     L_ERRMSG     VARCHAR2(32767);
> 
>     
>     L_USEASH           BOOLEAN;						   
>     	 
>     L_AWR_VIEW_PREFIX VARCHAR2(10)  := DBMS_SQLTUNE_UTIL1.AWR_VIEW_ROOT;
>     L_QRY        VARCHAR2(32767) := NULL;
> 
>   BEGIN
> 					   
>     
>     
>     IF (SYS_CONTEXT('USERENV', 'CON_ID') > 2) THEN
>       L_AWR_VIEW_PREFIX := 
>         DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(START_TIME);
>       
>       IF (L_AWR_VIEW_PREFIX = DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB) THEN
>         L_DBID := SYS_CONTEXT('USERENV','CON_DBID');
>       
>       ELSE
>         L_DBID := SYS_CONTEXT('USERENV','DBID');
>       END IF;
>     
>     ELSE
>       L_AWR_VIEW_PREFIX := DBMS_SQLTUNE_UTIL1.AWR_VIEW_ROOT;
>       L_DBID := SYS_CONTEXT('USERENV','DBID');
>     END IF;
> 
>     
>     IF ((DBID IS NOT NULL) AND 
>         (DBMS_SQLTUNE_UTIL2.RESOLVE_DATABASE_TYPE(DBID) = 
>          DBMS_SQLTUNE_UTIL2.DB_TYPE_IMP)) THEN
>       L_IS_LOCAL := FALSE;
>       L_DBID := DBID;
>       L_AWR_VIEW_PREFIX := DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB;
>     END IF;
>     
>     
>     IF (NOT(L_IS_LOCAL) AND IS_REALTIME = G_TIMEPICKER_REALTIME) THEN
>       
>       SYS.DBMS_SYS_ERROR.RAISE_SYSTEM_ERROR(SYS_ERR_PARAM, 'dbid');
>     END IF;
> 							   
>     
>     I_SET_INST_ID(INST_ID,
>                   L_INST_ID, L_INST_ID_LOW, L_INST_ID_HIGH,
>                   L_INSTANCE_LIST);
> 
>     IF (L_IS_LOCAL) THEN
>       
>       L_QRY :=  'select extract(day    from snap_interval) * 24*60 +
>                         extract(hour   from snap_interval) * 60    +
>                         extract(minute from snap_interval) 
>                    from sys.awr_root_wr_control
>                   where dbid = :1';
> 
>       DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(L_QRY, 
>                                                  L_AWR_VIEW_PREFIX);
>     
>       BEGIN
>         EXECUTE IMMEDIATE L_QRY
>         INTO L_SNAPINT_MINS
>         USING L_DBID;
>       EXCEPTION
>         WHEN OTHERS THEN
>           L_SNAPINT_MINS := 60;
>       END;
>     ELSE
>       
>       L_SNAPINT_MINS := 60;
>     END IF;    
> 
>     
>     L_USEASH := FALSE;
> 							   
>     
>     IF (IS_REALTIME IS NULL OR IS_REALTIME = G_TIMEPICKER_HISTORICAL) THEN
> 	
> 	IF (L_START_TIME IS NOT NULL AND L_END_TIME IS NOT NULL AND
> 	   (L_END_TIME - L_START_TIME)*24*60 < L_SNAPINT_MINS) 
> 	THEN
> 	    L_USEASH := TRUE;
> 	END IF;
> 	
> 	
>     ELSE
> 	L_USEASH := TRUE;
>     END IF;		
> 					
>     
>     
>     
>     SELECT XMLELEMENT("root_main") INTO L_MAIN_XML 
>     FROM DUAL;			
> 							   
>     IF (L_USEASH) THEN
> 	  SELECT XMLELEMENT("region_data",
> 		    XMLAGG(
> 		        XMLELEMENT("stattype",
> 			    XMLATTRIBUTES('topsql' AS "name",
> 					  '10' AS "topn",
> 					  'ash'   AS "source"))))
> 	  INTO L_TOPSQL_XML
> 	  FROM SYS.DUAL;
> 
> 	  
> 	  IF (L_END_TIME IS NULL) THEN
> 		L_END_TIME := SYSDATE;
> 	  END IF;
> 
> 	  IF (L_START_TIME IS NULL) THEN
> 		L_START_TIME := L_END_TIME - 1/24;
> 	  END IF;
> 						   
> 	  L_TOPSQL_XML := L_TOPSQL_XML.APPENDCHILDXML('/*/stattype',
> 		   SYS.DBMS_ASH_INTERNAL.REPORT_ASHVIEWER_XML(
> 		   DBID          => L_DBID,
> 		   INST_ID       => L_INST_ID,
> 		   BEGIN_TIME    => 
> 				     TO_CHAR(L_START_TIME,
>                                          'hh24:mi:ss mm/dd/yyyy'),
> 		   END_TIME      => 
> 				     TO_CHAR(L_END_TIME,
>                                          'hh24:mi:ss mm/dd/yyyy'),
> 		   REPORT_LEVEL  =>'<sqlid,wait_class>{treemap}', 
> 		   PARENT_REPORT => 'topsql'));
>                  
>     ELSE
> 
>           
>           L_TOPSQL_XML := I_REP_AWRDATA_XML(
>                           START_TIME       => L_START_TIME,
>                           END_TIME         => L_END_TIME,
>                           TIMEPICKER_START => NULL,
>                           TIMEPICKER_END   => NULL,
>                           INSTANCE_LIST    => L_INSTANCE_LIST,
>                           DBID             => L_DBID,
>                           BUCKET_MAX_COUNT => 1,  
>                           TIME_MODEL       => 'no',
>                           WAIT_CLASS       => 'no',
>                           WAIT_EVENT       => 'no',
>                           EVENT_CLASS      => 'no',
>                           SYSSTAT          => 'no',
>                           SQLSTAT          => 'EM_TOP_SQL',
>                           OSSTAT           => 'no',
>                           IOSTAT           => 'no',
>                           MEMORY           => 'no',
>                           SPACE            => 'no',
>                           KEY_STATISTICS   => 'no',
>                           INST_DETAIL      => L_SHOW_INST_DETAIL,
>                           MEMBERS          => 'no',
>                           SUMMARY          => 'no',
>                           SHOW_SQL         => SHOW_SQL);
>     END IF;
> 	
>     L_TOPSQL_XML := L_MAIN_XML.APPENDCHILDXML(XML_ROOT, L_TOPSQL_XML);						   
> 							   
>     
16960a17188
>                          DB_TZ               => DB_TZ,
16964,16965c17192,17193
<           IF (L_REPORT_XML IS NOT NULL) THEN
<             L_REPORT_XML := L_REPORT_XML.APPENDCHILDXML(XML_ROOT,L_SQL_XML);
---
>           IF (L_TOPSQL_XML IS NOT NULL) THEN
>             L_TOPSQL_XML := L_TOPSQL_XML.APPENDCHILDXML(XML_ROOT,L_SQL_XML);
16990a17219
>                          DB_TZ               => DB_TZ,
16994,16995c17223,17224
<           IF (L_REPORT_XML IS NOT NULL) THEN
<             L_REPORT_XML := L_REPORT_XML.APPENDCHILDXML(XML_ROOT,L_SQL_XML);
---
>           IF (L_TOPSQL_XML IS NOT NULL) THEN
>             L_TOPSQL_XML := L_TOPSQL_XML.APPENDCHILDXML(XML_ROOT,L_SQL_XML);
17002c17231
< 
---
> 							   
17006,17024c17235,17240
<     IF (L_REPORT_XML IS NULL) THEN
<       
<       L_REPORT_XML :=
<         PRVT_REPORT_TAGS.BUILD_REPORT_TAG(
<           DBMS_REPORT.BUILD_REPORT_REFERENCE_STRUCT(
<             'awrv','topsql',L_REF_PARAMS),
<           NULL, NULL);
<     END IF;
< 
<     IF (L_SET_ENV) THEN
<       
<       DBMS_REPORT.RESTORE_REPORT_ENV(L_ORIG_ENV);
<     END IF;
< 
<  
<     
<     RETURN L_REPORT_XML;
< 
<   END REPORT_TOPSQL_XML;
---
>     SELECT EXTRACT(L_TOPSQL_XML, '/root_main/*') INTO L_TOPSQL_XML
>     FROM DUAL;
> 							   
>     RETURN L_TOPSQL_XML;
> 							   
>   END FETCH_TOPSQL_XML;
17105c17321
<     L_ISLOCAL         BOOLEAN;
---
>     L_IS_LOCAL         BOOLEAN;
17153c17369
<       L_ISLOCAL := TRUE;
---
>       L_IS_LOCAL := TRUE;
17155c17371
<       L_ISLOCAL := FALSE;
---
>       L_IS_LOCAL := FALSE;
17162c17378
<     IF (NOT(L_ISLOCAL) AND IS_REALTIME = G_TIMEPICKER_REALTIME) THEN
---
>     IF (NOT(L_IS_LOCAL) AND IS_REALTIME = G_TIMEPICKER_REALTIME) THEN
17405c17621,17624
<     L_AWR_CUR     SYS_REFCURSOR;   
---
>     L_AWR_CUR     SYS_REFCURSOR;  
>     
>     L_ERRMSG      VARCHAR2(32767);
>     L_ERROR_XML   XMLTYPE            := NULL; 
17414a17634,17646
>     IF (L_DBID IS NULL) THEN
>       IF (SYS_CONTEXT('USERENV', 'CON_ID') > 2 AND
>            (DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(SELECTED_START_TIME) = 
>                DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB)) THEN
>         
>         L_DBID := SYS_CONTEXT('userenv','con_dbid');
>       ELSE
>         
>         L_DBID := SYS_CONTEXT('userenv','dbid');
>       END IF;
>     END IF;
> 
>     
17420a17653,17668
> 
>     
>     
>     IF (L_BEGIN_SNAP IS NULL OR L_END_SNAP IS NULL) THEN
>       
>       L_ERRMSG := '[' || TO_CHAR(SELECTED_START_TIME, DATE_FMT) || ']' ||
>                   '[' || TO_CHAR(SELECTED_END_TIME, DATE_FMT) || ']';
> 
>       
>       L_ERROR_XML :=  ERROR_XML('i_report_awrrep_clob',
>                           ERR_PARAM,
>                          'Insufficient awr data', L_ERRMSG); 
>       L_REPORT_CLOB := L_ERROR_XML.GETCLOBVAL(); 
>     
>     ELSE
> 
17466c17714,17716
<  
---
> 
>     END IF;
> 
17719c17969
<                awr_root_snapshot s
---
>                sys.awr_root_snapshot s
17750c18000
<                    from awr_root_con_sysstat)]';
---
>                    from sys.awr_root_con_sysstat)]';
17863c18113
<           awr_root_pdb_instance where dbid=:m_dbid)';
---
>           sys.awr_root_pdb_instance where dbid=:m_dbid)';
17949c18199
<                        from awr_root_active_sess_history va
---
>                        from sys.awr_root_active_sess_history va
18000c18250
<             from awr_root_rsrc_pdb_metric 
---
>             from sys.awr_root_rsrc_pdb_metric 
18022c18272
<                    from awr_root_pdb_instance
---
>                    from sys.awr_root_pdb_instance
18282a18533,18536
>   
>   
>   
>   
18285d18538
<     DBID            IN NUMBER             DEFAULT NULL,
18289a18543,18544
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
18304d18558
<     L_DBID            NUMBER        := DBID;
18308a18563,18564
>     L_INST_ID_LOW     NUMBER        := INST_ID_LOW;
>     L_INST_ID_HIGH    NUMBER        := INST_ID_HIGH;
18317d18572
<     L_CON_DBID NUMBER;
18333,18334c18588,18589
<              when avg(avg_cpu_utilization) > 100 then 100
<              else avg(avg_cpu_utilization) 
---
>              when sum(avg_cpu_utilization) > 100 then 100
>              else sum(avg_cpu_utilization) 
18336c18591
<            avg(cpu_usage_per_sec) cpu_usage_per_sec,
---
>            sum(cpu_usage_per_sec) cpu_usage_per_sec,
18342,18389c18597,18644
<       from table(sys.gv$(cursor(
<            select trunc(
<                   ((extract(day from 
<                       (cast(trunc(end_time,'mi') as timestamp) -
<                        cast(trunc(to_date(:b_start_time, :date_fmt),'mi') 
<                          as timestamp))) 
<                     * 86400 +
<                     extract(hour from 
<                       (cast(trunc(end_time,'mi') as timestamp) -
<                        cast(trunc(to_date(:b_start_time, :date_fmt),'mi') 
<                          as timestamp))) 
<                     * 3600 + 
<                     extract(minute from
<                       (cast(trunc(end_time,'mi') as timestamp) -
<                        cast(trunc(to_date(:b_start_time, :date_fmt),'mi') 
<                          as timestamp))) 
<                     * 60 + 
<                     extract(second from
<                       (cast(trunc(end_time,'mi') as timestamp) -
<                        cast(trunc(to_date(:b_start_time, :date_fmt),'mi') 
<                          as timestamp))) 
<                    )
<                    / :p_bucket_interval)) + 1 bucket_id,
<                   consumer_group_name,
<                   consumer_group_id,
<                   (case 
<                      -- resource manager enabled, use running_sessions_limit
<                      when :resource_manager_enabled > 0 then
<                        (case
<                           -- if running_sessions_limit is not set
<                           when running_sessions_limit is null or
<                                running_sessions_limit = 0 then
<                             avg_cpu_utilization
<                           else
<                             (avg_running_sessions/running_sessions_limit)*100
<                         end)
<                      -- resource manager disabled, use system cpu limit
<                      else
<                        (case
<                           when :num_cpus > 0 then
<                             (avg_running_sessions/:num_cpus)*100
<                           -- system cpu limit not available
<                           -- use running_sessions_limit
<                           else
<                             (case
<                                when running_sessions_limit is null or
<                                     running_sessions_limit = 0 then
<                                  avg_cpu_utilization
---
>       from (select bucket_id,
>                    consumer_group_id, consumer_group_name,
>                    avg(avg_cpu_utilization) avg_cpu_utilization,
>                    avg(cpu_usage_per_sec) cpu_usage_per_sec,
>                    avg(avg_running_stmts) avg_running_stmts,
>                    avg(avg_active_parallel_stmts) avg_active_parallel_stmts,
>                    avg(avg_queued_parallel_stmts) avg_queued_parallel_stmts
>               from table(sys.gv$(cursor(
>                      select trunc(
>                               ((extract(day from 
>                                  (cast(trunc(end_time,'mi') as timestamp) -
>                                   cast(trunc(to_date(:b_start_time, :date_fmt),
>                                              'mi') as timestamp)))
>                                     * 86400 +
>                                 extract(hour from 
>                                  (cast(trunc(end_time,'mi') as timestamp) -
>                                   cast(trunc(to_date(:b_start_time, :date_fmt),
>                                              'mi')  as timestamp))) 
>                                     * 3600 + 
>                                 extract(minute from
>                                  (cast(trunc(end_time,'mi') as timestamp) -
>                                   cast(trunc(to_date(:b_start_time, :date_fmt),
>                                              'mi') as timestamp))) 
>                                     * 60 + 
>                                 extract(second from
>                                  (cast(trunc(end_time,'mi') as timestamp) -
>                                   cast(trunc(to_date(:b_start_time, :date_fmt),
>                                              'mi') as timestamp)))
>                                )
>                                / :p_bucket_interval)) + 1 bucket_id,
>                             userenv('INSTANCE') inst_id,
>                             consumer_group_name,
>                             consumer_group_id,
>                             (case 
>                                -- resource manager enabled, 
>                                -- use running_sessions_limit
>                                when :resource_manager_enabled > 0 then
>                                  (case
>                                     -- if running_sessions_limit is not set
>                                     when running_sessions_limit is null or
>                                          running_sessions_limit = 0 then
>                                       avg_cpu_utilization
>                                     else
>                                       (avg_running_sessions /
>                                        running_sessions_limit) * 100
>                                   end)
>                                  -- resource manager disabled, 
>                                  -- use system cpu limit
18391,18403c18646,18675
<                                 (avg_running_sessions/running_sessions_limit)*100
<                              end)
<                         end)
<                      end) avg_cpu_utilization,
<                   cpu_consumed_time/(intsize_csec*10) cpu_usage_per_sec,
<                   avg_running_sessions + avg_waiting_sessions
<                     as avg_running_stmts,
<                   avg_active_parallel_stmts,
<                   avg_queued_parallel_stmts
<              from sys.v_$rsrcmgrmetric_history
<             where end_time >= to_date(:b_start_time, :date_fmt)
<               and end_time <  to_date(:b_end_time, :date_fmt))))
<          group by bucket_id, consumer_group_id, consumer_group_name]';
---
>                                  (case
>                                     when :num_cpus > 0 then
>                                       (avg_running_sessions/:num_cpus)*100
>                                       -- system cpu limit not available
>                                       -- use running_sessions_limit
>                                     else
>                                       (case
>                                          when running_sessions_limit is null or
>                                               running_sessions_limit = 0 then
>                                            avg_cpu_utilization
>                                          else
>                                            (avg_running_sessions /
>                                             running_sessions_limit) * 100
>                                        end)
>                                   end)
>                              end) avg_cpu_utilization,
>                             cpu_consumed_time/(intsize_csec*10) 
>                               as cpu_usage_per_sec,
>                             avg_running_sessions + avg_waiting_sessions
>                               as avg_running_stmts,
>                             avg_active_parallel_stmts,
>                             avg_queued_parallel_stmts
>                        from sys.v_$rsrcmgrmetric_history
>                       where end_time >= to_date(:b_start_time, :date_fmt)
>                         and end_time <  to_date(:b_end_time, :date_fmt)
>                         and userenv('INSTANCE') between :inst_id_low 
>                                                     and :inst_id_high)))
>             group by bucket_id, inst_id, 
>                      consumer_group_id, consumer_group_name)
>     group by bucket_id, consumer_group_id, consumer_group_name]';
18418a18691,18692
>       var inst_id_low              number;
>       var inst_id_high             number;
18431a18706,18707
>         :inst_id_low              := #inst_id_low#;
>         :inst_id_high             := #inst_id_high#;
18478c18754
<                   from awr_root_rsrc_metric m,
---
>                   from sys.awr_root_rsrc_metric m,
18504c18780
<                                     FROM awr_root_osstat
---
>                                     FROM sys.awr_root_osstat
18527c18803
<                                     FROM awr_root_parameter
---
>                                     FROM sys.awr_root_parameter
18535d18810
<                    and m.con_dbid = :l_con_dbid
18536a18812
>                    and m.instance_number between :inst_id_low and :inst_id_high
18556d18831
<       var l_con_dbid        number;
18561a18837,18838
>       var inst_id_low       number;
>       var inst_id_high      number;
18569d18845
<         :l_con_dbid        := #l_con_dbid#;
18574a18851,18852
>         :inst_id_low       := #inst_id_low#;
>         :inst_id_high      := #inst_id_high#;
18586,18593d18863
<     L_CON_DBID := SYS_CONTEXT('USERENV','CON_DBID');
<     
<     
<     IF (DBID IS NULL) THEN
<       L_DBID := L_CON_DBID;
<     END IF;
< 
<     
18614a18885,18893
>     IF (INST_ID_LOW IS NULL) THEN
>       L_INST_ID_LOW := 0;
>     END IF;
> 
>     IF (INST_ID_HIGH IS NULL) THEN
>       L_INST_ID_HIGH := INST_ID_MAX;
>     END IF;
> 
>     
18690a18970,18972
>         L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>         L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
> 
18706a18989,18990
>                 L_INST_ID_LOW, 
>                 L_INST_ID_HIGH,
18738,18743c19022,19023
<         IF (SYS_CONTEXT('USERENV','CON_ID') > 2) THEN
<           L_AWR_VIEW_PREFIX := 
<             DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(L_AWR_PERIOD.M_MIN_TIME);
< 
<           DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(L_QRY, L_AWR_VIEW_PREFIX);
<         END IF;
---
>         DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(
>           L_QRY, L_AWR_PERIOD.M_AWR_VIEW_PREFIX);
18759d19038
<           L_SQL := REPLACE(L_SQL, '#l_con_dbid#', L_CON_DBID);
18770a19050,19051
>           L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>           L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
18783c19064,19065
<                 L_CON_DBID,
---
>                 L_INST_ID_LOW, 
>                 L_INST_ID_HIGH,
18825a19108,19109
>   
>   
18828d19111
<     DBID            IN NUMBER             DEFAULT NULL,
18832a19116,19117
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
18847d19131
<     L_DBID            NUMBER             := DBID;
18851a19136,19137
>     L_INST_ID_LOW     NUMBER             := INST_ID_LOW;
>     L_INST_ID_HIGH    NUMBER             := INST_ID_HIGH;
18856,18858d19141
<     L_CON_DBID NUMBER;
< 
<     
18900a19184,19185
>                             AND userenv('INSTANCE') between :inst_id_low 
>                                                         and :inst_id_high
18930a19216,19217
>     var inst_id_low       number;
>     var inst_id_high      number;
18937a19225,19226
>       :inst_id_low         := #inst_id_low#;
>       :inst_id_high        := #inst_id_high#;
18960c19249
<              FROM awr_root_snapshot s, awr_root_pdb_in_snap p
---
>              FROM sys.awr_root_snapshot s, sys.awr_root_pdb_in_snap p
18963a19253
>               AND s.instance_number between :inst_id_low and :inst_id_high
18973c19263
<              FROM awr_root_con_sys_time_model s
---
>              FROM sys.awr_root_con_sys_time_model s
18976a19267
>               AND s.instance_number between :inst_id_low and :inst_id_high
19061c19352,19353
< 
---
>       var inst_id_low          number;
>       var inst_id_high         number;
19071a19364,19365
>         :inst_id_low          := #inst_id_low#;
>         :inst_id_high         := #inst_id_high#;
19082,19088d19375
<     L_CON_DBID := SYS_CONTEXT('USERENV','CON_DBID');
< 
<     IF (DBID IS NULL) THEN
<       L_DBID := L_CON_DBID;
<     END IF;
< 
<     
19109a19397,19405
>     IF (INST_ID_LOW IS NULL) THEN
>       L_INST_ID_LOW := 0;
>     END IF;
> 
>     IF (INST_ID_HIGH IS NULL) THEN
>       L_INST_ID_HIGH := INST_ID_MAX;
>     END IF;
> 
>     
19128a19425,19426
>         L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>         L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
19147a19446,19447
>                           L_INST_ID_LOW,
>                           L_INST_ID_HIGH,
19164,19169c19464,19465
<         IF (SYS_CONTEXT('USERENV','CON_ID') > 2) THEN
<           L_AWR_VIEW_PREFIX := 
<             DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(L_AWR_PERIOD.M_MIN_TIME);
< 
<           DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(L_QRY, L_AWR_VIEW_PREFIX);
<         END IF;
---
>         DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(
>           L_QRY, L_AWR_PERIOD.M_AWR_VIEW_PREFIX);
19191a19488,19489
>           L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>           L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
19199a19498,19499
>                 L_INST_ID_LOW,
>                 L_INST_ID_HIGH,
19206a19507,19508
>                 L_INST_ID_LOW,
>                 L_INST_ID_HIGH,
19256a19559,19560
>   
>   
19259d19562
<     DBID            IN NUMBER             DEFAULT NULL,
19263a19567,19568
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
19278d19582
<     L_DBID            NUMBER             := DBID;
19282a19587,19588
>     L_INST_ID_LOW     NUMBER             := INST_ID_LOW;
>     L_INST_ID_HIGH    NUMBER             := INST_ID_HIGH;
19287,19289d19592
<     L_CON_DBID NUMBER;
< 
<     
19344a19648,19649
>                                       AND USERENV('INSTANCE') between :inst_id_low 
>                                                                   and :inst_id_high
19389a19695,19696
>                                AND USERENV('INSTANCE') between :inst_id_low 
>                                                            and :inst_id_high
19448a19756,19757
>       var inst_id_low       number;
>       var inst_id_high      number;
19455a19765,19766
>         :inst_id_low         := #inst_id_low#;
>         :inst_id_high        := #inst_id_high#;
19477c19788
<              FROM awr_root_snapshot s, awr_root_pdb_in_snap p
---
>              FROM sys.awr_root_snapshot s, sys.awr_root_pdb_in_snap p
19480a19792
>               AND s.instance_number between :inst_id_low and :inst_id_high
19490c19802
<              FROM awr_root_con_system_event e
---
>              FROM sys.awr_root_con_system_event e
19494a19807
>               AND e.instance_number between :inst_id_low and :inst_id_high
19504c19817
<              FROM awr_root_con_sys_time_model s
---
>              FROM sys.awr_root_con_sys_time_model s
19508a19822
>               AND s.instance_number between :inst_id_low and :inst_id_high
19603c19917,19918
< 
---
>       var inst_id_low          number;
>       var inst_id_high         number;
19613a19929,19930
>         :inst_id_low          := #inst_id_low#;
>         :inst_id_high         := #inst_id_high#;
19625,19631d19941
<     L_CON_DBID := SYS_CONTEXT('USERENV','CON_DBID');
< 
<     IF (DBID IS NULL) THEN
<       L_DBID := L_CON_DBID;
<     END IF;
< 
<     
19652a19963,19971
>     IF (INST_ID_LOW IS NULL) THEN
>       L_INST_ID_LOW := 0;
>     END IF;
> 
>     IF (INST_ID_HIGH IS NULL) THEN
>       L_INST_ID_HIGH := INST_ID_MAX;
>     END IF;
> 
>     
19672a19992,19994
>         L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>         L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
> 
19685a20008,20009
>                           L_INST_ID_LOW,
>                           L_INST_ID_HIGH,
19697a20022,20023
>                           L_INST_ID_LOW,
>                           L_INST_ID_HIGH,
19714,19719c20040,20043
<         IF (SYS_CONTEXT('USERENV','CON_ID') > 2) THEN
<           L_AWR_VIEW_PREFIX := 
<             DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(L_AWR_PERIOD.M_MIN_TIME);
< 
<           DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(L_QRY, L_AWR_VIEW_PREFIX);
<         END IF;
---
>         
>         
>         DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(
>           L_QRY, L_AWR_PERIOD.M_AWR_VIEW_PREFIX);
19743a20068,20070
>           L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>           L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
> 
19750a20078,20079
>                 L_INST_ID_LOW,
>                 L_INST_ID_HIGH,
19757a20087,20088
>                 L_INST_ID_LOW,
>                 L_INST_ID_HIGH,
19760a20092,20093
>                 L_INST_ID_LOW,
>                 L_INST_ID_HIGH,
19808a20142,20143
>   
>   
19811d20145
<     DBID            IN NUMBER             DEFAULT NULL,
19815a20150,20151
>     INST_ID_LOW     IN NUMBER             DEFAULT NULL,
>     INST_ID_HIGH    IN NUMBER             DEFAULT NULL,
19830d20165
<     L_DBID            NUMBER             := DBID;
19834a20170,20171
>     L_INST_ID_LOW     NUMBER             := INST_ID_LOW;
>     L_INST_ID_HIGH    NUMBER             := INST_ID_HIGH;
19839,19841d20175
<     L_CON_DBID NUMBER;
< 
<     
19907a20242,20243
>                                       AND USERENV('INSTANCE') between :inst_id_low 
>                                                                   and :inst_id_high
19970a20307,20308
>       var inst_id_low       number;
>       var inst_id_high      number;
19977a20316,20317
>         :inst_id_low         := #inst_id_low#;
>         :inst_id_high        := #inst_id_high#;
19999c20339
<              FROM awr_root_snapshot s, awr_root_pdb_in_snap p
---
>              FROM sys.awr_root_snapshot s, sys.awr_root_pdb_in_snap p
20002a20343
>               AND s.instance_number between :inst_id_low and :inst_id_high
20018c20359
<              FROM awr_root_con_sysmetric_summ s
---
>              FROM sys.awr_root_con_sysmetric_summ s
20021a20363
>               AND s.instance_number between :inst_id_low and :inst_id_high
20113c20455,20456
< 
---
>       var inst_id_low          number;
>       var inst_id_high         number;
20123a20467,20468
>         :inst_id_low          := #inst_id_low#;
>         :inst_id_high         := #inst_id_high#;
20135,20141d20479
<     L_CON_DBID := SYS_CONTEXT('USERENV','CON_DBID');
< 
<     IF (DBID IS NULL) THEN
<       L_DBID := L_CON_DBID;
<     END IF;
< 
<     
20162a20501,20509
>     IF (INST_ID_LOW IS NULL) THEN
>       L_INST_ID_LOW := 0;
>     END IF;
> 
>     IF (INST_ID_HIGH IS NULL) THEN
>       L_INST_ID_HIGH := INST_ID_MAX;
>     END IF;
> 
>     
20181a20529,20530
>         L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>         L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
20195a20545,20546
>                           L_INST_ID_LOW,
>                           L_INST_ID_HIGH,
20218,20223c20569,20572
<         IF (SYS_CONTEXT('USERENV','CON_ID') > 2) THEN
<           L_AWR_VIEW_PREFIX := 
<             DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(L_AWR_PERIOD.M_MIN_TIME);
< 
<           DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(L_QRY, L_AWR_VIEW_PREFIX);
<         END IF;
---
>         
>         
>         DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(
>           L_QRY, L_AWR_PERIOD.M_AWR_VIEW_PREFIX);
20246a20596,20597
>           L_SQL := REPLACE(L_SQL, '#inst_id_low#', L_INST_ID_LOW);
>           L_SQL := REPLACE(L_SQL, '#inst_id_high#', L_INST_ID_HIGH);
20254a20606,20607
>                 L_INST_ID_LOW,
>                 L_INST_ID_HIGH,
20261a20615,20616
>                 L_INST_ID_LOW,
>                 L_INST_ID_HIGH,
20295a20651,20654
>   
>   
>   
>   
20297a20657,20658
>     INST_ID_LOW  IN NUMBER   DEFAULT NULL,
>     INST_ID_HIGH IN NUMBER   DEFAULT NULL,
20305a20667,20670
>     L_INST_ID_LOW  NUMBER := INST_ID_LOW;
>     L_INST_ID_HIGH NUMBER := INST_ID_HIGH;
> 
>     
20318c20683
<         from sys.v_$containers c
---
>         from sys.gv_$containers c
20319a20685
>          and c.inst_id between :inst_id_low and :inst_id_high
20337a20704,20705
>                        c.inst_id         as "instance",
>                        c.con_id          as "container",
20343c20711
<              sys.v_$containers c
---
>              sys.gv_$containers c
20346a20715
>          and c.inst_id between :inst_id_low and :inst_id_high
20351a20721,20729
>     
>     IF (INST_ID_LOW IS NULL) THEN
>       L_INST_ID_LOW := 0;
>     END IF;
> 
>     IF (INST_ID_HIGH IS NULL) THEN
>       L_INST_ID_HIGH := INST_ID_MAX;
>     END IF;
> 
20361c20739
<    
---
> 
20367a20746,20748
>       L_SQL := REPLACE(L_SQL, ':inst_id_low', L_INST_ID_LOW);
>       L_SQL := REPLACE(L_SQL, ':inst_id_high', L_INST_ID_HIGH);
> 
20375c20756,20757
<                    INTO L_RESULT_XML;
---
>                    INTO L_RESULT_XML
>                   USING L_INST_ID_LOW, L_INST_ID_HIGH;
20392a20775,20777
>   
>   
>   
20394c20779,20781
<     SHOW_SQL        IN NUMBER   DEFAULT NULL)
---
>     INST_ID_LOW  IN NUMBER DEFAULT NULL,
>     INST_ID_HIGH IN NUMBER DEFAULT NULL,
>     SHOW_SQL     IN NUMBER DEFAULT NULL)
20401a20789,20792
>     L_INST_ID_LOW  NUMBER := INST_ID_LOW;
>     L_INST_ID_HIGH NUMBER := INST_ID_HIGH;
> 
>     
20412a20804
>          AND s.inst_id between :inst_id_low and :inst_id_high
20423c20815,20816
<          AND return_code != 0]';
---
>          AND return_code != 0
>          AND instance_id between :inst_id_low and :inst_id_high]';
20427a20821,20829
>     IF (INST_ID_LOW IS NULL) THEN
>       L_INST_ID_LOW := 0;
>     END IF;
> 
>     IF (INST_ID_HIGH IS NULL) THEN
>       L_INST_ID_HIGH := INST_ID_MAX;
>     END IF;
> 
>     
20431a20834,20836
>       L_SQL := REPLACE(L_SQL, ':inst_id_low', L_INST_ID_LOW);
>       L_SQL := REPLACE(L_SQL, ':inst_id_high', L_INST_ID_HIGH);
> 
20439c20844,20845
<                    INTO L_RESULT_XML;
---
>                    INTO L_RESULT_XML
>                   USING L_INST_ID_LOW, L_INST_ID_HIGH;
20442c20848,20849
<                    INTO L_FAILED_LOGONS_XML;
---
>                    INTO L_FAILED_LOGONS_XML
>                   USING L_INST_ID_LOW, L_INST_ID_HIGH;
20479a20887,20895
>   
>   
>   
>   
>   
>   
>   
>   
>   
20481,20487c20897,20905
<     SERVICE_TYPE   IN VARCHAR2 DEFAULT NULL,
<     IS_REALTIME    IN NUMBER   DEFAULT 1,
<     DBID           IN NUMBER   DEFAULT NULL,
<     START_TIME     IN DATE     DEFAULT NULL,
<     END_TIME       IN DATE     DEFAULT NULL,
<     REPORT_LEVEL   IN VARCHAR2 DEFAULT NULL,
<     SHOW_SQL       IN NUMBER   DEFAULT 0)
---
>     SERVICE_TYPE IN VARCHAR2 DEFAULT NULL,
>     IS_REALTIME  IN NUMBER   DEFAULT 1,
>     DBID         IN NUMBER   DEFAULT NULL,
>     INST_ID      IN NUMBER   DEFAULT NULL,
>     START_TIME   IN DATE     DEFAULT NULL,
>     END_TIME     IN DATE     DEFAULT NULL,
>     REPORT_LEVEL IN VARCHAR2 DEFAULT NULL,
>     DB_TZ        IN VARCHAR2 DEFAULT NULL,
>     SHOW_SQL     IN NUMBER   DEFAULT 0)
20516a20935,20936
>     L_INST_ID_LOW    NUMBER          := INST_ID;
>     L_INST_ID_HIGH   NUMBER          := INST_ID;
20638d21057
<             
20671c21090
<       L_REF_PARAMS('dbid') := DBID;
---
>         L_REF_PARAMS('dbid') := DBID;
20687a21107,21110
>     IF (INST_ID IS NOT NULL) THEN
>       L_REF_PARAMS('inst_id') := INST_ID;
>     END IF;
> 
20700,20701c21123,21124
<     IF (DBID IS NULL) THEN
<       L_DBID := SYS_CONTEXT('USERENV','CON_DBID');
---
>     IF (REPORT_LEVEL IS NULL) THEN
>       L_REPORT_LEVEL := 'all';
20705,20706c21128,21130
<     IF (REPORT_LEVEL IS NULL) THEN
<       L_REPORT_LEVEL := 'all';
---
>     IF (INST_ID IS NULL) THEN
>       L_INST_ID_LOW := 0;
>       L_INST_ID_HIGH := INST_ID_MAX;
20726,20727c21150,21158
<     L_TZ := DBMS_SQLTUNE_UTIL2.GET_TZ_OFFSET();
<     L_END_TIME_UTC := CAST(SYS_EXTRACT_UTC(
---
>     IF (DB_TZ IS NULL) THEN
>       L_TZ := DBMS_SQLTUNE_UTIL2.GET_TZ_OFFSET();
>     ELSE
>       
>       L_TZ := DB_TZ;
>     END IF;
> 
> 
>    L_END_TIME_UTC := CAST(SYS_EXTRACT_UTC(
20741a21173,21198
>     
>     IF (SYS_CONTEXT('USERENV', 'CON_ID') > 2) THEN
>       L_AWR_VIEW_PREFIX := 
>         DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(L_START_TIME);
>       
>       IF (L_AWR_VIEW_PREFIX = DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB) THEN
>         L_DBID := SYS_CONTEXT('USERENV','CON_DBID');
>       
>       ELSE
>         L_DBID := SYS_CONTEXT('USERENV','DBID');
>       END IF;
>     
>     ELSE
>       L_AWR_VIEW_PREFIX := DBMS_SQLTUNE_UTIL1.AWR_VIEW_ROOT;
>       L_DBID := SYS_CONTEXT('USERENV','DBID');
>     END IF;
> 
>     
>     IF ((DBID IS NOT NULL) AND 
>         (DBMS_SQLTUNE_UTIL2.RESOLVE_DATABASE_TYPE(DBID) = 
>          DBMS_SQLTUNE_UTIL2.DB_TYPE_IMP)) THEN
>       L_DBID := DBID;
>       L_AWR_VIEW_PREFIX := DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB;
>     END IF;
> 
>     
20755c21212
<           FROM awr_root_snapshot
---
>           FROM sys.awr_root_snapshot
20762,20772c21219,21220
<       IF (SYS_CONTEXT('USERENV','CON_ID') > 2) THEN
<         L_AWR_VIEW_PREFIX := 
<           DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(L_START_TIME);
< 
<         DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(L_SNAP_QRY, 
<                                                    L_AWR_VIEW_PREFIX);
<       END IF;
< 
<       IF (L_AWR_VIEW_PREFIX = DBMS_SQLTUNE_UTIL1.AWR_VIEW_ROOT) THEN
<         L_DBID := SYS_CONTEXT('USERENV','DBID');
<       END IF;
---
>       DBMS_SQLTUNE_UTIL1.REPLACE_AWR_VIEW_PREFIX(L_SNAP_QRY, 
>                                                  L_AWR_VIEW_PREFIX);
20788c21236
<       L_AWR_PERIOD := PRVT_AWRV_METADATA(P_START_TIME => L_START_TIME, 
---
>       L_AWR_PERIOD := PRVT_AWRV_METADATA(P_START_TIME => L_START_TIME,
20795a21244,21247
>       L_AWR_PERIOD.M_INST_ID_LOW := L_INST_ID_LOW;
>       L_AWR_PERIOD.M_INST_ID_HIGH := L_INST_ID_HIGH;
>       L_AWR_PERIOD.M_DBID := L_DBID;
>       L_AWR_PERIOD.M_AWR_VIEW_PREFIX := L_AWR_VIEW_PREFIX;
20839d21290
<                                             L_DBID,
20843a21295,21296
>                                             L_INST_ID_LOW,
>                                             L_INST_ID_HIGH,
20851d21303
<                                                 L_DBID,
20855a21308,21309
>                                                 L_INST_ID_LOW,
>                                                 L_INST_ID_HIGH,
20867d21320
<                                                  L_DBID,
20871a21325,21326
>                                                  L_INST_ID_LOW,
>                                                  L_INST_ID_HIGH,
20879d21333
<                                            L_DBID,
20883a21338,21339
>                                            L_INST_ID_LOW,
>                                            L_INST_ID_HIGH,
20890,20891c21346,21350
<       L_STORAGE_METRICS_XML := GET_STORAGE_METRICS_XML(L_SERVICE_TYPE,
<                                                        SHOW_SQL);
---
>       L_STORAGE_METRICS_XML := GET_STORAGE_METRICS_XML(
>                                  L_SERVICE_TYPE,
>                                  L_INST_ID_LOW,
>                                  L_INST_ID_HIGH,
>                                  SHOW_SQL);
20898c21357,21360
<       L_SESSION_METRICS_XML := GET_SESSION_METRICS_XML(SHOW_SQL);
---
>       L_SESSION_METRICS_XML := GET_SESSION_METRICS_XML(
>                                  L_INST_ID_LOW,
>                                  L_INST_ID_HIGH,
>                                  SHOW_SQL);
SYS.PRVT_COMPRESSION - PACKAGE BODY (RU):
773c773,774
<     NEW_PERCENT := TRUNC(NEW_PERCENT, 2);
---
>     
>     NEW_PERCENT := TRUNC(NEW_PERCENT, 3);
993a995,998
>         DROP_INTERIM_TABLES(SAFE_TABOWNER||'.'||TEMP_ROW1_TAB);
>         V_TEMP_ROW1_TAB := FALSE;
> 
>         
1028a1034,1037
>     
>     DROP_INTERIM_TABLES(SAFE_TABOWNER||'.'||TEMP_ROW2_TAB);
>     V_TEMP_ROW2_TAB := FALSE;
>     
1277,1278d1285
<     DROP_INTERIM_TABLES(SAFE_TABOWNER||'.'||TEMP_ROW1_TAB);
<     DROP_INTERIM_TABLES(SAFE_TABOWNER||'.'||TEMP_ROW2_TAB);
SYS.PRVT_EMX - PACKAGE BODY (RU):
19a20
>   OMX_VERSION           CONSTANT VARCHAR2(20) := '1.51.0-200917.184935';
332a334,335
>         FILE_CLOB := REGEXP_REPLACE(FILE_CLOB, '#NLS_VERSION#', OMX_VERSION);
> 
659c662
<       V_UI_VERSION := '1.34.0-190206.161020';
---
>       V_UI_VERSION := OMX_VERSION;
671a675,687
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/font/font-awesome-4.3.0/fonts/fontawesome-webfont.woff', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/font/font-awesome-4.3.0/fonts/fontawesome-webfont.woff', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/font/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/font/font-awesome-4.3.0/fonts/fontawesome-webfont.woff2', 
>                               IS_PUBLIC=>TRUE);
>       
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/font/font-apex-2.1/fonts/Font-APEX-Small.woff', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/font/font-apex-2.1/fonts/Font-APEX-Small.woff', 
>                               IS_PUBLIC=>TRUE);
673,674c689,690
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/omx-ui-version/css/libs/oj/v4.2.0/alta/oj-alta-min.css', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/' || V_UI_VERSION || '/css/libs/oj/v4.2.0/alta/oj-alta-min.css', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/font/font-apex-2.1/fonts/Font-APEX-Small.woff2', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/font/font-apex-2.1/fonts/Font-APEX-Small.woff2', 
677,678c693,694
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/omx-ui-version/css/libs/oj/v4.2.0/alta/fonts/JetFW_iconfont.woff', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/' || V_UI_VERSION || '/css/libs/oj/v4.2.0/alta/fonts/JetFW_iconfont.woff', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/font/font-apex-2.1/css/font-apex.min.css',
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/font/font-apex-2.1/css/font-apex.min.css',
681,682c697,698
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/omx-ui-version/js/libs/oj/v4.2.0/min/ojtemplateengine.js', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/' || V_UI_VERSION || '/js/libs/oj/v4.2.0/min/ojtemplateengine.js', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/css/libs/oj/v8.3.0/alta/oj-alta-min.css',
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/css/libs/oj/v8.3.0/alta/oj-alta-min.css', 
685,686c701,702
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/omx-ui-version/js/libs/oj/v4.2.0/resources/internal-deps/dvt/chart/drag_horizontal.png', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/' || V_UI_VERSION || '/js/libs/oj/v4.2.0/resources/internal-deps/dvt/chart/drag_horizontal.png', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/css/libs/oj/v8.3.0/alta/fonts/JetFW_iconfont.woff', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/css/libs/oj/v8.3.0/alta/fonts/JetFW_iconfont.woff', 
689,690c705,706
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/omx-ui-version/js/libs/oj/v4.2.0/resources/nls/en/localeElements.js', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/' || V_UI_VERSION || '/js/libs/oj/v4.2.0/resources/nls/en/localeElements.js', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/min/ojtemplateengine.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/min/ojtemplateengine.js', 
693,694c709,710
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/omx-ui-version/js/libs/oj/v4.2.0/resources/nls/en-US/localeElements.js', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/' || V_UI_VERSION || '/js/libs/oj/v4.2.0/resources/nls/en-US/localeElements.js', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/internal-deps/dvt/chart/drag_horizontal.png', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/internal-deps/dvt/chart/drag_horizontal.png', 
697,698c713,715
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/omx-ui-version/js/libs/require/require.js', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/resources/' || V_UI_VERSION || '/js/libs/require/require.js', 
---
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en/localeElements.js', 
701,702c718,719
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/omx-ui-version/css/fonts/functional/Functional.woff', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/' || V_UI_VERSION || '/css/fonts/functional/Functional.woff', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en-US/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en-US/localeElements.js', 
705,706c722,723
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/omx-ui-version/js/bundles/dbcsComponentsBundle.js', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/' || V_UI_VERSION || '/js/bundles/dbcsComponentsBundle.js', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ja/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ja/localeElements.js', 
709,710c726,727
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/common/omx-ui-version/js/bundles/jet-partition.js', 
<                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/common-ui/common/' || V_UI_VERSION || '/js/bundles/jet-partition.js', 
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/es/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/es/localeElements.js', 
713c730,835
<       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/common-ui/components/sql-plan-component/js/sql-plan-datagrid.js', IS_PUBLIC=>TRUE);
---
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ko/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ko/localeElements.js', 
>                               IS_PUBLIC=>TRUE);
>                               
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/it/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/it/localeElements.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hans-CN/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hans-CN/localeElements.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hant-TW/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hant-TW/localeElements.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/fr/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/fr/localeElements.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt/localeElements.js', 
>                               IS_PUBLIC=>TRUE);
>      
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt-BR/localeElements.js',
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt-BR/localeElements.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/de/localeElements.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/de/localeElements.js', 
>                               IS_PUBLIC=>TRUE);      
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ja/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ja/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/es/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/es/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ko/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ko/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
>                               
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/it/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/it/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hans/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hans/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hant/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hant/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/fr/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/fr/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/de/ojtranslations.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/de/ojtranslations.js', 
>                               IS_PUBLIC=>TRUE);
>                                                                                             
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/require/require.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/require/require.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/css/fonts/functional/Functional.woff', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/css/fonts/functional/Functional.woff', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/bundles/dbcsComponentsBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/bundles/dbcsComponentsBundle.js', 
>                               IS_PUBLIC=>TRUE);      
> 
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/bundles/v8.3.0/jet-corebundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/bundles/v8.3.0/jet-corebundle.js', 
>                               IS_PUBLIC=>TRUE);
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/bundles/v8.3.0/jet-3rdpartybundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/bundles/v8.3.0/jet-3rdpartybundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/bundles/v8.3.0/jet-dvtbasebundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/bundles/v8.3.0/jet-dvtbasebundle.js', 
>                               IS_PUBLIC=>TRUE);
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/bundles/v8.3.0/jet-commoncomponentsbundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/bundles/v8.3.0/jet-commoncomponentsbundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/bundles/v8.3.0/jet-chartbundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/bundles/v8.3.0/jet-chartbundle.js', 
>                               IS_PUBLIC=>TRUE);
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/bundles/v8.3.0/jet-collectionsbundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/bundles/v8.3.0/jet-collectionsbundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/components/sql-plan-component/js/sql-plan-datagrid.js', IS_PUBLIC=>TRUE);
796a919
>       
804a928,931
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/images/Info.svg', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/images/Info.svg', 
>                               IS_PUBLIC=>TRUE);
> 
827a955,1153
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/jquery/jquery-3.5.1.min.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/jquery/jquery-3.5.1.min.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/min/ojhtmlutils.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/min/ojhtmlutils.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/min_es5/ojcspexpressionevaluator.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/min_es5/ojcspexpressionevaluator.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/min_es5/ojexpparser.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/min_es5/ojexpparser.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en-US/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/en-US/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ja/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ja/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/es/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/es/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ko/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/ko/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/it/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/it/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hans-CN/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hans-CN/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hant-TW/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/zh-Hant-TW/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/fr/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/fr/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt-BR/timezoneData.js',
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/pt-BR/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/de/timezoneData.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/js/libs/oj/v8.3.0/resources/nls/de/timezoneData.js',
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/css/libs/oj/v8.3.0/alta/images/animated-overlay.gif', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/css/libs/oj/v8.3.0/alta/images/animated-overlay.gif', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/css/libs/oj/v8.3.0/alta/images/spinner_full.gif', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/css/libs/oj/v8.3.0/alta/images/spinner_full.gif', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/css/libs/oj/v8.3.0/alta/images/sprites/sprite.svg', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/css/libs/oj/v8.3.0/alta/images/sprites/sprite.svg', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/omx-ui-version/jet/v8.3.0/css/libs/oj/v8.3.0/common/images/sprites/sprite.svg', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/resources/' || V_UI_VERSION || '/jet/v8.3.0/css/libs/oj/v8.3.0/common/images/sprites/sprite.svg', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/omx-ui-version/js/util/main-config.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/common/' || V_UI_VERSION || '/js/util/main-config.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/root/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/root/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/ja/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/ja/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/es/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/es/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/ko/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/ko/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/it/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/it/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/zh-Hans/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/zh-Hans/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/zh-Hant/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/zh-Hant/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/fr/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/fr/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/pt/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/pt/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/ui-utils/omx-ui-version/js/resources/nls/de/dbcsPerfUiMsg.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/ui-utils/' || V_UI_VERSION || '/js/resources/nls/de/dbcsPerfUiMsg.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/blocking-sessions/omx-ui-version/js/bundles/utilBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/blocking-sessions/' || V_UI_VERSION || '/js/bundles/utilBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/blocking-sessions/omx-ui-version/js/bundles/componentsBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/blocking-sessions/' || V_UI_VERSION || '/js/bundles/componentsBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/addm/omx-ui-version/js/bundles/utilBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/addm/' || V_UI_VERSION || '/js/bundles/utilBundle.js', 
>                              IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/addm/omx-ui-version/js/bundles/componentsBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/addm/' || V_UI_VERSION || '/js/bundles/componentsBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/workload/omx-ui-version/js/bundles/utilBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/workload/' || V_UI_VERSION || '/js/bundles/utilBundle.js', 
>                              IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/workload/omx-ui-version/js/bundles/componentsBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/workload/' || V_UI_VERSION || '/js/bundles/componentsBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/spa-home/html/spa-home-omx.html', IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/spa-home/omx-ui-version/js/bundles/componentsBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/spa-home/' || V_UI_VERSION || '/js/bundles/componentsBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/spa-home/omx-ui-version/js/bundles/utilBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/spa-home/' || V_UI_VERSION || '/js/bundles/utilBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/spa-home/omx-ui-version/js/viewmodel/spa-home.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/spa-home/' || V_UI_VERSION || '/js/viewmodel/spa-home.js',
>                               IS_PUBLIC=>TRUE);
> 
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/sql-perf-analyzer/html/spa-report-omx.html', IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/sql-perf-analyzer/omx-ui-version/js/bundles/componentsBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/sql-perf-analyzer/' || V_UI_VERSION || '/js/bundles/componentsBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/sql-perf-analyzer/omx-ui-version/js/bundles/utilBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/sql-perf-analyzer/' || V_UI_VERSION || '/js/bundles/utilBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/sql-perf-analyzer/omx-ui-version/js/viewmodel/spa-report.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/sql-perf-analyzer/' || V_UI_VERSION || '/js/viewmodel/spa-report.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/tablespace/html/tablespace-omx.html', IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/tablespace/omx-ui-version/js/bundles/componentsBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/tablespace/' || V_UI_VERSION || '/js/bundles/componentsBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/tablespace/omx-ui-version/js/bundles/utilBundle.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/tablespace/' || V_UI_VERSION || '/js/bundles/utilBundle.js', 
>                               IS_PUBLIC=>TRUE);
> 
>       FILE_ID := I_STORE_FILE(FILE_PATH       => 'emsaasui/emcdbms-dbcsperf/tablespace/omx-ui-version/js/viewmodel/tablespace.js', 
>                               FILE_NAME_ALIAS => 'emsaasui/emcdbms-dbcsperf/tablespace/' || V_UI_VERSION || '/js/viewmodel/tablespace.js',
>                               IS_PUBLIC=>TRUE);
> 
2656a2983
>       WHEN 'js' THEN IS_BINARY := TRUE;
2660a2988,2993
>     
>     
>     IF (LOWER(FILE_NAME) IN ('shell.js', 'reportmap.js', 'shell_flex.js')) THEN
>       IS_BINARY := FALSE;
>     END IF;
> 
3264a3598,3629
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   FUNCTION OMX_LOCALES 
>   RETURN LOCALES_ARRAY
>   IS
>     LOCALES LOCALES_ARRAY;
>   BEGIN
>     LOCALES('en-US') := 'en-US';
>     LOCALES('de') := 'de';
>     LOCALES('es') := 'es';
>     LOCALES('fr') := 'fr';
>     LOCALES('it') := 'it';
>     LOCALES('ja') := 'ja';
>     LOCALES('ko') := 'ko';
>     LOCALES('pt-BR') := 'pt-BR';
>     LOCALES('pt') := 'pt';
>     LOCALES('zh-CN') := 'zh-CN';
>     LOCALES('zh-TW') := 'zh-TW';
>     
>     LOCALES('zh-Hans') := 'zh-CN';
>     LOCALES('zh-Hant') := 'zh-TW';
>     RETURN LOCALES;
>   END OMX_LOCALES;
SYS.PRVT_HDM - PACKAGE BODY (RU):
2912a2913,2914
>                   WHEN (ACT_MSG_ID = 5285 AND BITAND(DBT_FLAGS,12) <> 0) 
>                      THEN 5283
SYS.PRVT_SQLPA - PACKAGE BODY (RU):
60c60
<     COMPARE_STS2STS BINARY_INTEGER); 
---
>     COMPARE_STS2STS BINARY_INTEGER);  
263c263
<       IF(WKLD.TYPE = SYS.DBMS_SQLTUNE_UTIL1.OBJ_SQLSET#) THEN 
---
>       IF (WKLD.TYPE = SYS.DBMS_SQLTUNE_UTIL1.OBJ_SQLSET#) THEN 
438c438
< 
---
>  
772,784d771
<       SELECT XMLCONCAT(HEADER_XML, 
<               XMLELEMENT("compare", 
<                          EXEC1_XML,
<                          EXEC2_XML, 
<                          XMLELEMENT("metric", COMP_OBJ.METRIC),
<                          XMLELEMENT("threshold", 
<                                     XMLATTRIBUTES('sts' AS "type"), 
<                                     COMP_OBJ.STS_THRESH),
<                          XMLELEMENT("threshold", 
<                                     XMLATTRIBUTES('sql' AS "type"), 
<                                     COMP_OBJ.SQL_THRESH)))
<       INTO HEADER_XML
<       FROM DUAL;  
785a773,785
>         SELECT XMLCONCAT(HEADER_XML, 
>                 XMLELEMENT("compare", 
>                            EXEC1_XML,
>                            EXEC2_XML, 
>                            XMLELEMENT("metric", COMP_OBJ.METRIC), 
>                            XMLELEMENT("threshold", 
>                                       XMLATTRIBUTES('sts' AS "type"), 
>                                       COMP_OBJ.STS_THRESH),
>                            XMLELEMENT("threshold", 
>                                       XMLATTRIBUTES('sql' AS "type"), 
>                                       COMP_OBJ.SQL_THRESH)))
>         INTO HEADER_XML
>         FROM DUAL;
921a922,926
>     
>     EXCEPTION
>       WHEN OTHERS THEN
>         NULL; 
> 
960a966,970
>     
>     EXCEPTION
>       WHEN OTHERS THEN
>         NULL; 
> 
997a1008,1012
>   
>   EXCEPTION
>       WHEN OTHERS THEN
>         NULL; 
> 
1647c1662
<                               WHEN dbms_lob.getlength(sql_text) < 300
---
>                               WHEN dbms_lob.getlength(sql_text) < 100
1649c1664
<                               ELSE to_char(dbms_lob.substr(sql_text, 300)) ||
---
>                               ELSE to_char(dbms_lob.substr(sql_text, 100)) ||
1711a1727,1732
>     
>     
>     EXCEPTION
>       WHEN OTHERS THEN
>         NULL; 
> 
1730c1751
< 
---
>       
1746c1767
< 
---
>       
1770,1777c1791,1795
<         LOOP
<           I_REPORT_SUMMARY_CMPSQLS(
<             SUMMARY, 
<             TID, 
<             ENAME, 
<             MAX_SQL, 
<             SUMMARY_ACTIVE_FLAGS(IDX),
<             COMP_OBJ);
---
>         LOOP 
>              
>             I_REPORT_SUMMARY_CMPSQLS(SUMMARY, TID, ENAME, MAX_SQL, 
>                                     SUMMARY_ACTIVE_FLAGS(IDX), COMP_OBJ);
>                  
1779d1796
< 
1784,1787c1801,1803
<         IF (ETYPE = DBMS_SQLTUNE_UTIL1.COMPARE) THEN           
<           I_REPORT_SUMMARY_CMPSQLS(SUMMARY, 
<                                TID, ENAME, MAX_SQL, FLAGS, COMP_OBJ);
< 
---
>         IF (ETYPE = DBMS_SQLTUNE_UTIL1.COMPARE) THEN    
>           I_REPORT_SUMMARY_CMPSQLS(SUMMARY, TID, ENAME, 
>                     MAX_SQL, FLAGS, COMP_OBJ);
1848d1863
< 
1855c1870
<       QUERY := 'AND o.id = :obj ';
---
>       QUERY := ' AND o.id = :obj ';
1861,1862c1876,1877
<   
<        QUERY := 'AND ' || QUERY;
---
>        
>        QUERY := ' AND ' || QUERY;
1920c1935
<          
---
>       
1934,1937c1949,1952
<                 FROM    
<                   (SELECT oo.object_id, oo.sql_id, oo.phv, oo.schema, t.sql_text,
<                           oo.stats_xml, oo.frequency, oo.obj_flags, oo.con_name,
<                           oo.con_dbid
---
>                 FROM 
>                   (SELECT oo.object_id, oo.sql_id, oo.phv, oo.schema, t.sql_text,	
>                           oo.stats_xml, oo.frequency, oo.obj_flags, oo.con_name, 
>                           oo.con_dbid	
1940,1941c1955,1956
<                                 o.attr10 frequency, o.attr7 obj_flags,
<                                 o.attr16 con_name, o.attr11 con_dbid,
---
>                                 o.attr10 frequency, o.attr7 obj_flags, 
>                                 o.attr16 con_name, o.attr11 con_dbid,	
1943,1944c1958,1959
<                                 o.attr10 attr10
<                          FROM wri$_adv_objects o
---
>                                 o.attr10 attr10	
>                          FROM wri$_adv_objects o 
1948,1949c1963,1964
<                                QUERY || ERR_FILTER || ') oo,
<                         wrh$_sqltext t
---
>                                QUERY || ERR_FILTER || ') oo, 
>                          wrh$_sqltext t	
1953c1968
<                    ORDER BY ' || ORDERBY || ' oo.object_id ASC) ooo
---
>                   ORDER BY ' || ORDERBY || ' oo.object_id ASC) ooo 
1956c1971
<     WHEN DBMS_SQLTUNE_UTIL1.STS2TRIAL THEN 
---
>     WHEN DBMS_SQLTUNE_UTIL1.STS2TRIAL THEN
2037c2052
<   END I_REPORT_GET_QUERY; 
---
>   END I_REPORT_GET_QUERY;
2045c2060
<     OBJID       IN     NUMBER, 
---
>     OBJID       IN     NUMBER,
2059d2073
< 
2069d2082
< 
2071,2073c2084,2086
<       QUERY := I_REPORT_GET_QUERY(ETYPE, FLAGS, OBJID, ERR_CODE, SQL_CATEG, 
<                                   COMP_OBJ.COMPARE_STS2STS,
<                                   CATEGORY);
---
>       
>       QUERY := I_REPORT_GET_QUERY(ETYPE, FLAGS, OBJID, ERR_CODE, SQL_CATEG,
>                                 COMP_OBJ.COMPARE_STS2STS, CATEGORY);
2091c2104
< 
---
>         
2112,2115c2125,2128
<             USING TID, ENAME, DBMS_SQLTUNE_UTIL1.OBJ_SQL#, SQL_CATEG, 
<                   FLAG_SQL, WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_CON_DBID2),
<                   WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_CON_DBID),
<                   COMP_OBJ.TOTAL('m_b'), MAX_SQL;
---
>               USING TID, ENAME, DBMS_SQLTUNE_UTIL1.OBJ_SQL#, SQL_CATEG, 
>                     FLAG_SQL, WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_CON_DBID2),
>                     WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_CON_DBID),
>                     COMP_OBJ.TOTAL('m_b'), MAX_SQL;
2118,2121c2131,2134
<             USING 
<                   TID, ENAME, DBMS_SQLTUNE_UTIL1.OBJ_SQL#, SQL_CATEG, 
<                   WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_CON_DBID),
<                   COMP_OBJ.TOTAL('m_b'), MAX_SQL;
---
>               USING 
>                     TID, ENAME, DBMS_SQLTUNE_UTIL1.OBJ_SQL#, SQL_CATEG, 
>                     WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_CON_DBID),
>                     COMP_OBJ.TOTAL('m_b'), MAX_SQL;
2160,2161c2173
<       END CASE; 
< 
---
>       END CASE;
2193c2205
<     END IF; 
---
>     END IF;
2197d2208
< 
2499,2500c2510
< 
<   
---
>  
3725c3735,3737
<     
---
> 
> 
>      
4195,4196c4207,4208
<     SQLSET_ID IN NUMBER, 
<     SQL_ID    IN VARCHAR2)
---
>     SQL_ID     IN VARCHAR2,
>     SQLSET_ID  IN NUMBER)
4200,4206c4212,4218
<   BEGIN 
<     SELECT PARSING_SCHEMA_NAME
<     INTO   SCHEMA_NAME
<     FROM   WRI$_SQLSET_STATEMENTS S
<     WHERE  SQLSET_ID = I_GET_SQLSCHEMA.SQLSET_ID AND 
<            S.SQL_ID = I_GET_SQLSCHEMA.SQL_ID;
< 
---
>   BEGIN
>    SELECT PARSING_SCHEMA_NAME
>      INTO SCHEMA_NAME
>      FROM WRI$_SQLSET_STATEMENTS
>     WHERE SQLSET_ID = I_GET_SQLSCHEMA.SQLSET_ID
>       AND SQL_ID    = I_GET_SQLSCHEMA.SQL_ID;
>  
4209d4220
<    
4211,4214c4222,4225
<     EXCEPTION 
<       WHEN OTHERS THEN 
<         RETURN NULL; 
<  
---
>     
>     EXCEPTION
>       WHEN OTHERS THEN
>         RETURN NULL;
4217a4229,4281
>   PROCEDURE I_REPORT_SQLTEXT(
>     SQL_TEXT IN CLOB, 
>     SQL_XML  IN OUT NOCOPY XMLTYPE)
>   IS   
>    SQLTEXT_TEMP CLOB; 
>    ERR_NUM      NUMBER; 
>   BEGIN 
> 
>     
>     
>     
>     
>     
>     
>     
>     
>     BEGIN
>       SELECT XMLELEMENT("property", XMLATTRIBUTES('text' AS "name"), 
>                         SQL_TEXT) 
>       INTO SQL_XML 
>       FROM DUAL; 
>     EXCEPTION
>       
>       WHEN OTHERS THEN
>         IF (LENGTH(SQL_TEXT) > 32000) THEN 
>           SQLTEXT_TEMP := TRANSLATE(SUBSTR(SQL_TEXT, 1, 32000), 
>                                     CHR(0), ' ') ||  
>                           '...';
>         ELSE
>           SQLTEXT_TEMP := TRANSLATE(SQL_TEXT, CHR(0), ' ');
>         END IF;
> 
>         
>         SELECT XMLELEMENT("property", XMLATTRIBUTES('text' AS "name"), 
>                           SQLTEXT_TEMP)
>         INTO SQL_XML 
>         FROM DUAL; 
>     END;
> 
>   
>   EXCEPTION 
>     
>     WHEN OTHERS THEN
>       ERR_NUM := SQLCODE; 
>       SELECT XMLELEMENT("property", 
>                         XMLATTRIBUTES('text' AS "name"),
>                         'cannot fetch SQL text because of error ORA' || ERR_NUM)
>       INTO SQL_XML
>       FROM DUAL;
> 
>   END I_REPORT_SQLTEXT; 
> 
>   
4242,4249c4306,4312
<     IF (ETYPE = DBMS_SQLTUNE_UTIL1.COMPARE AND          
<         WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQLSET# AND  
<         COMP_OBJ.COMPARE_STS2STS = 0)                   
<     THEN 
<        SCHEMA_NAME := I_GET_SQLSCHEMA(
<                         WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_SQLSET_ID),
<                         WKLD.CURSQL.SQL_ID); 
<     END IF; 
---
>     IF (ETYPE = DBMS_SQLTUNE_UTIL1.COMPARE AND           
>         WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQLSET# AND
>         COMP_OBJ.COMPARE_STS2STS = 0)                    
>     THEN
>       SCHEMA_NAME := I_GET_SQLSCHEMA(WKLD.CURSQL.SQL_ID,
>         WKLD.PROPS(DBMS_SQLTUNE_UTIL1.PROP_SQLSET_ID));
>     END IF;
4253,4279c4316
<     
<     
<     
<     
<     
<     
<     BEGIN
<       SELECT XMLELEMENT("property", XMLATTRIBUTES('text' AS "name"), 
<                         WKLD.CURSQL.SQL_TEXT) 
<       INTO SQL_XML 
<       FROM DUAL; 
<     EXCEPTION
<       
<       WHEN OTHERS THEN
<         IF (LENGTH(WKLD.CURSQL.SQL_TEXT) > 32000) THEN 
<           SQLTXT := TRANSLATE(SUBSTR(WKLD.CURSQL.SQL_TEXT, 1, 32000), 
<                               CHR(0), ' ') ||  
<                     '...';
<         ELSE
<           SQLTXT := TRANSLATE(WKLD.CURSQL.SQL_TEXT, CHR(0), ' ');
<         END IF;
< 
<         SELECT XMLELEMENT("property", XMLATTRIBUTES('text' AS "name"), 
<                           SQLTXT)
<         INTO SQL_XML 
<         FROM DUAL; 
<     END;
---
>     I_REPORT_SQLTEXT(WKLD.CURSQL.SQL_TEXT, SQL_XML);  
4280a4318
>     
4311c4349
<                            NULL), 
---
>                             NULL),
4352c4390
< 
---
>        
4354c4392
< 
---
>        
4386c4424
<     RTYPE        IN           VARCHAR2)
---
>     RTYPE       IN            VARCHAR2)
4512c4550
<       
---
>     
4515c4553
<         WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQLSET# AND
---
>         WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQLSET# AND 
4518c4556
<         I_NOTFOR_SPECIFIC_CATEGORY(FLAGS)) 
---
>         I_NOTFOR_SPECIFIC_CATEGORY(FLAGS))
4524,4526c4562,4566
<       TOP_SQL := FLOOR(TOP_SQL / (BODY_ACTIVE_FLAGS.COUNT-1)); 
<       IF (TOP_SQL <= 0) THEN
<         TOP_SQL := 1; 
---
>       IF (TOP_SQL > 10 AND UPPER(TYPE) != 'TEST_V4') THEN
>         TOP_SQL := FLOOR(TOP_SQL / (BODY_ACTIVE_FLAGS.COUNT-1)); 
>         IF (TOP_SQL <= 0) THEN
>           TOP_SQL := 1; 
>         END IF;
4545c4585,4586
<     IF ((WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQLSET# AND OBJ_ID IS NULL) AND 
---
>     IF ((WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQLSET# AND
>          OBJ_ID IS NULL) AND
4554,4555c4595,4596
<     IF (SECTION != 'SUMMARY' OR OBJ_ID IS NOT NULL OR 
<         WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQL#) 
---
>     IF (SECTION != 'SUMMARY' OR OBJ_ID IS NOT NULL 
>         OR WKLD.TYPE = DBMS_SQLTUNE_UTIL1.OBJ_SQL#) 
4563c4604
<       THEN  
---
>       THEN
4650a4692,4697
>     
>     IF (TOP_SQL > 10) THEN
>       TOP_SQL := 10; 
>     END IF;
> 
>     
4652,4661c4699,4709
<                            TID,
<                            WKLD,
<                            EXEC_NAME,
<                            EXEC_TYPE,
<                            OBJ_ID,
<                            TOP_SQL,
<                            LEVEL_FLAGS,
<                            'SUMMARY',
<                            REPORT_REF,
<                            TYPE); 
---
>                            TID=> TID,
>                            WKLD => WKLD,
>                            EXEC_NAME => EXEC_NAME,
>                            EXEC_TYPE => EXEC_TYPE,
>                            OBJ_ID => OBJ_ID,
>                            RESULT_LIMIT => TOP_SQL,
>                            LEVEL_FLAGS => LEVEL_FLAGS,
>                            SECTION => 'SUMMARY',
>                            REPORT_REF => REPORT_REF,
>                            TYPE => TYPE,
>                            ERROR_CODE => NULL); 
4678,4687c4726,4736
<                            TID,
<                            WKLD,
<                            EXEC_NAME,
<                            EXEC_TYPE,
<                            R.OBJID,
<                            TOP_SQL,
<                            LEVEL_FLAGS,
<                            'SQL',
<                            SQL_REP_REF,
<                            TYPE));
---
>                            TID => TID,
>                            WKLD => WKLD,
>                            EXEC_NAME => EXEC_NAME,
>                            EXEC_TYPE => EXEC_TYPE,
>                            OBJ_ID => R.OBJID,
>                            RESULT_LIMIT => TOP_SQL,
>                            LEVEL_FLAGS => LEVEL_FLAGS,
>                            SECTION => 'SQL',
>                            REPORT_REF => SQL_REP_REF,
>                            TYPE => TYPE,
>                            ERROR_CODE => NULL));
SYS.STANDARD - PACKAGE BODY (19.9RUR):
265a266,272
>   function NLS_CHARSET_NAME(csetid PLS_INTEGER)
>     return VARCHAR2 is
>    v varchar2(2000);
>   begin
>    select nls_charset_name(csetid) into v from sys.dual;
>    return v;
>   end NLS_CHARSET_NAME;
266a274,280
>   function NLS_CHARSET_ID(csetname VARCHAR2)
>     return PLS_INTEGER is
>    i PLS_INTEGER;
>   begin
>    select nls_charset_id(csetname) into i from sys.dual;
>    return i;
>   end NLS_CHARSET_ID;
573,574d586
<     function pescsetname(csetid PLS_INTEGER) return varchar2;
<   pragma interface (c, pescsetname);
576,609d587
<   -- Special: if the ICD raises ICD_UNABLE_TO_COMPUTE, that means we should do
<   -- the old 'select nls_charset_name(...) from dual;' thing.  This allows us to do
<   -- the select from PL/SQL rather than having to do it from C (within the ICD.)
<   function NLS_CHARSET_NAME(csetid PLS_INTEGER)
<     return VARCHAR2 is
<    v varchar2(2000);
<   begin
<    v := pescsetname(csetid);
<    return v;
<   exception
<     when ICD_UNABLE_TO_COMPUTE then
<       select nls_charset_name(csetid) into v from sys.dual;
<       return v;
<   end NLS_CHARSET_NAME;
< 
< 
<   function pescsetid(csetname VARCHAR2) return pls_integer;
<   pragma interface (c, pescsetid);
< 
<   -- Special: if the ICD raises ICD_UNABLE_TO_COMPUTE, that means we should do
<   -- the old 'select nls_charset_id(...) from dual;' thing.  This allows us to do
<   -- the select from PL/SQL rather than having to do it from C (within the ICD.)
<   function NLS_CHARSET_ID(csetname VARCHAR2)
<     return PLS_INTEGER is
<    i PLS_INTEGER;
<   begin
<     i := pescsetid(csetname);
<     return i;
< 
<     exception
<        when ICD_UNABLE_TO_COMPUTE then
<           select nls_charset_id(csetname) into i from sys.dual;
<           return i;
<   end NLS_CHARSET_ID;
SYS.DBMS_FEATURE_PARTITION_SYSTEM - PROCEDURE (RU):
410c410
< --                               from x$props where name = 'CONTAINER_MAP'
---
> --                               from sys.props$ where name = 'CONTAINER_MAP'
SYS.DBMS_FEATURE_PARTITION_USER - PROCEDURE (RU):
409c409
<                                from x$props where name = 'CONTAINER_MAP'
---
>                                from sys.props$ where name = 'CONTAINER_MAP'
SYS.LOGMNR_GTLO3 - PROCEDURE (RU):
50c50
<     FETCHED_OBJV#_OUT    NUMBER;  
---
>     FETCHED_OBJV#_OUT    NUMBER := OBJV#_INOUT;  
56a57,108
>     TRYTHECACHE         BOOLEAN := TRUE;
> 
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     PROCEDURE TRACE_LOGMNR_GTLO3 (LOGMNR_LEVEL IN NUMBER, 
>                                 LM_LOGMNR_UID IN NUMBER,
>                                 MSG IN VARCHAR2) AS
>         DICT_LVL        CONSTANT BINARY_INTEGER := 8;
>     BEGIN
>         IF (DICT_LVL = BITAND(LOGMNR_LEVEL, DICT_LVL)) THEN
>           DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.TRACE_FILE,
>                              'TRACE_LOGMNR_GTLO3:'||LM_LOGMNR_UID || ':'||MSG);
>         END IF;
>     END;
> 
> 
>    
>    
>    
>    
>    FUNCTION MAXOBJVERSION( LM_LOGMNR_UID IN NUMBER,
>                            OBJ#_IN       IN NUMBER,
>                            HINT_STR      IN VARCHAR2,
>                            TABLE_STR     IN VARCHAR2)
>    RETURN NUMBER
>    IS
>      PRAGMA AUTONOMOUS_TRANSACTION;   
>      MAXOBJVERSIONRETURN NUMBER;                 
> 
>    BEGIN
>      EXECUTE IMMEDIATE
>            'SELECT /*+ INDEX (' || HINT_STR || ') */
>               NVL(MAX(baseobjv#), 0) AS m_objv#
>             FROM ' || TABLE_STR || '
>             WHERE logmnr_uid = ' || LOGMNR_UID_IN || ' AND
>                   keyobj# = :obj#_in'
>          INTO MAXOBJVERSIONRETURN
>          USING OBJ#_IN;
>      RETURN MAXOBJVERSIONRETURN;
>    END MAXOBJVERSION;
536c588
<                        objv#_inout   => :loc_objv#,
---
>                        objv#_inout   => :loc_objv#,
701,703c753,754
<  
<  DBMS_SYSTEM.READ_EV(LOGMNR_EVENT, LOGMNR_LEVEL);
<  SYS.LOGMNR_DICT_CACHE.TRACE_FAST_START(LOGMNR_LEVEL, 
---
>  DBMS_SYSTEM.READ_EV(LOGMNR_EVENT, LOGMNR_LEVEL); 
>  TRACE_LOGMNR_GTLO3(LOGMNR_LEVEL, 
708a760,767
>  IF CALLEDFROMTRIGGER THEN
>    HINT_STR := 'logmnrggc_gtlo logmnrggc_gtlo_pk';
>    TABLE_STR := 'system.logmnrggc_gtlo ';
>  ELSE
>    HINT_STR := 'logmnrc_gtlo logmnrc_gtlo_pk';
>    TABLE_STR := 'system.logmnrc_gtlo ';
>  END IF;
> 
712a772,774
> 
>    TRYTHECACHE := FALSE;
> 
756c818,824
<  );
---
>    );
>      
>      
>      
>      
>      
>      
758c826,837
<  ELSE        
---
>    IF (0 <> LOGMNR_UID_IN) AND (0 = OBJV#_INOUT) AND (0 = LVLCNT_OUT) THEN
>      TRACE_LOGMNR_GTLO3(LOGMNR_LEVEL, LOGMNR_UID_IN,
>                                     'logmnr_gtlo3:1.1:objv#_inout=0,lvlcnt=0');
>      
>      OBJV#_INOUT :=
>        MAXOBJVERSION(LOGMNR_UID_IN, OBJ#_IN, HINT_STR, TABLE_STR);
>      TRACE_LOGMNR_GTLO3(LOGMNR_LEVEL, 
>                   LOGMNR_UID_IN,'logmnr_gtlo3:1.3:objv#_inout:was 0,now ' ||
>                   OBJV#_INOUT);
>      TRYTHECACHE := (OBJV#_INOUT <> 0);
>    END IF;
>  END IF;
759a839
>  IF TRYTHECACHE THEN       
761,768d840
<      IF CALLEDFROMTRIGGER THEN
<        HINT_STR := 'logmnrggc_gtlo logmnrggc_gtlo_pk';
<        TABLE_STR := 'system.logmnrggc_gtlo ';
<      ELSE
<        HINT_STR := 'logmnrc_gtlo logmnrc_gtlo_pk';
<        TABLE_STR := 'system.logmnrc_gtlo ';
<      END IF;
< 
792a865,866
> 
>      FETCHED_OBJV#_OUT := OBJV#_INOUT;
801c875
<      SYS.LOGMNR_DICT_CACHE.TRACE_FAST_START(LOGMNR_LEVEL, LOGMNR_UID_IN,
---
>      TRACE_LOGMNR_GTLO3(LOGMNR_LEVEL, LOGMNR_UID_IN,
802a877
> 
853c928
<        SYS.LOGMNR_DICT_CACHE.TRACE_FAST_START(LOGMNR_LEVEL, LOGMNR_UID_IN,
---
>        TRACE_LOGMNR_GTLO3(LOGMNR_LEVEL, LOGMNR_UID_IN,
895,896c970,973
<          ACDRROWTSINTCOL#_OUT
<      );
---
>          ACDRROWTSINTCOL#_OUT);
>        IF LVLCNT_OUT > 0 THEN
>          FETCHED_OBJV#_OUT := OBJV#_INOUT;
>        END IF;
902c979
<         SYS.LOGMNR_DICT_CACHE.TRACE_FAST_START(LOGMNR_LEVEL, 
---
>         TRACE_LOGMNR_GTLO3(LOGMNR_LEVEL, 
910c987
<             OBJV#_INOUT,
---
>             FETCHED_OBJV#_OUT,
953c1030
<    FETCHED_OBJV#_OUT := OBJV#_INOUT;
---
> 
956,958c1033,1036
<  SYS.LOGMNR_DICT_CACHE.TRACE_FAST_START(LOGMNR_LEVEL,
<                   LOGMNR_UID_IN,'logmnr_gtlo3:3:objv#_in:'||OBJV#_INOUT||
<                                ':objv#_out:'||FETCHED_OBJV#_OUT||
---
>  TRACE_LOGMNR_GTLO3(LOGMNR_LEVEL, LOGMNR_UID_IN,
>                                'logmnr_gtlo3:3:obj#_in:'||OBJ#_IN||
>                                ':objv#_inout:'||OBJV#_INOUT||
>                                ':fetched_objv#_out:'||FETCHED_OBJV#_OUT||
SYS.PRVT_AWRV_METADATA - TYPE BODY (RU):
18c18
<     L_ISLOCAL                 NUMBER;
---
>     L_IS_LOCAL                 NUMBER;
289,294c289,293
<         IF (M_RESOLVED_DB_TYPE IN
<               (DBMS_SQLTUNE_UTIL2.DB_TYPE_PDB, 
<                DBMS_SQLTUNE_UTIL2.DB_TYPE_IMP)
<             AND
<             DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(P_START_TIME) = 
<               DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB)
---
>         IF ((M_RESOLVED_DB_TYPE = DBMS_SQLTUNE_UTIL2.DB_TYPE_IMP) OR
>             (M_RESOLVED_DB_TYPE = DBMS_SQLTUNE_UTIL2.DB_TYPE_PDB
>              AND
>              DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(P_START_TIME) = 
>                DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB))
300c299
<               FROM AWR_PDB_SNAPSHOT
---
>               FROM SYS.AWR_PDB_SNAPSHOT
307c306
<               FROM AWR_ROOT_SNAPSHOT
---
>               FROM SYS.AWR_ROOT_SNAPSHOT
352c351
<                 from awr_pdb_wr_control
---
>                 from sys.awr_pdb_wr_control
414c413
<     L_ISLOCAL := 0;
---
>     L_IS_LOCAL := 0;
419c418
<       L_ISLOCAL := 1;
---
>       L_IS_LOCAL := 1;
424c423
<         L_ISLOCAL := 1;
---
>         L_IS_LOCAL := 1;
435,438c434
<     
<     IF (SYS.DBMS_SQLTUNE_UTIL0.CDB_IS_PDB(L_CON_NAME, L_CON_ID) AND
<         DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(P_START_TIME) = 
<           DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB) THEN  
---
>     IF (M_RESOLVED_DB_TYPE = DBMS_SQLTUNE_UTIL2.DB_TYPE_IMP) THEN
439a436
>     ELSE
441a439,442
>         IF (SYS.DBMS_SQLTUNE_UTIL0.CDB_IS_PDB(L_CON_NAME, L_CON_ID) AND
>             DBMS_SQLTUNE_UTIL2.CHOOSEAWRFORPDB(P_START_TIME) = 
>               DBMS_SQLTUNE_UTIL1.AWR_VIEW_PDB) THEN  
>             M_AWR_VIEW_PREFIX := AWR_PREFIX_PDB;
443,444c444,454
<         IF (M_DB_TYPE = STR_ROOT) THEN
<             M_AWR_VIEW_PREFIX := AWR_PREFIX_ROOT;
---
>             
>             
>             
>             IF (M_DB_TYPE = STR_ROOT) THEN
>                 M_AWR_VIEW_PREFIX := AWR_PREFIX_ROOT;
>             END IF;
>         ELSE 
>             
>             
>             
>             M_AWR_VIEW_PREFIX := AWR_PREFIX_ROOT;    
446,450d455
<     ELSE 
<         
<         
<         
<         M_AWR_VIEW_PREFIX := AWR_PREFIX_ROOT;    
457c462
<     ADJUST_INPUT_TIMES(L_ISLOCAL);
---
>     ADJUST_INPUT_TIMES(L_IS_LOCAL);
482c487
<           from awr_root_snapshot
---
>           from sys.awr_root_snapshot
505c510
<                 from awr_root_snapshot
---
>                 from sys.awr_root_snapshot
523c528
<          from awr_root_snapshot
---
>          from sys.awr_root_snapshot
547,548c552,553
<                  from awr_root_database_instance di,
<                       awr_root_snapshot  s
---
>                  from sys.awr_root_database_instance di,
>                       sys.awr_root_snapshot  s
582c587
<     IF (L_ISLOCAL = 1) THEN
---
>     IF (L_IS_LOCAL = 1) THEN
SYS.WRI$_REPT_AWRV - TYPE BODY (RU):
586a587
>                         INST_ID      => P_INST_ID,
605,606c606,608
<         P_TOP_N_DETAIL := TO_NUMBER(DBMS_REPORT.GET_PARAM(PARAMS,'top_n_detail',
<                                                      NULLABLE=>TRUE));
---
>         P_TOP_N_DETAIL := TO_NUMBER(DBMS_REPORT.GET_PARAM(PARAMS,
>                                                         'top_n_detail',
>                                                         NULLABLE=>TRUE));
SYS.WRI$_REPT_SQLPI - TYPE BODY (RU):
149,158c149,159
<                            TID,
<                            WKLD,
<                            ENAME,
<                            ETYPE,
<                            OBJ_ID,
<                            TOP_SQL,
<                            LEVEL_FLAGS,
<                            SECTION,
<                            REPORT_REFERENCE,
<                            'test_v4');       
---
>                            TID => TID,
>                            WKLD => WKLD,
>                            EXEC_NAME => ENAME,
>                            EXEC_TYPE => ETYPE,
>                            OBJ_ID => OBJ_ID,
>                            RESULT_LIMIT => TOP_SQL,
>                            LEVEL_FLAGS => LEVEL_FLAGS,
>                            SECTION => SECTION,
>                            REPORT_REF => REPORT_REFERENCE,
>                            TYPE => 'test_v4',  
>                            ERROR_CODE => NULL);      
SYS.ALL_IND_STATISTICS - VIEW (RU):
88c88
<             from sys.tab$ tab, mon_mods_v m
---
>             from sys.tab$ tab, sys.mon_mods_v m
126c126
<   /* Partitions */
---
>   /* Partitions (not local index) */
141,144c141,202
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ io, sys.indpartv$ ip,
>     sys.user$ u, sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       io.obj# = ip.obj#
>   and io.owner# = u.user#
>   and ip.obj# = ins.obj# (+)
>   and ip.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and io.namespace = 4 and io.remoteowner IS NULL and io.linkname IS NULL
>   and bitand(io.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   and (io.owner# = userenv('SCHEMAID')
>         or
>         i.bo# in (select obj#
>                     FROM sys.objauth$
>                     where grantee# in ( select kzsrorol
>                                         FROM x$kzsro
>                                       )
>                    )
>         or
>          exists (select null FROM v$enabledprivs
>                  where priv_number in (-45 /* LOCK ANY TABLE */,
>                                        -47 /* SELECT ANY TABLE */,
>                                        -397/* READ ANY TABLE */,
>                                        -48 /* INSERT ANY TABLE */,
>                                        -49 /* UPDATE ANY TABLE */,
>                                        -50 /* DELETE ANY TABLE */)
>                  )
>        )
>   UNION ALL
>   /* Partitions (local index) */
>   SELECT
>     u.name, io.name, ut.name, ot.name,
>     io.subname, ip.part#, NULL, NULL, 'PARTITION',
>     ip.blevel, ip.leafcnt, ip.distkey, ip.lblkkey, ip.dblkkey,
>     ip.clufac, ip.rowcnt, ins.cachedblk, ins.cachehit,
>     ip.samplesize, ip.analyzetime,
>     decode(bitand(ip.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(ip.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
161,162c219
<              tp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tp.bo# = t.obj#),
164,193c221,230
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (ip.analyzetime is null or
<                       tp.analyzetime is null) then null
<                 when (ip.analyzetime < tp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tabpartv$ tp, sys.mon_mods_v m
<        where tp.bo# = i.bo# and tp.phypart# = ip.phypart# and
<              tp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1),  -- local index
---
>     case     when (ip.analyzetime is null or
>                    tp.analyzetime is null) then null
>              when (ip.analyzetime < tp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
198c235,236
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabpartv$ tp, sys.mon_mods_v m
204d241
<   and ip.bo# = i.obj#
209a247,248
>   and tp.bo# = i.bo# and tp.phypart# = ip.phypart#
>   and tp.obj# = m.obj# (+)
211a251
>   and bitand(po.flags, 1) = 1   -- local index
231c271
<   /* Composite partitions */
---
>   /* Composite partitions (not local index) */
246,249c286,346
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ io, sys.indcompartv$ icp, sys.user$ u, sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       io.obj# = icp.obj#
>   and io.owner# = u.user#
>   and icp.obj# = ins.obj# (+)
>   and icp.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and io.namespace = 4 and io.remoteowner IS NULL and io.linkname IS NULL
>   and bitand(io.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   and (io.owner# = userenv('SCHEMAID')
>         or
>         i.bo# in (select oa.obj#
>                   FROM sys.objauth$ oa
>                     where grantee# in ( select kzsrorol
>                                         FROM x$kzsro
>                                       )
>                    )
>         or /* user has system privileges */
>          exists (select null FROM v$enabledprivs
>                  where priv_number in (-45 /* LOCK ANY TABLE */,
>                                        -47 /* SELECT ANY TABLE */,
>                                        -397/* READ ANY TABLE */,
>                                        -48 /* INSERT ANY TABLE */,
>                                        -49 /* UPDATE ANY TABLE */,
>                                        -50 /* DELETE ANY TABLE */)
>                  )
>       )
>   UNION ALL
>   /* Composite partitions (local index) */
>   SELECT
>     u.name, io.name, ut.name, ot.name,
>     io.subname, icp.part#, NULL, NULL, 'PARTITION',
>     icp.blevel, icp.leafcnt, icp.distkey, icp.lblkkey, icp.dblkkey,
>     icp.clufac, icp.rowcnt, ins.cachedblk, ins.cachehit,
>     icp.samplesize, icp.analyzetime,
>     decode(bitand(icp.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(icp.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
266,267c363
<              tcp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tcp.bo# = t.obj#),
269,298c365,374
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (icp.analyzetime is null or
<                       tcp.analyzetime is null) then null
<                 when (icp.analyzetime < tcp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tcp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tcp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tabcompartv$ tcp, sys.mon_mods_v m
<        where tcp.bo# = i.bo# and tcp.phypart# = icp.phypart# and
<              tcp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1),  -- local index
---
>     case     when (icp.analyzetime is null or
>                    tcp.analyzetime is null) then null
>              when (icp.analyzetime < tcp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tcp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tcp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
302c378,379
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabcompartv$ tcp, sys.mon_mods_v m
307d383
<   and i.obj# = icp.bo#
313a390,391
>   and tcp.bo# = i.bo# and tcp.phypart# = icp.phypart#
>   and tcp.obj# = m.obj# (+)
315a394
>   and bitand(po.flags, 1) = 1   -- local index
335c414
<   /* Subpartitions */
---
>   /* Subpartitions (not local index) */
351,354c430,494
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ os, sys.obj$ op, sys.indcompartv$ icp, sys.indsubpartv$ isp,
>     sys.user$ u,  sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       os.obj# = isp.obj#
>   and op.obj# = icp.obj#
>   and icp.obj# = isp.pobj#
>   and u.user# = op.owner#
>   and isp.obj# = ins.obj# (+)
>   and icp.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and op.namespace = 4 and op.remoteowner IS NULL and op.linkname IS NULL
>   and bitand(op.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   and (op.owner# = userenv('SCHEMAID')
>         or i.bo# in
>             (select oa.obj#
>              FROM sys.objauth$ oa
>              where grantee# in ( select kzsrorol
>                                  FROM x$kzsro
>                                )
>             )
>         or /* user has system privileges */
>          exists (select null FROM v$enabledprivs
>                  where priv_number in (-45 /* LOCK ANY TABLE */,
>                                        -47 /* SELECT ANY TABLE */,
>                                        -397/* READ ANY TABLE */,
>                                        -48 /* INSERT ANY TABLE */,
>                                        -49 /* UPDATE ANY TABLE */,
>                                        -50 /* DELETE ANY TABLE */)
>                  )
>       )
>   UNION ALL
>   /* Subpartitions (local index) */
>   SELECT
>     u.name, op.name, ut.name, ot.name,
>     op.subname, icp.part#, os.subname, isp.subpart#,
>     'SUBPARTITION',
>     isp.blevel, isp.leafcnt, isp.distkey, isp.lblkkey, isp.dblkkey,
>     isp.clufac, isp.rowcnt, ins.cachedblk, ins.cachehit,
>     isp.samplesize, isp.analyzetime,
>     decode(bitand(isp.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(isp.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
374,375c514
<              tcp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tcp.bo# = t.obj#),
377,408c516,525
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (isp.analyzetime is null or
<                       tsp.analyzetime is null) then null
<                 when (isp.analyzetime < tsp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tcp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tsp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM  sys.tabcompartv$ tcp, sys.tabsubpartv$ tsp, sys.mon_mods_v m
<        where tcp.bo# = i.bo# and tcp.phypart# = icp.phypart# and
<              tsp.pobj# = tcp.obj# and
<              isp.physubpart# = tsp.physubpart# and
<              tsp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1),  -- local index
---
>     case     when (isp.analyzetime is null or
>                    tsp.analyzetime is null) then null
>              when (isp.analyzetime < tsp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tcp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tsp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
413c530,531
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabcompartv$ tcp, sys.tabsubpartv$ tsp, sys.mon_mods_v m
418,419d535
<   and icp.bo# = i.obj#
<   and i.type# != 9  --  no domain indexes
422a539
>   and i.type# != 9  --  no domain indexes
426a544,547
>   and tcp.bo# = i.bo# and tcp.phypart# = icp.phypart#
>   and tsp.pobj# = tcp.obj#
>   and isp.physubpart# = tsp.physubpart#
>   and tsp.obj# = m.obj# (+)
428a550
>   and bitand(po.flags, 1) = 1   -- local index
SYS.CDB_WORKLOAD_CAPTURES - VIEW (RU):
1c1
< SELECT k."ID",k."NAME",k."DBID",k."DBNAME",k."DBVERSION",k."PARALLEL",k."DIRECTORY",k."STATUS",k."START_TIME",k."END_TIME",k."DURATION_SECS",k."START_SCN",k."END_SCN",k."DEFAULT_ACTION",k."FILTERS_USED",k."CAPTURE_SIZE",k."DBTIME",k."DBTIME_TOTAL",k."USER_CALLS",k."USER_CALLS_TOTAL",k."USER_CALLS_UNREPLAYABLE",k."PLSQL_SUBCALL_SIZE",k."PLSQL_CALLS",k."PLSQL_SUBCALLS",k."PLSQL_DBTIME",k."TRANSACTIONS",k."TRANSACTIONS_TOTAL",k."CONNECTS",k."CONNECTS_TOTAL",k."ERRORS",k."AWR_DBID",k."AWR_BEGIN_SNAP",k."AWR_END_SNAP",k."AWR_EXPORTED",k."ERROR_CODE",k."ERROR_MESSAGE",k."DIR_PATH",k."DIR_PATH_SHARED",k."LAST_PROCESSED_VERSION",k."SQLSET_OWNER",k."SQLSET_NAME",k."PLSQL_MODE",k."ENCRYPTION",k."ENCRYPTION_VERIFIER",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_WORKLOAD_CAPTURES") k
---
> SELECT k."ID",k."NAME",k."DBID",k."DBNAME",k."DBVERSION",k."PARALLEL",k."DIRECTORY",k."STATUS",k."START_TIME",k."END_TIME",k."DURATION_SECS",k."START_SCN",k."END_SCN",k."DEFAULT_ACTION",k."FILTERS_USED",k."CAPTURE_SIZE",k."DBTIME",k."DBTIME_TOTAL",k."USER_CALLS",k."USER_CALLS_TOTAL",k."USER_CALLS_UNREPLAYABLE",k."PLSQL_SUBCALL_SIZE",k."PLSQL_CALLS",k."PLSQL_SUBCALLS",k."PLSQL_DBTIME",k."TRANSACTIONS",k."TRANSACTIONS_TOTAL",k."CONNECTS",k."CONNECTS_TOTAL",k."ERRORS",k."AWR_DBID",k."AWR_BEGIN_SNAP",k."AWR_END_SNAP",k."AWR_EXPORTED",k."ERROR_CODE",k."ERROR_MESSAGE",k."DIR_PATH",k."DIR_PATH_SHARED",k."LAST_PROCESSED_VERSION",k."SQLSET_OWNER",k."SQLSET_NAME",k."PLSQL_MODE",k."ENCRYPTION",k."CON_ID", k.CON$NAME, k.CDB$NAME, k.CON$ERRNUM, k.CON$ERRMSG FROM CONTAINERS("SYS"."DBA_WORKLOAD_CAPTURES") k
SYS.DBA_IND_STATISTICS - VIEW (RU):
70c70
<             from sys.tab$ tab, mon_mods_v m
---
>             from sys.tab$ tab, sys.mon_mods_v m
90c90
<   /* Partitions */
---
>   /* Partitions (not local index) */
105,108c105,148
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ io, sys.indpartv$ ip,
>     sys.user$ u, sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       io.obj# = ip.obj#
>   and io.owner# = u.user#
>   and ip.obj# = ins.obj# (+)
>   and ip.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and io.namespace = 4 and io.remoteowner IS NULL and io.linkname IS NULL
>   and bitand(io.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   UNION ALL
>   /* Partitions (local index) */
>   SELECT
>     u.name, io.name, ut.name, ot.name,
>     io.subname, ip.part#, NULL, NULL, 'PARTITION',
>     ip.blevel, ip.leafcnt, ip.distkey, ip.lblkkey, ip.dblkkey,
>     ip.clufac, ip.rowcnt, ins.cachedblk, ins.cachehit,
>     ip.samplesize, ip.analyzetime,
>     decode(bitand(ip.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(ip.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
125,126c165
<              tp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tp.bo# = t.obj#),
128,157c167,176
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (ip.analyzetime is null or
<                       tp.analyzetime is null) then null
<                 when (ip.analyzetime < tp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tabpartv$ tp, sys.mon_mods_v m
<        where tp.bo# = i.bo# and tp.phypart# = ip.phypart# and
<              tp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1),  -- local index
---
>     case     when (ip.analyzetime is null or
>                    tp.analyzetime is null) then null
>              when (ip.analyzetime < tp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
162c181,182
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabpartv$ tp, sys.mon_mods_v m
172a193,194
>   and tp.bo# = i.bo# and tp.phypart# = ip.phypart#
>   and tp.obj# = m.obj# (+)
174a197
>   and bitand(po.flags, 1) = 1   -- local index
176c199
<   /* Composite partitions */
---
>   /* Composite partitions (not local index) */
191,194c214,256
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ io, sys.indcompartv$ icp, sys.user$ u, sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       io.obj# = icp.obj#
>   and io.owner# = u.user#
>   and icp.obj# = ins.obj# (+)
>   and icp.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and io.namespace = 4 and io.remoteowner IS NULL and io.linkname IS NULL
>   and bitand(io.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   UNION ALL
>   /* Composite partitions (local index) */
>   SELECT
>     u.name, io.name, ut.name, ot.name,
>     io.subname, icp.part#, NULL, NULL, 'PARTITION',
>     icp.blevel, icp.leafcnt, icp.distkey, icp.lblkkey, icp.dblkkey,
>     icp.clufac, icp.rowcnt, ins.cachedblk, ins.cachehit,
>     icp.samplesize, icp.analyzetime,
>     decode(bitand(icp.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(icp.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
211,212c273
<              tcp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tcp.bo# = t.obj#),
214,243c275,284
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (icp.analyzetime is null or
<                       tcp.analyzetime is null) then null
<                 when (icp.analyzetime < tcp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tcp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tcp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tabcompartv$ tcp, sys.mon_mods_v m
<        where tcp.bo# = i.bo# and tcp.phypart# = icp.phypart# and
<              tcp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1),  -- local index
---
>     case     when (icp.analyzetime is null or
>                    tcp.analyzetime is null) then null
>              when (icp.analyzetime < tcp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tcp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tcp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
247c288,289
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabcompartv$ tcp, sys.mon_mods_v m
257a300,301
>   and tcp.bo# = i.bo# and tcp.phypart# = icp.phypart#
>   and tcp.obj# = m.obj# (+)
259a304
>   and bitand(po.flags, 1) = 1   -- local index
261c306
<   /* Subpartitions */
---
>   /* Subpartitions (not local index) */
277,280c322,368
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ os, sys.obj$ op, sys.indcompartv$ icp, sys.indsubpartv$ isp,
>     sys.user$ u,  sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       os.obj# = isp.obj#
>   and op.obj# = icp.obj#
>   and icp.obj# = isp.pobj#
>   and u.user# = op.owner#
>   and isp.obj# = ins.obj# (+)
>   and icp.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and op.namespace = 4 and op.remoteowner IS NULL and op.linkname IS NULL
>   and bitand(op.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   UNION ALL
>   /* Subpartitions (local index) */
>   SELECT
>     u.name, op.name, ut.name, ot.name,
>     op.subname, icp.part#, os.subname, isp.subpart#,
>     'SUBPARTITION',
>     isp.blevel, isp.leafcnt, isp.distkey, isp.lblkkey, isp.dblkkey,
>     isp.clufac, isp.rowcnt, ins.cachedblk, ins.cachehit,
>     isp.samplesize, isp.analyzetime,
>     decode(bitand(isp.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(isp.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
300,301c388
<              tcp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tcp.bo# = t.obj#),
303,334c390,399
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (isp.analyzetime is null or
<                       tsp.analyzetime is null) then null
<                 when (isp.analyzetime < tsp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tcp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tsp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM  sys.tabcompartv$ tcp, sys.tabsubpartv$ tsp, sys.mon_mods_v m
<        where tcp.bo# = i.bo# and tcp.phypart# = icp.phypart# and
<              tsp.pobj# = tcp.obj# and
<              isp.physubpart# = tsp.physubpart# and
<              tsp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1),  -- local index
---
>     case     when (isp.analyzetime is null or
>                    tsp.analyzetime is null) then null
>              when (isp.analyzetime < tsp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tcp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tsp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
339c404,405
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabcompartv$ tcp, sys.tabsubpartv$ tsp, sys.mon_mods_v m
351a418,421
>   and tcp.bo# = i.bo# and tcp.phypart# = icp.phypart#
>   and tsp.pobj# = tcp.obj#
>   and isp.physubpart# = tsp.physubpart#
>   and tsp.obj# = m.obj# (+)
353a424
>   and bitand(po.flags, 1) = 1   -- local index
SYS.DBA_JOBS - VIEW (RU):
4c4
<     j.last_start_date LAST_DATE,
---
>     CAST(j.last_start_date AS DATE) LAST_DATE,
6c6,8
<     DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL) THIS_DATE,
---
>     CAST(
>       DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL)
>     AS DATE) THIS_DATE,
9c11
<     j.next_run_date NEXT_DATE,
---
>     CAST(j.next_run_date AS DATE) NEXT_DATE,
SYS.DBA_JOBS_RUNNING - VIEW (RU):
3c3
<     j.last_start_date LAST_DATE,
---
>     CAST(j.last_start_date AS DATE) LAST_DATE,
5c5,7
<     DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL) THIS_DATE,
---
>     CAST(
>       DECODE(BITAND(j.job_status,2), 2, j.last_start_date, NULL)
>     AS DATE) THIS_DATE,
SYS.DBA_TABLESPACE_USAGE_METRICS - VIEW (RU):
11c11,12
<         t.ts# = tstat.kttetstsn
---
>         t.ts# = tstat.kttetstsn and
>         (tstat.con_id is NULL or tstat.con_id = sys_context('USERENV', 'CON_ID'))
SYS.DBA_WORKLOAD_CAPTURES - VIEW (RU):
30,31c30
<  , decode( nvl(r.plsql_mode, 0), 0,'TOP_LEVEL', 1,'EXTENDED', 2,'EXTENDED_SYS',
<                                  'INVALID' )
---
>  , decode(nvl(r.plsql_mode, 0), 0, 'TOP_LEVEL', 1, 'EXTENDED', 2, 'EXTENDED_SYS', 'INVALID')
33d31
<  , r.encryption_verifier
SYS.LOGSTDBY_RU_SUPP_TAB_19 - VIEW (RU):
96a97
>     or (bitand(t.trigflag, 8192) != 0)            /* Blockchain ledger table */
SYS.LOGSTDBY_RU_UN_TAB_19 - VIEW (RU):
94a95
>   or (bitand(t.trigflag, 8192) != 0)            /* Blockchain ledger table */
SYS.LOGSTDBY_SUPPORT_TAB_19 - VIEW (RU):
126a127
>     or (bitand(t.trigflag, 8192) != 0)            /* Blockchain ledger table */
SYS.LOGSTDBY_UNSUPP_TAB_19 - VIEW (RU):
124a125
>   or (bitand(t.trigflag, 8192) != 0)            /* Blockchain ledger table */
SYS.MON_MODS_V - VIEW (RU):
2c2
<   nvl(m.obj#, x.objn),
---
>   m.obj#,
15c15
< from sys.mon_mods_all$ m full outer join
---
> from sys.mon_mods_all$ m,
19c19,33
< on m.obj# = x.objn
---
> where m.obj# = x.objn(+)
> union all
> select
>   x.objn,
>   nvl(x.ins, 0),
>   nvl(x.upd, 0),
>   nvl(x.del, 0),
>   sysdate,                 /* assume sysdate as timestamp for mods in memory */
>   nvl(x.flags, 0),
>   nvl(x.dropseg, 0)
> from sys.mon_mods_all$ m,
>      (select objn, sum(ins) ins, sum(upd) upd, sum(del) del,
>       max(bitand(flags, 1)) flags, sum(dropseg) dropseg
>       from sys.gv$dml_stats group by objn) x
> where x.objn = m.obj#(+) and m.obj# is null
SYS.OGG_SUPPORT_TAB_19 - VIEW (RU):
118a119
>     or (bitand(t.trigflag, 8192) != 0)            /* Blockchain ledger table */
SYS.STRADDLING_TS_OBJECTS - VIEW (RU):
106a107
>   -- Exclude domain indexes, they are done separately
120c121,122
<   WHERE   tp1.bo# = i.bo# AND ip.bo# = i.obj# and tp1.ts# != ip.ts#
---
>   WHERE   tp1.bo# = i.bo# AND ip.bo# = i.obj# and tp1.ts# != ip.ts# AND
>           i.type# != 9
170a173
>   -- Exclude domain indexes, they are done separately
185c188,189
<   WHERE  i.bo# = v3.bo# AND v4.bo# = i.obj# AND v4.ts# != V3.ts#
---
>   WHERE  i.bo# = v3.bo# AND v4.bo# = i.obj# AND v4.ts# != V3.ts# AND
>          i.type# != 9
SYS.USER_IND_STATISTICS - VIEW (RU):
69c69
<             from sys.tab$ tab, mon_mods_v m
---
>             from sys.tab$ tab, sys.mon_mods_v m
88c88
<   /* Partitions */
---
>   /* Partitions (not local index) */
103,106c103,145
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ io, sys.indpartv$ ip, sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       io.obj# = ip.obj#
>   and ip.obj# = ins.obj# (+)
>   and ip.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and io.owner# = userenv('SCHEMAID')
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and io.namespace = 4 and io.remoteowner IS NULL and io.linkname IS NULL
>   and bitand(io.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   UNION ALL
>   /* Partitions (local index) */
>   SELECT
>     io.name, ut.name, ot.name,
>     io.subname, ip.part#, NULL, NULL, 'PARTITION',
>     ip.blevel, ip.leafcnt, ip.distkey, ip.lblkkey, ip.dblkkey,
>     ip.clufac, ip.rowcnt, ins.cachedblk, ins.cachehit,
>     ip.samplesize, ip.analyzetime,
>     decode(bitand(ip.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(ip.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
123,124c162
<              tp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tp.bo# = t.obj#),
126,155c164,173
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (ip.analyzetime is null or
<                       tp.analyzetime is null) then null
<                 when (ip.analyzetime < tp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tabpartv$ tp, sys.mon_mods_v m
<        where tp.bo# = i.bo# and tp.phypart# = ip.phypart# and
<              tp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1), -- local index
---
>     case     when (ip.analyzetime is null or
>                    tp.analyzetime is null) then null
>              when (ip.analyzetime < tp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
159c177,178
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabpartv$ tp, sys.mon_mods_v m
169a189,190
>   and tp.bo# = i.bo# and tp.phypart# = ip.phypart#
>   and tp.obj# = m.obj# (+)
171a193
>   and bitand(po.flags, 1) = 1   -- local index
173c195
<   /* Composite partitions */
---
>   /* Composite partitions (not local index) */
188,191c210,252
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ io, sys.indcompartv$ icp, sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       io.obj# = icp.obj#
>   and io.obj# = ins.obj# (+)
>   and icp.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and io.owner# = userenv('SCHEMAID')
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and io.namespace = 4 and io.remoteowner IS NULL and io.linkname IS NULL
>   and bitand(io.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   UNION ALL
>   /* Composite partitions (local index) */
>   SELECT
>     io.name, ut.name, ot.name,
>     io.subname, icp.part#, NULL, NULL, 'PARTITION',
>     icp.blevel, icp.leafcnt, icp.distkey, icp.lblkkey, icp.dblkkey,
>     icp.clufac, icp.rowcnt, ins.cachedblk, ins.cachehit,
>     icp.samplesize, icp.analyzetime,
>     decode(bitand(icp.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(icp.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
208,209c269
<              tcp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tcp.bo# = t.obj#),
211,240c271,280
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (icp.analyzetime is null or
<                       tcp.analyzetime is null) then null
<                 when (icp.analyzetime < tcp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tcp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tcp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tabcompartv$ tcp, sys.mon_mods_v m
<        where tcp.bo# = i.bo# and tcp.phypart# = icp.phypart# and
<              tcp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1), -- local index
---
>     case     when (icp.analyzetime is null or
>                    tcp.analyzetime is null) then null
>              when (icp.analyzetime < tcp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tcp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tcp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
244c284,285
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabcompartv$ tcp, sys.mon_mods_v m
254a296,297
>   and tcp.bo# = i.bo# and tcp.phypart# = icp.phypart#
>   and tcp.obj# = m.obj# (+)
256a300
>   and bitand(po.flags, 1) = 1   -- local index
258c302
<   /* Subpartitions */
---
>   /* Subpartitions (not local index) */
274,277c318,364
<        where t.obj# = i.bo# and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
---
>        where t.obj# = i.bo#),
>     /* stale_stats */
>     case     when (i.analyzetime is null or
>                    tab.analyzetime is null) then null
>              when (i.analyzetime < tab.analyzetime  or
>                    (dbms_stats_internal.is_stale(tab.obj#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tab.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
>     'SHARED'
>   FROM
>     sys.obj$ os, sys.obj$ op, sys.indcompartv$ icp, sys.indsubpartv$ isp,
>     sys.ind_stats$ ins,
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tab$ tab, sys.mon_mods_v m
>   WHERE
>       os.obj# = isp.obj#
>   and op.obj# = icp.obj#
>   and icp.obj# = isp.pobj#
>   and isp.obj# = ins.obj# (+)
>   and icp.bo# = i.obj#
>   and i.type# != 9  --  no domain indexes
>   and i.bo# = ot.obj#
>   and ot.type# = 2
>   and ot.owner# = ut.user#
>   and i.obj# = po.obj#
>   and op.owner# = userenv('SCHEMAID')
>   and tab.obj# = i.bo# and tab.obj# = m.obj# (+)
>   and op.namespace = 4 and op.remoteowner IS NULL and op.linkname IS NULL
>   and bitand(op.flags, 128) = 0 -- not in recycle bin
>   and bitand(po.flags, 1) = 0   -- not local index
>   UNION ALL
>   /* Subpartitions (local index) */
>   SELECT
>     op.name, ut.name, ot.name,
>     op.subname, icp.part#, os.subname, isp.subpart#,
>     'SUBPARTITION',
>     isp.blevel, isp.leafcnt, isp.distkey, isp.lblkkey, isp.dblkkey,
>     isp.clufac, isp.rowcnt, ins.cachedblk, ins.cachehit,
>     isp.samplesize, isp.analyzetime,
>     decode(bitand(isp.flags, 16), 0, 'NO', 'YES'),
>     decode(bitand(isp.flags, 8), 0, 'NO', 'YES'),
>     /* stattype_locked */
>     (select
297,298c384
<              tcp.bo# = t.obj# and
<              bitand(po.flags, 1) = 1),  -- local index
---
>              tcp.bo# = t.obj#),
300,331c386,395
<     (select
<        case     when (i.analyzetime is null or
<                       tab.analyzetime is null) then null
<                 when (i.analyzetime < tab.analyzetime  or
<                       (dbms_stats_internal.is_stale(tab.obj#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tab.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM sys.tab$ tab, sys.mon_mods_v m
<        where tab.obj# = i.bo# and tab.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 0   -- not local index
<      union all
<      select
<        case     when (isp.analyzetime is null or
<                       tsp.analyzetime is null) then null
<                 when (isp.analyzetime < tsp.analyzetime  or
<                       (dbms_stats_internal.is_stale(tcp.bo#,
<                          null,
<                          null,
<                          (m.inserts + m.deletes + m.updates),
<                          tsp.rowcnt, m.flags) > 0)) then 'YES'
<                 else 'NO'
<        end
<        FROM  sys.tabcompartv$ tcp, sys.tabsubpartv$ tsp, sys.mon_mods_v m
<        where tcp.bo# = i.bo# and tcp.phypart# = icp.phypart# and
<              tsp.pobj# = tcp.obj# and
<              isp.physubpart# = tsp.physubpart# and
<              tsp.obj# = m.obj# (+) and
<              bitand(po.flags, 1) = 1), -- local index
---
>     case     when (isp.analyzetime is null or
>                    tsp.analyzetime is null) then null
>              when (isp.analyzetime < tsp.analyzetime  or
>                    (dbms_stats_internal.is_stale(tcp.bo#,
>                       null,
>                       null,
>                       (m.inserts + m.deletes + m.updates),
>                       tsp.rowcnt, m.flags) > 0)) then 'YES'
>              else 'NO'
>     end,
336c400,401
<     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po
---
>     sys.ind$ i, sys.obj$ ot, sys.user$ ut, sys.partobj$ po,
>     sys.tabcompartv$ tcp, sys.tabsubpartv$ tsp, sys.mon_mods_v m
348a414,417
>   and tcp.bo# = i.bo# and tcp.phypart# = icp.phypart#
>   and tsp.pobj# = tcp.obj#
>   and isp.physubpart# = tsp.physubpart#
>   and tsp.obj# = m.obj# (+)
350a420
>   and bitand(po.flags, 1) = 1   -- local index
SYS.USER_ROLE_PRIVS - VIEW (RU):
74,77d73
<       (groles.default_role = 'YES' /* password protected roles cannot be enabled in proxy session so should not
<                                       be displayed here. Secure application roles though, should be displayed. */
<        or EXISTS (select 1 from sys.user$ u where u.name = groles.granted_role and u.password = 'APPLICATION'))
<       and /* password protected roles cannot be enabled in proxy session so should not be displayed here */

Leave a Reply

Your email address will not be published.