Dissecting 181016 BP, PSU, RU and RUR

This post is also available in: English

Since 2017 I am quarterly writing a post dissecting the changes implemented by Oracle CPUs so we can understand better the modifications implemented by Oracle in our Databases.

To check previous changes, follow the links below:

 

So what oracle internal objects were changed in October 2018 - 181016?

VERSION    PATCH           OWNER      TYPE                 TOTAL
---------- --------------- ---------- --------------- ----------
12.1.0.2   BP              SYS        PACKAGE                  1
12.1.0.2   BP              SYS        PACKAGE BODY             5
12.1.0.2   BP              SYS        VIEW                     3
12.1.0.2   BP              SYSTEM     FUNCTION                 1
12.1.0.2   PSU             SYS        PACKAGE BODY             2
12.1.0.2   PSU & BP        SYS        PACKAGE BODY             1
12.2.0.1   JUL2018RUR      DVSYS      TYPE                     5
12.2.0.1   JUL2018RUR      SYS        PACKAGE BODY             6
12.2.0.1   RU              SYS        PACKAGE                  1
12.2.0.1   RU              SYS        PACKAGE BODY             3
18.0.0.0   18.2RUR         SYS        PACKAGE                  2
18.0.0.0   18.2RUR         SYS        PACKAGE BODY             1
18.0.0.0   18.3RUR         SYS        PACKAGE                  2
18.0.0.0   18.3RUR         SYS        PACKAGE BODY             1
18.0.0.0   RU              CTXSYS     PACKAGE BODY             1
18.0.0.0   RU              SYS        PACKAGE                  4
18.0.0.0   RU              SYS        PACKAGE BODY             6
18.0.0.0   RU              SYS        PROCEDURE                2

P.S: Nothing was changed for 11.2 in Oracle objects.

And created?

VERSION    PATCH           OWNER      TYPE                 TOTAL
---------- --------------- ---------- --------------- ----------
12.1.0.2   BP              SYSTEM     FUNCTION                 1
12.1.0.2   BP              SYSTEM     TYPE                     2

P.S: Nothing was added for 11.2 / 12.2 / 18 in Oracle objects.

So which are exactly the objects modified by 181016?

VERSION    PATCH           OWNER      TYPE            NAME                           ACTION
---------- --------------- ---------- --------------- ------------------------------ ------
12.1.0.2   BP              SYSTEM     FUNCTION        LOGMNR$GSBA_GG_TABF_PUBLIC     NEW
12.1.0.2   BP              SYSTEM     TYPE            LOGMNR$GSBA_GG_REC             NEW
12.1.0.2   BP              SYSTEM     TYPE            LOGMNR$GSBA_GG_RECS            NEW
12.1.0.2   BP              SYS        PACKAGE         DBMS_BACKUP_RESTORE            MOD
12.1.0.2   BP              SYS        PACKAGE BODY    DBMS_BACKUP_RESTORE            MOD
12.1.0.2   BP              SYS        PACKAGE BODY    DBMS_STATS                     MOD
12.1.0.2   BP              SYS        PACKAGE BODY    LOGMNR_DICT_CACHE              MOD
12.1.0.2   BP              SYS        VIEW            LOGSTDBY_RU_UNSUPPORT_TAB_12_1 MOD
12.1.0.2   BP              SYS        VIEW            LOGSTDBY_SUPPORT_TAB_12_1      MOD
12.1.0.2   BP              SYS        VIEW            LOGSTDBY_UNSUPPORT_TAB_12_1    MOD
12.1.0.2   BP              SYSTEM     FUNCTION        LOGMNR$TAB_GG_TABF_PUBLIC      MOD
12.1.0.2   PSU & BP        SYS        PACKAGE BODY    DBMS_AQADM_SYS                 MOD
12.1.0.2   PSU & BP        SYS        PACKAGE BODY    DBMS_PRVTAQIM                  MOD
12.1.0.2   PSU & BP        SYS        PACKAGE BODY    DBMS_RCVMAN                    MOD
12.2.0.1   JUL2018RUR      DVSYS      TYPE            SYS_YOID0000072649$            MOD
12.2.0.1   JUL2018RUR      DVSYS      TYPE            SYS_YOID0000072661$            MOD
12.2.0.1   JUL2018RUR      DVSYS      TYPE            SYS_YOID0000072667$            MOD
12.2.0.1   JUL2018RUR      DVSYS      TYPE            SYS_YOID0000072694$            MOD
12.2.0.1   JUL2018RUR      DVSYS      TYPE            SYS_YOID0000072697$            MOD
12.2.0.1   JUL2018RUR      SYS        PACKAGE BODY    DBMS_XSTREAM_ADM_INTERNAL      MOD
12.2.0.1   JUL2018RUR      SYS        PACKAGE BODY    DBMS_XSTREAM_ADM_UTL           MOD
12.2.0.1   JUL2018RUR      SYS        PACKAGE BODY    DBMS_XSTREAM_AUTH_IVK          MOD
12.2.0.1   JUL2018RUR      SYS        PACKAGE BODY    DBMS_XSTREAM_GG_INTERNAL       MOD
12.2.0.1   JUL2018RUR      SYS        PACKAGE BODY    DBMS_XSTREAM_UTL_IVK           MOD
12.2.0.1   RU              SYS        PACKAGE         DBMS_RCVMAN                    MOD
12.2.0.1   RU              SYS        PACKAGE BODY    DBMS_QOPATCH                   MOD
12.2.0.1   RU              SYS        PACKAGE BODY    DBMS_STATS                     MOD
12.2.0.1   RU & JUL2018RUR SYS        PACKAGE BODY    DBMS_RCVMAN                    MOD
18.0.0.0   RU              CTXSYS     PACKAGE BODY    DRIUTL                         MOD
18.0.0.0   RU              SYS        PACKAGE         DBMS_ISCHED                    MOD
18.0.0.0   RU              SYS        PACKAGE         DBMS_RCVMAN                    MOD
18.0.0.0   RU              SYS        PACKAGE BODY    DBMS_ISCHED                    MOD
18.0.0.0   RU              SYS        PACKAGE BODY    DBMS_QOPATCH                   MOD
18.0.0.0   RU              SYS        PACKAGE BODY    DBMS_REGISTRY                  MOD
18.0.0.0   RU              SYS        PACKAGE BODY    DBMS_SCHEDULER                 MOD
18.0.0.0   RU              SYS        PACKAGE BODY    DBMS_STATS                     MOD
18.0.0.0   RU              SYS        PROCEDURE       DBMS_FEATURE_ACTIVE_DATA_GUARD MOD
18.0.0.0   RU              SYS        PROCEDURE       SCHEDULER$_JOB_EVENT_HANDLER   MOD
18.0.0.0   RU & 18.3RUR &  SYS        PACKAGE         DBMS_BACKUP_RESTORE            MOD
           18.2RUR
18.0.0.0   RU & 18.3RUR &  SYS        PACKAGE         DBMS_REGISTRY                  MOD
           18.2RUR
18.0.0.0   RU & 18.3RUR &  SYS        PACKAGE BODY    DBMS_RCVMAN                    MOD
           18.2RUR

What changed for each? (click to see the changes)

Changed Objects

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

12.1.0.2

SYS.DBMS_BACKUP_RESTORE - PACKAGE (BP):
8242a8243,8248
> 
>   FUNCTION createTempXmlFile
>      RETURN varchar2;
>   -- This procedure returns a temporary filename.
>   -- The temporary filename is derived from ?/dbs location.
> 
SYS.DBMS_AQADM_SYS - PACKAGE BODY (PSU):
2804c2804,2815
<       TMP_STR := NLS_UPPER(LTRIM(RTRIM(SORT_TAB(I))));
---
>       
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>       TMP_STR := NLS_UPPER(LTRIM(RTRIM(SORT_TAB(I))), 'nls_sort=binary');
SYS.DBMS_BACKUP_RESTORE - PACKAGE BODY (BP):
9045a9046,9063
> 
> 
> FUNCTION KRBI_CREATE_XML RETURN VARCHAR2;
> PRAGMA INTERFACE (C, KRBI_CREATE_XML);
> 
> FUNCTION CREATETEMPXMLFILE  RETURN VARCHAR2 IS 
>    FNAME VARCHAR2(1024);
> BEGIN
>    ICDSTART(214);
>    FNAME := KRBI_CREATE_XML;
>    ICDFINISH;
>    RETURN FNAME;
> EXCEPTION
>    WHEN OTHERS THEN
>       ICDFINISH;
>       RAISE;
> END;
> 
SYS.DBMS_PRVTAQIM - PACKAGE BODY (BP):
1714c1714,1725
<       TMP_STR := NLS_UPPER(LTRIM(RTRIM(SORT_TAB(I))));
---
>       
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>       TMP_STR := NLS_UPPER(LTRIM(RTRIM(SORT_TAB(I))), 'nls_sort=binary');
SYS.DBMS_PRVTAQIM - PACKAGE BODY (PSU):
1706c1706,1717
<       TMP_STR := NLS_UPPER(LTRIM(RTRIM(SORT_TAB(I))));
---
>       
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>       TMP_STR := NLS_UPPER(LTRIM(RTRIM(SORT_TAB(I))), 'nls_sort=binary');
SYS.DBMS_RCVMAN - PACKAGE BODY (PSU):
23754a23755
>       END IF;
23756,23779c23757,23777
<          
<          
<          
<          
<          
<          
<          
<          IF (AVAILABLE_FROMSCN_ACT IS NULL OR
<              (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
<               USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
<               LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
<             IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
<                DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file# ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             ELSE
<                DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             END IF;
<             USABLE_INCR := LOCAL;
<             AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
---
>       
>       
>       
>       
>       
>       
>       
>       IF (AVAILABLE_FROMSCN_ACT IS NULL OR
>           (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
>            USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
>            LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
>          IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
>             DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file# ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
>          ELSE
>             DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
23780a23779,23780
>          USABLE_INCR := LOCAL;
>          AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
SYS.DBMS_RCVMAN - PACKAGE BODY (BP):
23947a23948
>       END IF;
23949,23972c23950,23970
<          
<          
<          
<          
<          
<          
<          
<          IF (AVAILABLE_FROMSCN_ACT IS NULL OR
<              (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
<               USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
<               LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
<             IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
<                DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file# ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             ELSE
<                DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             END IF;
<             USABLE_INCR := LOCAL;
<             AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
---
>       
>       
>       
>       
>       
>       
>       
>       IF (AVAILABLE_FROMSCN_ACT IS NULL OR
>           (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
>            USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
>            LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
>          IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
>             DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file# ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
>          ELSE
>             DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
23973a23972,23973
>          USABLE_INCR := LOCAL;
>          AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
SYS.DBMS_STATS - PACKAGE BODY (BP):
1203c1203,1204
<   TYPE VARCHARTAB  IS TABLE OF VARCHAR2(4000) INDEX BY VARCHAR2(64);
---
>   
>   TYPE VARCHARTAB  IS TABLE OF VARCHAR2(32767) INDEX BY VARCHAR2(64);
SYS.LOGMNR_DICT_CACHE - PACKAGE BODY (BP):
5749,5754c5749,5757
< 
<   UNSUPPORTEDCOLS_LOCAL  NUMBER := NULL;
<   UNSUPPORTEDCOLS_LOCAL2 NUMBER := NULL;
<   COMPLEXTYPECOLS_LOCAL  NUMBER := NULL;
<   TLOFLAGS_LOCAL         NUMBER := NULL;
<   LOGMNRMCV_LOCAL VARCHAR2(32)  := NULL;
---
>   UNSUPPORTEDCOLS_LOCAL  NUMBER := 0;
>   UNSUPPORTEDCOLS_LOCAL2 NUMBER := 0;
>   COMPLEXTYPECOLS_LOCAL  NUMBER := 0;
>   TLOFLAGS_LOCAL         NUMBER := 0;
>   LOGMNRMCV_LOCAL        VARCHAR2(32) := NULL;
>   OWNERNAME              VARCHAR2(390);
>   OBJNAME                VARCHAR2(390);
>   LONG_IDEN              NUMBER := 0;
>   IS_APPLICATION_CON     NUMBER := 0;
SYS.LOGSTDBY_RU_UNSUPPORT_TAB_12_1 - VIEW (BP):
141c141
<        and (c2.type# in (114, 122) or                /* BFILE/Nested Table */
---
>        and (c2.type# in (114, 122, 111) or       /* BFILE/Nested Table/REF */
SYS.LOGSTDBY_SUPPORT_TAB_12_1 - VIEW (BP):
153c153
<        and (c2.type# in (114, 122) or                /* BFILE/Nested Table */
---
>        and (c2.type# in (114, 122, 111) or       /* BFILE/Nested Table/REF */
SYS.LOGSTDBY_UNSUPPORT_TAB_12_1 - VIEW (BP):
143c143
<        and (c2.type# in (114, 122) or                /* BFILE/Nested Table */
---
>        and (c2.type# in (114, 122, 111) or       /* BFILE/Nested Table/REF */
SYSTEM.LOGMNR$TAB_GG_TABF_PUBLIC - FUNCTION (BP):
32c32
<           DECODE(BITAND(LOGMNRTLOFLAGS, 14), 0, 'NO', 'YES')
---
>           DECODE(BITAND(NVL(LOGMNRTLOFLAGS,0), 14), 0, 'NO', 'YES')
44,45c44,48
<           LOGMNR_SPARE9, UNSUPPORTEDCOLS, COMPLEXTYPECOLS, NTPARENTOBJNUM, 
<           NTPARENTOBJVERSION, NTPARENTINTCOLNUM, LOGMNRTLOFLAGS, 
---
>           LOGMNR_SPARE9, UNSUPPORTEDCOLS, 
>           NVL(COMPLEXTYPECOLS,0) COMPLEXTYPECOLS,
>           NTPARENTOBJNUM, 
>           NTPARENTOBJVERSION, NTPARENTINTCOLNUM, 
>           NVL(LOGMNRTLOFLAGS,0) LOGMNRTLOFLAGS, 

12.2.0.1

DVSYS.SYS_YOID0000072649$ - TYPE (JUL2018RUR):
2c2
< type         "SYS_YOID0000072649$"              as object( "SYS_NC00001$" RAW(16))
---
> type         "SYS_YOID0000072649$"              as object( "SYS_NC00001$" VARCHAR2(128 BYTE), "SYS_NC00002$" VARCHAR2(128 BYTE), "SYS_NC00003$" VARCHAR2(128 BYTE))
DVSYS.SYS_YOID0000072661$ - TYPE (JUL2018RUR):
2c2
< type         "SYS_YOID0000072661$"              as object( "SYS_NC00001$" RAW(16))
---
> type         "SYS_YOID0000072661$"              as object( "SYS_NC00001$" VARCHAR2(128 BYTE), "SYS_NC00002$" VARCHAR2(128 BYTE))
DVSYS.SYS_YOID0000072667$ - TYPE (JUL2018RUR):
2c2
< type         "SYS_YOID0000072667$"              as object( "SYS_NC00001$" RAW(16))
---
> type         "SYS_YOID0000072667$"              as object( "SYS_NC00001$" VARCHAR2(128 BYTE), "SYS_NC00002$" VARCHAR2(100 BYTE), "SYS_NC00003$" VARCHAR2(128 BYTE), "SYS_NC00004$" VARCHAR2(128 BYTE), "SYS_NC00005$" VARCHAR2(128 BYTE), "SYS_NC00006$" VARCHAR2(128 BYTE), "SYS_NC00007$" NUMBER)
DVSYS.SYS_YOID0000072694$ - TYPE (JUL2018RUR):
2c2
< type         "SYS_YOID0000072694$"              as object( "SYS_NC00001$" RAW(16))
---
> type         "SYS_YOID0000072694$"              as object( "SYS_NC00001$" VARCHAR2(128 BYTE), "SYS_NC00002$" VARCHAR2(128 BYTE), "SYS_NC00003$" VARCHAR2(128 BYTE), "SYS_NC00004$" VARCHAR2(128 BYTE))
DVSYS.SYS_YOID0000072697$ - TYPE (JUL2018RUR):
2c2
< type         "SYS_YOID0000072697$"              as object( "SYS_NC00001$" RAW(16))
---
> type         "SYS_YOID0000072697$"              as object( "SYS_NC00001$" VARCHAR2(128 BYTE), "SYS_NC00002$" VARCHAR2(128 BYTE), "SYS_NC00003$" VARCHAR2(100 BYTE), "SYS_NC00004$" VARCHAR2(128 BYTE), "SYS_NC00005$" VARCHAR2(128 BYTE), "SYS_NC00006$" VARCHAR2(128 BYTE), "SYS_NC00007$" VARCHAR2(128 BYTE))
SYS.DBMS_RCVMAN - PACKAGE (RU):
554c554,555
<    stamp          number
---
>    stamp          number,
>    order_hint     number
699a701
>    rl_snapstandby        VARCHAR2(3),
3278c3280
<   ,nblocks        OUT     binary_integer -- number of blocks of datafilecopy
---
>   ,nblocks        OUT     number      -- number of blocks of datafilecopy
SYS.DBMS_QOPATCH - PACKAGE BODY (RU):
23a24,28
> V_CODE     NUMBER;
> V_ERRM     VARCHAR2(128);
> 
> 
> 
78c83
<   RETURN '$Header: rdbms/src/client/tools/qpinv/prvtqopi.sql /st_rdbms_12.2.0.1.0dbbp/3 2018/05/02 15:37:07 surman Exp $';
---
>   RETURN '$Header: rdbms/src/client/tools/qpinv/prvtqopi.sql /st_rdbms_12.2.0.1.0dbbp/6 2018/08/10 12:48:23 aime Exp $';
127a133,149
> --+
> PROCEDURE LOG_STATUS(MSG VARCHAR2) IS
> BEGIN
>         IF DO_DEBUG THEN
>                 DBMS_OUTPUT.PUT_LINE(MSG);
>         END IF;
>         DBMS_SYSTEM.KSDWRT(1,MSG);
> 
> END;
> 
> --+
> 
> 
> 
> 
> 
> 
143a166,171
>   T_OP_INST_PATH   VARCHAR2(1024) := '';
>   T_OP_SCPT_PATH   VARCHAR2(1024) := '';
>   T_OP_LOG_PATH    VARCHAR2(1024) := '';
>   T_ROOT           VARCHAR2(1024) := '';
>   T_ORABASE        VARCHAR2(1024) := '';
>   OPATCHFILE   VARCHAR2(128) := 'opatch';
168,172c196,198
<       DBMS_SYSTEM.KSDWRT(1,'QPI: Event 22171584 set. Skipping sanity check');
<       DBMS_SYSTEM.KSDWRT(1,'QPI: Please disable the event in case of any errors and try again');
<       IF DO_DEBUG THEN
<         DBMS_OUTPUT.PUT_LINE('Event 22171584 set. Skipping sanity check');
<       END IF;
---
>       DBMS_SYSTEM.KSDWRT(3,'QPI: Event 22171584 set. Skipping sanity check');
>       DBMS_SYSTEM.KSDWRT(3,'QPI: Please disable the event in case of any errors and try again');
>         LOG_STATUS('Event 22171584 set. Skipping sanity check');
195a222,229
>     SELECT PLATFORM_ID INTO PFID FROM V$DATABASE;
>     NOT_WIN := IS_NON_WINDOWS (PFID);
> 
>     
>     IF NOT NOT_WIN  THEN
>        OPATCHFILE := 'opatch.bat';
>     END IF;
> 
208a243,309
>      
>      
>      
>      
>      
>      
>      
>      
>       T_ROOT := ROOT;
>       T_ORABASE := ORABASE;
>       T_OP_INST_PATH := OP_INST_PATH;
>       T_OP_SCPT_PATH := OP_SCPT_PATH;
>       T_OP_LOG_PATH := OP_LOG_PATH;
>   
>       IF NOT_WIN  THEN
>               IF SUBSTR( ROOT,-1,1 ) <> '/' THEN
>                  T_ROOT := ROOT || '/';
>                  LOG_STATUS('QPI:  t_root is ' || T_ROOT);
>               END IF;
> 
>               IF SUBSTR( ORABASE,-1,1 ) <> '/' THEN
>                  T_ORABASE := ORABASE || '/';
>                  LOG_STATUS('QPI:  t_orabase is ' || T_ORABASE);
>               END IF;
> 
>               IF SUBSTR( OP_INST_PATH,-1,1 ) <> '/' THEN
>                  T_OP_INST_PATH := OP_INST_PATH || '/';
>                  LOG_STATUS('QPI:  t_op_inst_path is ' || T_OP_INST_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_SCPT_PATH,-1,1 ) <> '/' THEN
>                  T_OP_SCPT_PATH := OP_SCPT_PATH || '/';
>                  LOG_STATUS('QPI:  t_op_scpt_path is ' || T_OP_SCPT_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_LOG_PATH,-1,1 ) <> '/' THEN
>                  T_OP_LOG_PATH := OP_LOG_PATH || '/';
>                  LOG_STATUS('QPI:  t_op_log_path is ' || T_OP_LOG_PATH);
>               END IF;
>       ELSE
>               IF SUBSTR( ROOT,-1,1 ) <> '\' THEN
>                  T_ROOT := ROOT || '\';
>                  LOG_STATUS('QPI:  t_root is ' || T_ROOT);
>               END IF;
> 
>               IF SUBSTR( ORABASE,-1,1 ) <> '\' THEN
>                  T_ORABASE := ORABASE || '\';
>                  LOG_STATUS('QPI:  t_orabase is ' || T_ORABASE);
>               END IF;
> 
>               IF SUBSTR( OP_INST_PATH,-1,1 ) <> '\' THEN
>                  T_OP_INST_PATH := OP_INST_PATH || '\';
>                  LOG_STATUS('QPI:  t_op_inst_path is ' || T_OP_INST_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_SCPT_PATH,-1,1 ) <> '\' THEN
>                  T_OP_SCPT_PATH := OP_SCPT_PATH || '\';
>                  LOG_STATUS('QPI:  t_op_scpt_path is ' || T_OP_SCPT_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_LOG_PATH,-1,1 ) <> '\' THEN
>                  T_OP_LOG_PATH := OP_LOG_PATH || '\';
>                  LOG_STATUS('QPI:  t_op_log_path is ' || T_OP_LOG_PATH);
>               END IF;
> 
>       END IF;
> 
230d330
<         SELECT PLATFORM_ID INTO PFID FROM V$DATABASE;
245d344
<           NOT_WIN := IS_NON_WINDOWS (PFID);
292c391
<     UTL_FILE.FGETATTR('OPATCH_INST_DIR', 'opatch', FEXISTS, FILE_LENGTH, BLOCK_SIZE);
---
>     UTL_FILE.FGETATTR('OPATCH_INST_DIR', OPATCHFILE, FEXISTS, FILE_LENGTH, BLOCK_SIZE);
294c393
<       DBMS_SYSTEM.KSDWRT(1,'QPI: opatch file present');
---
>       DBMS_SYSTEM.KSDWRT(3,'QPI: opatch file present, ' || OPATCHFILE);
296a396
>       DBMS_SYSTEM.KSDWRT(3,'QPI: opatch executable does not exist, ' || OPATCHFILE);
306c406
<         DBMS_SYSTEM.KSDWRT(1,'QPI: qopiprep.bat file present');
---
>         DBMS_SYSTEM.KSDWRT(3,'QPI: qopiprep.bat file present');
361,363d460
<     IF DO_DEBUG THEN
<           DBMS_OUTPUT.PUT_LINE ('QPI: GOT lock at :' || SYSTIMESTAMP);
<     END IF;
366a464
>        LOG_STATUS('QPI: Obtaining lock FAILED, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
367a466,467
>     ELSIF QP_RESULT = 0 OR QP_RESULT = 4 THEN
>         LOG_STATUS('QPI: Obtaining lock SUCCESSFUL, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
390,391c490,493
<     IF DO_DEBUG THEN
<           DBMS_OUTPUT.PUT_LINE ('QPI: Releasing the lock at :' || SYSTIMESTAMP);
---
>     IF QP_RESULT = 0 THEN
>         LOG_STATUS('QPI: Releasing lock SUCCESSFUL, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
>     ELSE
>         LOG_STATUS('QPI: Releasing lock FAILED, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
417,418d518
<   V_CODE     NUMBER;
<   V_ERRM     VARCHAR2(128);
488,489c588,589
<       V_ERRM := SUBSTR(SQLERRM, 1, 64);
<       DBMS_OUTPUT.PUT_LINE('Error code ' || V_CODE || ': ' || V_ERRM);
---
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in config_oinv_jobs, Error code ' || V_CODE || ': ' || V_ERRM);
507a608
> PROCEDURE CLEAN_METADATA_PRI;
821,824c922,923
<        IF DO_DEBUG THEN
<          DBMS_OUTPUT.PUT_LINE('QPI: Cleaning and refreshing metadata..');
<        END IF;
<          DBMS_SYSTEM.KSDWRT(1,'QPI: Cleaning and refreshing metadata..');
---
>          LOG_STATUS('QPI: Cleaning and refreshing metadata..');
>          DBMS_SYSTEM.KSDWRT(3,'QPI: Cleaning and refreshing metadata..');
866a966,969
>    LOG_STATUS('QPI: Caught error while querying opatch_xml_inv');
>    V_CODE := SQLCODE;
>    V_ERRM := SUBSTR(SQLERRM, 1, 128);
>    LOG_STATUS('QPI: in REFRESH_OPATCH_DATA, ERROR code ' || V_CODE || ' : ' || V_ERRM);
927a1031,1037
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_opatch_install_info, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
976a1087,1093
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_opatch_list, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1033a1151,1157
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in IS_PATCH_INSTALLED, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1092a1217,1223
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_DATA, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1158a1290,1296
>     WHEN OTHERS THEN
>       V_CODE := SQLCODE;
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in GET_OPATCH_BUGS, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>       QP_RESULT:= RELEASE_QOPATCH_LOCK();
>       RAISE;
> 
1182a1321,1324
>     QP_RESULT := GET_QOPATCH_LOCK();
> 
>     LOG_STATUS('QPI: Got lock get_opatch_files');
> 
1194a1337,1340
> 
>      LOG_STATUS('QPI: Release lock get_opatch_files');
>      QP_RESULT:= RELEASE_QOPATCH_LOCK();
> 
1195a1342,1354
> 
>     EXCEPTION 
>       WHEN UNABLE_TO_LOCK THEN
>         RAISE_APPLICATION_ERROR(-20016, 
>                  'Unable to get the lock : get_opatch_files : ' || QP_RESULT);
> 
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_FILES, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1245a1405,1411
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_COUNT, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1298a1465,1471
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_PREQS, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1347a1521,1532
>     EXCEPTION 
>       WHEN UNABLE_TO_LOCK THEN
>         RAISE_APPLICATION_ERROR(-20016, 
>                  'Unable to get the lock : get_opatch_install_info : ' || QP_RESULT);
> 
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_OLAYS, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1402a1588,1594
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in PATCH_CONFLICT_DETECTION, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1454c1646
< OPATCHFILE   CONSTANT VARCHAR2(128) := 'opatch';
---
> OPATCHFILE   VARCHAR2(128) := 'opatch';
1491a1684
>       OPATCHFILE := 'opatch.bat';
1544a1738
>     LOG_STATUS('QPI: opatch executable exists and is readable, ' || OPATCHFILE);
1546a1741
>     LOG_STATUS('QPI: opatch executable does not exist or is not redable, ' || OPATCHFILE);
1607,1608d1801
<   V_CODE     NUMBER;
<   V_ERRM     VARCHAR2(128);
1689,1690c1882,1883
<       V_ERRM := SUBSTR(SQLERRM, 1, 64);
<       DBMS_OUTPUT.PUT_LINE('Error code ' || V_CODE || ': ' || V_ERRM);
---
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in add_oinv_job, Error code ' || V_CODE || ': ' || V_ERRM);
1713c1906
<          DBMS_SYSTEM.KSDWRT(1,'Node name: ' || PVAL.NODE_NAME || ' Inst:' || PVAL.INST_NAME|| ' Job:' || PVAL.INST_JOB);
---
>          DBMS_SYSTEM.KSDWRT(3,'Node name: ' || PVAL.NODE_NAME || ' Inst:' || PVAL.INST_NAME|| ' Job:' || PVAL.INST_JOB);
1720c1913
<          DBMS_SYSTEM.KSDWRT(1,'Job: ' || PVAR.JOB_NAME || ' State: ' || PVAR.STATE);
---
>          DBMS_SYSTEM.KSDWRT(3,'Job: ' || PVAR.JOB_NAME || ' State: ' || PVAR.STATE);
1781c1974
<     CLEAN_METADATA();
---
>     CLEAN_METADATA_PRI();
1827a2021
> 
2021a2216,2219
>     WHEN UNABLE_TO_LOCK THEN
>       RAISE_APPLICATION_ERROR(-20016, 
>                  'Unable to get the lock : get_pending_activity : ' || QP_RESULT);
> 
2027a2226,2228
>       V_CODE := SQLCODE;
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in get_pending_activity, ERROR code ' || V_CODE || ' : ' || V_ERRM);
2265a2467,2473
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_opatch_lsinventory, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2647a2856,2862
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in opatch_compare, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2714a2930,2936
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_patch_details, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2761a2984,2990
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in check_patch_installed, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2835c3064,3067
<         
---
> 
>        LOG_STATUS('QPI: Release lock opatch_compare_nodes');
>        QP_RESULT:= RELEASE_QOPATCH_LOCK();
> 
2855a3088,3091
> 
>         LOG_STATUS('QPI: Release lock opatch_compare_nodes');
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
> 
2862,2866d3097
<    IF DO_DEBUG THEN
<          DBMS_OUTPUT.PUT_LINE('QPI: Release lock opatch_compare_nodes');
<    END IF;
<    QP_RESULT:= RELEASE_QOPATCH_LOCK();
< 
2871a3103,3109
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in OPATCH_COMPARE_NODES, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2886,2888d3123
< 
< 
< 
2890c3125
< PROCEDURE  CLEAN_METADATA   IS
---
> PROCEDURE  CLEAN_METADATA_PRI   IS
2902c3137
<     DBMS_OUTPUT.PUT_LINE('QPI: In clean_metadata');
---
>     DBMS_OUTPUT.PUT_LINE('QPI: In clean_metadata_pri');
2905,2910d3139
<   QP_RESULT := GET_QOPATCH_LOCK();
<  
<   IF DO_DEBUG THEN
<      DBMS_OUTPUT.PUT_LINE('QPI: Got lock clean_metadata');
<   END IF;
< 
2919c3148
<       DBMS_OUTPUT.PUT_LINE('QPI: clean_metadata opatch_inst_job :' || NODECNT );
---
>       DBMS_OUTPUT.PUT_LINE('QPI: clean_metadata_pri opatch_inst_job :' || NODECNT );
2951,2955d3179
<   IF DO_DEBUG THEN
<        DBMS_OUTPUT.PUT_LINE('QPI: Release lock clean_metadata');
<   END IF;
<  
<   QP_RESULT:= RELEASE_QOPATCH_LOCK();
2959a3184,3223
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in CLEAN_METADATA_PRI, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         RAISE;
> 
> END;
> 
> --+
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --+
> 
> PROCEDURE  CLEAN_METADATA   IS
> BEGIN
> 
>     LOG_STATUS('QPI: In clean_metadata');
> 
>   QP_RESULT := GET_QOPATCH_LOCK();
> 
>     LOG_STATUS('QPI: Got lock clean_metadata');
> 
>   CLEAN_METADATA_PRI();
> 
>         LOG_STATUS('QPI: Release lock clean_metadata');
> 
>   QP_RESULT:= RELEASE_QOPATCH_LOCK();
> 
>   EXCEPTION
2961c3225
<              RAISE_APPLICATION_ERROR(-20016, 
---
>              RAISE_APPLICATION_ERROR(-20016,
2963,2964c3227,3234
<        WHEN OTHERS THEN
<             RAISE;
---
> 
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in CLEAN_METADATA, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2966a3237
> 
SYS.DBMS_RCVMAN - PACKAGE BODY (JUL2018RUR):
26424c26424,26425
<                 ELSIF (LISTBACKUPINMKS(LBSTATE.LBDFRECTABUS, LBREC,
---
>                 ELSIF (LBREC.FILE_TYPE <> SPFILE_TXT AND
>                        LISTBACKUPINMKS(LBSTATE.LBDFRECTABUS, LBREC,
SYS.DBMS_RCVMAN - PACKAGE BODY (RU):
545a546
>            NULL                    RL_SNAPSTANDBY,
614a616
>            NULL                    RL_SNAPSTANDBY,
691a694
>            NULL                    RL_SNAPSTANDBY,
756a760
>            'NO'                    RL_SNAPSTANDBY,
820a825
>            NULL                    RL_SNAPSTANDBY,
892a898
>            NULL                    RL_SNAPSTANDBY,
901,902c907,910
<            AL.STAMP                LIST_ORDER1,
<            -1                      LIST_ORDER2,
---
>            DECODE(DBINC.SNAPSTANDBY, 1, 0, AL.STAMP)
>                                    LIST_ORDER1,
>            DECODE(DBINC.SNAPSTANDBY, 1, AL.STAMP, -1)
>                                    LIST_ORDER2,
963a972,973
>            DECODE(DBINC.SNAPSTANDBY, 1, 'YES', 'NO')
>                                    RL_SNAPSTANDBY,
983a994,1007
>           LEFT OUTER JOIN
>           (SELECT CASE WHEN
>                        (THIS_DBROLE = 'SNAPSHOT STANDBY'      AND
>                         DBINC.STATUS IN ('CURRENT', 'PARENT') AND
>                         DBINC.INCARNATION# > DI2.DI2SSBY_PIC)
>                        THEN 1 ELSE NULL END SNAPSTANDBY,
>                   DBINC.RESETLOGS_CHANGE#,
>                   DBINC.RESETLOGS_TIME,
>                   DBINC.STATUS
>              FROM V$DATABASE_INCARNATION DBINC, 
>                   X$KCCDI2 DI2
>           ) DBINC
>            ON AL.RESETLOGS_CHANGE# = DBINC.RESETLOGS_CHANGE#
>           AND AL.RESETLOGS_TIME    = DBINC.RESETLOGS_TIME
1054a1079
>            NULL                    RL_SNAPSTANDBY,
1124a1150
>            'NO'                    RL_SNAPSTANDBY,
8264c8290,8291
<           DC.STAMP                  STAMP
---
>           DC.STAMP                  STAMP,
>           0                         ORDER_HINT
8274c8301,8302
<           AL.STAMP                  STAMP
---
>           AL.STAMP                  STAMP,
>           0                         ORDER_HINT
8286c8314,8315
<           RL.STAMP                  STAMP
---
>           RL.STAMP                  STAMP,
>           0                         ORDER_HINT
8297c8326,8327
<           BP.STAMP                  STAMP
---
>           BP.STAMP                  STAMP,
>           0                         ORDER_HINT
8312c8342,8343
<           DC.STAMP              STAMP
---
>           DC.STAMP              STAMP,
>           0                     ORDER_HINT
8347c8378,8379
<           DC.STAMP              STAMP
---
>           DC.STAMP              STAMP,
>           0                     ORDER_HINT
8371c8403,8404
<           DC.STAMP              STAMP
---
>           DC.STAMP              STAMP,
>           0                     ORDER_HINT
8403c8436,8437
<           AL.STAMP              STAMP
---
>           AL.STAMP              STAMP,
>           0                     ORDER_HINT
8439c8473,8474
<           AL.STAMP              STAMP
---
>           AL.STAMP              STAMP,
>           0                     ORDER_HINT
8465c8500,8501
<           AL.STAMP              STAMP
---
>           AL.STAMP              STAMP,
>           0                     ORDER_HINT
8485c8521,8522
<           AL.STAMP              STAMP
---
>           AL.STAMP              STAMP,
>           0                     ORDER_HINT
8605c8642,8643
<           BP.STAMP              STAMP
---
>           BP.STAMP              STAMP,
>           0                     ORDER_HINT
8660c8698,8699
<           AL.STAMP              STAMP
---
>           AL.STAMP              STAMP,
>           DBINC.SNAPSTANDBY     ORDER_HINT
8680c8719,8729
<         V$DATABASE_INCARNATION DBINC
---
>         (SELECT CASE WHEN
>                      (THIS_DBROLE = 'SNAPSHOT STANDBY'      AND
>                       DBINC.STATUS IN ('CURRENT', 'PARENT') AND
>                       DBINC.INCARNATION# > DI2.DI2SSBY_PIC)
>                      THEN 1 ELSE NULL END SNAPSTANDBY,
>                 DBINC.RESETLOGS_CHANGE#,
>                 DBINC.RESETLOGS_TIME,
>                 DBINC.STATUS
>            FROM V$DATABASE_INCARNATION DBINC,
>                 X$KCCDI2 DI2
>         ) DBINC
8690a8740
>           DBINC.SNAPSTANDBY = 1 OR
8694c8744
<    ORDER BY AL.STAMP; 
---
>    ORDER BY ORDER_HINT, AL.STAMP; 
15122c15172,15174
<    IF (THIS_CFTYPE = 'STANDBY' OR THIS_CFTYPE = 'FARSYNC') THEN
---
>    IF (THIS_CFTYPE = 'STANDBY' OR
>        THIS_DBROLE = 'SNAPSHOT STANDBY' OR
>        THIS_CFTYPE = 'FARSYNC') THEN
15179a15232
>    SETTHIS_DBROLE;
15188a15242
>           THIS_DBROLE <> 'SNAPSHOT STANDBY' AND
15807a15862,15865
>    THIS_CFTYPE := NULL;
>    SETTHIS_CFTYPE;
>    THIS_DBROLE := NULL;
>    SETTHIS_DBROLE;
17002a17061
>       SETTHIS_DBROLE;
17390a17450
>    
17710a17771
>            NULL                    RL_SNAPSTANDBY,
17779a17841
>            NULL                    RL_SNAPSTANDBY,
17856a17919
>            NULL                    RL_SNAPSTANDBY,
17921a17985
>            'NO'                    RL_SNAPSTANDBY,
17985a18050
>            NULL                    RL_SNAPSTANDBY,
18057a18123
>            NULL                    RL_SNAPSTANDBY,
18128a18195
>            'NO'                    RL_SNAPSTANDBY,
18220a18288
>            NULL                    RL_SNAPSTANDBY,
18290a18359
>            'NO'                    RL_SNAPSTANDBY,
24509a24579
>       END IF;
24511,24534c24581,24601
<          
<          
<          
<          
<          
<          
<          
<          IF (AVAILABLE_FROMSCN_ACT IS NULL OR
<              (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
<               USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
<               LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
<             IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
<                DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file# ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             ELSE
<                DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             END IF;
<             USABLE_INCR := LOCAL;
<             AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
---
>       
>       
>       
>       
>       
>       
>       
>       IF (AVAILABLE_FROMSCN_ACT IS NULL OR
>           (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
>            USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
>            LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
>          IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
>             DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file# ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
>          ELSE
>             DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
24535a24603,24604
>          USABLE_INCR := LOCAL;
>          AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
26424c26493,26494
<                 ELSIF (LISTBACKUPINMKS(LBSTATE.LBDFRECTABUS, LBREC,
---
>                 ELSIF (LBREC.FILE_TYPE <> SPFILE_TXT AND
>                        LISTBACKUPINMKS(LBSTATE.LBDFRECTABUS, LBREC,
26462a26533,26538
> 
>           
>           IF (RECOVERYDESTFILE AND LBREC.RL_SNAPSTANDBY = 'YES') THEN
>              IF (DEBUG) THEN 
>                 DEB(DEB_IN, 'snapshot standby archivelog');
>              END IF;
26467c26543
<           IF ((LBREC.RL_NEXT_CHANGE# >= LBSTATE.LBMINGRSP AND
---
>           ELSIF ((LBREC.RL_NEXT_CHANGE# >= LBSTATE.LBMINGRSP AND
28925c29001
<   ,NBLOCKS         OUT     BINARY_INTEGER
---
>   ,NBLOCKS         OUT     NUMBER
SYS.DBMS_STATS - PACKAGE BODY (RU):
14406,14409c14406,14411
<     TRANSFER_COLUMN_STATS(OWNER, DBMS_STATS_INTERNAL.DQ(TAB_NAME), EXTN_NAME, 
<       NULL, NULL, NULL,
<       NULL, NULL, TRUE, TRUE, NULL, FALSE, FALSE, DSC_NON_FXT, TRUE, 
<       'ALL', FALSE, NULL, TRUE);
---
>     
>     
>     TRANSFER_COLUMN_STATS(DBMS_STATS_INTERNAL.DQ(OWNER), 
>       DBMS_STATS_INTERNAL.DQ(TAB_NAME), DBMS_STATS_INTERNAL.DQ(EXTN_NAME),
>       NULL, NULL, NULL, NULL, NULL, TRUE, TRUE, NULL, FALSE, FALSE, 
>       DSC_NON_FXT, TRUE, 'ALL', FALSE, NULL, TRUE);
SYS.DBMS_XSTREAM_ADM_INTERNAL - PACKAGE BODY (JUL2018RUR):
445c445
<         END IF;
---
>       END IF;
496c496
<       INCREMENT := INCREMENT + 1;      
---
>       INCREMENT := INCREMENT + 1;
583c583
<       END IF;
---
>     END IF;
2727c2727
< 
---
>     
3310c3310
<     HAS_ROLE            NUMBER := 0;
---
>     HAS_ROLE        NUMBER := 0;
3433c3433
< 
---
>       
3484c3484
<  
---
> 
SYS.DBMS_XSTREAM_ADM_UTL - PACKAGE BODY (JUL2018RUR):
687c687
<                SCN     OCINUMBER,  SCN INDICATOR SB2,
---
>                SCN OCINUMBER, SCN INDICATOR SB2,
689,690c689,690
<                POS     OCIRAW,     POS  INDICATOR SB2,
<                POS     MAXLEN SB4, POS LENGTH SB4)
---
>                POS OCIRAW, POS  INDICATOR SB2,
>                POS MAXLEN SB4, POS LENGTH SB4)
1526c1526
<       DBMS_XSTREAM_ADM_UTL.CONVERT_SCN_TO_POS(PROCESSED_LWM_SCN,
---
>       DBMS_XSTREAM_ADM_UTL.CONVERT_SCN_TO_POS(PROCESSED_LWM_SCN, 
SYS.DBMS_XSTREAM_AUTH_IVK - PACKAGE BODY (JUL2018RUR):
792c792
<     INCREMENT := INCREMENT + 1;     
---
>     INCREMENT := INCREMENT + 1; 
908c908
<     END IF;    
---
>     END IF;
SYS.DBMS_XSTREAM_GG_INTERNAL - PACKAGE BODY (JUL2018RUR):
77a78
>       PRBA NUMBER := RBA;
87c88
<           SEQ# = SEQNO AND RBA = RBA AND INDEX# = INDEX_NUM;
---
>           SEQ# = SEQNO AND RBA = PRBA AND INDEX# = INDEX_NUM;
91c92
<           SEQ# = SEQNO AND RBA = RBA AND INDEX# = INDEX_NUM;
---
>           SEQ# = SEQNO AND RBA = PRBA AND INDEX# = INDEX_NUM;
SYS.DBMS_XSTREAM_UTL_IVK - PACKAGE BODY (JUL2018RUR):
1438c1438
<       ' queue=' || QUEUE_NAME || ' src_db=' || SOURCE_DATABASE || 
---
>       ' queue=' || QUEUE_NAME || ' src_db=' || SOURCE_DATABASE ||
2908c2908
<         END IF;
---
>       END IF; 

18.0.0.0

CTXSYS.DRIUTL - PACKAGE BODY (RU):
2203a2204,2249
> FUNCTION ENQUOTE_PARTS(P_SPEC IN VARCHAR2, CAPITALIZE IN BOOLEAN := TRUE)
>   RETURN VARCHAR2 IS
>   L_SPEC DRVUTL.DR_QLID3;
>   L_PERIOD1 NUMBER;
>   L_PERIOD2 NUMBER;
> BEGIN
>   IF INSTR(P_SPEC, '"') = 1 THEN
>     
>     L_SPEC := P_SPEC;
>   ELSIF INSTR(P_SPEC, '.') = 0 THEN
>     
>     L_SPEC := DBMS_ASSERT.ENQUOTE_NAME(P_SPEC, CAPITALIZE);
>   ELSE
>     
>     L_PERIOD1 := INSTR(P_SPEC, '.');
>     L_PERIOD2 := INSTR(P_SPEC, '.', L_PERIOD1 + 1);
>     
>     L_SPEC :=
>       DBMS_ASSERT.ENQUOTE_NAME(SUBSTR(P_SPEC, 1, L_PERIOD1 - 1), CAPITALIZE) || '.';
>     IF L_PERIOD2 = 0 THEN
>       L_SPEC := L_SPEC ||
>         DBMS_ASSERT.ENQUOTE_NAME(SUBSTR(P_SPEC, L_PERIOD1 + 1), CAPITALIZE);
>     ELSE
>       L_SPEC := L_SPEC ||
>         DBMS_ASSERT.ENQUOTE_NAME(SUBSTR(P_SPEC, L_PERIOD1 + 1,
>                                         (L_PERIOD2 - L_PERIOD1 - 1)), CAPITALIZE) ||
>         '.' ||
>         DBMS_ASSERT.ENQUOTE_NAME(SUBSTR(P_SPEC, L_PERIOD2 + 1), CAPITALIZE);
>     END IF;
>   END IF;
> 
>   RETURN L_SPEC;
> END ENQUOTE_PARTS;
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
SYS.DBMS_BACKUP_RESTORE - PACKAGE (18.2RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.03.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.02.02.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.03.00.00', '.');
<   msn  CONSTANT NUMBER := instr('18.03.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.03.00.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('18.02.02.00', '.');
>   msn  CONSTANT NUMBER := instr('18.02.02.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('18.02.02.00', '.', msn + 1);
29c29
<                            to_number(substr('18.03.00.00', 1, fsn - 1));
---
>                            to_number(substr('18.02.02.00', 1, fsn - 1));
31c31
<                to_number(substr('18.03.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.02.02.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.03.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.02.02.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.03.00.00',  psn + 1));
---
>                              to_number(substr('18.02.02.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (RU):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.03.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.04.00.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.03.00.00', '.');
<   msn  CONSTANT NUMBER := instr('18.03.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.03.00.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('18.04.00.00', '.');
>   msn  CONSTANT NUMBER := instr('18.04.00.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('18.04.00.00', '.', msn + 1);
29c29
<                            to_number(substr('18.03.00.00', 1, fsn - 1));
---
>                            to_number(substr('18.04.00.00', 1, fsn - 1));
31c31
<                to_number(substr('18.03.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.04.00.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.03.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.04.00.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.03.00.00',  psn + 1));
---
>                              to_number(substr('18.04.00.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (18.3RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.03.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.03.01.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.03.00.00', '.');
<   msn  CONSTANT NUMBER := instr('18.03.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.03.00.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('18.03.01.00', '.');
>   msn  CONSTANT NUMBER := instr('18.03.01.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('18.03.01.00', '.', msn + 1);
29c29
<                            to_number(substr('18.03.00.00', 1, fsn - 1));
---
>                            to_number(substr('18.03.01.00', 1, fsn - 1));
31c31
<                to_number(substr('18.03.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.03.01.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.03.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.03.01.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.03.00.00',  psn + 1));
---
>                              to_number(substr('18.03.01.00',  psn + 1));
SYS.DBMS_ISCHED - PACKAGE (RU):
1387c1387,1418
<   CUR_SCHEMA           IN VARCHAR2);
---
>   CUR_SCHEMA           IN VARCHAR2,
>   LOCK_NAME           OUT DBMS_ID,
>   LOCK_HANDLE         OUT VARCHAR2,
>   RECIPIENTS_LIST     OUT DBMS_UTILITY.LNAME_ARRAY,
>  NEW_RAISE_EVENTS_NUM OUT PLS_INTEGER,
>   CANON_JOB_NAME   IN OUT DBMS_ID,
>  CANON_JOB_SUBNAME IN OUT DBMS_ID,
>   CANON_JOB_OWNER  IN OUT DBMS_ID,
>   CUR_FLAGS           OUT NUMBER,
>   DOES_SUB_EXIST      OUT BOOLEAN,
>   DOES_REG_EXIST      OUT BOOLEAN,
>   REAL_JB_NAME        IN VARCHAR2 
> );
> 
> PROCEDURE ADD_JOB_EMAIL_NOTIFICATION_PH3
> (
>   RECIPIENTS_LIST      IN DBMS_UTILITY.LNAME_ARRAY,
>   NEW_RAISE_EVENTS_NUM IN PLS_INTEGER,
>   CANON_JOB_NAME       IN DBMS_ID,
>   CANON_JOB_SUBNAME    IN DBMS_ID,
>   CANON_JOB_OWNER      IN DBMS_ID,
>   INVOKER              IN VARCHAR2,
>   SENDER               IN VARCHAR2,
>   SUBJECT              IN VARCHAR2,
>   BODY                 IN VARCHAR2,
>   FILTER_CONDITION     IN VARCHAR2,
>   LOCK_NAME            IN DBMS_ID,
>   LOCK_HANDLE          IN VARCHAR2,
>   CUR_FLAGS            IN NUMBER,
>   RECIPIENTS           IN VARCHAR2,
>   EVENTS               IN VARCHAR2
> );
SYS.DBMS_RCVMAN - PACKAGE (RU):
3289c3289
<   ,nblocks        OUT     binary_integer -- number of blocks of datafilecopy
---
>   ,nblocks        OUT     number      -- number of blocks of datafilecopy
SYS.DBMS_REGISTRY - PACKAGE (18.2RUR):
13c13
<                                '18.3.0.0.0';
---
>                                '18.2.2.0.0';
231,237c231,233
< PROCEDURE RU_apply    (comp_version      IN VARCHAR2  DEFAULT NULL,
<                        build_description IN VARCHAR2  DEFAULT NULL,
<                        build_timestamp   IN TIMESTAMP DEFAULT NULL);
< 
< PROCEDURE RU_rollback (comp_version      IN VARCHAR2  DEFAULT NULL,
<                        build_description IN VARCHAR2  DEFAULT NULL,
<                        build_timestamp   IN TIMESTAMP DEFAULT NULL);
---
> PROCEDURE RU_apply    (comp_version IN VARCHAR2 DEFAULT NULL);
> 
> PROCEDURE RU_rollback (comp_version IN VARCHAR2 DEFAULT NULL);
SYS.DBMS_REGISTRY - PACKAGE (RU):
13c13
<                                '18.3.0.0.0';
---
>                                '18.4.0.0.0';
SYS.DBMS_REGISTRY - PACKAGE (18.3RUR):
13c13
<                                '18.3.0.0.0';
---
>                                '18.3.1.0.0';
SYS.DBMS_ISCHED - PACKAGE BODY (RU):
7763a7764
> 
7775,7778c7776,7788
<   CUR_SCHEMA           IN VARCHAR2) IS
< CANON_JOB_NAME     DBMS_ID;
< CANON_JOB_SUBNAME  DBMS_ID;
< CANON_JOB_OWNER    DBMS_ID;
---
>   CUR_SCHEMA           IN VARCHAR2,
>   LOCK_NAME           OUT DBMS_ID,
>   LOCK_HANDLE         OUT VARCHAR2,
>   RECIPIENTS_LIST     OUT DBMS_UTILITY.LNAME_ARRAY,
>  NEW_RAISE_EVENTS_NUM OUT PLS_INTEGER,
>   CANON_JOB_NAME   IN OUT DBMS_ID,
>  CANON_JOB_SUBNAME IN OUT DBMS_ID,
>   CANON_JOB_OWNER  IN OUT DBMS_ID,
>   CUR_FLAGS           OUT NUMBER,
>   DOES_SUB_EXIST      OUT BOOLEAN,
>   DOES_REG_EXIST      OUT BOOLEAN,
>   REAL_JB_NAME        IN VARCHAR2 
> ) IS
7782d7791
< NEW_RAISE_EVENTS_NUM PLS_INTEGER := 0;
7791d7799
< EVENT_10862       PLS_INTEGER := 0;
7798,7799d7805
< LOCK_NAME                  DBMS_ID;
< LOCK_HANDLE                VARCHAR2(128);
7802d7807
< RECIPIENTS_LIST   DBMS_UTILITY.LNAME_ARRAY;
7805d7809
< CUR_FLAGS              NUMBER;
7807c7811
< REAL_JOB_NAME          VARCHAR2(2 * ORA_MAX_NAME_LEN + 5) := JOB_NAME;
---
> REAL_JOB_NAME          VARCHAR2(2 * ORA_MAX_NAME_LEN + 5) := REAL_JB_NAME;
7817c7821,7822
<    SYS.DBMS_ISCHED.TRACE_EMAIL('Entering add_job_email_notification');
---
>    SYS.DBMS_ISCHED.TRACE_EMAIL('Entering ' || 
>          'dbms_isched.add_job_email_notification');
7819a7825,7836
>   IF DO_TRC THEN
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current user: ' ||
>           SYS_CONTEXT('USERENV','CURRENT_USER') );
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Session user: ' ||
>           SYS_CONTEXT('USERENV','SESSION_USER') );
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current schema: ' ||
>           SYS_CONTEXT('USERENV','CURRENT_SCHEMA') );
>   END IF;
> 
>   NEW_RAISE_EVENTS_NUM := 0;
>   CUR_FLAGS := 0;
> 
7844,7868c7861,7862
<   RESOLVE3_NAME(REAL_JOB_NAME, CANON_JOB_NAME, CANON_JOB_SUBNAME,
<     CANON_JOB_OWNER, CUR_SCHEMA);
< 
<   
<   FULL_JOB_NAME := '"'||CANON_JOB_OWNER||'"."'||CANON_JOB_NAME||'"';
< 
<   
<   IF INVOKER != CANON_JOB_OWNER AND INVOKER != 'SYS' AND
<     BITAND(SYS_PRIVS, 2) = 0
<   THEN
<     
<     BEGIN
<       SYS.DBMS_ISCHED_UTL.CHECK_OBJECT_PRIVS(CANON_JOB_NAME, CANON_JOB_OWNER, 'JOB',
<         INVOKER, 'ALTER', TRUE, SYS_PRIVS);
<     EXCEPTION WHEN OTHERS THEN
<       
<       IF SQLCODE = -23306 AND CANON_JOB_SUBNAME IS NULL
<        AND REAL_JOB_NAME = JOB_NAME THEN
<         REAL_JOB_NAME := '"'||CUR_SCHEMA||'".' || JOB_NAME;
<         GOTO TRY_RESOLVE_AGAIN;
<       ELSE
<         RAISE;
<       END IF;
<     END;
<   END IF;
---
>   FULL_JOB_NAME := DBMS_ASSERT.ENQUOTE_NAME(CANON_JOB_OWNER, FALSE) ||'.'||
>                    DBMS_ASSERT.ENQUOTE_NAME(CANON_JOB_NAME , FALSE);
7892c7886,7890
<       REAL_JOB_NAME := '"'||CUR_SCHEMA||'".' || JOB_NAME;
---
>       REAL_JOB_NAME := DBMS_ASSERT.ENQUOTE_NAME(CUR_SCHEMA, FALSE) ||
>                        '.' || JOB_NAME;
>       
>       RESOLVE3_NAME(REAL_JOB_NAME, CANON_JOB_NAME, CANON_JOB_SUBNAME,
>       CANON_JOB_OWNER, CUR_SCHEMA);
7981,7990d7978
<   
<   
<   
<   DBMS_SYSTEM.READ_EV(10862, EVENT_10862);
<   IF EVENT_10862 = 0 THEN
<     EXECUTE IMMEDIATE
<       'ALTER SESSION SET EVENTS ''10862 TRACE NAME CONTEXT FOREVER, LEVEL 1''';
<   END IF;
< 
<   
7992,7993c7980,7981
<     'select count(*) from sys.dba_QUEUE_SUBSCRIBERS where owner=''SYS''
<        and queue_name=''SCHEDULER$_EVENT_QUEUE'' and consumer_name=:lname'
---
>     'select count(*) from sys.user_QUEUE_SUBSCRIBERS where 
>        queue_name=''SCHEDULER$_EVENT_QUEUE'' and consumer_name=:lname'
7996,8003c7984,7985
<   BEGIN
<     
<     DBMS_AQADM.ADD_SUBSCRIBER
<      (QUEUE_NAME => 'SYS.SCHEDULER$_EVENT_QUEUE',
<       SUBSCRIBER => SYS.AQ$_AGENT(LOCK_NAME, NULL, NULL));
<   EXCEPTION WHEN OTHERS THEN
<     IF SQLCODE = -24034 THEN NULL;
<     ELSE
---
>     DOES_SUB_EXIST := FALSE;
>     BEGIN
8005,8007c7987,7994
<       IF EVENT_10862 = 0 THEN
<         EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS ' ||
<           '''10862 TRACE NAME CONTEXT OFF''' ;
---
>       DBMS_AQADM.ADD_SUBSCRIBER
>        (QUEUE_NAME => 'SYS.SCHEDULER$_EVENT_QUEUE',
>         SUBSCRIBER => SYS.AQ$_AGENT(LOCK_NAME, NULL, NULL));
>     EXCEPTION WHEN OTHERS THEN
>       IF SQLCODE = -24034 THEN NULL;
>       ELSE
>         LOCK_ERROR := DBMS_LOCK.RELEASE(LOCKHANDLE=>LOCK_HANDLE);
>         RAISE;
8009,8019c7996,7998
< 
<       LOCK_ERROR := DBMS_LOCK.RELEASE(LOCKHANDLE=>LOCK_HANDLE);
<       RAISE;
<     END IF;
<   END;
<   END IF;
< 
<   
<   IF EVENT_10862 = 0 THEN
<     EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS ' ||
<       '''10862 TRACE NAME CONTEXT OFF''' ;
---
>     END;
>   ELSE
>     DOES_SUB_EXIST := TRUE;
8025,8029d8003
<   IF ROW_COUNT = 0 THEN
<     
<     SYS.DBMS_AQADM_SYS.ENABLE_DB_ACCESS(LOCK_NAME,INVOKER,TRUE);
<   END IF;
< 
8033a8008,8012
>   EXCEPTION WHEN OTHERS THEN
>     LOCK_ERROR := DBMS_LOCK.RELEASE(LOCKHANDLE=>LOCK_HANDLE);
>     RAISE;
>   END;
> 
8035,8042c8014,8020
<     
<     
<     REGINFO := SYS.AQ$_REG_INFO('SYS.SCHEDULER$_EVENT_QUEUE:"'||LOCK_NAME||'"',
<                                 DBMS_AQ.NAMESPACE_AQ,
<                                 'plsql://SYS.SCHEDULER$_JOB_EVENT_HANDLER',
<                                  NULL);
<     REGLIST := SYS.AQ$_REG_INFO_LIST(REGINFO);
<     DBMS_AQ.REGISTER ( REGLIST, 1 );
---
>     DOES_REG_EXIST := FALSE;
>   ELSE 
>     DOES_REG_EXIST := TRUE;
>   END IF;
> 
>   IF DO_TRC THEN
>    SYS.DBMS_ISCHED.TRACE_EMAIL('Exiting dbms_isched.add_job_email_notification');
8045a8024,8078
> 
> END;
> 
> PROCEDURE ADD_JOB_EMAIL_NOTIFICATION_PH3
> (
>   RECIPIENTS_LIST      IN DBMS_UTILITY.LNAME_ARRAY,
>   NEW_RAISE_EVENTS_NUM IN PLS_INTEGER,
>   CANON_JOB_NAME       IN DBMS_ID,
>   CANON_JOB_SUBNAME    IN DBMS_ID,
>   CANON_JOB_OWNER      IN DBMS_ID,
>   INVOKER              IN VARCHAR2,
>   SENDER               IN VARCHAR2,
>   SUBJECT              IN VARCHAR2,
>   BODY                 IN VARCHAR2,
>   FILTER_CONDITION     IN VARCHAR2,
>   LOCK_NAME            IN DBMS_ID,
>   LOCK_HANDLE          IN VARCHAR2,
>   CUR_FLAGS            IN NUMBER,
>   RECIPIENTS           IN VARCHAR2,
>   EVENTS               IN VARCHAR2
> ) IS
> TYPE EVENT_NAME_LIST IS TABLE OF DBMS_ID;
> TYPE EVENT_NUMBER_LIST IS TABLE OF NUMBER;
> EVENT_NAMES EVENT_NAME_LIST :=  EVENT_NAME_LIST('JOB_STARTED',
>   'JOB_SUCCEEDED', 'JOB_FAILED', 'JOB_BROKEN', 'JOB_COMPLETED',
>   'JOB_STOPPED', 'JOB_SCH_LIM_REACHED', 'JOB_DISABLED',
>   'JOB_CHAIN_STALLED','JOB_OVER_MAX_DUR','JOB_RUN_COMPLETED','JOB_ALL_EVENTS');
> EVENT_NUMBERS EVENT_NUMBER_LIST :=
>   EVENT_NUMBER_LIST(1,2,4,8,16,32,64,128,256,512,2+4+32,1024-1);
> EVENT_10862       PLS_INTEGER := 0;
> LOCK_ERROR        PLS_INTEGER;
> FULL_JOB_NAME     VARCHAR2(3 * ORA_MAX_NAME_LEN + 8);
> DO_TRC            BOOLEAN := FALSE;
> EV_27402          PLS_INTEGER;
> BEGIN
>   
>   DBMS_SYSTEM.READ_EV(27402, EV_27402);
>   IF BITAND(EV_27402,128)=128 THEN DO_TRC := TRUE; END IF;
> 
>   
>   IF DO_TRC THEN
>    SYS.DBMS_ISCHED.TRACE_EMAIL('Entered add_job_email_notification_ph3');
>   END IF;
> 
>   IF DO_TRC THEN
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current user: ' ||
>           SYS_CONTEXT('USERENV','CURRENT_USER') );
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Session user: ' ||
>           SYS_CONTEXT('USERENV','SESSION_USER') );
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current schema: ' ||
>           SYS_CONTEXT('USERENV','CURRENT_SCHEMA') );
>   END IF;
> 
>   BEGIN 
>   
8152a8186,8189
>   FULL_JOB_NAME := DBMS_ASSERT.ENQUOTE_NAME(CANON_JOB_OWNER, FALSE) ||'.'||
>                    DBMS_ASSERT.ENQUOTE_NAME(CANON_JOB_NAME , FALSE);
> 
>   
8159c8196,8197
<         FULL_JOB_NAME := FULL_JOB_NAME ||'."'||CANON_JOB_SUBNAME||'"';
---
>         FULL_JOB_NAME := FULL_JOB_NAME ||'.'||
>                          DBMS_ASSERT.ENQUOTE_NAME(CANON_JOB_SUBNAME,FALSE);
8165a8204,8208
> 
>   
>   IF DO_TRC THEN
>    SYS.DBMS_ISCHED.TRACE_EMAIL('Exiting add_job_email_notification_ph3');
>   END IF;
SYS.DBMS_QOPATCH - PACKAGE BODY (RU):
25a26,30
> V_CODE     NUMBER;
> V_ERRM     VARCHAR2(128);
> 
> 
> 
80c85
<   RETURN '$Header: rdbms/src/client/tools/qpinv/prvtqopi.sql /st_rdbms_18.0/1 2018/03/05 00:47:50 sspulava Exp $';
---
>   RETURN '$Header: rdbms/src/client/tools/qpinv/prvtqopi.sql /st_rdbms_18.0/3 2018/07/12 07:15:49 apfwkr Exp $';
162a168,173
>   T_OP_INST_PATH   VARCHAR2(1024) := '';
>   T_OP_SCPT_PATH   VARCHAR2(1024) := '';
>   T_OP_LOG_PATH    VARCHAR2(1024) := '';
>   T_ROOT           VARCHAR2(1024) := '';
>   T_ORABASE        VARCHAR2(1024) := '';
>   OPATCHFILE   VARCHAR2(128) := 'opatch';
185,186c196,197
<       DBMS_SYSTEM.KSDWRT(1,'QPI: Event 22171584 set. Skipping sanity check');
<       DBMS_SYSTEM.KSDWRT(1,'QPI: Please disable the event in case of any errors and try again');
---
>       DBMS_SYSTEM.KSDWRT(3,'QPI: Event 22171584 set. Skipping sanity check');
>       DBMS_SYSTEM.KSDWRT(3,'QPI: Please disable the event in case of any errors and try again');
210a222,229
>     SELECT PLATFORM_ID INTO PFID FROM V$DATABASE;
>     NOT_WIN := IS_NON_WINDOWS (PFID);
> 
>     
>     IF NOT NOT_WIN  THEN
>        OPATCHFILE := 'opatch.bat';
>     END IF;
> 
223a243,309
>      
>      
>      
>      
>      
>      
>      
>      
>       T_ROOT := ROOT;
>       T_ORABASE := ORABASE;
>       T_OP_INST_PATH := OP_INST_PATH;
>       T_OP_SCPT_PATH := OP_SCPT_PATH;
>       T_OP_LOG_PATH := OP_LOG_PATH;
>   
>       IF NOT_WIN  THEN
>               IF SUBSTR( ROOT,-1,1 ) <> '/' THEN
>                  T_ROOT := ROOT || '/';
>                  LOG_STATUS('QPI:  t_root is ' || T_ROOT);
>               END IF;
> 
>               IF SUBSTR( ORABASE,-1,1 ) <> '/' THEN
>                  T_ORABASE := ORABASE || '/';
>                  LOG_STATUS('QPI:  t_orabase is ' || T_ORABASE);
>               END IF;
> 
>               IF SUBSTR( OP_INST_PATH,-1,1 ) <> '/' THEN
>                  T_OP_INST_PATH := OP_INST_PATH || '/';
>                  LOG_STATUS('QPI:  t_op_inst_path is ' || T_OP_INST_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_SCPT_PATH,-1,1 ) <> '/' THEN
>                  T_OP_SCPT_PATH := OP_SCPT_PATH || '/';
>                  LOG_STATUS('QPI:  t_op_scpt_path is ' || T_OP_SCPT_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_LOG_PATH,-1,1 ) <> '/' THEN
>                  T_OP_LOG_PATH := OP_LOG_PATH || '/';
>                  LOG_STATUS('QPI:  t_op_log_path is ' || T_OP_LOG_PATH);
>               END IF;
>       ELSE
>               IF SUBSTR( ROOT,-1,1 ) <> '\' THEN
>                  T_ROOT := ROOT || '\';
>                  LOG_STATUS('QPI:  t_root is ' || T_ROOT);
>               END IF;
> 
>               IF SUBSTR( ORABASE,-1,1 ) <> '\' THEN
>                  T_ORABASE := ORABASE || '\';
>                  LOG_STATUS('QPI:  t_orabase is ' || T_ORABASE);
>               END IF;
> 
>               IF SUBSTR( OP_INST_PATH,-1,1 ) <> '\' THEN
>                  T_OP_INST_PATH := OP_INST_PATH || '\';
>                  LOG_STATUS('QPI:  t_op_inst_path is ' || T_OP_INST_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_SCPT_PATH,-1,1 ) <> '\' THEN
>                  T_OP_SCPT_PATH := OP_SCPT_PATH || '\';
>                  LOG_STATUS('QPI:  t_op_scpt_path is ' || T_OP_SCPT_PATH);
>               END IF;
> 
>               IF SUBSTR( OP_LOG_PATH,-1,1 ) <> '\' THEN
>                  T_OP_LOG_PATH := OP_LOG_PATH || '\';
>                  LOG_STATUS('QPI:  t_op_log_path is ' || T_OP_LOG_PATH);
>               END IF;
> 
>       END IF;
> 
243d328
<         SELECT PLATFORM_ID INTO PFID FROM V$DATABASE;
258d342
<           NOT_WIN := IS_NON_WINDOWS (PFID);
305c389
<     UTL_FILE.FGETATTR('OPATCH_INST_DIR', 'opatch', FEXISTS, FILE_LENGTH, BLOCK_SIZE);
---
>     UTL_FILE.FGETATTR('OPATCH_INST_DIR', OPATCHFILE, FEXISTS, FILE_LENGTH, BLOCK_SIZE);
307c391
<       DBMS_SYSTEM.KSDWRT(1,'QPI: opatch file present');
---
>       DBMS_SYSTEM.KSDWRT(3,'QPI: opatch file present, ' || OPATCHFILE);
309a394
>       DBMS_SYSTEM.KSDWRT(3,'QPI: opatch executable does not exist, ' || OPATCHFILE);
319c404
<         DBMS_SYSTEM.KSDWRT(1,'QPI: qopiprep.bat file present');
---
>         DBMS_SYSTEM.KSDWRT(3,'QPI: qopiprep.bat file present');
374d458
<           LOG_STATUS ('QPI: GOT lock at :' || SYSTIMESTAMP);
377a462
>        LOG_STATUS('QPI: Obtaining lock FAILED, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
378a464,465
>     ELSIF QP_RESULT = 0 OR QP_RESULT = 4 THEN
>         LOG_STATUS('QPI: Obtaining lock SUCCESSFUL, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
401c488,492
<           LOG_STATUS ('QPI: Releasing the lock at :' || SYSTIMESTAMP);
---
>     IF QP_RESULT = 0 THEN
>         LOG_STATUS('QPI: Releasing lock SUCCESSFUL, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
>     ELSE
>         LOG_STATUS('QPI: Releasing lock FAILED, qp_result=' || QP_RESULT || ' at : ' || SYSTIMESTAMP);
>     END IF;
426,427d516
<   V_CODE     NUMBER;
<   V_ERRM     VARCHAR2(128);
493,494c582,583
<       V_ERRM := SUBSTR(SQLERRM, 1, 64);
<       LOG_STATUS('Error code ' || V_CODE || ': ' || V_ERRM);
---
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in config_oinv_jobs, Error code ' || V_CODE || ': ' || V_ERRM);
799c888
<          DBMS_SYSTEM.KSDWRT(1,'QPI: Cleaning and refreshing metadata..');
---
>          DBMS_SYSTEM.KSDWRT(3,'QPI: Cleaning and refreshing metadata..');
837a927,930
>    LOG_STATUS('QPI: Caught error while querying opatch_xml_inv');
>    V_CODE := SQLCODE;
>    V_ERRM := SUBSTR(SQLERRM, 1, 128);
>    LOG_STATUS('QPI: in REFRESH_OPATCH_DATA, ERROR code ' || V_CODE || ' : ' || V_ERRM);
892a986,992
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_opatch_install_info, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
935a1036,1042
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_opatch_list, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
986a1094,1100
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in IS_PATCH_INSTALLED, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1039a1154,1160
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_DATA, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1099a1221,1227
>     WHEN OTHERS THEN
>       V_CODE := SQLCODE;
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in GET_OPATCH_BUGS, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>       QP_RESULT:= RELEASE_QOPATCH_LOCK();
>       RAISE;
> 
1121a1250,1253
>     QP_RESULT := GET_QOPATCH_LOCK();
> 
>     LOG_STATUS('QPI: Got lock get_opatch_files');
> 
1133a1266,1269
> 
>      LOG_STATUS('QPI: Release lock get_opatch_files');
>      QP_RESULT:= RELEASE_QOPATCH_LOCK();
> 
1134a1271,1283
> 
>     EXCEPTION 
>       WHEN UNABLE_TO_LOCK THEN
>         RAISE_APPLICATION_ERROR(-20016, 
>                  'Unable to get the lock : get_opatch_files : ' || QP_RESULT);
> 
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_FILES, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1178a1328,1334
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_COUNT, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1225a1382,1388
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_PREQS, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1268a1432,1443
>     EXCEPTION 
>       WHEN UNABLE_TO_LOCK THEN
>         RAISE_APPLICATION_ERROR(-20016, 
>                  'Unable to get the lock : get_opatch_install_info : ' || QP_RESULT);
> 
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in GET_OPATCH_OLAYS, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1317a1493,1499
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in PATCH_CONFLICT_DETECTION, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
1370c1552
< OPATCHFILE   CONSTANT VARCHAR2(128) := 'opatch';
---
> OPATCHFILE   VARCHAR2(128) := 'opatch';
1406a1589
>       OPATCHFILE := 'opatch.bat';
1453a1637
>     LOG_STATUS('QPI: opatch executable exists and is readable, ' || OPATCHFILE);
1455a1640
>     LOG_STATUS('QPI: opatch executable does not exist or is not redable, ' || OPATCHFILE);
1514,1515d1698
<   V_CODE     NUMBER;
<   V_ERRM     VARCHAR2(128);
1590,1591c1773,1774
<       V_ERRM := SUBSTR(SQLERRM, 1, 64);
<       LOG_STATUS('Error code ' || V_CODE || ': ' || V_ERRM);
---
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in add_oinv_job, Error code ' || V_CODE || ': ' || V_ERRM);
1612c1795
<          DBMS_SYSTEM.KSDWRT(1,'Node name: ' || PVAL.NODE_NAME || ' Inst:' || PVAL.INST_NAME|| ' Job:' || PVAL.INST_JOB);
---
>          DBMS_SYSTEM.KSDWRT(3,'Node name: ' || PVAL.NODE_NAME || ' Inst:' || PVAL.INST_NAME|| ' Job:' || PVAL.INST_JOB);
1619c1802
<          DBMS_SYSTEM.KSDWRT(1,'Job: ' || PVAR.JOB_NAME || ' State: ' || PVAR.STATE);
---
>          DBMS_SYSTEM.KSDWRT(3,'Job: ' || PVAR.JOB_NAME || ' State: ' || PVAR.STATE);
1718a1902
> 
1900a2085,2088
>     WHEN UNABLE_TO_LOCK THEN
>       RAISE_APPLICATION_ERROR(-20016, 
>                  'Unable to get the lock : get_pending_activity : ' || QP_RESULT);
> 
1906a2095,2097
>       V_CODE := SQLCODE;
>       V_ERRM := SUBSTR(SQLERRM, 1, 128);
>       LOG_STATUS('QPI: in get_pending_activity, ERROR code ' || V_CODE || ' : ' || V_ERRM);
2136a2328,2334
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_opatch_lsinventory, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2635a2834,2840
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in opatch_compare, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2741a2947,2953
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in get_patch_details, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2784a2997,3003
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in check_patch_installed, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2856c3075,3078
<         
---
> 
>        LOG_STATUS('QPI: Release lock opatch_compare_nodes');
>        QP_RESULT:= RELEASE_QOPATCH_LOCK();
> 
2876a3099,3102
> 
>         LOG_STATUS('QPI: Release lock opatch_compare_nodes');
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
> 
2883,2885d3108
<          LOG_STATUS('QPI: Release lock opatch_compare_nodes');
<    QP_RESULT:= RELEASE_QOPATCH_LOCK();
< 
2890a3114,3120
>       WHEN OTHERS THEN
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in OPATCH_COMPARE_NODES, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2917a3148
>  
2989c3220
<        WHEN UNABLE_TO_LOCK THEN
---
>       WHEN UNABLE_TO_LOCK THEN 
2992,2993c3223,3230
<        WHEN OTHERS THEN
<             RAISE;
---
> 
>       WHEN OTHERS THEN 
>         V_CODE := SQLCODE;
>         V_ERRM := SUBSTR(SQLERRM, 1, 128);
>         LOG_STATUS('QPI: in CLEAN_METADATA, ERROR code ' || V_CODE || ' : ' || V_ERRM);
>         QP_RESULT:= RELEASE_QOPATCH_LOCK();
>         RAISE;
> 
2995a3233,3234
> 
> 
SYS.DBMS_RCVMAN - PACKAGE BODY (18.3RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.03.00.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.03.01.00'; 
SYS.DBMS_RCVMAN - PACKAGE BODY (18.2RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.03.00.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.02.02.00'; 
SYS.DBMS_RCVMAN - PACKAGE BODY (RU):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.03.00.00'; 
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.04.00.00'; 
24765a24766
>       END IF;
24767,24790c24768,24788
<          
<          
<          
<          
<          
<          
<          
<          IF (AVAILABLE_FROMSCN_ACT IS NULL OR
<              (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
<               USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
<               LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
<             IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
<                DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file# ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             ELSE
<                DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
<                               AVAILABLE_FROMSCN_ACT || ' for file ' ||
<                               LOCAL.DFNUMBER_OBJ || ', creation_scn '||
<                               LOCAL.DFCREATIONSCN_OBJ);
<             END IF;
<             USABLE_INCR := LOCAL;
<             AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
---
>       
>       
>       
>       
>       
>       
>       
>       IF (AVAILABLE_FROMSCN_ACT IS NULL OR
>           (USABLE_INCR.DFNUMBER_OBJ = LOCAL.DFNUMBER_OBJ AND
>            USABLE_INCR.DFCREATIONSCN_OBJ = LOCAL.DFCREATIONSCN_OBJ AND
>            LOCAL.TOSCN_ACT < AVAILABLE_FROMSCN_ACT)) THEN
>          IF (AVAILABLE_FROMSCN_ACT IS NULL) THEN
>             DEB(DEB_PRINT, 'available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file# ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
>          ELSE
>             DEB(DEB_PRINT, 'broken chain, available_fromSCN_act set to ' ||
>                            AVAILABLE_FROMSCN_ACT || ' for file ' ||
>                            LOCAL.DFNUMBER_OBJ || ', creation_scn '||
>                            LOCAL.DFCREATIONSCN_OBJ);
24791a24790,24791
>          USABLE_INCR := LOCAL;
>          AVAILABLE_FROMSCN_ACT := LOCAL.FROMSCN_ACT;
27205a27206,27208
> 
>     
>     IF (DFREC.PDBID <= 1 OR TRANSLATEPDB2NAME(DFREC.PDBID) IS NOT NULL) THEN
27206a27210
>     END IF;
29222c29226
<   ,NBLOCKS         OUT     BINARY_INTEGER
---
>   ,NBLOCKS         OUT     NUMBER
SYS.DBMS_REGISTRY - PACKAGE BODY (RU):
624,625c624,625
<             TO_CHAR(P_DATE, 'MM-DD-YYYY HH24:MI:SS') || P_EDITION || 'FBC238'),
<             DBMS_CRYPTO.HASH_MD5);
---
>             TO_CHAR(P_DATE, 'MM-DD-YYYY HH24:MI:SS','nls_calendar=Gregorian')
>             || P_EDITION || 'FBC238'), DBMS_CRYPTO.HASH_MD5);
SYS.DBMS_SCHEDULER - PACKAGE BODY (RU):
4389a4390,4408
>   DOES_SUB_EXIST          BOOLEAN := FALSE;
>   DOES_REG_EXIST          BOOLEAN := FALSE;
>   LOCK_NAME               DBMS_ID;
>   LOCK_HANDLE             VARCHAR2(128);
>   LOCK_ERROR              PLS_INTEGER;
>   REGINFO                 SYS.AQ$_REG_INFO;
>   REGLIST                 SYS.AQ$_REG_INFO_LIST;
>   RECIPIENTS_LIST         DBMS_UTILITY.LNAME_ARRAY;
>   NEW_RAISE_EVENTS_NUM    PLS_INTEGER := 0;
>   CANON_JOB_NAME          DBMS_ID;
>   CANON_JOB_SUBNAME       DBMS_ID;
>   CANON_JOB_OWNER         DBMS_ID;
>   CUR_FLAGS               NUMBER;
>   EV_27402                PLS_INTEGER := 0;
>   DO_TRC                  BOOLEAN := FALSE;
>   CURRENT_USER            DBMS_ID := SYS_CONTEXT('USERENV','CURRENT_USER');
>   CUR_SCHEMA              DBMS_ID := SYS_CONTEXT('USERENV','CURRENT_SCHEMA');
>   REAL_JOB_NAME           VARCHAR2(2 * ORA_MAX_NAME_LEN + 5) := JOB_NAME;
>   FULL_JOB_NAME           VARCHAR2(3 * ORA_MAX_NAME_LEN + 8);
4392a4412,4429
>   SYS.DBMS_SYSTEM.READ_EV(27402, EV_27402);
>   IF BITAND(EV_27402,128)=128 THEN DO_TRC := TRUE; END IF;
>  
>   IF DO_TRC THEN
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Entered ' || 
>           'dbms_scheduler.add_job_email_notification');
>   END IF;
> 
>   IF DO_TRC THEN
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current user: ' ||
>           CURRENT_USER );
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Session user: ' ||
>           SYS_CONTEXT('USERENV','SESSION_USER') );
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current schema: ' ||
>           CUR_SCHEMA );
>   END IF;
> 
>   
4424a4462,4497
>   
> 
>   <<TRY_RESOLVE_AGAIN>>
> 
>   
>   SYS.DBMS_ISCHED.RESOLVE3_NAME(REAL_JOB_NAME, CANON_JOB_NAME, 
>     CANON_JOB_SUBNAME, CANON_JOB_OWNER, CUR_SCHEMA);
> 
>   
>   FULL_JOB_NAME := SYS.DBMS_ASSERT.ENQUOTE_NAME(CANON_JOB_OWNER, FALSE) ||'.'||
>                    SYS.DBMS_ASSERT.ENQUOTE_NAME(CANON_JOB_NAME , FALSE);
> 
>   
>   IF CURRENT_USER != CANON_JOB_OWNER AND CURRENT_USER != 'SYS' AND
>     BITAND(SYS_PRIVS, 2) = 0
>   THEN
>     
>     BEGIN
>       SYS.DBMS_ISCHED_UTL.CHECK_OBJECT_PRIVS(CANON_JOB_NAME, CANON_JOB_OWNER, 
>         'JOB', CURRENT_USER, 'ALTER', TRUE, SYS_PRIVS);
>     EXCEPTION WHEN OTHERS THEN
>       
>       IF SQLCODE = -23306 AND CANON_JOB_SUBNAME IS NULL
>        AND REAL_JOB_NAME = JOB_NAME THEN
>         REAL_JOB_NAME := SYS.DBMS_ASSERT.ENQUOTE_NAME(CUR_SCHEMA, FALSE) ||
>                          '.' || JOB_NAME;
>         GOTO TRY_RESOLVE_AGAIN;
>       ELSE
>         RAISE;
>       END IF;
>     END;
>   END IF;
> 
>   
> 
>   
4427,4428c4500,4541
<     SYS_CONTEXT('USERENV','CURRENT_USER'), SYS_PRIVS,
<     SYS_CONTEXT('USERENV','CURRENT_SCHEMA'));
---
>     CURRENT_USER, SYS_PRIVS,
>     CUR_SCHEMA,
>     LOCK_NAME, LOCK_HANDLE, RECIPIENTS_LIST, NEW_RAISE_EVENTS_NUM, 
>     CANON_JOB_NAME, CANON_JOB_SUBNAME, CANON_JOB_OWNER, CUR_FLAGS,
>     DOES_SUB_EXIST, DOES_REG_EXIST, REAL_JOB_NAME);
> 
>   
> 
>   IF NOT DOES_SUB_EXIST THEN
>     
>     SYS.DBMS_AQADM.ENABLE_DB_ACCESS(LOCK_NAME,
>         SYS.DBMS_ASSERT.ENQUOTE_NAME(CURRENT_USER, FALSE));
>   END IF;
> 
>   BEGIN
>     IF NOT DOES_REG_EXIST THEN
>     
>     
>     REGINFO := SYS.AQ$_REG_INFO('SYS.SCHEDULER$_EVENT_QUEUE:"'||LOCK_NAME||'"',
>                                 SYS.DBMS_AQ.NAMESPACE_AQ,
>                                 'plsql://SYS.SCHEDULER$_JOB_EVENT_HANDLER',
>                                  NULL);
>     REGLIST := SYS.AQ$_REG_INFO_LIST(REGINFO);
>     SYS.DBMS_AQ.REGISTER ( REGLIST, 1 );
>     END IF;
>   EXCEPTION WHEN OTHERS THEN
>     LOCK_ERROR := SYS.DBMS_LOCK.RELEASE(LOCKHANDLE=>LOCK_HANDLE);
>     RAISE;
>   END;
> 
>   
> 
>   SYS.DBMS_ISCHED.ADD_JOB_EMAIL_NOTIFICATION_PH3(RECIPIENTS_LIST, 
>      NEW_RAISE_EVENTS_NUM, CANON_JOB_NAME, CANON_JOB_SUBNAME, 
>      CANON_JOB_OWNER, CURRENT_USER,
>      SENDER, SUBJECT, BODY, FILTER_CONDITION, LOCK_NAME, LOCK_HANDLE,
>      CUR_FLAGS, RECIPIENTS, EVENTS);
> 
>   IF DO_TRC THEN
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Exiting' ||
>           'dbms_scheduler.add_job_email_notification');
>   END IF;
SYS.DBMS_STATS - PACKAGE BODY (RU):
15195,15198c15195,15200
<     TRANSFER_COLUMN_STATS(OWNER, DBMS_STATS_INTERNAL.DQ(TAB_NAME), EXTN_NAME, 
<       NULL, NULL, NULL,
<       NULL, NULL, TRUE, TRUE, NULL, FALSE, FALSE, DSC_NON_FXT, TRUE, 
<       'ALL', FALSE, NULL, TRUE);
---
>     
>     
>     TRANSFER_COLUMN_STATS(DBMS_STATS_INTERNAL.DQ(OWNER), 
>       DBMS_STATS_INTERNAL.DQ(TAB_NAME), DBMS_STATS_INTERNAL.DQ(EXTN_NAME),
>       NULL, NULL, NULL, NULL, NULL, TRUE, TRUE, NULL, FALSE, FALSE, 
>       DSC_NON_FXT, TRUE, 'ALL', FALSE, NULL, TRUE);
SYS.DBMS_FEATURE_ACTIVE_DATA_GUARD - PROCEDURE (RU):
64c64,65
<             'where (PARENT_DBUN not in ' ||
---
>             'where (DEST_ROLE != ''LOGICAL STANDBY'') ' ||
>             'and (PARENT_DBUN not in ' ||
SYS.SCHEDULER$_JOB_EVENT_HANDLER - PROCEDURE (RU):
32,34c32
<   NOTIF_OWNER            DBMS_ID := '';
<   NOTIF_OWNER_ID         PLS_INTEGER;
<   HAS_SYS_PRVLG          VARCHAR2(1) := 'N';
---
>   CURRENT_USER           DBMS_ID := SYS_CONTEXT('USERENV','CURRENT_USER');
38,43d35
<   
<   
<   
<   
< 
<   
49,52c41,46
<     SYS.DBMS_ISCHED.TRACE_EMAIL('Current user: '||
<                         SYS_CONTEXT('USERENV','CURRENT_USER'));
<     SYS.DBMS_ISCHED.TRACE_EMAIL('Consumer name: '||
<                                           DESCR.CONSUMER_NAME);
---
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Consumer name: ' || DESCR.CONSUMER_NAME);
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current user: ' || CURRENT_USER);
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Session user: ' ||
>           SYS_CONTEXT('USERENV','SESSION_USER') );
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Current schema: ' ||
>           SYS_CONTEXT('USERENV','CURRENT_SCHEMA') );
55a50,52
>    SYS_PRIVS := SYS.DBMS_SCHEDULER.CHECK_SYS_PRIVS();
> 
>   
75,117d71
< 
<   
<   BEGIN
<     NOTIF_OWNER_ID := TO_NUMBER(REGEXP_SUBSTR(DESCR.CONSUMER_NAME, '[0-9]+$')); 
<     SELECT NAME INTO NOTIF_OWNER FROM SYS.USER$ 
<       WHERE USER#=NOTIF_OWNER_ID;
<   IF DO_TRC THEN
<     SYS.DBMS_ISCHED.TRACE_EMAIL('Notification owner: '||
<                                 NOTIF_OWNER);
<   END IF;
<   EXCEPTION WHEN NO_DATA_FOUND THEN
<       SYS.DBMS_ISCHED.TRACE_EMAIL(
<         'No data found: notif_owner_id: ' || NOTIF_OWNER_ID);
<     WHEN OTHERS THEN RAISE;
<   END;
< 
<   
<   SELECT DECODE(SIGN(COUNT(UNIQUE UP)),1, 'Y', 'N') 
<     INTO HAS_SYS_PRVLG
<   FROM (
<     SELECT GRANTED_ROLE UP
<     FROM (
<       SELECT NULL GRANTEE,  USERNAME GRANTED_ROLE
<       FROM SYS.DBA_USERS
<       WHERE USERNAME = NOTIF_OWNER
<       UNION
<       SELECT GRANTEE, GRANTED_ROLE
<       FROM SYS.DBA_ROLE_PRIVS
<       UNION
<       SELECT GRANTEE, PRIVILEGE
<       FROM SYS.DBA_SYS_PRIVS
<     )
<     START WITH GRANTEE IS NULL
<     CONNECT BY GRANTEE = PRIOR GRANTED_ROLE
<   )
<   WHERE UP IN ('CREATE ANY JOB', 
<                'MANAGE SCHEDULER', 
<                'SCHEDULER_ADMIN');
< 
<   IF DO_TRC THEN
<     SYS.DBMS_ISCHED.TRACE_EMAIL('has_sys_prvlg: '||
<                                 HAS_SYS_PRVLG);
<   END IF;
124,125d77
<   
<   
127,129c79,81
<   IF NOTIF_OWNER   != MESSAGE.OBJECT_OWNER  AND
<      NOTIF_OWNER   != 'SYS' AND
<      HAS_SYS_PRVLG != 'Y' 
---
>   IF CURRENT_USER != MESSAGE.OBJECT_OWNER  AND
>      CURRENT_USER != 'SYS' AND
>      BITAND(SYS_PRIVS,2) = 0 
131,133c83,86
<       
<       SYS.DBMS_ISCHED_UTL.CHECK_OBJECT_PRIVS(MESSAGE.OBJECT_NAME , MESSAGE.OBJECT_OWNER, 
<         'JOB', NOTIF_OWNER, 'ALTER', TRUE, 0);
---
>     
>     SYS.DBMS_ISCHED_UTL.CHECK_OBJECT_PRIVS(MESSAGE.OBJECT_NAME,
>         MESSAGE.OBJECT_OWNER, 'JOB', CURRENT_USER,
>         'ALTER', TRUE, SYS_PRIVS);
145,146d97
<   
<   
149c100
<     NOTIF_OWNER, EVT_FLAG, SENDER_ARR, BODY_ARR, 
---
>     CURRENT_USER, EVT_FLAG, SENDER_ARR, BODY_ARR, 
353a305,308
> 
>   IF DO_TRC THEN
>     SYS.DBMS_ISCHED.TRACE_EMAIL('Exiting job event handler.');
>   END IF;

Useful Links:

Have you enjoyed? Please leave a comment or give a 👍!

Deixe um comentário

Seu e-mail não será publicado.