Oracle October 2020 Critical Patch Advisory - PL/SQL detailed changes

This post is also available in: Português

Oracle October 2020 Critical Patch Advisory changed objects performed by each database patch.

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

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

Changed Objects

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

11.2.0.4

SYS.DBMS_PDB - PACKAGE BODY (BP):
272c272,274
<            ROWNUM-1  as tbspNum,        -- + tsn_kpdbts
---
>            ROWNUM-1  as newTbspNum,        -- + tsn_kpdbts
>            -- bug 31506720: but to fetch datafile info, we need to use real ts#
>            ts# as tbspNum,
1045c1047
<       appendDataNode(doc, tbsNode, 'tsn', tablespaces(ts).tbspInfo.tbspNum);
---
>       appendDataNode(doc, tbsNode, 'tsn', tablespaces(ts).tbspInfo.newTbspNum);

12.1.0.2

DVSYS.DBMS_MACADM - PACKAGE BODY (PSU):
27c27
<     V_XSL_XMLTYPE   XMLTYPE;
---
>     V_XSL_XMLTYPE   SYS.XMLTYPE;
37c37
<                        P_XSL         IN XMLTYPE) IS
---
>                        P_XSL         IN SYS.XMLTYPE) IS
42,43c42,43
<       V_DLF_XMLTYPE XMLTYPE;
<       V_CONTEXT     DBMS_XMLSTORE.CTXTYPE;
---
>       V_DLF_XMLTYPE SYS.XMLTYPE;
>       V_CONTEXT     SYS.DBMS_XMLSTORE.CTXTYPE;
59c59
<       V_DLF_XMLTYPE := XMLTYPE.CREATEXML(XMLDATA=>V_DLF_BLOB, CSID=>NULL, SCHEMA=>NULL);
---
>       V_DLF_XMLTYPE := SYS.XMLTYPE.CREATEXML(XMLDATA=>V_DLF_BLOB, CSID=>NULL, SCHEMA=>NULL);
61,63c61,63
<       V_CONTEXT := DBMS_XMLSTORE.NEWCONTEXT(P_TABLE_OWNER||'.'||V_TABLE_NAME);
<       DBMS_XMLSTORE.SETROWTAG(V_CONTEXT, 'ROW');
<       V_ROWS := DBMS_XMLSTORE.INSERTXML(V_CONTEXT,
---
>       V_CONTEXT := SYS.DBMS_XMLSTORE.NEWCONTEXT(P_TABLE_OWNER||'.'||V_TABLE_NAME);
>       SYS.DBMS_XMLSTORE.SETROWTAG(V_CONTEXT, 'ROW');
>       V_ROWS := SYS.DBMS_XMLSTORE.INSERTXML(V_CONTEXT,
65c65
<       DBMS_XMLSTORE.CLOSECONTEXT(V_CONTEXT);
---
>       SYS.DBMS_XMLSTORE.CLOSECONTEXT(V_CONTEXT);
120c120
<       SELECT PLATFORM_ID INTO V_PFID FROM V$DATABASE;
---
>       SELECT PLATFORM_ID INTO V_PFID FROM SYS.V_$DATABASE;
138c138
<     V_XSL_XMLTYPE := XMLTYPE.CREATEXML(XMLDATA=>V_XSL_BLOB, CSID=>NULL, SCHEMA=>NULL);
---
>     V_XSL_XMLTYPE := SYS.XMLTYPE.CREATEXML(XMLDATA=>V_XSL_BLOB, CSID=>NULL, SCHEMA=>NULL);
1994,1995d1993
<
<
2299c2297
<     ADD_RULE_TO_RULE_SET ( RULE_SET_NAME,RULE_NAME,RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
---
>     ADD_RULE_TO_RULE_SET (RULE_SET_NAME,RULE_NAME,RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
DVSYS.DBMS_MACADM - PACKAGE BODY (BP):
27c27
<     V_XSL_XMLTYPE   XMLTYPE;
---
>     V_XSL_XMLTYPE   SYS.XMLTYPE;
37c37
<                        P_XSL         IN XMLTYPE) IS
---
>                        P_XSL         IN SYS.XMLTYPE) IS
42,43c42,43
<       V_DLF_XMLTYPE XMLTYPE;
<       V_CONTEXT     DBMS_XMLSTORE.CTXTYPE;
---
>       V_DLF_XMLTYPE SYS.XMLTYPE;
>       V_CONTEXT     SYS.DBMS_XMLSTORE.CTXTYPE;
59c59
<       V_DLF_XMLTYPE := XMLTYPE.CREATEXML(XMLDATA=>V_DLF_BLOB, CSID=>NULL, SCHEMA=>NULL);
---
>       V_DLF_XMLTYPE := SYS.XMLTYPE.CREATEXML(XMLDATA=>V_DLF_BLOB, CSID=>NULL, SCHEMA=>NULL);
61,63c61,63
<       V_CONTEXT := DBMS_XMLSTORE.NEWCONTEXT(P_TABLE_OWNER||'.'||V_TABLE_NAME);
<       DBMS_XMLSTORE.SETROWTAG(V_CONTEXT, 'ROW');
<       V_ROWS := DBMS_XMLSTORE.INSERTXML(V_CONTEXT,
---
>       V_CONTEXT := SYS.DBMS_XMLSTORE.NEWCONTEXT(P_TABLE_OWNER||'.'||V_TABLE_NAME);
>       SYS.DBMS_XMLSTORE.SETROWTAG(V_CONTEXT, 'ROW');
>       V_ROWS := SYS.DBMS_XMLSTORE.INSERTXML(V_CONTEXT,
65c65
<       DBMS_XMLSTORE.CLOSECONTEXT(V_CONTEXT);
---
>       SYS.DBMS_XMLSTORE.CLOSECONTEXT(V_CONTEXT);
120c120
<       SELECT PLATFORM_ID INTO V_PFID FROM V$DATABASE;
---
>       SELECT PLATFORM_ID INTO V_PFID FROM SYS.V_$DATABASE;
138c138
<     V_XSL_XMLTYPE := XMLTYPE.CREATEXML(XMLDATA=>V_XSL_BLOB, CSID=>NULL, SCHEMA=>NULL);
---
>     V_XSL_XMLTYPE := SYS.XMLTYPE.CREATEXML(XMLDATA=>V_XSL_BLOB, CSID=>NULL, SCHEMA=>NULL);
1994,1995d1993
<
<
2299,2300c2297,2298
<     ADD_RULE_TO_RULE_SET ( RULE_SET_NAME,RULE_NAME,RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
<   END;
---
>     ADD_RULE_TO_RULE_SET (RULE_SET_NAME,RULE_NAME,RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
>     END;
DVSYS.DBMS_MACOLS - PACKAGE BODY (PSU):
85c85
<                           LABEL_IND = DBMS_MACUTL.G_YES)
---
>                           LABEL_IND = DVSYS.DBMS_MACUTL.G_YES)
107,109c107,109
<         L_LABEL := NUMERIC_LABEL_TO_CHAR
<             (SA_UTL.MERGE_LABEL
<                 (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => L_POLICY,
---
>         L_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>             (LBACSYS.SA_UTL.MERGE_LABEL
>                 (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => L_POLICY,
111c111
<                  LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => L_POLICY,
---
>                  LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => L_POLICY,
238c238
<       L_SESSION_LABEL := SA_SESSION.LABEL(POLICY_NAME => POLICY.POL_NAME);
---
>       L_SESSION_LABEL := LBACSYS.SA_SESSION.LABEL(POLICY_NAME => POLICY.POL_NAME);
275,277c275,277
<           L_MAC_LABEL := NUMERIC_LABEL_TO_CHAR
<                       (SA_UTL.MERGE_LABEL
<                            (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>           L_MAC_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                       (LBACSYS.SA_UTL.MERGE_LABEL
>                            (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
279c279
<                             LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                             LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
290c290
<         SA_UTL.DOMINATES(LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>         LBACSYS.SA_UTL.DOMINATES(LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
292c292
<                          LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                          LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
296,298c296,298
<         L_SESSION_LABEL := NUMERIC_LABEL_TO_CHAR
<                     (SA_UTL.MERGE_LABEL
<                          (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>         L_SESSION_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                     (LBACSYS.SA_UTL.MERGE_LABEL
>                          (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
300c300
<                           LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                           LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
391c391
<       DBMS_SESSION.SET_CONTEXT(NAMESPACE => DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
---
>       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
DVSYS.DBMS_MACOLS - PACKAGE BODY (BP):
85c85
<                           LABEL_IND = DBMS_MACUTL.G_YES)
---
>                           LABEL_IND = DVSYS.DBMS_MACUTL.G_YES)
107,109c107,109
<         L_LABEL := NUMERIC_LABEL_TO_CHAR
<             (SA_UTL.MERGE_LABEL
<                 (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => L_POLICY,
---
>         L_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>             (LBACSYS.SA_UTL.MERGE_LABEL
>                 (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => L_POLICY,
111c111
<                  LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => L_POLICY,
---
>                  LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => L_POLICY,
238c238
<       L_SESSION_LABEL := SA_SESSION.LABEL(POLICY_NAME => POLICY.POL_NAME);
---
>       L_SESSION_LABEL := LBACSYS.SA_SESSION.LABEL(POLICY_NAME => POLICY.POL_NAME);
275,277c275,277
<           L_MAC_LABEL := NUMERIC_LABEL_TO_CHAR
<                       (SA_UTL.MERGE_LABEL
<                            (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>           L_MAC_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                       (LBACSYS.SA_UTL.MERGE_LABEL
>                            (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
279c279
<                             LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                             LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
290c290
<         SA_UTL.DOMINATES(LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>         LBACSYS.SA_UTL.DOMINATES(LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
292c292
<                          LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                          LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
296,298c296,298
<         L_SESSION_LABEL := NUMERIC_LABEL_TO_CHAR
<                     (SA_UTL.MERGE_LABEL
<                          (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>         L_SESSION_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                     (LBACSYS.SA_UTL.MERGE_LABEL
>                          (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
300c300
<                           LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                           LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
DVSYS.DBMS_MACSEC - PACKAGE BODY (BP):
315,317c315,317
<     L_NAMESPACE SESSION_CONTEXT.NAMESPACE%TYPE;
<     L_ATTRIBUTE SESSION_CONTEXT.ATTRIBUTE%TYPE;
<     L_VALUE     SESSION_CONTEXT.VALUE%TYPE;
---
>     L_NAMESPACE SYS.SESSION_CONTEXT.NAMESPACE%TYPE;
>     L_ATTRIBUTE SYS.SESSION_CONTEXT.ATTRIBUTE%TYPE;
>     L_VALUE     SYS.SESSION_CONTEXT.VALUE%TYPE;
319c319
<     L_NAME FACTOR$.NAME%TYPE;
---
>     L_NAME DVSYS.FACTOR$.NAME%TYPE;
323c323
<     L_FACTOR_NAME FACTOR$.NAME%TYPE;
---
>     L_FACTOR_NAME DVSYS.FACTOR$.NAME%TYPE;
DVSYS.DBMS_MACSEC - PACKAGE BODY (PSU):
315,317c315,317
<     L_NAMESPACE SESSION_CONTEXT.NAMESPACE%TYPE;
<     L_ATTRIBUTE SESSION_CONTEXT.ATTRIBUTE%TYPE;
<     L_VALUE     SESSION_CONTEXT.VALUE%TYPE;
---
>     L_NAMESPACE SYS.SESSION_CONTEXT.NAMESPACE%TYPE;
>     L_ATTRIBUTE SYS.SESSION_CONTEXT.ATTRIBUTE%TYPE;
>     L_VALUE     SYS.SESSION_CONTEXT.VALUE%TYPE;
319c319
<     L_NAME FACTOR$.NAME%TYPE;
---
>     L_NAME DVSYS.FACTOR$.NAME%TYPE;
323c323
<     L_FACTOR_NAME FACTOR$.NAME%TYPE;
---
>     L_FACTOR_NAME DVSYS.FACTOR$.NAME%TYPE;
DVSYS.DBMS_MACSEC_ROLES - PACKAGE BODY (BP):
67c67
<     DBMS_SESSION.SET_ROLE(L_TO_BE_SET);
---
>     SYS.DBMS_SESSION.SET_ROLE(L_TO_BE_SET);
DVSYS.DBMS_MACUTL - PACKAGE BODY (PSU):
217c217
<         FROM V$OPTION
---
>         FROM SYS.V_$OPTION
551,552c551,552
<     DOMAIN     IN ROLE_ARRAY DEFAULT NULL,
<     DOMAIN_STR IN ROLENAME_ARRAY DEFAULT NULL)
---
>     DOMAIN     IN SYS.ROLE_ARRAY DEFAULT NULL,
>     DOMAIN_STR IN SYS.ROLENAME_ARRAY DEFAULT NULL)
616d615
<
904,905c903,904
<       C IN (SELECT ATTRIBUTE, VALUE FROM SESSION_CONTEXT
<              WHERE NAMESPACE = DBMS_MACUTL.G_CONTEXT_FACTOR)
---
>       C IN (SELECT ATTRIBUTE, VALUE FROM SYS.SESSION_CONTEXT
>              WHERE NAMESPACE = DVSYS.DBMS_MACUTL.G_CONTEXT_FACTOR)
988c987
<     FROM V$OPTION
---
>     FROM SYS.V_$OPTION
DVSYS.DBMS_MACUTL - PACKAGE BODY (BP):
217c217
<         FROM V$OPTION
---
>         FROM SYS.V_$OPTION
551,552c551,552
<     DOMAIN     IN ROLE_ARRAY DEFAULT NULL,
<     DOMAIN_STR IN ROLENAME_ARRAY DEFAULT NULL)
---
>     DOMAIN     IN SYS.ROLE_ARRAY DEFAULT NULL,
>     DOMAIN_STR IN SYS.ROLENAME_ARRAY DEFAULT NULL)
905c905
<              WHERE NAMESPACE = DBMS_MACUTL.G_CONTEXT_FACTOR)
---
>              WHERE NAMESPACE = DVSYS.DBMS_MACUTL.G_CONTEXT_FACTOR)
988c988
<     FROM V$OPTION
---
>     FROM SYS.V_$OPTION
DVSYS.FACTOR_TYPE$_PRIV - PACKAGE BODY (PSU):
85c85
<        DBMS_MACADM.GET_ORA_LANG LANG FROM DUAL) B
---
>        DBMS_MACADM.GET_ORA_LANG LANG FROM SYS.DUAL) B
SYS.DBMS_RCVMAN - PACKAGE (BP):
3503a3504,3505
> PROCEDURE setSkipOfflineRangeAboveSCN(maxCheckpointSCN IN NUMBER);
>
SYS.DBMS_RCVMAN - PACKAGE (PSU):
3494a3495,3496
> PROCEDURE setSkipOfflineRangeAboveSCN(maxCheckpointSCN IN NUMBER);
>
SYS.DBMS_RCVMAN - PACKAGE BODY (BP):
187a188,200
>
>
>
>
>
>
>
>
> SKIPOFFLINERANGEABOVESCN NUMBER := NULL;
>
>
>
>
11457a11471,11476
>            END IF;
>
>            IF (ACTION.TYPE_CON = OFFLINERANGEREC_CON_T AND
>                     (FROMSCN > SKIPOFFLINERANGEABOVESCN OR
>                      TOSCN > SKIPOFFLINERANGEABOVESCN)) THEN
>                RETURN ACTION_SKIP;
29364a29384,29392
>
>
> PROCEDURE SETSKIPOFFLINERANGEABOVESCN(MAXCHECKPOINTSCN IN NUMBER)
> IS
> BEGIN
>    DEB(DEB_ENTER, 'setSkipOfflineRangeAboveSCN');
>    SKIPOFFLINERANGEABOVESCN := MAXCHECKPOINTSCN;
>    DEB(DEB_EXIT);
> END SETSKIPOFFLINERANGEABOVESCN;
SYS.DBMS_RCVMAN - PACKAGE BODY (PSU):
176a177,189
>
>
>
>
>
>
>
>
> SKIPOFFLINERANGEABOVESCN NUMBER := NULL;
>
>
>
>
11408a11422,11427
>            END IF;
>
>            IF (ACTION.TYPE_CON = OFFLINERANGEREC_CON_T AND
>                     (FROMSCN > SKIPOFFLINERANGEABOVESCN OR
>                      TOSCN > SKIPOFFLINERANGEABOVESCN)) THEN
>                RETURN ACTION_SKIP;
29157a29177,29185
>
>
> PROCEDURE SETSKIPOFFLINERANGEABOVESCN(MAXCHECKPOINTSCN IN NUMBER)
> IS
> BEGIN
>    DEB(DEB_ENTER, 'setSkipOfflineRangeAboveSCN');
>    SKIPOFFLINERANGEABOVESCN := MAXCHECKPOINTSCN;
>    DEB(DEB_EXIT);
> END SETSKIPOFFLINERANGEABOVESCN;
SYS.DBMS_SQLPATCH - PACKAGE BODY (BP):
33a34,36
>   USE_ROLLBACK_FILES BOOLEAN := FALSE;
>
>
786,790c789,841
<       IF CURRENT_PATCH.ACTION = 'APPLY' THEN
<         RETURN OH_SQL_FILE;
<       ELSE
<         RETURN ROLLBACK_SQL_FILE;
<       END IF;
---
>       IF CURRENT_PATCH_DESCRIPTOR IS NULL THEN
>
>         IF CURRENT_PATCH.ACTION = 'APPLY' THEN
>           DEBUG_PUT_LINE('  NO descriptor available; action APPLY, pick from OH');
>           RETURN OH_SQL_FILE;
>         ELSE
>           DEBUG_PUT_LINE('  NO descriptor available; action ROLLBACK, pick from rollback_files');
>           RETURN ROLLBACK_SQL_FILE;
>         END IF;
>       ELSE
>
>         BEGIN
>           SELECT F_NEW INTO FILE_NEW
>           FROM XMLTABLE(
>             '/sqlPatch/sqlFiles/file'
>             PASSING CURRENT_PATCH_DESCRIPTOR
>             COLUMNS F_NAME VARCHAR2(256) PATH 'normalize-space(.)',
>                     F_ACTION VARCHAR2(20) PATH '@mode',
>                     F_NEW VARCHAR2(3) PATH '@new')
>           WHERE F_NAME = SQL_FILE
>             AND UPPER(F_ACTION) LIKE '%' || CURRENT_PATCH.ACTION || '%';
>         EXCEPTION
>           WHEN NO_DATA_FOUND THEN
>
>
>             RAISE_APPLICATION_ERROR(-20000, 'File ' || SQL_FILE ||
>               ' does not exist in descriptor ');
>         END;
>
>           DEBUG_PUT_LINE('file new? : ' || FILE_NEW);
>
>         IF CURRENT_PATCH.ACTION = 'APPLY' THEN
>           DEBUG_PUT_LINE('  descriptor available; action APPLY, pick from OH');
>           RETURN OH_SQL_FILE;
>         ELSE
>           IF FILE_NEW = 'yes' THEN
>
>             DEBUG_PUT_LINE('  descriptor available; action ROLLBACK, new file, pick from rollback_files');
>             RETURN ROLLBACK_SQL_FILE;
>           ELSE
>             IF USE_ROLLBACK_FILES THEN
>
>               DEBUG_PUT_LINE('  descriptor available; action ROLLBACK, existing file, use_rollback_files is true; pick from rollback_files');
>               RETURN ROLLBACK_SQL_FILE;
>             ELSE
>
>               DEBUG_PUT_LINE('  descriptor available; action ROLLBACK, existing file, pick from OH');
>               RETURN OH_SQL_FILE;
>             END IF;
>           END IF;
>         END IF;
>       END IF;
>
1043c1094,1095
<                                P_DEBUG IN BOOLEAN := FALSE) IS
---
>                                P_DEBUG IN BOOLEAN := FALSE,
>                                P_USE_ROLLBACK_FILES IN BOOLEAN := FALSE) IS
1048a1101
>     USE_ROLLBACK_FILES := P_USE_ROLLBACK_FILES;
SYS.DBMS_STATS - PACKAGE BODY (BP):
33725a33726,33727
>
>         STSFLAGS := 0;
34752c34754
<         (PREPARESTATJOBS OR SEQSTATJOBS) AND
---
>         (PREPARESTATJOBS OR SEQSTATJOBS OR EXECUTESTATJOBS) AND
34760a34763,34770
>
>
>
>
>
>
>
>

12.2.0.1

CTXSYS.DRVDML - PACKAGE (RU):
113c113,115
<   p_rids   in varchar2
---
>   p_rids   in varchar2,
>   p_utab   in varchar2,
>   p_pname  in varchar2
CTXSYS.DRVDML - PACKAGE BODY (RU):
352c352,354
<   P_RIDS   IN VARCHAR2
---
>   P_RIDS   IN VARCHAR2,
>   P_UTAB   IN VARCHAR2,
>   P_PNAME  IN VARCHAR2
366a369,385
>
>   IF P_UTAB IS NOT NULL THEN
>     IF P_PNAME IS NOT NULL THEN
>       FORALL I IN 1..RIDCOUNT
>         EXECUTE IMMEDIATE
>           'delete from '||DBMS_ASSERT.QUALIFIED_SQL_NAME(P_UTAB)||
>           ' partition ('||DBMS_ASSERT.SIMPLE_SQL_NAME(P_PNAME)||')'||
>           ' where rid = :1'
>         USING RIDS(I);
>     ELSE
>       FORALL I IN 1..RIDCOUNT
>         EXECUTE IMMEDIATE
>           'delete from '||DBMS_ASSERT.QUALIFIED_SQL_NAME(P_UTAB)||
>           ' where rid = :1'
>         USING RIDS(I);
>     END IF;
>   END IF;
385a405,410
>   FOUND   BOOLEAN := TRUE;
>   IDX     DR_DEF.IDX_REC;
>   IXP     DR_DEF.IXP_REC;
>   UTAB    DRVUTL.DR_QLID2 := NULL;
>   PNAME   DRVUTL.DR_QLID := NULL;
>   L_IXPID NUMBER := P_IXPID;
391a417,433
>   IF DRIXMD.CHKINDEXOPTION(P_IDXID, 'u') = 1 THEN
>     IDX := DRIXMD.GETINDEXRECBYID(P_IDXID);
>     IF (P_IXPID != 0) THEN
>       IXP := DRIXMD.GETPARTITIONRECBYID(P_IXPID, P_IDXID);
>     END IF;
>
>     IF (P_IXPID != 0 AND IDX.IDX_TYPE = DRIXMD.IDX_TYPE_CONTEXT2) THEN
>       L_IXPID := NULL;
>       PNAME := DBMS_ASSERT.SIMPLE_SQL_NAME(IXP.IXP_NAME);
>     END IF;
>
>     UTAB := DBMS_ASSERT.QUALIFIED_SQL_NAME(
>               DRVXTAB.GET_OBJECT_NAME(IDX.IDX_OWNER, IDX.IDX_NAME,
>                                       IDX.IDX_ID, L_IXPID, 'U'));
>   END IF;
>
>
411a454
>       FOUND := TRUE;
414,415c457
<         DRIDML.DELETEPENDING(P_IDXID, P_IXPID, C1.PND_ROWID);
<         COMMIT;
---
>         FOUND := FALSE;
419,420c461
<         DRIDML.DELETEPENDING(P_IDXID, P_IXPID, C1.PND_ROWID);
<         COMMIT;
---
>         FOUND := FALSE;
424,425c465
<           DRIDML.DELETEPENDING(P_IDXID, P_IXPID, C1.PND_ROWID);
<           COMMIT;
---
>           FOUND := FALSE;
430a471,489
>
>
>     IF NOT FOUND THEN
>       DRIDML.DELETEPENDING(P_IDXID, P_IXPID, C1.PND_ROWID);
>
>       IF UTAB IS NOT NULL THEN
>         IF PNAME IS NOT NULL THEN
>           EXECUTE IMMEDIATE
>             'delete from '||UTAB||' partition ('||PNAME||') where rid = :1'
>           USING C1.PND_ROWID;
>         ELSE
>           EXECUTE IMMEDIATE
>             'delete from '||UTAB||' where rid = :1'
>           USING C1.PND_ROWID;
>         END IF;
>       END IF;
>
>       COMMIT;
>     END IF;
DVSYS.DVLANG - FUNCTION (APR2020RUR):
25c25
<   sys.dbms_sql.parse( l_cursor, l_stmt, dbms_sql.native );
---
>   sys.dbms_sql.parse( l_cursor, l_stmt, sys.dbms_sql.native );
DVSYS.DBMS_MACADM - PACKAGE BODY (JUL2020RUR):
1031,1032c1031,1032
<     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, NULL, DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
<                       DBMS_MACUTL.G_SCOPE_LOCAL);
---
>     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, NULL, DVSYS.DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
>                       DVSYS.DBMS_MACUTL.G_SCOPE_LOCAL);
1041c1041
<                       DBMS_MACUTL.G_SCOPE_LOCAL);
---
>                       DVSYS.DBMS_MACUTL.G_SCOPE_LOCAL);
1049,1050c1049,1050
<     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, RULE_SET_NAME, DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
<                       DBMS_MACUTL.G_SCOPE_LOCAL);
---
>     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, RULE_SET_NAME, DVSYS.DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
>                       DVSYS.DBMS_MACUTL.G_SCOPE_LOCAL);
1365c1365
<     ADD_RULE_TO_RULE_SET (RULE_SET_NAME,RULE_NAME,RULE_ORDER,DBMS_MACUTL.G_YES);
---
>     ADD_RULE_TO_RULE_SET (RULE_SET_NAME,RULE_NAME,RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
1394c1394
<     ADD_RULE_TO_RULE_SET ( RULE_SET_NAME,RULE_NAME,L_RULE_ORDER,DBMS_MACUTL.G_YES);
---
>     ADD_RULE_TO_RULE_SET ( RULE_SET_NAME,RULE_NAME,L_RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
DVSYS.DBMS_MACADM - PACKAGE BODY (APR2020RUR):
1031,1032c1031,1032
<     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, NULL, DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
<                       DBMS_MACUTL.G_SCOPE_LOCAL);
---
>     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, NULL, DVSYS.DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
>                       DVSYS.DBMS_MACUTL.G_SCOPE_LOCAL);
1041c1041
<                       DBMS_MACUTL.G_SCOPE_LOCAL);
---
>                       DVSYS.DBMS_MACUTL.G_SCOPE_LOCAL);
1049,1050c1049,1050
<     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, RULE_SET_NAME, DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
<                       DBMS_MACUTL.G_SCOPE_LOCAL);
---
>     ADD_AUTH_TO_REALM(REALM_NAME, GRANTEE, RULE_SET_NAME, DVSYS.DBMS_MACUTL.G_REALM_AUTH_PARTICIPANT,
>                       DVSYS.DBMS_MACUTL.G_SCOPE_LOCAL);
1365c1365
<     ADD_RULE_TO_RULE_SET (RULE_SET_NAME,RULE_NAME,RULE_ORDER,DBMS_MACUTL.G_YES);
---
>     ADD_RULE_TO_RULE_SET (RULE_SET_NAME,RULE_NAME,RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
1394c1394
<     ADD_RULE_TO_RULE_SET ( RULE_SET_NAME,RULE_NAME,L_RULE_ORDER,DBMS_MACUTL.G_YES);
---
>     ADD_RULE_TO_RULE_SET ( RULE_SET_NAME,RULE_NAME,L_RULE_ORDER,DVSYS.DBMS_MACUTL.G_YES);
DVSYS.DBMS_MACOLS - PACKAGE BODY (APR2020RUR):
85c85
<                           LABEL_IND = DBMS_MACUTL.G_YES)
---
>                           LABEL_IND = DVSYS.DBMS_MACUTL.G_YES)
107,109c107,109
<         L_LABEL := NUMERIC_LABEL_TO_CHAR
<             (SA_UTL.MERGE_LABEL
<                 (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => L_POLICY,
---
>         L_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>             (LBACSYS.SA_UTL.MERGE_LABEL
>                 (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => L_POLICY,
111c111
<                  LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => L_POLICY,
---
>                  LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => L_POLICY,
238c238
<       L_SESSION_LABEL := SA_SESSION.LABEL(POLICY_NAME => POLICY.POL_NAME);
---
>       L_SESSION_LABEL := LBACSYS.SA_SESSION.LABEL(POLICY_NAME => POLICY.POL_NAME);
275,277c275,277
<           L_MAC_LABEL := NUMERIC_LABEL_TO_CHAR
<                       (SA_UTL.MERGE_LABEL
<                            (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>           L_MAC_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                       (LBACSYS.SA_UTL.MERGE_LABEL
>                            (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
279c279
<                             LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                             LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
290c290
<         SA_UTL.DOMINATES(LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>         LBACSYS.SA_UTL.DOMINATES(LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
292c292
<                          LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                          LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
296,298c296,298
<         L_SESSION_LABEL := NUMERIC_LABEL_TO_CHAR
<                     (SA_UTL.MERGE_LABEL
<                          (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>         L_SESSION_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                     (LBACSYS.SA_UTL.MERGE_LABEL
>                          (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
300c300
<                           LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                           LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
312c312
<       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
---
>       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DVSYS.DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
314c314
<                                ATTRIBUTE => DBMS_MACUTL.G_USER_POLICY_LABEL,
---
>                                ATTRIBUTE => DVSYS.DBMS_MACUTL.G_USER_POLICY_LABEL,
318c318
<       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
---
>       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DVSYS.DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
320c320
<                                ATTRIBUTE => DBMS_MACUTL.G_MIN_POLICY_LABEL,
---
>                                ATTRIBUTE => DVSYS.DBMS_MACUTL.G_MIN_POLICY_LABEL,
323c323
<       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
---
>       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DVSYS.DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
325c325
<                                ATTRIBUTE => DBMS_MACUTL.G_MAX_SESSION_LABEL,
---
>                                ATTRIBUTE => DVSYS.DBMS_MACUTL.G_MAX_SESSION_LABEL,
329c329
<       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
---
>       SYS.DBMS_SESSION.SET_CONTEXT(NAMESPACE => DVSYS.DBMS_MACUTL.G_CONTEXT_SESSION_LABEL ||
331c331
<                                ATTRIBUTE => DBMS_MACUTL.G_OLS_SESSION_LABEL,
---
>                                ATTRIBUTE => DVSYS.DBMS_MACUTL.G_OLS_SESSION_LABEL,
DVSYS.DBMS_MACOLS_SESSION - PACKAGE BODY (APR2020RUR):
65c65
<         L_POLICY_LABEL  := CHAR_TO_LABEL(POLICY_NAME,LABEL);
---
>         L_POLICY_LABEL  := LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME,LABEL);
81c81
<             L_RESULT := DOMINATES(LABEL1=>CHAR_TO_LABEL(POLICY_NAME,L_MAX_SESSION_LABEL),
---
>             L_RESULT := LBACSYS.NUMERIC_DOMINATES(LABEL1=>LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME,L_MAX_SESSION_LABEL),
136c136
<                               DBMS_MACUTL.G_MAX_SESSION_LABEL || '=' ||
---
>                               DVSYS.DBMS_MACUTL.G_MAX_SESSION_LABEL || '=' ||
183c183
<                 SA_UTL.DOMINATES(LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                 LBACSYS.SA_UTL.DOMINATES(LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
185c185
<                                 LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                                 LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
189,191c189,191
<                 X_SESSION_LABEL := NUMERIC_LABEL_TO_CHAR
<                   (SA_UTL.MERGE_LABEL
<                       (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                 X_SESSION_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                   (LBACSYS.SA_UTL.MERGE_LABEL
>                       (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
193c193
<                       LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY.POL_NAME,
---
>                       LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY.POL_NAME,
224c224
<         L_SESSION_LABEL := SA_SESSION.LABEL(POLICY_NAME);
---
>         L_SESSION_LABEL := LBACSYS.SA_SESSION.LABEL(POLICY_NAME);
234,235c234,235
<            (STRICTLY_DOMINATES(LABEL1=>CHAR_TO_LABEL(POLICY_NAME,L_SESSION_LABEL),
<                 LABEL2=>CHAR_TO_LABEL(POLICY_NAME,P_MAX_SESSION_LABEL)) = 1) THEN
---
>            (LBACSYS.NUMERIC_STRICTLY_DOMINATES(LABEL1=>LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME,L_SESSION_LABEL),
>                 LABEL2=>LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME,P_MAX_SESSION_LABEL)) = 1) THEN
243,245c243,245
<                 X_NEW_SESSION_LABEL := NUMERIC_LABEL_TO_CHAR
<                             (SA_UTL.MERGE_LABEL
<                                 (LABEL1 => CHAR_TO_LABEL(POLICY_NAME  => POLICY_NAME,
---
>                 X_NEW_SESSION_LABEL := LBACSYS.NUMERIC_LABEL_TO_CHAR
>                             (LBACSYS.SA_UTL.MERGE_LABEL
>                                 (LABEL1 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY_NAME,
247c247
<                                 LABEL2 => CHAR_TO_LABEL(POLICY_NAME  => POLICY_NAME,
---
>                                 LABEL2 => LBACSYS.TO_NUMERIC_LABEL(POLICY_NAME  => POLICY_NAME,
DVSYS.DBMS_MACSEC - PACKAGE BODY (APR2020RUR):
296c296
<       (NVL(L_RULE_SET.FAIL_OPTIONS, DBMS_MACUTL.G_RULESET_FAIL_SHOW) =
---
>       (NVL(L_RULE_SET.FAIL_OPTIONS, DVSYS.DBMS_MACUTL.G_RULESET_FAIL_SHOW) =
315,317c315,317
<     L_NAMESPACE SESSION_CONTEXT.NAMESPACE%TYPE;
<     L_ATTRIBUTE SESSION_CONTEXT.ATTRIBUTE%TYPE;
<     L_VALUE     SESSION_CONTEXT.VALUE%TYPE;
---
>     L_NAMESPACE SYS.SESSION_CONTEXT.NAMESPACE%TYPE;
>     L_ATTRIBUTE SYS.SESSION_CONTEXT.ATTRIBUTE%TYPE;
>     L_VALUE     SYS.SESSION_CONTEXT.VALUE%TYPE;
319c319
<     L_NAME FACTOR$.NAME%TYPE;
---
>     L_NAME DVSYS.FACTOR$.NAME%TYPE;
323c323
<     L_FACTOR_NAME FACTOR$.NAME%TYPE;
---
>     L_FACTOR_NAME DVSYS.FACTOR$.NAME%TYPE;
DVSYS.DBMS_MACSEC_RULES - PACKAGE BODY (APR2020RUR):
50c50
<         L_SQL_COUNT := ORA_SQL_TXT(L_SQL_LIST);
---
>         L_SQL_COUNT := SYS.SQL_TXT(L_SQL_LIST);
56,62c56,62
<       DVSYS.EVENT.SET(P_SYSEVENT => ORA_SYSEVENT,
<                       P_LOGIN_USER => ORA_LOGIN_USER,
<                       P_INSTANCE_NUM => ORA_INSTANCE_NUM,
<                       P_DATABASE_NAME => ORA_DATABASE_NAME,
<                       P_DICT_OBJ_TYPE => ORA_DICT_OBJ_TYPE,
<                       P_DICT_OBJ_OWNER => ORA_DICT_OBJ_OWNER,
<                       P_DICT_OBJ_NAME => ORA_DICT_OBJ_NAME,
---
>       DVSYS.EVENT.SET(P_SYSEVENT => SYS.SYSEVENT,
>                       P_LOGIN_USER => SYS.LOGIN_USER,
>                       P_INSTANCE_NUM => SYS.INSTANCE_NUM,
>                       P_DATABASE_NAME => SYS.DATABASE_NAME,
>                       P_DICT_OBJ_TYPE => SYS.DICTIONARY_OBJ_TYPE,
>                       P_DICT_OBJ_OWNER => SYS.DICTIONARY_OBJ_OWNER,
>                       P_DICT_OBJ_NAME => SYS.DICTIONARY_OBJ_NAME,
107c107
<         OUT.PL(' Command=' || ORA_SYSEVENT ||  ' RuleSet_ID=' || P_RSET_ID#
---
>         OUT.PL(' Command=' || SYS.SYSEVENT ||  ' RuleSet_ID=' || P_RSET_ID#
109,111c109,111
<         OUT.PL(' Current_User=' || ORA_LOGIN_USER);
<         OUT.PL(' Object_Owner=' || ORA_DICT_OBJ_OWNER ||  ' Object_Name=' ||
<                 ORA_DICT_OBJ_NAME || ' Object_Type=' || ORA_DICT_OBJ_TYPE);
---
>         OUT.PL(' Current_User=' || SYS.LOGIN_USER);
>         OUT.PL(' Object_Owner=' || SYS.DICTIONARY_OBJ_OWNER ||  ' Object_Name=' ||
>                 SYS.DICTIONARY_OBJ_NAME || ' Object_Type=' || SYS.DICTIONARY_OBJ_TYPE);
DVSYS.DBMS_MACUTL - PACKAGE BODY (APR2020RUR):
217c217
<         FROM V$OPTION
---
>         FROM SYS.V_$OPTION
551,552c551,552
<     DOMAIN     IN ROLE_ARRAY DEFAULT NULL,
<     DOMAIN_STR IN ROLENAME_ARRAY DEFAULT NULL)
---
>     DOMAIN     IN SYS.ROLE_ARRAY DEFAULT NULL,
>     DOMAIN_STR IN SYS.ROLENAME_ARRAY DEFAULT NULL)
626c626
<      L_OK := DBMS_MACUTL.ALTER_SYSTEM_DUMP_ALLOWED;
---
>      L_OK := DVSYS.DBMS_MACUTL.ALTER_SYSTEM_DUMP_ALLOWED;
970,971c970,971
<       C IN (SELECT ATTRIBUTE, VALUE FROM SESSION_CONTEXT
<              WHERE NAMESPACE = DBMS_MACUTL.G_CONTEXT_FACTOR)
---
>       C IN (SELECT ATTRIBUTE, VALUE FROM SYS.SESSION_CONTEXT
>              WHERE NAMESPACE = DVSYS.DBMS_MACUTL.G_CONTEXT_FACTOR)
1054c1054
<     FROM V$OPTION
---
>     FROM SYS.V_$OPTION
DVSYS.EVENT - PACKAGE BODY (APR2020RUR):
57,58c57,58
<    dvsys.event.set(ORA_SYSEVENT, ORA_LOGIN_USER, ORA_INSTANCE_NUM, ORA_DATABASE_NAME,
<                    ORA_DICT_OBJ_TYPE, ORA_DICT_OBJ_OWNER, ORA_DICT_OBJ_NAME, '');
---
>    dvsys.event.set(SYS.SYSEVENT, SYS.LOGIN_USER, SYS.INSTANCE_NUM, SYS.DATABASE_NAME,
>                    SYS.DICTIONARY_OBJ_TYPE, SYS.DICTIONARY_OBJ_OWNER, SYS.DICTIONARY_OBJ_NAME, '');
DVSYS.DBA_DV_STATUS - VIEW (APR2020RUR):
6c6
< from v$option
---
> from sys.v_$option
DVSYS.DBA_DV_USER_PRIVS_ALL - VIEW (APR2020RUR):
12c12
<     table_privilege_map tpm
---
>     sys.table_privilege_map tpm
SYS.DBMS_SNAPSHOT_KKXRCA - PACKAGE BODY (RU):
294a295
>     CVAL                  INTEGER;
300a302
>
329,331c331,338
<     INSERT INTO SYS.MVREF$_RUN_STATS(
<               RUN_OWNER_USER#, REFRESH_ID, NUM_MVS_TOTAL,
<               NUM_MVS_CURRENT, ROLLBACK_SEG, ATOMIC_REFRESH,
---
>     SELECT COLLECTION_LEVEL  INTO CVAL
>     FROM SYS.MVREF$_STATS_SYS_DEFAULTS
>     FETCH FIRST ROW ONLY;
>
>     IF ( CVAL <> 0 ) THEN
>       INSERT INTO SYS.MVREF$_RUN_STATS(
>                 RUN_OWNER_USER#, REFRESH_ID, NUM_MVS_TOTAL,
>                 NUM_MVS_CURRENT, ROLLBACK_SEG, ATOMIC_REFRESH,
336,343c343,351
<      VALUES (
<             RUN_OWNER1, REFRESH_ID1, SNAPCNT,
<             SNAPCNT, ROLLBACK_SEG1, ATOMIC_REFRESH2,
<             NULL, NULL, NULL, NULL, NULL,
<             'Y', 0, 0, 0,
<             MV_LIST_BUF, METHOD1, PUSH_DEFERRED_RPC2, OUT_OF_PLACE2, NESTED2,
<             REFRESH_AFTER_ERRORS2, PURGE_OPTION1, PARALLELISM1, HEAP_SIZE1);
<
---
>       VALUES (
>               RUN_OWNER1, REFRESH_ID1, SNAPCNT,
>               SNAPCNT, ROLLBACK_SEG1, ATOMIC_REFRESH2,
>               NULL, NULL, NULL, NULL, NULL,
>               'Y', 0, 0, 0,
>               MV_LIST_BUF, METHOD1, PUSH_DEFERRED_RPC2, OUT_OF_PLACE2, NESTED2,
>               REFRESH_AFTER_ERRORS2, PURGE_OPTION1, PARALLELISM1, HEAP_SIZE1);
>     END IF;
>
SYS.DBMS_SQLPATCH - PACKAGE BODY (RU):
322c322
<     RETURN '$Header: rdbms/src/server/dict/plsicds/prvtsqlpatch.sql /st_rdbms_12.2.0.1.0dbbp/5 2018/12/18 08:17:21 sanagara Exp $';
---
>     RETURN '$Header: rdbms/src/server/dict/plsicds/prvtsqlpatch.sql /st_rdbms_12.2.0.1.0dbbp/6 2020/07/08 07:45:37 apfwkr Exp $';
764,765c764,766
<         SELECT F_COMPONENT
<           INTO FILE_COMPONENT
---
>         BEGIN
>           SELECT F_COMPONENT, F_NEW
>           INTO FILE_COMPONENT, FILE_NEW
768a770,771
>                                 F_ACTION VARCHAR2(20) PATH '@mode',
>                                 F_NEW VARCHAR2(3) PATH '@new',
770c773,781
<           WHERE F_NAME = SQL_FILE;
---
>           WHERE F_NAME = SQL_FILE
>             AND UPPER(F_ACTION) LIKE '%' || CURRENT_PATCH.ACTION || '%';
>         EXCEPTION
>           WHEN NO_DATA_FOUND THEN
>
>
>             RAISE_APPLICATION_ERROR(-20000, 'File ' || SQL_FILE ||
>               ' does not exist in descriptor ' || SQLERRM);
>         END;
778c789,795
<             RETURN ROLLBACK_SQL_FILE;
---
>             IF FILE_NEW = 'yes' THEN
>
>               RETURN ROLLBACK_SQL_FILE;
>             ELSE
>
>               RETURN OH_SQL_FILE;
>             END IF;
SYS.DBMS_STATS - PACKAGE BODY (RU):
35380a35381,35382
>
>         STSFLAGS := 0;
36425,36426c36427,36428
<         (PREPARESTATJOBS OR SEQSTATJOBS) AND
<         NOT DBMS_STATS_INTERNAL.IS_TEMP_TAB(NULL, NULL, TOBJN, TRANS_GTT))
---
>         (PREPARESTATJOBS OR SEQSTATJOBS OR EXECUTESTATJOBS) AND
>         NOT DBMS_STATS_INTERNAL.IS_TEMP_TAB(NULL, NULL, TOBJN, TRANS_GTT))
36433d36434
<
36436c36437,36444
<
---
>
>
>
>
>
>
>
>
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 ' ||

18.0.0.0

SYS.DBMS_BACKUP_RESTORE - PACKAGE (RU):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.11.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.12.00.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.11.00.00', '.');
<   msn  CONSTANT NUMBER := instr('18.11.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.11.00.00', '.', msn + 1);
---
>   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);
29c29
<                            to_number(substr('18.11.00.00', 1, fsn - 1));
---
>                            to_number(substr('18.12.00.00', 1, fsn - 1));
31c31
<                to_number(substr('18.11.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.12.00.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.11.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.12.00.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.11.00.00',  psn + 1));
---
>                              to_number(substr('18.12.00.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (18.10RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.10.01.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.10.02.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.10.01.00', '.');
<   msn  CONSTANT NUMBER := instr('18.10.01.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.10.01.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('18.10.02.00', '.');
>   msn  CONSTANT NUMBER := instr('18.10.02.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('18.10.02.00', '.', msn + 1);
29c29
<                            to_number(substr('18.10.01.00', 1, fsn - 1));
---
>                            to_number(substr('18.10.02.00', 1, fsn - 1));
31c31
<                to_number(substr('18.10.01.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.10.02.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.10.01.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.10.02.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.10.01.00',  psn + 1));
---
>                              to_number(substr('18.10.02.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (18.11RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '18.11.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '18.11.01.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('18.11.00.00', '.');
<   msn  CONSTANT NUMBER := instr('18.11.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('18.11.00.00', '.', msn + 1);
---
>   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);
29c29
<                            to_number(substr('18.11.00.00', 1, fsn - 1));
---
>                            to_number(substr('18.11.01.00', 1, fsn - 1));
31c31
<                to_number(substr('18.11.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('18.11.01.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('18.11.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('18.11.01.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('18.11.00.00',  psn + 1));
---
>                              to_number(substr('18.11.01.00',  psn + 1));
SYS.DBMS_REGISTRY - PACKAGE (RU):
13c13
<                                '18.11.0.0.0';
---
>                                '18.12.0.0.0';
SYS.DBMS_REGISTRY - PACKAGE (18.11RUR):
13c13
<                                '18.11.0.0.0';
---
>                                '18.11.1.0.0';
SYS.DBMS_REGISTRY - PACKAGE (18.10RUR):
13c13
<                                '18.10.1.0.0';
---
>                                '18.10.2.0.0';
SYS.DBMS_RCVMAN - PACKAGE BODY (RU):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.11.00.00';
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.12.00.00';
SYS.DBMS_RCVMAN - PACKAGE BODY (18.10RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.10.01.00';
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.10.02.00';
SYS.DBMS_RCVMAN - PACKAGE BODY (18.11RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '18.11.00.00';
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '18.11.01.00';
SYS.DBMS_SNAPSHOT_KKXRCA - PACKAGE BODY (RU):
297a298
>     CVAL                  INTEGER;
303a305
>
332,334c334,341
<     INSERT INTO SYS.MVREF$_RUN_STATS(
<               RUN_OWNER_USER#, REFRESH_ID, NUM_MVS_TOTAL,
<               NUM_MVS_CURRENT, ROLLBACK_SEG, ATOMIC_REFRESH,
---
>     SELECT COLLECTION_LEVEL  INTO CVAL
>     FROM SYS.MVREF$_STATS_SYS_DEFAULTS
>     FETCH FIRST ROW ONLY;
>
>     IF ( CVAL <> 0 ) THEN
>       INSERT INTO SYS.MVREF$_RUN_STATS(
>                 RUN_OWNER_USER#, REFRESH_ID, NUM_MVS_TOTAL,
>                 NUM_MVS_CURRENT, ROLLBACK_SEG, ATOMIC_REFRESH,
340,347c347,355
<      VALUES (
<             RUN_OWNER1, REFRESH_ID1, SNAPCNT,
<             SNAPCNT, ROLLBACK_SEG1, ATOMIC_REFRESH2,
<             NULL, NULL, NULL, NULL, NULL,
<             'Y', 0, 0, 0,
<             MV_LIST_BUF, METHOD1, PUSH_DEFERRED_RPC2, OUT_OF_PLACE2, NESTED2,
<             REFRESH_AFTER_ERRORS2, PURGE_OPTION1, PARALLELISM1, HEAP_SIZE1);
<
---
>       VALUES (
>               RUN_OWNER1, REFRESH_ID1, SNAPCNT,
>               SNAPCNT, ROLLBACK_SEG1, ATOMIC_REFRESH2,
>               NULL, NULL, NULL, NULL, NULL,
>               'Y', 0, 0, 0,
>               MV_LIST_BUF, METHOD1, PUSH_DEFERRED_RPC2, OUT_OF_PLACE2, NESTED2,
>               REFRESH_AFTER_ERRORS2, PURGE_OPTION1, PARALLELISM1, HEAP_SIZE1);
>     END IF;
>
SYS.DBMS_STATS - PACKAGE BODY (RU):
37240a37241,37242
>
>         STSFLAGS := 0;
38333c38335
<         (PREPARESTATJOBS OR SEQSTATJOBS) AND
---
>         (PREPARESTATJOBS OR SEQSTATJOBS OR EXECUTESTATJOBS) AND
38341d38342
<
38344c38345,38352
<
---
>
>
>
>
>
>
>
>

19.0.0.0

DBSFWUSER.DBMS_SFW_ACL_ADMIN - PACKAGE BODY (RU):
7a8,10
>
> TYPE XS_ACE_LIST IS TABLE OF XS$ACE_TYPE;
>
25a29,37
> FUNCTION KSACL_ISPERCONACLENABLED RETURN BOOLEAN;
> PRAGMA INTERFACE (C, KSACL_ISPERCONACLENABLED);
>
> FUNCTION KSACL_ISFEATUREENABLED RETURN BOOLEAN;
> PRAGMA INTERFACE (C, KSACL_ISFEATUREENABLED);
>
> FUNCTION KSACL_ISACLEXISTINROOT(SVC    IN VARCHAR2) RETURN BOOLEAN;
> PRAGMA INTERFACE (C, KSACL_ISACLEXISTINROOT);
>
109c121
< PROCEDURE XS_APPEND_ACE(ACES      IN OUT NOCOPY XS$ACE_LIST,
---
> PROCEDURE XS_APPEND_ACE(ACES      IN OUT NOCOPY XS_ACE_LIST,
125c137,138
<   ACES         XS$ACE_LIST := XS$ACE_LIST();
---
>   ACES         XS_ACE_LIST := XS_ACE_LIST();
>   BATCH        XS$ACE_LIST := XS$ACE_LIST();
152a166,167
>
>
154c169,184
<     SYS.XS_ACL.APPEND_ACES(XS_FULL_NAME(ACL_OWNER, ACL_NAME), ACES);
---
>     FOR ACE_ORDER IN 1 .. ACES.COUNT LOOP
>       BATCH.EXTEND;
>       BATCH(BATCH.LAST) := ACES(ACE_ORDER);
>       IF MOD(ACE_ORDER, (BATCH.LIMIT - 1)) = 0 THEN
>
>         SYS.XS_ACL.APPEND_ACES(XS_FULL_NAME(ACL_OWNER, ACL_NAME), BATCH);
>
>
>         BATCH := XS$ACE_LIST();
>       END IF;
>     END LOOP;
>
>
>     IF (BATCH.COUNT > 0) THEN
>       SYS.XS_ACL.APPEND_ACES(XS_FULL_NAME(ACL_OWNER, ACL_NAME), BATCH);
>     END IF;
314,315c344
< PROCEDURE CHECK_CDBROOT
< AS
---
> FUNCTION IN_PDB RETURN BOOLEAN IS
324c353,355
<       RAISE_APPLICATION_ERROR(-20012, 'Must run in CDB$ROOT container');
---
>       RETURN TRUE;
>     ELSE
>       RETURN FALSE;
325a357,358
>   ELSE
>     RETURN FALSE;
332d364
< 	CHECK_CDBROOT;
340d371
< 	CHECK_CDBROOT;
352d382
< 	CHECK_CDBROOT;
361d390
< 	CHECK_CDBROOT;
387d415
<     	CHECK_CDBROOT;
452d479
< 	CHECK_CDBROOT;
494d520
< 	CHECK_CDBROOT;
516d541
< 	CHECK_CDBROOT;
540d564
< 	CHECK_CDBROOT;
565d588
< 	CHECK_CDBROOT;
587d609
< 	CHECK_CDBROOT;
600d621
< 	CHECK_CDBROOT;
614d634
< 	CHECK_CDBROOT;
631d650
< 	CHECK_CDBROOT;
645d663
<     CHECK_CDBROOT;
678d695
<     CHECK_CDBROOT;
691d707
<    CHECK_CDBROOT;
708d723
<    CHECK_CDBROOT;
724d738
<    CHECK_CDBROOT;
744d757
<    CHECK_CDBROOT;
764d776
< 	CHECK_CDBROOT;
782d793
<    CHECK_CDBROOT;
796a808,895
> PROCEDURE IP_VALIDATE_SVC(
>    P_SVC_NAME  IN VARCHAR2,
>    REMOVE_OP   IN BOOLEAN DEFAULT FALSE
> )
> AS
> FOUND NUMBER := 0;
> CON_ID NUMBER := 0;
> ACL_FOUND NUMBER := 0;
> DB_DOMAIN    VARCHAR2(1024);
> Q_SVC_NAME   VARCHAR2(512);
> BEGIN
>    IF (NOT KSACL_ISFEATUREENABLED) THEN
>       RAISE_APPLICATION_ERROR(-20018, 'Feature NOT enabled');
>    END IF;
>
>    IF P_SVC_NAME IS NULL THEN
>      RAISE_APPLICATION_ERROR(-20003, 'Service is missing');
>    END IF;
>
>    SELECT INSTR(P_SVC_NAME, '.') INTO FOUND FROM DUAL;
>    IF FOUND = 0 THEN
>       SELECT VALUE INTO DB_DOMAIN FROM SYS.V_$PARAMETER WHERE
>             LOWER(NAME) = 'db_domain';
>       IF DB_DOMAIN IS NOT NULL THEN
>          Q_SVC_NAME := P_SVC_NAME || '.' || DB_DOMAIN;
>       ELSE
>          Q_SVC_NAME := P_SVC_NAME;
>       END IF;
>    ELSE
>       Q_SVC_NAME := P_SVC_NAME;
>    END IF;
>
>   IF IN_PDB() THEN
>     IF (NOT KSACL_ISPERCONACLENABLED) THEN
>       RAISE_APPLICATION_ERROR(-20015, 'Per-Container ACL is not enabled');
>     END IF;
>
>     IF (KSACL_ISACLEXISTINROOT(Q_SVC_NAME)) THEN
>       RAISE_APPLICATION_ERROR(-20017,
>            'Service ACL ' || Q_SVC_NAME ||
>            ' Already Exists in ROOT container');
>     END IF;
>
>     BEGIN
>       SELECT 1 INTO FOUND FROM DUAL
>         WHERE UPPER(P_SVC_NAME) IN (SELECT UPPER(NAME) FROM SYS.SERVICE$);
>     EXCEPTION
>       WHEN NO_DATA_FOUND THEN NULL;
>     END;
>
>     IF (FOUND = 0 AND NOT REMOVE_OP) THEN
>       BEGIN
>         SELECT 1 INTO FOUND FROM DUAL
>           WHERE UPPER(P_SVC_NAME) IN (SELECT UPPER(NAME) FROM SYS.SERVICE$);
>       EXCEPTION
>         WHEN NO_DATA_FOUND THEN
>           RAISE_APPLICATION_ERROR(-20014,
>             'Service ' || P_SVC_NAME ||  ' not found in current container');
>       END;
>     END IF;
>   ELSE
>     IF (KSACL_ISPERCONACLENABLED) THEN
>       BEGIN
>         SELECT CON_ID# INTO CON_ID FROM SYS.CDB_SERVICE$
>            WHERE UPPER(NAME) = UPPER(P_SVC_NAME);
>       EXCEPTION
>         WHEN NO_DATA_FOUND THEN NULL;
>       END;
>
>       IF (CON_ID = 0) THEN
>         BEGIN
>           SELECT CON_ID# INTO CON_ID FROM SYS.CDB_SERVICE$
>              WHERE UPPER(NAME) = UPPER(Q_SVC_NAME);
>         EXCEPTION
>           WHEN NO_DATA_FOUND THEN
>             RAISE_APPLICATION_ERROR(-20014,
>              'Service ' || P_SVC_NAME ||  ' not found in current container');
>         END;
>       END IF;
>
>       IF (CON_ID <> 1) THEN
>         RAISE_APPLICATION_ERROR(-20016,
>           'Cross-container ACL operation is disabled');
>       END IF;
>     END IF;
>   END IF;
> END;
>
804d902
< 	CHECK_CDBROOT;
805a904
>         IP_VALIDATE_SVC(P_SERVICE_NAME);
843c942
< 	CHECK_CDBROOT;
---
>         IP_VALIDATE_SVC(P_SERVICE_NAME, TRUE);
864c963
< 	CHECK_CDBROOT;
---
>         IP_VALIDATE_SVC(P_SERVICE_NAME, TRUE);
884d982
< 	CHECK_CDBROOT;
897d994
< 	CHECK_CDBROOT;
909,915c1006,1015
<    IF P_PDB_NAME IS NULL THEN
<      RAISE_APPLICATION_ERROR(-20003, 'Service is missing');
<    END IF;
<
<   CHECK_CDBROOT;
<
<    FOR R IN (SELECT NAME
---
>    IP_VALIDATE_SVC(P_PDB_NAME);
>    IF IN_PDB() THEN
>
>      FOR R IN (SELECT NAME
>                FROM SYS.SERVICE$
>                  WHERE UPPER(P_PDB_NAME) = UPPER(PDB)) LOOP
>         IP_ADD_ACE(R.NAME, P_HOST);
>      END LOOP;
>    ELSE
>      FOR R IN (SELECT NAME
917c1017
<               WHERE CON_ID# = (SELECT CON_ID
---
>                WHERE CON_ID# = (SELECT CON_ID
919,922c1019,1022
<                                WHERE UPPER(NAME) = UPPER(P_PDB_NAME)
<                               )) LOOP
<      IP_ADD_ACE(R.NAME, P_HOST);
<    END LOOP;
---
>                                 WHERE UPPER(NAME) = UPPER(P_PDB_NAME))) LOOP
>         IP_ADD_ACE(R.NAME, P_HOST);
>      END LOOP;
>    END IF;
930,932c1030
<    IF P_PDB_NAME IS NULL THEN
<      RAISE_APPLICATION_ERROR(-20003, 'Service is missing');
<    END IF;
---
>    IP_VALIDATE_SVC(P_PDB_NAME, TRUE);
934,946c1032,1048
<    CHECK_CDBROOT;
<    BEGIN
<         FOR R IN (SELECT NAME
<                     FROM SYS.CDB_SERVICE$
<                    WHERE CON_ID# = (SELECT CON_ID
<                                      FROM SYS.V_$PDBS
<                                     WHERE UPPER(NAME) = UPPER(P_PDB_NAME)
<                                    )) LOOP
<           IP_REMOVE_ACE(R.NAME, P_HOST);
<         END LOOP;
<    EXCEPTION
<      WHEN OTHERS THEN NULL;
<    END;
---
>    IF IN_PDB() THEN
>
>      FOR R IN (SELECT NAME
>                FROM SYS.SERVICE$
>                  WHERE UPPER(P_PDB_NAME) = UPPER(PDB)) LOOP
>         IP_REMOVE_ACE(R.NAME, P_HOST);
>      END LOOP;
>    ELSE
>       FOR R IN (SELECT NAME
>                   FROM SYS.CDB_SERVICE$
>                  WHERE CON_ID# = (SELECT CON_ID
>                                    FROM SYS.V_$PDBS
>                                   WHERE UPPER(NAME) = UPPER(P_PDB_NAME)
>                                  )) LOOP
>         IP_REMOVE_ACE(R.NAME, P_HOST);
>       END LOOP;
>    END IF;
951a1054
> CNAME VARCHAR2(128);
953,954c1056,1077
<    IF P_PDB_NAME IS NULL THEN
<      RAISE_APPLICATION_ERROR(-20003, 'Service is missing');
---
>    IP_VALIDATE_SVC(P_PDB_NAME, TRUE);
>    IF IN_PDB() THEN
>      SELECT SYS_CONTEXT('USERENV', 'CON_NAME') AS CUR_CONTAINER INTO CNAME
>        FROM DUAL;
>      IF UPPER(P_PDB_NAME) <> UPPER(CNAME) THEN
>         RAISE_APPLICATION_ERROR(-20014,
>           'Service ' || P_PDB_NAME ||  ' not found in current container');
>      END IF;
>
>      FOR R IN (SELECT TRIM('"' FROM SERVICE_NAME) NAME
>                FROM IP_ACL) LOOP
>         IP_REMOVE_ACL(R.NAME);
>      END LOOP;
>    ELSE
>      FOR R IN (SELECT NAME
>                FROM SYS.CDB_SERVICE$
>               WHERE CON_ID# = (SELECT CON_ID
>                                 FROM SYS.V_$PDBS
>                                WHERE UPPER(NAME) = UPPER(P_PDB_NAME)
>                               )) LOOP
>        IP_REMOVE_ACL(R.NAME);
>      END LOOP;
956,969d1078
<
<    CHECK_CDBROOT;
<    BEGIN
<         FOR R IN (SELECT NAME
<                     FROM SYS.CDB_SERVICE$
<                    WHERE CON_ID# = (SELECT CON_ID
<                                      FROM SYS.V_$PDBS
<                                     WHERE UPPER(NAME) = UPPER(P_PDB_NAME)
<                                    )) LOOP
<           IP_REMOVE_ACL(R.NAME);
<         END LOOP;
<    EXCEPTION
<      WHEN OTHERS THEN NULL;
<    END;
MDSYS.SDO_RDF_INTERNAL - PACKAGE BODY (RU):
17459c17459,17461
<             INSTR(ROLES_AND_PRIVS,' DATAPUMP_EXP_FULL_DATABASE ') > 0) THEN
---
>             INSTR(ROLES_AND_PRIVS,' DATAPUMP_EXP_FULL_DATABASE ') > 0 OR
>             INSTR(ROLES_AND_PRIVS,' DATAPUMP_CLOUD_IMP ') > 0 OR
>             INSTR(ROLES_AND_PRIVS,' DATAPUMP_CLOUD_EXP ') > 0) THEN
26057c26059,26060
<     DYN_SQL_STMT VARCHAR2(4000);
---
>     ROLE_NOT_FOUND EXCEPTION;
>     PRAGMA EXCEPTION_INIT(ROLE_NOT_FOUND, -1917);
26083a26087,26103
>
>       BEGIN
>         EXECUTE IMMEDIATE
>           'grant execute on ' || V_PFX_FOR_RDF_OBJ_NAME ||
>           'rdf_sys_callout to DATAPUMP_CLOUD_IMP';
>         EXCEPTION
>           WHEN ROLE_NOT_FOUND THEN NULL;
>           WHEN OTHERS THEN RAISE;
>       END;
>       BEGIN
>         EXECUTE IMMEDIATE
>           'grant execute on ' || V_PFX_FOR_RDF_OBJ_NAME ||
>           'rdf_sys_callout to DATAPUMP_CLOUD_EXP';
>           EXCEPTION
>             WHEN ROLE_NOT_FOUND THEN NULL;
>             WHEN OTHERS THEN RAISE;
>       END;
26091a26112,26114
>     DYN_SQL_STMT   LONG;
>     ROLE_NOT_FOUND EXCEPTION;
>     PRAGMA EXCEPTION_INIT(ROLE_NOT_FOUND, -1917);
26129a26153,26169
>
>       BEGIN
>         EXECUTE IMMEDIATE
>           'grant execute on ' || V_PFX_FOR_RDF_OBJ_NAME ||
>           'rdf_sys_callout_imp to DATAPUMP_CLOUD_IMP';
>         EXCEPTION
>           WHEN ROLE_NOT_FOUND THEN NULL;
>           WHEN OTHERS THEN RAISE;
>       END;
>       BEGIN
>         EXECUTE IMMEDIATE
>           'grant execute on ' || V_PFX_FOR_RDF_OBJ_NAME ||
>           'rdf_sys_callout_imp to DATAPUMP_CLOUD_EXP';
>           EXCEPTION
>             WHEN ROLE_NOT_FOUND THEN NULL;
>             WHEN OTHERS THEN RAISE;
>       END;
26183a26224
>     ROLE_NOT_FOUND          EXCEPTION;
26192a26234
>     PRAGMA EXCEPTION_INIT(ROLE_NOT_FOUND,         -1917);
26287c26329,26331
<           INSTR(ROLES_AND_PRIVS,' DATAPUMP_EXP_FULL_DATABASE ') > 0) THEN
---
>           INSTR(ROLES_AND_PRIVS,' DATAPUMP_EXP_FULL_DATABASE ') > 0 OR
>           INSTR(ROLES_AND_PRIVS,' DATAPUMP_CLOUD_IMP ') > 0 OR
>           INSTR(ROLES_AND_PRIVS,' DATAPUMP_CLOUD_EXP ') > 0) THEN
26337a26382,26398
>
>
>       BEGIN
>         EXECUTE IMMEDIATE
>           'grant read on ' || V_PFX_FOR_RDF_OBJ_NAME || 'rdf_parameter to DATAPUMP_CLOUD_IMP';
>         EXCEPTION
>           WHEN ROLE_NOT_FOUND THEN NULL;
>           WHEN OTHERS THEN RAISE;
>       END;
>
>       BEGIN
>         EXECUTE IMMEDIATE
>           'grant read on ' || V_PFX_FOR_RDF_OBJ_NAME || 'rdf_parameter to DATAPUMP_CLOUD_EXP';
>         EXCEPTION
>           WHEN ROLE_NOT_FOUND THEN NULL;
>           WHEN OTHERS THEN RAISE;
>       END;
SYS.DBMS_BACKUP_RESTORE - PACKAGE (19.7RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '19.07.01.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '19.07.02.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('19.07.01.00', '.');
<   msn  CONSTANT NUMBER := instr('19.07.01.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('19.07.01.00', '.', msn + 1);
---
>   fsn  CONSTANT NUMBER := instr('19.07.02.00', '.');
>   msn  CONSTANT NUMBER := instr('19.07.02.00', '.', fsn + 1);
>   psn  CONSTANT NUMBER := instr('19.07.02.00', '.', msn + 1);
29c29
<                            to_number(substr('19.07.01.00', 1, fsn - 1));
---
>                            to_number(substr('19.07.02.00', 1, fsn - 1));
31c31
<                to_number(substr('19.07.01.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('19.07.02.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('19.07.01.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('19.07.02.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('19.07.01.00',  psn + 1));
---
>                              to_number(substr('19.07.02.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (19.8RUR):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '19.08.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '19.08.01.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('19.08.00.00', '.');
<   msn  CONSTANT NUMBER := instr('19.08.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('19.08.00.00', '.', msn + 1);
---
>   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);
29c29
<                            to_number(substr('19.08.00.00', 1, fsn - 1));
---
>                            to_number(substr('19.08.01.00', 1, fsn - 1));
31c31
<                to_number(substr('19.08.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('19.08.01.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('19.08.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('19.08.01.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('19.08.00.00',  psn + 1));
---
>                              to_number(substr('19.08.01.00',  psn + 1));
SYS.DBMS_BACKUP_RESTORE - PACKAGE (RU):
12c12
<   bannerVersion CONSTANT VARCHAR2(15) := '19.08.00.00';
---
>   bannerVersion CONSTANT VARCHAR2(15) := '19.09.00.00';
24,26c24,26
<   fsn  CONSTANT NUMBER := instr('19.08.00.00', '.');
<   msn  CONSTANT NUMBER := instr('19.08.00.00', '.', fsn + 1);
<   psn  CONSTANT NUMBER := instr('19.08.00.00', '.', msn + 1);
---
>   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);
29c29
<                            to_number(substr('19.08.00.00', 1, fsn - 1));
---
>                            to_number(substr('19.09.00.00', 1, fsn - 1));
31c31
<                to_number(substr('19.08.00.00', fsn + 1, msn - fsn - 1));
---
>                to_number(substr('19.09.00.00', fsn + 1, msn - fsn - 1));
33c33
<               to_number(substr('19.08.00.00',  msn + 1, psn - msn - 1));
---
>               to_number(substr('19.09.00.00',  msn + 1, psn - msn - 1));
35c35
<                              to_number(substr('19.08.00.00',  psn + 1));
---
>                              to_number(substr('19.09.00.00',  psn + 1));
SYS.DBMS_CRYPTO - PACKAGE (RU):
83a84,102
>     -- Public Key Encryption Algorithm
>     PKENCRYPT_RSA_PKCS1_OAEP   CONSTANT PLS_INTEGER   := 1;
>
>     -- Public Key Type Algorithm
>     KEY_TYPE_RSA               CONSTANT PLS_INTEGER   := 1;
>
>     -- Public Key Signature Type Algorithm
>     SIGN_SHA1_RSA              CONSTANT PLS_INTEGER   := 1;
>     SIGN_MD2_RSA               CONSTANT PLS_INTEGER   := 2;
>     SIGN_MD5_RSA               CONSTANT PLS_INTEGER   := 3;
>     SIGN_RSA_PKCS1_OAEP_SHA256 CONSTANT PLS_INTEGER   := 4;
>     SIGN_SHA1_RSA_X931         CONSTANT PLS_INTEGER   := 5;
>     SIGN_SHA224_RSA            CONSTANT PLS_INTEGER   := 6;
>     SIGN_SHA256_RSA            CONSTANT PLS_INTEGER   := 7;
>     SIGN_SHA256_RSA_X931       CONSTANT PLS_INTEGER   := 8;
>     SIGN_SHA384_RSA            CONSTANT PLS_INTEGER   := 9;
>     SIGN_SHA384_RSA_X931       CONSTANT PLS_INTEGER   := 10;
>     SIGN_SHA512_RSA            CONSTANT PLS_INTEGER   := 11;
>     SIGN_SHA512_RSA_X931       CONSTANT PLS_INTEGER   := 12;
339a359,401
>
>     ------------------------------------------------------------------------
>     --
>     -- NAME:  Asymmetric Key Operations
>     --
>     -- DESCRIPTION:
>     --
>     -- New API for Asymmetric Key Operations which are encrypt, decrypt,
>     -- sign and verify
>     --
>     -- PARAMETERS
>     --
>     --
>     ------------------------------------------------------------------------
>
>
>     FUNCTION PKENCRYPT   (src        IN            RAW,
>                           pub_key    IN            RAW,
>                           pubkey_alg IN            PLS_INTEGER,
>                           enc_alg    IN            PLS_INTEGER)
>     RETURN RAW;
>
>
>     FUNCTION PKDECRYPT   (src        IN            RAW,
>                           prv_key    IN            RAW,
>                           pubkey_alg IN            PLS_INTEGER,
>                           enc_alg    IN            PLS_INTEGER)
>        RETURN RAW;
>
>
>     FUNCTION SIGN        (src        IN            RAW,
>                           prv_key    IN            RAW,
>                           pubkey_alg IN            PLS_INTEGER,
>                           sign_alg   IN            PLS_INTEGER)
>        RETURN RAW;
>
>
>     FUNCTION VERIFY      (src        IN            RAW,
>                           sign       IN            RAW,
>                           pub_key    IN            RAW,
>                           pubkey_alg IN            PLS_INTEGER,
>                           sign_alg   IN            PLS_INTEGER)
>        RETURN BOOLEAN;
SYS.DBMS_CRYPTO_FFI - PACKAGE (RU):
86a87,115
>     FUNCTION PKENCRYPT   (SRC        IN RAW,
>                           PUB_KEY    IN RAW,
>                           PUBKEY_ALG IN PLS_INTEGER,
>                           ENC_ALG    IN PLS_INTEGER)
>        RETURN RAW;
>
>
>
>     FUNCTION PKDECRYPT   (SRC        IN RAW,
>                           PRV_KEY    IN RAW,
>                           PUBKEY_ALG IN PLS_INTEGER,
>                           ENC_ALG    IN PLS_INTEGER)
>        RETURN RAW;
>
>
>     FUNCTION SIGN        (SRC        IN RAW,
>                           PRV_KEY    IN RAW,
>                           PUBKEY_ALG IN PLS_INTEGER,
>                           SIGN_ALG   IN PLS_INTEGER)
>        RETURN RAW;
>
>
>     FUNCTION VERIFY      (SRC        IN RAW,
>                           SIGN       IN RAW,
>                           PUB_KEY    IN RAW,
>                           PUBKEY_ALG IN PLS_INTEGER,
>                           SIGN_ALG   IN PLS_INTEGER)
>        RETURN BOOLEAN;
>
SYS.DBMS_JSON0 - PACKAGE (RU):
23,24c23
<                       TNAME VARCHAR2,
<                       CNAME VARCHAR2) RETURN BOOLEAN;
---
>                       TNAME VARCHAR2) RETURN BOOLEAN;
SYS.DBMS_PARALLEL_EXECUTE_INTERNAL - PACKAGE (RU):
15d14
<
33c32,36
<                                    NUM_ROW     IN NUMBER);
---
>                                    NUM_ROW     IN NUMBER,
>                                    BLOCKS      IN NUMBER,
>                                    NUM_ROWS    IN NUMBER,
>                                    FROM_STATS  IN BOOLEAN)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
39c42,43
<                                    NUM_BLOCK   IN NUMBER);
---
>                                    NUM_BLOCK   IN NUMBER)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
46c50,51
<                                         CHUNK_SIZE   IN NUMBER);
---
>                                         CHUNK_SIZE   IN NUMBER)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
50,51c55,56
<                                  SQL_STMT  IN CLOB,
<                                  BY_ROWID  IN BOOLEAN);
---
>                                  BY_ROWID  IN BOOLEAN)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
96,98c101,102
<   PROCEDURE RUN_INTERNAL_WORKER(OWNER#    IN NUMBER,
<                                 TASK_NAME IN VARCHAR2,
<                                 JOB_NAME  IN VARCHAR2);
---
>   PROCEDURE RUN_INTERNAL_WORKER(JOB_NAME  IN VARCHAR2)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
119a124,142
>
>   FUNCTION IS_STOP_FLAG_SET(OWNER# IN NUMBER,
>                             TASK   IN VARCHAR2) RETURN BOOLEAN
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
>
>   PROCEDURE SET_TASK_STATUS(OWNER#     IN NUMBER,
>                             TASK       IN VARCHAR2,
>                             NEW_STATUS IN NUMBER)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
>
>   PROCEDURE INSERT_CHUNKS_ROW(OWNER# NUMBER, TASK_NAME VARCHAR2,
>                               STATUS NUMBER, START_ID NUMBER, END_ID NUMBER,
>                               START_ROWID UROWID, END_ROWID UROWID)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
>
>   PROCEDURE GET_BLOCKS_NUM_ROWS(TABLE_OWNER IN VARCHAR2,
>                                 TABLE_NAME IN VARCHAR2,
>                                 BLOCKS OUT NUMBER, NUM_ROWS OUT NUMBER)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE);
SYS.DBMS_REGISTRY - PACKAGE (19.8RUR):
13c13
<                                '19.8.0.0.0';
---
>                                '19.8.1.0.0';
SYS.DBMS_REGISTRY - PACKAGE (19.7RUR):
13c13
<                                '19.7.1.0.0';
---
>                                '19.7.2.0.0';
SYS.DBMS_REGISTRY - PACKAGE (RU):
13c13
<                                '19.8.0.0.0';
---
>                                '19.9.0.0.0';
SYS.DBMS_RULE_IMP_OBJ - PACKAGE (RU):
2c2
<
---
> PRAGMA SUPPLEMENTAL_LOG_DATA(DEFAULT, AUTO);
SYS.DBMS_SODA - PACKAGE (RU):
19c19,21
<     FUNCTION drop_Collection (collection_Name NVARCHAR2)
---
>     FUNCTION drop_Collection (collection_Name  NVARCHAR2,
>                               purge             BOOLEAN DEFAULT FALSE,
>                               drop_Mapped_Table BOOLEAN DEFAULT FALSE)
26a29,31
>
>     FUNCTION TO_UUID (placeholder IN VARCHAR2)
>     RETURN VARCHAR2;
SYS.DBMS_SODA_UTIL - PACKAGE (RU):
9c9
<   function isJDCS return boolean;
---
>   function getServiceName return varchar2;
10a11
>   function checkAndGetCompat return number;
SYS.DBMS_SPM_INTERNAL - PACKAGE (19.8RUR):
21c21,22
<   AUTO_EVOLVE_TASK_NAME CONSTANT   DBMS_ID := 'SYS_AUTO_SPM_EVOLVE_TASK';
---
>   AUTO_EVOLVE_TASK_NAME            CONSTANT   DBMS_ID :=
>     'SYS_AUTO_SPM_EVOLVE_TASK';
24a26,27
>
>   AUTO_INDEX_EVOLVE_TASK_OWNER      CONSTANT  DBMS_ID := 'SYS';
769a773,789
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>   PROCEDURE HIGH_FREQ_EVOLVE_TASK_PROC;
SYS.PRVTEMX_PERF - PACKAGE (RU):
34a35,50
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
44a61,62
>     P_REPORT_LEVEL       IN   VARCHAR2   DEFAULT  'all',
>     P_COMPRESS_XML       IN   NUMBER     DEFAULT   1,
SYS.DBMS_AUTO_INDEX_INTERNAL - PACKAGE BODY (19.8RUR):
6542a6543
>                  and sql_text not like '%/* SQL Analyze(%'
SYS.DBMS_CRYPTO - PACKAGE BODY (RU):
136a137,175
>     FUNCTION PKENCRYPT  (SRC        IN RAW,
>                          PUB_KEY    IN RAW,
>                          PUBKEY_ALG IN PLS_INTEGER,
>                          ENC_ALG    IN PLS_INTEGER)
>       RETURN RAW IS
>     BEGIN
>       RETURN DBMS_CRYPTO_FFI.PKENCRYPT(SRC, PUB_KEY, PUBKEY_ALG, ENC_ALG);
>     END PKENCRYPT;
>
>
>     FUNCTION PKDECRYPT  (SRC        IN RAW,
>                          PRV_KEY    IN RAW,
>                          PUBKEY_ALG IN PLS_INTEGER,
>                          ENC_ALG    IN PLS_INTEGER)
>       RETURN RAW IS
>     BEGIN
>       RETURN DBMS_CRYPTO_FFI.PKDECRYPT(SRC, PRV_KEY, PUBKEY_ALG, ENC_ALG);
>     END PKDECRYPT;
>
>
>     FUNCTION SIGN       (SRC        IN RAW,
>                          PRV_KEY    IN RAW,
>                          PUBKEY_ALG IN PLS_INTEGER,
>                          SIGN_ALG   IN PLS_INTEGER)
>       RETURN RAW IS
>     BEGIN
>       RETURN DBMS_CRYPTO_FFI.SIGN(SRC, PRV_KEY, PUBKEY_ALG, SIGN_ALG);
>     END SIGN;
>
>
>     FUNCTION VERIFY     (SRC        IN RAW,
>                          SIGN       IN RAW,
>                          PUB_KEY    IN RAW,
>                          PUBKEY_ALG IN PLS_INTEGER,
>                          SIGN_ALG   IN PLS_INTEGER)
>       RETURN BOOLEAN IS
>     BEGIN
>       RETURN DBMS_CRYPTO_FFI.VERIFY(SRC, SIGN, PUB_KEY, PUBKEY_ALG, SIGN_ALG);
>     END VERIFY;
SYS.DBMS_CRYPTO_FFI - PACKAGE BODY (RU):
257a258,351
>     FUNCTION PKENCRYPT   (SRC        IN RAW,
>                           PUB_KEY    IN RAW,
>                           PUBKEY_ALG IN PLS_INTEGER,
>                           ENC_ALG    IN PLS_INTEGER)
>       RETURN RAW
>     IS EXTERNAL NAME "kzstea"
>     PARAMETERS (CONTEXT,
>                 SRC                  OCIRAW,
>                 SRC        INDICATOR SB4,
>                 SRC        LENGTH    UB4,
>                 PUB_KEY              OCIRAW,
>                 PUB_KEY    INDICATOR SB4,
>                 PUB_KEY    LENGTH    UB4,
>                 PUBKEY_ALG           SB4,
>                 PUBKEY_ALG INDICATOR SB4,
>                 ENC_ALG              SB4,
>                 ENC_ALG    INDICATOR SB4,
>                 RETURN     INDICATOR SB4,
>                 RETURN     LENGTH    UB4)
>     LIBRARY CRYPTO_TOOLKIT_LIBRARY
>     WITH CONTEXT;
>
>
>     FUNCTION PKDECRYPT   (SRC        IN RAW,
>                           PRV_KEY    IN RAW,
>                           PUBKEY_ALG IN PLS_INTEGER,
>                           ENC_ALG    IN PLS_INTEGER)
>       RETURN RAW
>     IS EXTERNAL NAME "kzstde"
>     PARAMETERS (CONTEXT,
>                 SRC                  OCIRAW,
>                 SRC        INDICATOR SB4,
>                 SRC        LENGTH    UB4,
>                 PRV_KEY              OCIRAW,
>                 PRV_KEY    INDICATOR SB4,
>                 PRV_KEY    LENGTH    UB4,
>                 PUBKEY_ALG           SB4,
>                 PUBKEY_ALG INDICATOR SB4,
>                 ENC_ALG              SB4,
>                 ENC_ALG    INDICATOR SB4,
>                 RETURN     INDICATOR SB4,
>                 RETURN     LENGTH    UB4)
>     LIBRARY CRYPTO_TOOLKIT_LIBRARY
>     WITH CONTEXT;
>
>
>     FUNCTION SIGN  (SRC        IN RAW,
>                     PRV_KEY    IN RAW,
>                     PUBKEY_ALG IN PLS_INTEGER,
>                     SIGN_ALG   IN PLS_INTEGER)
>       RETURN RAW
>     IS EXTERNAL NAME "kzsts"
>     PARAMETERS (CONTEXT,
>                 SRC                  OCIRAW,
>                 SRC        INDICATOR SB4,
>                 SRC        LENGTH    UB4,
>                 PRV_KEY              OCIRAW,
>                 PRV_KEY    INDICATOR SB4,
>                 PRV_KEY    LENGTH    UB4,
>                 PUBKEY_ALG           SB4,
>                 PUBKEY_ALG INDICATOR SB4,
>                 SIGN_ALG             SB4,
>                 SIGN_ALG   INDICATOR SB4,
>                 RETURN     INDICATOR SB4,
>                 RETURN     LENGTH    UB4)
>     LIBRARY CRYPTO_TOOLKIT_LIBRARY
>     WITH CONTEXT;
>
>
>     FUNCTION VERIFY  (SRC        IN RAW,
>                       SIGN       IN RAW,
>                       PUB_KEY    IN RAW,
>                       PUBKEY_ALG IN PLS_INTEGER,
>                       SIGN_ALG   IN PLS_INTEGER)
>       RETURN BOOLEAN
>     IS EXTERNAL NAME "kzstv"
>     PARAMETERS (CONTEXT,
>                 SRC                  OCIRAW,
>                 SRC        INDICATOR SB4,
>                 SRC        LENGTH    UB4,
>                 SIGN                 OCIRAW,
>                 SIGN       INDICATOR SB4,
>                 SIGN       LENGTH    UB4,
>                 PUB_KEY              OCIRAW,
>                 PUB_KEY    INDICATOR SB4,
>                 PUB_KEY    LENGTH    UB4,
>                 PUBKEY_ALG           SB4,
>                 PUBKEY_ALG INDICATOR SB4,
>                 SIGN_ALG             SB4,
>                 SIGN_ALG   INDICATOR SB4,
>                 RETURN               SB2)
>     LIBRARY CRYPTO_TOOLKIT_LIBRARY
>     WITH CONTEXT;
>
SYS.DBMS_ISCHED - PACKAGE BODY (RU):
9140,9155c9140
<
<
<
<
<
<
<
<
<
<
<
<   DELETE FROM SYS.SCHEDULER$_DBMSJOB_MAP
<   WHERE JOB_NAME NOT IN (SELECT NAME
<                          FROM SYS.OBJ$
<                          WHERE NAME LIKE 'DBMS_JOB$_%');
<   INSERT INTO SYS.SCHEDULER$_DBMSJOB_MAP
---
>   INSERT INTO SYS.SCHEDULER$_DBMSJOB_MAP (DBMS_JOB_NUMBER, JOB_OWNER, JOB_NAME)
SYS.DBMS_JSON0 - PACKAGE BODY (RU):
55a56
>
157,159c158,159
<                       OWNER VARCHAR2,
<                       TNAME VARCHAR2,
<                       CNAME VARCHAR2) RETURN BOOLEAN
---
>                      OWNER VARCHAR2,
>                      TNAME VARCHAR2) RETURN BOOLEAN
161,162c161
<   CURSOR CHECK_CUR(OWN VARCHAR2, TNM VARCHAR2, CNM VARCHAR2,
<                    COM VARCHAR2)
---
>   CURSOR CHECK_CUR(OWN VARCHAR2, TNM VARCHAR2, CNM VARCHAR2)
164,173c163,166
<      SELECT 1 FROM COL$ C, USER$ U, COM$ CO, OBJ$ O
<        WHERE O.OWNER# = U.USER#
<        AND U.NAME = OWN
<        AND O.TYPE# IN (2,4)
<        AND O.OBJ# = C.OBJ#
<        AND C.OBJ# = CO.OBJ#(+)
<        AND C.INTCOL# = CO.COL#(+)
<        AND O.NAME = TNM
<        AND C.NAME = CNM
<        AND (CO.COMMENT$ IS NULL OR CO.COMMENT$ != COM);
---
>      SELECT 1 FROM DBA_TAB_COLS C
>      WHERE C.OWNER = OWN
>        AND C.TABLE_NAME = TNM
>        AND C.COLUMN_NAME = CNM;
175,176c168
<   NAMEOK   BOOLEAN := FALSE;
<   COMNT    VARCHAR2(135);
---
>   VCEXISTS   BOOLEAN := FALSE;
178,179c170
<   COMNT := CNAME||' dg';
<   OPEN CHECK_CUR(OWNER, TNAME, VCNAME, COMNT);
---
>   OPEN CHECK_CUR(OWNER, TNAME, VCNAME);
182,183c173,174
<   IF QUERYRET IS NULL THEN
<     NAMEOK := TRUE;
---
>   IF QUERYRET IS NOT NULL THEN
>     VCEXISTS := TRUE;
185c176
<   RETURN NAMEOK;
---
>   RETURN VCEXISTS;
SYS.DBMS_PARALLEL_EXECUTE - PACKAGE BODY (RU):
117a118,123
>     BLOCKS               NUMBER;
>     NUM_ROWS             NUMBER;
>     QUOTED_TABLE_OWNER   DBMS_QUOTED_ID;
>     QUOTED_TABLE_NAME    DBMS_QUOTED_ID;
>     CALLED_DBMS_STATS    BOOLEAN := FALSE;
>     SQL_STMT             VARCHAR2(32767);
123a130,178
>
>
>
>
>
>
>
>
>
>
>
>
>       DBMS_PARALLEL_EXECUTE_INTERNAL.GET_BLOCKS_NUM_ROWS(
>         TABLE_OWNER, TABLE_NAME, BLOCKS, NUM_ROWS);
>
>       IF (BLOCKS IS NULL OR NUM_ROWS IS NULL) THEN
>         CALLED_DBMS_STATS := TRUE;
>
>
>
>
>         BLOCKS := DBMS_STATS_INTERNAL.GET_TABLE_BLOCK_COUNT(
>           TABLE_OWNER,
>           TABLE_NAME,
>           PARTNAME => NULL,
>           SUBPARTNAME => NULL,
>           IGNORE_ERRORS => 'TRUE');
>
>         QUOTED_TABLE_OWNER := DBMS_ASSERT.ENQUOTE_NAME(TABLE_OWNER, FALSE);
>         QUOTED_TABLE_NAME := DBMS_ASSERT.ENQUOTE_NAME(TABLE_NAME, FALSE);
>
>         NUM_ROWS := DBMS_STATS.GET_ROW_COUNT_ESTIMATE(
>           OWNNAME => QUOTED_TABLE_OWNER,
>           TABNAME => QUOTED_TABLE_NAME,
>           PARTNAME => NULL,
>           NBLKS => NULL,
>           DEGREE => NULL);
>       END IF;
>
>       IF NUM_ROWS = 0 THEN
>
>
>
>         SQL_STMT := 'select count(*) from ' ||
>                       DBMS_ASSERT.ENQUOTE_NAME(TABLE_OWNER) || '.' ||
>                       DBMS_ASSERT.ENQUOTE_NAME(TABLE_NAME);
>         EXECUTE IMMEDIATE SQL_STMT INTO NUM_ROWS;
>       END IF;
>
126c181,182
<         NUM_ROW=>CHUNK_SIZE);
---
>         NUM_ROW=>CHUNK_SIZE, BLOCKS=>BLOCKS, NUM_ROWS=>NUM_ROWS,
>         FROM_STATS=>CALLED_DBMS_STATS);
144a201,220
>     L_MIN_VAL     NUMBER;
>     L_MAX_VAL     NUMBER;
>     L_TBL_OWN     DBMS_ID;
>     L_TBL_NM      DBMS_ID;
>     L_COL_NM      DBMS_ID;
>     L_AST_TBL_OWN DBMS_QUOTED_ID;
>     L_AST_TBL_NM  DBMS_QUOTED_ID;
>     L_AST_COL_NM  DBMS_QUOTED_ID;
>     L_SQL         VARCHAR2(1000);
>     L_START_ID    NUMBER;
>     L_END_ID      NUMBER;
>     L_SEQ         NUMBER;
>     L_USR_CUR     INTEGER;
>     L_ROWS        NUMBER;
>     L_STATUS      NUMBER;
>     L_CHUNK_SIZE  NUMBER;
>     L_CNT         NUMBER := 0;
>     L_START_ROWID UROWID;
>     L_END_ROWID   UROWID;
>     OWNER#          NUMBER := USERENV('SCHEMAID');
148,149c224,293
<       USERENV('SCHEMAID'), TASK_NAME, TABLE_OWNER, TABLE_NAME,
<       TABLE_COLUMN, CHUNK_SIZE);
---
>       OWNER#, TASK_NAME, TABLE_OWNER, TABLE_NAME, TABLE_COLUMN, CHUNK_SIZE);
>
>     L_AST_TBL_NM  := DBMS_ASSERT.ENQUOTE_NAME(TABLE_NAME,   FALSE);
>     L_AST_TBL_OWN := DBMS_ASSERT.ENQUOTE_NAME(TABLE_OWNER,  FALSE);
>     L_AST_COL_NM  := DBMS_ASSERT.ENQUOTE_NAME(TABLE_COLUMN, FALSE);
>     L_CHUNK_SIZE := CHUNK_SIZE;
>     IF (L_CHUNK_SIZE < 1) THEN L_CHUNK_SIZE := 1; END IF;
>
>
>
>     BEGIN
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>       L_SQL     := 'select min('||L_AST_COL_NM||'), max('||L_AST_COL_NM||')
>                     from ' || L_AST_TBL_OWN || '.' || L_AST_TBL_NM;
>       EXECUTE IMMEDIATE L_SQL INTO L_MIN_VAL, L_MAX_VAL;
>
>
>       IF (L_MIN_VAL IS NULL OR L_MAX_VAL IS NULL) THEN
>         RETURN;
>       END IF;
>
>
>       L_END_ID := L_MIN_VAL-1;
>       LOOP
>
>         L_START_ID := L_END_ID + 1;
>         L_END_ID   := LEAST(L_MAX_VAL, L_START_ID + L_CHUNK_SIZE - 1);
>
>
>         DBMS_PARALLEL_EXECUTE_INTERNAL.INSERT_CHUNKS_ROW(
>           OWNER#, TASK_NAME, DBMS_PARALLEL_EXECUTE.UNASSIGNED,
>           L_START_ID, L_END_ID, NULL, NULL);
>
>         COMMIT;
>         L_CNT := L_CNT + 1;
>
>
>         IF (L_END_ID = L_MAX_VAL) THEN
>           EXIT;
>         END IF;
>       END LOOP;
>
>
>       IF (L_CNT = 0) THEN
>         DBMS_PARALLEL_EXECUTE_INTERNAL.SET_TASK_STATUS
>           (OWNER#, TASK_NAME, DBMS_PARALLEL_EXECUTE.NO_CHUNKS);
>       ELSE
>         DBMS_PARALLEL_EXECUTE_INTERNAL.SET_TASK_STATUS
>           (OWNER#, TASK_NAME, DBMS_PARALLEL_EXECUTE.CHUNKED);
>       END IF;
>
>     EXCEPTION WHEN OTHERS THEN
>
>       DBMS_PARALLEL_EXECUTE_INTERNAL.SET_TASK_STATUS(OWNER#, TASK_NAME,
>                       DBMS_PARALLEL_EXECUTE.CHUNKING_FAILED);
>       RAISE;
>     END;
160a305,312
>     L_START_ID      NUMBER;
>     L_END_ID        NUMBER;
>     L_START_ROWID   UROWID;
>     L_END_ROWID     UROWID;
>     L_SOURCE_CURSOR INTEGER;
>     L_IGNORE        NUMBER;
>     L_CNT           NUMBER := 0;
>     OWNER#          NUMBER := USERENV('SCHEMAID');
163c315,374
<       USERENV('SCHEMAID'), TASK_NAME, SQL_STMT, BY_ROWID);
---
>       OWNER#, TASK_NAME, BY_ROWID);
>
>
>
>     BEGIN
>
>       L_SOURCE_CURSOR := DBMS_SQL.OPEN_CURSOR;
>       DBMS_SQL.PARSE(L_SOURCE_CURSOR, SQL_STMT, DBMS_SQL.NATIVE);
>       IF (BY_ROWID = FALSE) THEN
>         DBMS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 1, L_START_ID);
>         DBMS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 2, L_END_ID);
>       ELSE
>         DBMS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 1, L_START_ROWID);
>         DBMS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 2, L_END_ROWID);
>       END IF;
>       L_IGNORE := DBMS_SQL.EXECUTE(L_SOURCE_CURSOR);
>
>
>       LOOP
>          IF (DBMS_SQL.FETCH_ROWS(L_SOURCE_CURSOR)=0) THEN
>            EXIT;
>          END IF;
>
>
>          IF (BY_ROWID = FALSE) THEN
>            DBMS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 1, L_START_ID);
>            DBMS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 2, L_END_ID);
>          ELSE
>            DBMS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 1, L_START_ROWID);
>            DBMS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 2, L_END_ROWID);
>          END IF;
>
>
>          DBMS_PARALLEL_EXECUTE_INTERNAL.INSERT_CHUNKS_ROW(
>            OWNER#, TASK_NAME, DBMS_PARALLEL_EXECUTE.UNASSIGNED,
>            L_START_ID, L_END_ID, L_START_ROWID, L_END_ROWID);
>          L_CNT := L_CNT + 1;
>       END LOOP;
>
>
>       DBMS_SQL.CLOSE_CURSOR(L_SOURCE_CURSOR);
>
>
>       IF (L_CNT = 0) THEN
>         DBMS_PARALLEL_EXECUTE_INTERNAL.SET_TASK_STATUS(
>           OWNER#, TASK_NAME, DBMS_PARALLEL_EXECUTE.NO_CHUNKS);
>       ELSE
>         DBMS_PARALLEL_EXECUTE_INTERNAL.SET_TASK_STATUS(
>           OWNER#, TASK_NAME, DBMS_PARALLEL_EXECUTE.CHUNKED);
>       END IF;
>
>     EXCEPTION WHEN OTHERS THEN
>       IF DBMS_SQL.IS_OPEN(L_SOURCE_CURSOR) THEN
>         DBMS_SQL.CLOSE_CURSOR(L_SOURCE_CURSOR);
>       END IF;
>
>       DBMS_PARALLEL_EXECUTE_INTERNAL.SET_TASK_STATUS(
>         OWNER#, TASK_NAME, DBMS_PARALLEL_EXECUTE.CHUNKING_FAILED);
>       RAISE;
>     END;
259a471,480
>     L_START_ID           NUMBER;
>     L_END_ID             NUMBER;
>     L_START_ROWID        ROWID;
>     L_END_ROWID          ROWID;
>     L_ROWS_PROCESSED     NUMBER;
>     L_CUR                INTEGER;
>     L_FIRE_APPLY_TRIGGER BOOLEAN;
>     L_CHUNK_ID           NUMBER;
>     L_TASK               DBMS_PARALLEL_EXECUTE_INTERNAL.TASK_TYPE;
>     OWNER#               NUMBER := USERENV('SCHEMAID');
261,262c482,572
<     DBMS_PARALLEL_EXECUTE_INTERNAL.RUN_INTERNAL_WORKER(
<       USERENV('SCHEMAID'), TASK_NAME, JOB_NAME);
---
>     DBMS_PARALLEL_EXECUTE_INTERNAL.RUN_INTERNAL_WORKER(JOB_NAME);
>
>
>     L_TASK := DBMS_PARALLEL_EXECUTE_INTERNAL.READ_TASK(OWNER#, TASK_NAME);
>
>
>     IF (L_TASK.FIRE_APPLY_TRIGGER = 'TRUE') THEN L_FIRE_APPLY_TRIGGER := TRUE;
>     ELSE                                         L_FIRE_APPLY_TRIGGER := FALSE;
>     END IF;
>
>
>
>
>     L_CUR := DBMS_SQL.OPEN_CURSOR;
>     DBMS_SQL.PARSE(L_CUR,
>                        DBMS_ASSERT.NOOP(L_TASK.SQL_STMT),
>                        L_TASK.LANGUAGE_FLAG,
>                        L_TASK.EDITION,
>                        L_TASK.APPLY_CROSSEDITION_TRIGGER,
>                        L_FIRE_APPLY_TRIGGER);
>
>
>
>
>
>
>     LOOP
>
>
>
>         IF (DBMS_PARALLEL_EXECUTE_INTERNAL.IS_STOP_FLAG_SET(OWNER#,
>             TASK_NAME)) THEN
>           EXIT;
>         END IF;
>
>
>
>
>
>         IF (DBMS_PARALLEL_EXECUTE_INTERNAL.GET_RANGE(OWNER#, TASK_NAME,
>               L_CHUNK_ID, L_START_ROWID, L_END_ROWID, L_START_ID, L_END_ID)
>             = FALSE) THEN
>           EXIT;
>         END IF;
>
>
>
>
>
>
>
>
>         BEGIN
>           IF (L_TASK.CHUNK_TYPE =
>                 DBMS_PARALLEL_EXECUTE_INTERNAL.ROWID_RANGE) THEN
>             DBMS_SQL.BIND_VARIABLE(L_CUR, ':start_id', L_START_ROWID);
>             DBMS_SQL.BIND_VARIABLE(L_CUR, ':end_id',   L_END_ROWID);
>           ELSE
>             DBMS_SQL.BIND_VARIABLE(L_CUR, ':start_id', L_START_ID);
>             DBMS_SQL.BIND_VARIABLE(L_CUR, ':end_id',   L_END_ID);
>           END IF;
>
>           L_ROWS_PROCESSED := DBMS_SQL.EXECUTE(L_CUR);
>
>
>
>
>
>           DBMS_PARALLEL_EXECUTE_INTERNAL.SET_CHUNK_STATUS(OWNER#, TASK_NAME,
>             L_CHUNK_ID, DBMS_PARALLEL_EXECUTE.PROCESSED);
>         EXCEPTION WHEN OTHERS THEN
>
>
>
>
>
>           DBMS_PARALLEL_EXECUTE_INTERNAL.SET_CHUNK_STATUS(OWNER#, TASK_NAME,
>             L_CHUNK_ID, DBMS_PARALLEL_EXECUTE.PROCESSED_WITH_ERROR,
>             SQLCODE, SQLERRM);
>         END;
>
>
>
>
>         COMMIT;
>     END LOOP;
>
>
>
>
>     DBMS_SQL.CLOSE_CURSOR(L_CUR);
408a719
>     L_STATUS    NUMBER;
411c722,723
<     IF (TASK_STATUS(TASK_NAME) = NO_CHUNKS) THEN
---
>     L_STATUS := TASK_STATUS(TASK_NAME);
>     IF (L_STATUS = NO_CHUNKS) THEN
413c725
<     ELSIF (TASK_STATUS(TASK_NAME) != CHUNKED) THEN
---
>     ELSIF (L_STATUS != CHUNKED) THEN
SYS.DBMS_PARALLEL_EXECUTE_INTERNAL - PACKAGE BODY (RU):
165a166
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE)
179a181
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE)
268d269
<
364c365,369
<                                    NUM_ROW     IN NUMBER)
---
>                                    NUM_ROW     IN NUMBER,
>                                    BLOCKS      IN NUMBER,
>                                    NUM_ROWS    IN NUMBER,
>                                    FROM_STATS  IN BOOLEAN)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE)
368,369d372
<     L_QUOTED_TABLE_OWNER   DBMS_QUOTED_ID;
<     L_QUOTED_TABLE_NAME    DBMS_QUOTED_ID;
371,372d373
<     L_BLOCKS               NUMBER;
<     L_NUM_ROWS             NUMBER;
374,375d374
<     L_SQL_STMT             VARCHAR2(1000);
<     L_CALLED_DBMS_STATS    BOOLEAN := FALSE;
386,400d384
<
<
<
<
<
<
<     SELECT T.BLOCKS, T.NUM_ROWS
<       INTO L_BLOCKS, L_NUM_ROWS
<       FROM DBA_TABLES T
<      WHERE T.OWNER      = L_TABLE_OWNER
<        AND T.TABLE_NAME = L_TABLE_NAME;
<
<     IF (L_BLOCKS IS NULL OR
<         L_NUM_ROWS IS NULL) THEN
<       L_CALLED_DBMS_STATS := TRUE;
401a386
>     IF NUM_ROWS = 0 THEN
404,421c389,398
<
<       L_BLOCKS := DBMS_STATS_INTERNAL.GET_TABLE_BLOCK_COUNT(
<         L_TABLE_OWNER,
<         L_TABLE_NAME,
<         PARTNAME => NULL,
<         SUBPARTNAME => NULL,
<         IGNORE_ERRORS => 'TRUE');
<
<       L_QUOTED_TABLE_OWNER := DBMS_ASSERT.ENQUOTE_NAME(L_TABLE_OWNER, FALSE);
<       L_QUOTED_TABLE_NAME := DBMS_ASSERT.ENQUOTE_NAME(L_TABLE_NAME, FALSE);
<
<       L_NUM_ROWS := DBMS_STATS.GET_ROW_COUNT_ESTIMATE(
<         OWNNAME => L_QUOTED_TABLE_OWNER,
<         TABNAME => L_QUOTED_TABLE_NAME,
<         PARTNAME => NULL,
<         NBLKS => L_BLOCKS,
<         DEGREE => NULL);
<     END IF;
---
>       UPDATE DBMS_PARALLEL_EXECUTE_TASK$
>         SET STATUS      = DBMS_PARALLEL_EXECUTE.NO_CHUNKS,
>             CHUNK_TYPE  = ROWID_RANGE,
>             TABLE_OWNER = L_TABLE_OWNER,
>             TABLE_NAME  = L_TABLE_NAME
>          WHERE TASK_OWNER# = OWNER#
>            AND TASK_NAME   = CREATE_CHUNKS_BY_ROWID.TASK_NAME
>            AND STATUS      IN (DBMS_PARALLEL_EXECUTE.CREATED,
>                                DBMS_PARALLEL_EXECUTE.CHUNKING_FAILED)
>         RETURNING STATUS INTO L_STATUS;
423,424d399
<     IF L_NUM_ROWS = 0 THEN
<
427,449c402,404
<       L_SQL_STMT := 'select count(*) from ' ||
<                     DBMS_ASSERT.ENQUOTE_NAME(L_TABLE_OWNER) || '.' ||
<                     DBMS_ASSERT.ENQUOTE_NAME(L_TABLE_NAME);
<       EXECUTE IMMEDIATE L_SQL_STMT INTO L_NUM_ROWS;
<       IF L_NUM_ROWS = 0 THEN
<
<
<         UPDATE DBMS_PARALLEL_EXECUTE_TASK$
<           SET STATUS      = DBMS_PARALLEL_EXECUTE.NO_CHUNKS,
<               CHUNK_TYPE  = ROWID_RANGE,
<               TABLE_OWNER = L_TABLE_OWNER,
<               TABLE_NAME  = L_TABLE_NAME
<            WHERE TASK_OWNER# = OWNER#
<              AND TASK_NAME   = CREATE_CHUNKS_BY_ROWID.TASK_NAME
<              AND STATUS      IN (DBMS_PARALLEL_EXECUTE.CREATED,
<                                  DBMS_PARALLEL_EXECUTE.CHUNKING_FAILED)
<           RETURNING STATUS INTO L_STATUS;
<
<
<
<         IF (L_STATUS IS NULL) THEN
<           RAISE DBMS_PARALLEL_EXECUTE.INVALID_STATE_FOR_CHUNK;
<         END IF;
---
>       IF (L_STATUS IS NULL) THEN
>         RAISE DBMS_PARALLEL_EXECUTE.INVALID_STATE_FOR_CHUNK;
>       END IF;
451c406
<         COMMIT;
---
>       COMMIT;
453,454c408
<         RETURN;
<       END IF;
---
>       RETURN;
459c413
<                                     (L_BLOCKS / L_NUM_ROWS));
---
>                                     (BLOCKS / NUM_ROWS));
466,467c420,421
<                            ', l_called_dbms_stats = ' ||
<                               CASE L_CALLED_DBMS_STATS
---
>                            ', dbms_stats = ' ||
>                               CASE FROM_STATS
471,472c425,426
<                            ', l_blocks = ' || L_BLOCKS ||
<                            ', l_num_rows = ' || L_NUM_ROWS ||
---
>                            ', blocks = ' || BLOCKS ||
>                            ', num_rows = ' || NUM_ROWS ||
586a541
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE)
739a695
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE)
747,755d702
<     L_AST_TBL_OWN DBMS_QUOTED_ID;
<     L_AST_TBL_NM  DBMS_QUOTED_ID;
<     L_AST_COL_NM  DBMS_QUOTED_ID;
<     L_SQL         VARCHAR2(1000);
<     L_START_ID    NUMBER;
<     L_END_ID      NUMBER;
<     L_SEQ         NUMBER;
<     L_USR_CUR     INTEGER;
<     L_ROWS        NUMBER;
757,758d703
<     L_CHUNK_SIZE  NUMBER;
<     L_CNT         NUMBER := 0;
768,773d712
<     L_AST_TBL_NM  := DBMS_ASSERT.ENQUOTE_NAME(TABLE_NAME,   FALSE);
<     L_AST_TBL_OWN := DBMS_ASSERT.ENQUOTE_NAME(TABLE_OWNER,  FALSE);
<     L_AST_COL_NM  := DBMS_ASSERT.ENQUOTE_NAME(TABLE_COLUMN, FALSE);
<     L_CHUNK_SIZE := CHUNK_SIZE;
<     IF (L_CHUNK_SIZE < 1) THEN L_CHUNK_SIZE := 1; END IF;
<
803,870d741
<
<
<     BEGIN
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<       L_SQL     := 'select min('||L_AST_COL_NM||'), max('||L_AST_COL_NM||')
<                     from ' || L_AST_TBL_OWN || '.' || L_AST_TBL_NM;
<       L_USR_CUR := DBMS_SYS_SQL.OPEN_CURSOR;
<       DBMS_SYS_SQL.PARSE_AS_USER(L_USR_CUR, L_SQL, DBMS_SQL.NATIVE, OWNER#);
<       DBMS_SYS_SQL.DEFINE_COLUMN(L_USR_CUR, 1, L_MIN_VAL);
<       DBMS_SYS_SQL.DEFINE_COLUMN(L_USR_CUR, 2, L_MAX_VAL);
<
<       L_ROWS := DBMS_SYS_SQL.EXECUTE_AND_FETCH(L_USR_CUR);
<       DBMS_SYS_SQL.COLUMN_VALUE(L_USR_CUR, 1, L_MIN_VAL);
<       DBMS_SYS_SQL.COLUMN_VALUE(L_USR_CUR, 2, L_MAX_VAL);
<
<
<       IF (L_MIN_VAL IS NULL OR L_MAX_VAL IS NULL) THEN
<         RETURN;
<       END IF;
<
<
<       L_END_ID := L_MIN_VAL-1;
<       LOOP
<
<         L_START_ID := L_END_ID + 1;
<         L_END_ID   := LEAST(L_MAX_VAL, L_START_ID + L_CHUNK_SIZE - 1);
<
<
<         L_SEQ := SEQ_NEXT_VAL;
<         INSERT INTO DBMS_PARALLEL_EXECUTE_CHUNKS$(
<           CHUNK_ID, TASK_OWNER#, TASK_NAME, STATUS, START_ID, END_ID)
<           VALUES(L_SEQ, OWNER#, L_TASK_NAME, DBMS_PARALLEL_EXECUTE.UNASSIGNED,
<                  L_START_ID, L_END_ID);
<         COMMIT;
<         L_CNT := L_CNT + 1;
<
<
<         IF (L_END_ID = L_MAX_VAL) THEN
<           EXIT;
<         END IF;
<       END LOOP;
<
<
<       IF (L_CNT = 0) THEN
<         SET_TASK_STATUS(OWNER#, L_TASK_NAME, DBMS_PARALLEL_EXECUTE.NO_CHUNKS);
<       ELSE
<         SET_TASK_STATUS(OWNER#, L_TASK_NAME, DBMS_PARALLEL_EXECUTE.CHUNKED);
<       END IF;
<
<     EXCEPTION WHEN OTHERS THEN
<
<       SET_TASK_STATUS(OWNER#, L_TASK_NAME,
<                       DBMS_PARALLEL_EXECUTE.CHUNKING_FAILED);
<       RAISE;
<     END;
880d750
<                                  SQL_STMT  IN CLOB,
881a752
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE)
885,891d755
<     L_START_ID      NUMBER;
<     L_END_ID        NUMBER;
<     L_START_ROWID   UROWID;
<     L_END_ROWID     UROWID;
<     L_SEQ           NUMBER;
<     L_SOURCE_CURSOR INTEGER;
<     L_IGNORE        NUMBER;
893d756
<     L_CNT           NUMBER := 0;
921,977c784
<     BEGIN
<
<       L_SOURCE_CURSOR := DBMS_SYS_SQL.OPEN_CURSOR;
<       DBMS_SYS_SQL.PARSE_AS_USER(L_SOURCE_CURSOR, SQL_STMT, DBMS_SQL.NATIVE,
<                                   OWNER#);
<       IF (BY_ROWID = FALSE) THEN
<         DBMS_SYS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 1, L_START_ID);
<         DBMS_SYS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 2, L_END_ID);
<       ELSE
<         DBMS_SYS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 1, L_START_ROWID);
<         DBMS_SYS_SQL.DEFINE_COLUMN(L_SOURCE_CURSOR, 2, L_END_ROWID);
<       END IF;
<       L_IGNORE := DBMS_SQL.EXECUTE(L_SOURCE_CURSOR);
<
<
<       LOOP
<          IF (DBMS_SYS_SQL.FETCH_ROWS(L_SOURCE_CURSOR)=0) THEN
<            EXIT;
<          END IF;
<
<
<          IF (BY_ROWID = FALSE) THEN
<            DBMS_SYS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 1, L_START_ID);
<            DBMS_SYS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 2, L_END_ID);
<          ELSE
<            DBMS_SYS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 1, L_START_ROWID);
<            DBMS_SYS_SQL.COLUMN_VALUE(L_SOURCE_CURSOR, 2, L_END_ROWID);
<          END IF;
<
<
<          L_SEQ := SEQ_NEXT_VAL;
<          INSERT INTO DBMS_PARALLEL_EXECUTE_CHUNKS$
<            (CHUNK_ID, TASK_OWNER#, TASK_NAME, STATUS,
<             START_ID, END_ID, START_ROWID, END_ROWID)
<            VALUES (L_SEQ, OWNER#, L_TASK_NAME,
<                    DBMS_PARALLEL_EXECUTE.UNASSIGNED,
<                    L_START_ID, L_END_ID, L_START_ROWID, L_END_ROWID);
<          COMMIT;
<          L_CNT := L_CNT + 1;
<       END LOOP;
<
<
<       DBMS_SYS_SQL.CLOSE_CURSOR(L_SOURCE_CURSOR);
<
<
<       IF (L_CNT = 0) THEN
<         SET_TASK_STATUS(OWNER#, L_TASK_NAME, DBMS_PARALLEL_EXECUTE.NO_CHUNKS);
<       ELSE
<         SET_TASK_STATUS(OWNER#, L_TASK_NAME, DBMS_PARALLEL_EXECUTE.CHUNKED);
<       END IF;
<
<     EXCEPTION WHEN OTHERS THEN
<
<       SET_TASK_STATUS(OWNER#, L_TASK_NAME,
<                       DBMS_PARALLEL_EXECUTE.CHUNKING_FAILED);
<       RAISE;
<     END;
---
>
1159a967
>     L_TASK_NAME := TASK_NAME;
1298a1107
>
1314,1329c1123,1126
<   PROCEDURE RUN_INTERNAL_WORKER(OWNER#    IN NUMBER,
<                                 TASK_NAME IN VARCHAR2,
<                                 JOB_NAME  IN VARCHAR2)
<   IS
<     L_START_ID           NUMBER;
<     L_END_ID             NUMBER;
<     L_START_ROWID        ROWID;
<     L_END_ROWID          ROWID;
<     L_ROWS_PROCESSED     NUMBER;
<     L_CUR                INTEGER;
<     L_FIRE_APPLY_TRIGGER BOOLEAN;
<     L_CHUNK_ID           NUMBER;
<     L_TASK               TASK_TYPE;
<   BEGIN
<
<     L_TASK := READ_TASK(OWNER#, TASK_NAME);
---
>
>
>
>
1331,1334c1128,1131
<
<     IF (L_TASK.FIRE_APPLY_TRIGGER = 'TRUE') THEN L_FIRE_APPLY_TRIGGER := TRUE;
<     ELSE                                         L_FIRE_APPLY_TRIGGER := FALSE;
<     END IF;
---
>   PROCEDURE RUN_INTERNAL_WORKER(JOB_NAME  IN VARCHAR2)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE)
>   IS
>   BEGIN
1344,1425d1140
<
<
<
<
<     L_CUR := DBMS_SYS_SQL.OPEN_CURSOR;
<     DBMS_SYS_SQL.PARSE_AS_USER(L_CUR,
<                                DBMS_ASSERT.NOOP(L_TASK.SQL_STMT),
<                                L_TASK.LANGUAGE_FLAG,
<                                OWNER#,
<                                FALSE,
<                                L_TASK.EDITION,
<                                L_TASK.APPLY_CROSSEDITION_TRIGGER,
<                                L_FIRE_APPLY_TRIGGER);
<
<
<
<
<
<
<     LOOP
<
<
<
<         IF (IS_STOP_FLAG_SET(OWNER#, TASK_NAME)) THEN
<           EXIT;
<         END IF;
<
<
<
<
<
<         IF (GET_RANGE(OWNER#, TASK_NAME, L_CHUNK_ID,
<                       L_START_ROWID, L_END_ROWID, L_START_ID, L_END_ID)
<             = FALSE) THEN
<           EXIT;
<         END IF;
<
<
<
<
<
<
<
<
<         BEGIN
<           IF (L_TASK.CHUNK_TYPE = ROWID_RANGE) THEN
<             DBMS_SYS_SQL.BIND_VARIABLE(L_CUR, ':start_id', L_START_ROWID);
<             DBMS_SYS_SQL.BIND_VARIABLE(L_CUR, ':end_id',   L_END_ROWID);
<           ELSE
<             DBMS_SYS_SQL.BIND_VARIABLE(L_CUR, ':start_id', L_START_ID);
<             DBMS_SYS_SQL.BIND_VARIABLE(L_CUR, ':end_id',   L_END_ID);
<           END IF;
<
<           L_ROWS_PROCESSED := DBMS_SYS_SQL.EXECUTE(L_CUR);
<
<
<
<
<
<           SET_CHUNK_STATUS(OWNER#, TASK_NAME, L_CHUNK_ID,
<                            DBMS_PARALLEL_EXECUTE.PROCESSED);
<         EXCEPTION WHEN OTHERS THEN
<
<
<
<
<
<           SET_CHUNK_STATUS(OWNER#, TASK_NAME, L_CHUNK_ID,
<                            DBMS_PARALLEL_EXECUTE.PROCESSED_WITH_ERROR,
<                            SQLCODE, SQLERRM);
<         END;
<
<
<
<
<         COMMIT;
<     END LOOP;
<
<
<
<
<     DBMS_SYS_SQL.CLOSE_CURSOR(L_CUR);
1428d1142
<
1449a1164
>
1505a1221,1250
>   END;
>
>   PROCEDURE INSERT_CHUNKS_ROW(OWNER# NUMBER, TASK_NAME VARCHAR2,
>                               STATUS NUMBER, START_ID NUMBER, END_ID NUMBER,
>                               START_ROWID UROWID, END_ROWID UROWID)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE) IS
>     L_SEQ NUMBER;
>   BEGIN
>     L_SEQ := SEQ_NEXT_VAL;
>     INSERT INTO DBMS_PARALLEL_EXECUTE_CHUNKS$
>       (CHUNK_ID, TASK_OWNER#, TASK_NAME, STATUS,
>        START_ID, END_ID, START_ROWID, END_ROWID)
>       VALUES (L_SEQ, OWNER#, TASK_NAME, STATUS, START_ID, END_ID,
>               START_ROWID, END_ROWID);
>
>     COMMIT;
>   END;
>
>   PROCEDURE GET_BLOCKS_NUM_ROWS(TABLE_OWNER IN VARCHAR2,
>                                 TABLE_NAME IN VARCHAR2,
>                                 BLOCKS OUT NUMBER, NUM_ROWS OUT NUMBER)
>     ACCESSIBLE BY (PACKAGE SYS.DBMS_PARALLEL_EXECUTE) IS
>     L_TABLE_NAME DBMS_ID := TABLE_NAME;
>   BEGIN
>
>     SELECT T.BLOCKS, T.NUM_ROWS
>       INTO BLOCKS, NUM_ROWS
>       FROM DBA_TABLES T
>      WHERE T.OWNER      = TABLE_OWNER
>        AND T.TABLE_NAME = L_TABLE_NAME;
SYS.DBMS_RCVMAN - PACKAGE BODY (19.7RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '19.07.01.00';
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '19.07.02.00';
SYS.DBMS_RCVMAN - PACKAGE BODY (19.8RUR):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '19.08.00.00';
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '19.08.01.00';
SYS.DBMS_RCVMAN - PACKAGE BODY (RU):
122c122
< CATALOGVERSION CONSTANT VARCHAR2(11) := '19.08.00.00';
---
> CATALOGVERSION CONSTANT VARCHAR2(11) := '19.09.00.00';
25966,25968c25966,25968
<          IF ((UNTILTIME IS NULL AND UNTILSCN IS NULL) OR
<              LBREC.DF_CKP_MOD_TIME < UNTILTIME       OR
<              LBREC.DF_CHECKPOINT_CHANGE# <= UNTILSCN) THEN
---
>          IF (LBREC.DF_CKP_MOD_TIME < UNTILTIME OR
>             (UNTILTIME IS NULL AND
>              LBREC.DF_CHECKPOINT_CHANGE# <= UNTILSCN)) THEN
SYS.DBMS_RULE_IMP_OBJ - PACKAGE BODY (RU):
11a12
>     STMT_BUF   VARCHAR2(4000);
15c16,18
<
---
>     STMT_BUF := 'ALTER SESSION SET EVENTS ''25475 TRACE NAME'
>                ||' CONTEXT FOREVER, LEVEL 1''';
>     EXECUTE IMMEDIATE STMT_BUF;
35a39
>     STMT_BUF   VARCHAR2(4000);
38a43,45
>     STMT_BUF := 'ALTER SESSION SET EVENTS ''25475 TRACE NAME'
>                ||' CONTEXT FOREVER, LEVEL 1''';
>     EXECUTE IMMEDIATE STMT_BUF;
58a66
>     STMT_BUF   VARCHAR2(4000);
62c70,73
<
---
>     STMT_BUF := 'ALTER SESSION SET EVENTS ''25475 TRACE NAME'
>                ||' CONTEXT FOREVER, LEVEL 1''';
>     EXECUTE IMMEDIATE STMT_BUF;
>
103c114,118
<
---
>     STMT_BUF := 'ALTER SESSION SET EVENTS ''25475 TRACE NAME'
>                ||' CONTEXT FOREVER, LEVEL 1''';
>     EXECUTE IMMEDIATE STMT_BUF;
>     STMT_BUF := NULL;
>
SYS.DBMS_SNAPSHOT_KKXRCA - PACKAGE BODY (RU):
305a306
>     CVAL                  INTEGER;
312a314
>
345,347c347,354
<     INSERT INTO SYS.MVREF$_RUN_STATS(
<               RUN_OWNER_USER#, REFRESH_ID, NUM_MVS_TOTAL,
<               NUM_MVS_CURRENT, ROLLBACK_SEG, ATOMIC_REFRESH,
---
>     SELECT COLLECTION_LEVEL  INTO CVAL
>     FROM SYS.MVREF$_STATS_SYS_DEFAULTS
>     FETCH FIRST ROW ONLY;
>
>     IF ( CVAL <> 0 ) THEN
>       INSERT INTO SYS.MVREF$_RUN_STATS(
>                 RUN_OWNER_USER#, REFRESH_ID, NUM_MVS_TOTAL,
>                 NUM_MVS_CURRENT, ROLLBACK_SEG, ATOMIC_REFRESH,
353,360c360,368
<      VALUES (
<             RUN_OWNER1, REFRESH_ID1, SNAPCNT,
<             SNAPCNT, ROLLBACK_SEG1, ATOMIC_REFRESH2,
<             NULL, NULL, NULL, NULL, NULL,
<             'Y', 0, 0, 0,
<             MV_LIST_BUF, METHOD1, PUSH_DEFERRED_RPC2, OUT_OF_PLACE2, NESTED2,
<             REFRESH_AFTER_ERRORS2, PURGE_OPTION1, PARALLELISM1, HEAP_SIZE1);
<
---
>       VALUES (
>               RUN_OWNER1, REFRESH_ID1, SNAPCNT,
>               SNAPCNT, ROLLBACK_SEG1, ATOMIC_REFRESH2,
>               NULL, NULL, NULL, NULL, NULL,
>               'Y', 0, 0, 0,
>               MV_LIST_BUF, METHOD1, PUSH_DEFERRED_RPC2, OUT_OF_PLACE2, NESTED2,
>               REFRESH_AFTER_ERRORS2, PURGE_OPTION1, PARALLELISM1, HEAP_SIZE1);
>     END IF;
>
SYS.DBMS_SODA - PACKAGE BODY (RU):
24c24,26
<     FUNCTION DROP_COLLECTION (COLLECTION_NAME NVARCHAR2)
---
>     FUNCTION DROP_COLLECTION (COLLECTION_NAME   NVARCHAR2
>                             , PURGE             BOOLEAN DEFAULT FALSE
>                             , DROP_MAPPED_TABLE BOOLEAN DEFAULT FALSE)
27c29
<     LANGUAGE C
---
>     EXTERNAL
32,35c34,41
<                 COLLECTION_NAME             OCISTRING,
<                 COLLECTION_NAME  INDICATOR  SB2,
<                 RETURN           INDICATOR  SB2,
<                 RETURN                      OCINUMBER);
---
>                 COLLECTION_NAME              OCISTRING,
>                 COLLECTION_NAME   INDICATOR  SB2,
>                 PURGE,
>                 PURGE             INDICATOR  SB2,
>                 DROP_MAPPED_TABLE,
>                 DROP_MAPPED_TABLE INDICATOR  SB2,
>                 RETURN            INDICATOR  SB2,
>                 RETURN                       OCINUMBER);
72a79,85
>
>     FUNCTION TO_UUID(PLACEHOLDER IN VARCHAR2)
>     RETURN VARCHAR2
>     IS
>     BEGIN
>       RETURN RAWTOHEX(SYS_GUID());
>     END;
SYS.DBMS_SODA_UTIL - PACKAGE BODY (RU):
48,49c48,49
< FUNCTION ISJDCS
< RETURN BOOLEAN
---
> FUNCTION GETSERVICENAME
> RETURN VARCHAR2
51a52
>     V_NAME VARCHAR2(200);
53,55c54,58
<   SELECT VALUE INTO V_PDB_LOCKDOWN FROM V$PARAMETER WHERE NAME = 'pdb_lockdown';
<   IF (UPPER(V_PDB_LOCKDOWN) = 'JDCS') THEN
<     RETURN TRUE;
---
>   V_NAME := SYS_CONTEXT('userenv', 'cloud_service');
>   IF (V_NAME IS NULL) THEN
>     RETURN 'ONPREMISE';
>   ELSE
>     RETURN UPPER(V_NAME);
57d59
<   RETURN FALSE;
60c62
<       RETURN FALSE;
---
>       RETURN 'UNKNOWN';
66,68c68,71
< PROCEDURE CHECKCOMPAT
<  IS
<   V_COMPATIBLE  NUMBER;
---
> FUNCTION CHECKANDGETCOMPAT
> RETURN NUMBER
>   IS
>     V_COMPATIBLE  NUMBER;
77a81,89
>
>   RETURN V_COMPATIBLE;
> END;
>
> PROCEDURE CHECKCOMPAT
>   IS
>     V_COMPATIBLE NUMBER;
> BEGIN
>     V_COMPATIBLE := CHECKANDGETCOMPAT;
SYS.DBMS_SPM - PACKAGE BODY (19.8RUR):
2803c2803,2804
<             AND ORIGIN = DBMS_SMB_INTERNAL.BASELINE_ORIGIN_AUTO_INDEX;
---
>             AND ORIGIN = SYS.DBMS_SMB_INTERNAL.BASELINE_ORIGIN_AUTO_INDEX
>             AND LAST_VERIFIED IS NOT NULL;
SYS.DBMS_SPM_INTERNAL - PACKAGE BODY (19.8RUR):
34a35,36
>   FLAGS_EVOLVE_PENDING  CONSTANT BINARY_INTEGER :=
>                         DBMS_SQLTUNE_INTERNAL.SQLOBJ_FLG_PENDING;
512c514
<                     min(cpu_plus_io)) > :ratio / 100)
---
>                     min(cpu_plus_io)) > (:ratio / 100))
514c516
<        HAVING MAX(s.buffer_gets * 10000 + s.cpu_time) / 100 > :threshold)#';
---
>        HAVING MAX(s.buffer_gets * 10000 + s.cpu_time) / 1000 > :threshold)#';
1827c1829
<                                                    'INTERVAL', P_VALUE);
---
>                                                    'INTERVAL', P_VALUE);
1843a1846,1857
>
>
>
>
>
>
>       PRVT_ADVISOR.SET_TASK_PARAMETER(
>         TASK_NAME  => AUTO_EVOLVE_TASK_NAME,
>         PARAMETER     => PAR_TIME_LIMIT,
>         DATA          => P_VALUE - 60,
>         TASK_OWNER_ID => PRVT_ADVISOR.SYS_USER_ID);
>
4433,4434c4447,4450
<       SRC_LOC := 'AUTOMATIC_WORKLOAD_REPOSITORY + CURSOR_CACHE + ' ||
<         'SQL_TUNING_SET';
---
>
>
>
>       SRC_LOC := 'SQL_TUNING_SET';
6229a6246,6334
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>   PROCEDURE HIGH_FREQ_EVOLVE_TASK_PROC
>   IS
>     EXEC_NAME        VARCHAR2(300);
>     TASK_ID          NUMBER;
>     EXEC_STATUS      NUMBER;
>     TRACE            PLS_INTEGER := DBMS_SPM_INTERNAL.GET_SPM_TRACING_VALUE();
>     PLAN_NUM         NUMBER;
>     CURSOR MALFORMED_CUR IS
>     SELECT  SO.NAME PLAN_NAME
>     FROM SQLOBJ$AUXDATA SA, SQLOBJ$ SO
>     WHERE SO.SIGNATURE = SA.SIGNATURE AND
>           SO.CATEGORY = SA.CATEGORY AND
>           SO.PLAN_ID = SA.PLAN_ID AND
>           SO.OBJ_TYPE = DBMS_SMB_INTERNAL.SMBTYPE_PLAN_BASELINE#
>           AND SA.OBJ_TYPE = DBMS_SMB_INTERNAL.SMBTYPE_PLAN_BASELINE# AND
>           (SA.OPTIMIZER_ENV IS NULL OR
>           SA.PARSING_SCHEMA_NAME IS NULL);
>   BEGIN
>
>      IF (SYS_CONTEXT('userenv', 'con_id') != 0 AND
>          SYS_CONTEXT('userenv', 'con_id') <= 2 ) THEN
>        RETURN;
>      END IF;
>
>      SELECT MAX(STATUS#), MAX(EXECUTION_NAME) INTO EXEC_STATUS, EXEC_NAME
>        FROM DBA_ADVISOR_EXECUTIONS
>       WHERE TASK_NAME = AUTO_EVOLVE_TASK_NAME AND EXECUTION_NAME IN
>         (SELECT MAX(EXECUTION_NAME)
>          FROM DBA_ADVISOR_EXECUTIONS
>          WHERE TASK_NAME = AUTO_EVOLVE_TASK_NAME);
>
>      I_SPM_TRC(TRACE,' execution status: ' || EXEC_STATUS);
>      I_SPM_TRC(TRACE,' execution name: ' || EXEC_NAME);
>
>      IF (EXEC_NAME IS NULL OR
>          EXEC_STATUS = PRVT_ADVISOR.TASK_STATE_COMPLETED OR
>          EXEC_STATUS = PRVT_ADVISOR.TASK_STATE_ERROR) THEN
>
>        EXEC_NAME := 'SYS_SPM_' || TO_CHAR(SYSDATE, 'YYYY-MM-DD/HH24:MI:SS');
>
>        I_SPM_TRC(TRACE, 'Starting SPM evolve task, ' || ' execution name: '
>                  || EXEC_NAME);
>
>        EXEC_NAME := DBMS_SPM.EXECUTE_EVOLVE_TASK(
>                       TASK_NAME      => AUTO_EVOLVE_TASK_NAME,
>                       EXECUTION_NAME => EXEC_NAME);
>      ELSE
>
>        IF (EXEC_STATUS = PRVT_ADVISOR.TASK_STATE_EXEC) THEN
>         DBMS_SPM.INTERRUPT_EVOLVE_TASK(AUTO_EVOLVE_TASK_NAME);
>        END IF;
>
>        I_SPM_TRC(TRACE, 'Resuming SPM evolve task, ' || ' execution name: '
>                   || EXEC_NAME);
>
>        DBMS_SPM.RESUME_EVOLVE_TASK(TASK_NAME => AUTO_EVOLVE_TASK_NAME);
>      END IF;
>
>
>      FOR CUR IN MALFORMED_CUR
>      LOOP
>        PLAN_NUM := DBMS_SPM.DROP_SQL_PLAN_BASELINE(PLAN_NAME => CUR.PLAN_NAME);
>      END LOOP;
>
>      COMMIT;
>
>   EXCEPTION
>     WHEN OTHERS THEN
>       I_SPM_TRC(TRACE, 'SPM evolve error ' || ' execution name: '
>                 || EXEC_NAME || ' execution status ' || EXEC_STATUS);
>       RAISE;
>   END HIGH_FREQ_EVOLVE_TASK_PROC;
SYS.DBMS_STATS - PACKAGE BODY (RU):
38817a38818,38819
>
>         STSFLAGS := 0;
SYS.DBMS_XPLAN - PACKAGE BODY (RU):
2150c2150,2151
<       QB_REGISTRY        IN OUT NOCOPY STRING_TAB_TYPE_XL)
---
>       QB_REGISTRY        IN OUT NOCOPY STRING_TAB_TYPE_XL,
>       ADS_SYSTEM         IN OUT NOCOPY VARCHAR2)
2429a2431,2437
>
>
>       EXTRACT_TEMP :=
>               q'#extractvalue(xmlval, '/*/info[@type = "ads_system"]')#';
>       EXTRACT_SQL := EXTRACT_SQL || ', ' || EXTRACT_TEMP;
>
>
2451c2459
<              SHARD_ID, HINTUSAGE
---
>              SHARD_ID, HINTUSAGE, ADS_SYSTEM
5279a5288
>           ADS_SYSTEM         VARCHAR2(5) DEFAULT NULL;
5495c5504,5505
<                                   QB_REGISTRY);
---
>                                   QB_REGISTRY,
>                                   ADS_SYSTEM);
7446c7456,7461
<                           THEN 'AUTO'
---
>                           THEN 'AUTO' ||
>
>                                CASE WHEN ADS_SYSTEM = 'yes'
>                                     THEN ' (SYSTEM)'
>                                     ELSE ''
>                                     END
SYS.PRVTEMX_ADMIN - PACKAGE BODY (RU):
1765,1766c1765
<                 fi.file_name) order by fi.relative_fno))
<               order by tbs.tablespace_name))
---
>                 fi.file_name) order by fi.relative_fno))))
1811a1811
>     order by tbs.tablespace_name
SYS.PRVTEMX_PERF - PACKAGE BODY (RU):
263a264,356
>
>
>
>
>
>
>
>
>   FUNCTION I_GET_SESS_ASH_OMX_XML(
>     P_INST_ID       IN NUMBER,
>     P_SID           IN NUMBER,
>     P_SERIAL        IN NUMBER,
>     P_START_TIME    IN DATE,
>     P_END_TIME      IN DATE,
>     P_COMPRESS_XML  IN NUMBER)
>   RETURN XMLTYPE
>   IS
>     L_ACTIVITY_XML     XMLTYPE;
>     L_BEGIN_TIME_UTC   VARCHAR2(32767)   := NULL;
>     L_END_TIME_UTC     VARCHAR2(32767)   := NULL;
>     L_TZ               VARCHAR2(10)      := NULL;
>     L_FILTER_LIST      DBMS_REPORT.REF_STRING_IDSPEC;
>     L_FILTER_LIST_XML  VARCHAR2(32767)   := NULL;
>     L_COMPRESS_XML     NUMBER            := 1;
>
>
>
>
>
>     L_MINIMIZE_COST    VARCHAR2(8) := 'y';
>
>   BEGIN
>
>
>     IF (P_COMPRESS_XML IS NOT NULL) THEN
>         L_COMPRESS_XML := P_COMPRESS_XML;
>     ELSE
>         L_COMPRESS_XML := 1;
>     END IF;
>
>
>
>     L_TZ := DBMS_SQLTUNE_UTIL2.GET_TZ_OFFSET();
>
>     L_BEGIN_TIME_UTC := TO_CHAR(P_START_TIME,
>                                 'yyyy-mm-dd hh24:mi:ss') || L_TZ;
>     L_BEGIN_TIME_UTC :=
>         TO_CHAR(CAST(SYS_EXTRACT_UTC(
>             TO_TIMESTAMP_TZ(L_BEGIN_TIME_UTC,
>                 'yyyy-mm-dd hh24:mi:ssTZH:TZM')) AS DATE),
>                 DBMS_REPORT.DATE_FMT);
>
>     L_END_TIME_UTC := TO_CHAR(P_END_TIME,
>                               'yyyy-mm-dd hh24:mi:ss') || L_TZ;
>     L_END_TIME_UTC :=
>         TO_CHAR(CAST(SYS_EXTRACT_UTC(
>             TO_TIMESTAMP_TZ(L_END_TIME_UTC,
>                 'yyyy-mm-dd hh24:mi:ssTZH:TZM')) AS DATE),
>                 DBMS_REPORT.DATE_FMT);
>
>     L_FILTER_LIST('physical_session') := P_INST_ID || ',' ||
>                                          P_SID || ',' ||
>                                          P_SERIAL;
>
>
>
>     L_FILTER_LIST_XML := XMLTYPE('<fs><f n="physical_session" v="' ||
>                          P_INST_ID || ',' || P_SID || ',' || P_SERIAL ||
>                          '"/></fs>').GETCLOBVAL();
>
>     L_ACTIVITY_XML := SYS.PRVT_ASH_OMX.REPORT_OMX_ASHVIEWER_XML(
>                         INST_ID         => P_INST_ID,
>                         BEGIN_TIME_UTC  => L_BEGIN_TIME_UTC,
>                         END_TIME_UTC    => L_END_TIME_UTC,
>                         MINIMIZE_COST   => L_MINIMIZE_COST,
>                         FILTER_LIST     => L_FILTER_LIST_XML,
>                         REPORT_PARAMS   => L_FILTER_LIST);
>
>     IF (L_ACTIVITY_XML IS NOT NULL) THEN
>       SELECT XMLELEMENT("ashrep",L_ACTIVITY_XML)
>         INTO L_ACTIVITY_XML
>         FROM SYS.DUAL;
>     END IF;
>
>     L_ACTIVITY_XML := DBMS_REPORT.TRANSFORM_REPORT_XML(
>                         L_ACTIVITY_XML,
>                         ZLIB2BASE64 => L_COMPRESS_XML);
>
>     RETURN L_ACTIVITY_XML;
>
>   END I_GET_SESS_ASH_OMX_XML;
>
>
709a803,816
>
>
>
>
>
>
>
>
>
>
>
>
>
>
719a827,828
>     P_REPORT_LEVEL       IN   VARCHAR2   DEFAULT  'all',
>     P_COMPRESS_XML       IN   NUMBER     DEFAULT   1,
757a867,870
>     L_REPORT_LEVEL     VARCHAR2(32) := LOWER(P_REPORT_LEVEL);
>     L_IS_OMX           NUMBER;
>     L_COMPRESS_XML     NUMBER;
>
763a877,891
>     IF (P_REPORT_LEVEL IS NULL) THEN
>         L_REPORT_LEVEL := 'all';
>     END IF;
>
>
>     L_IS_OMX := CASE WHEN SYS.PRVT_EMX.IS_OMX() THEN 1 ELSE 0 END;
>
>
>     IF (P_COMPRESS_XML IS NOT NULL) THEN
>         L_COMPRESS_XML := P_COMPRESS_XML;
>     ELSE
>         L_COMPRESS_XML := 1;
>     END IF;
>
>
846,861c974,1008
<     IF (L_SESSION_EXISTS > 0) THEN
<
<       L_SESSION_XML := I_GET_SESSION_XML(P_INST_ID => L_INST_ID,
<                                          P_SID     => L_SID,
<                                          P_SERIAL  => L_SERIAL,
<                                          P_SHOW_SQL=> P_SHOW_SQL);
<     ELSE
<
<       L_SESSION_XML := I_GET_SESSION_INFO_HIST_XML(P_INST_ID => L_INST_ID,
<                                          P_SID     => L_SID,
<                                          P_SERIAL  => L_SERIAL,
<                                          P_IS_REALTIME=> P_IS_REALTIME,
<                                          P_START_TIME => L_START_TIME,
<                                          P_END_TIME   => L_END_TIME,
<                                          P_SHOW_SQL   => P_SHOW_SQL);
<     END IF;
---
>     IF ((L_REPORT_LEVEL = 'all') OR (L_REPORT_LEVEL = 'summary')) THEN
>         IF (L_SESSION_EXISTS > 0) THEN
>
>           L_SESSION_XML := I_GET_SESSION_XML(P_INST_ID => L_INST_ID,
>                                              P_SID     => L_SID,
>                                              P_SERIAL  => L_SERIAL,
>                                              P_SHOW_SQL=> P_SHOW_SQL);
>         ELSE
>
>           L_SESSION_XML := I_GET_SESSION_INFO_HIST_XML(P_INST_ID => L_INST_ID,
>                                              P_SID     => L_SID,
>                                              P_SERIAL  => L_SERIAL,
>                                              P_IS_REALTIME=> P_IS_REALTIME,
>                                              P_START_TIME => L_START_TIME,
>                                              P_END_TIME   => L_END_TIME,
>                                              P_SHOW_SQL   => P_SHOW_SQL);
>         END IF;
>
>         IF (L_IS_OMX = 1) THEN
>
>             L_ACTIVITY_XML := I_GET_SESS_ASH_OMX_XML(P_INST_ID => L_INST_ID,
>                                              P_SID          => L_SID,
>                                              P_SERIAL       => L_SERIAL,
>                                              P_START_TIME   => L_START_TIME,
>                                              P_END_TIME     => L_END_TIME,
>                                              P_COMPRESS_XML => L_COMPRESS_XML);
>
>         ELSE
>
>             L_ACTIVITY_XML := I_GET_ACTIVITY_XML(P_INST_ID => L_INST_ID,
>                                              P_SID          => L_SID,
>                                              P_SERIAL       => L_SERIAL,
>                                              P_IS_REALTIME  => P_IS_REALTIME,
>                                              P_START_TIME   => L_START_TIME,
>                                              P_END_TIME     => L_END_TIME);
863,871c1010
<     IF (P_IS_REALTIME = 1) THEN
<
<       L_STASH_XML := SYS.DBMS_SQLTUNE.BUILD_STASH_XML(
<                        SESSION_ID     => L_SID,
<                        SESSION_SERIAL => L_SERIAL,
<                        SESSION_INST_ID=> L_INST_ID,
<                        PX_MODE        => 'yes',
<                        START_TIME     => L_START_TIME,
<                        END_TIME       => L_END_TIME);
---
>         END IF;
873c1012
<     END IF;
---
>     END IF;
875,881c1014,1023
<
<     L_ACTIVITY_XML := I_GET_ACTIVITY_XML(P_INST_ID => L_INST_ID,
<                                          P_SID     => L_SID,
<                                          P_SERIAL  => L_SERIAL,
<                                          P_IS_REALTIME=> P_IS_REALTIME,
<                                          P_START_TIME => L_START_TIME,
<                                          P_END_TIME   => L_END_TIME);
---
>     IF ((L_REPORT_LEVEL = 'all') OR (L_REPORT_LEVEL = 'metrics')) THEN
>         IF (P_IS_REALTIME = 1) THEN
>
>           L_STASH_XML := SYS.DBMS_SQLTUNE.BUILD_STASH_XML(
>                            SESSION_ID     => L_SID,
>                            SESSION_SERIAL => L_SERIAL,
>                            SESSION_INST_ID=> L_INST_ID,
>                            PX_MODE        => 'yes',
>                            START_TIME     => L_START_TIME,
>                            END_TIME       => L_END_TIME);
883,885c1025,1031
<
<     IF (P_IS_REALTIME = 1) THEN
<       L_MONITOR_LIST_XML := SYS.DBMS_SQLTUNE.REPORT_SQL_MONITOR_LIST_XML(
---
>         END IF;
>     END IF;
>
>     IF ((L_REPORT_LEVEL = 'all') OR (L_REPORT_LEVEL = 'sqlmonitor')) THEN
>
>         IF (P_IS_REALTIME = 1) THEN
>           L_MONITOR_LIST_XML := SYS.DBMS_SQLTUNE.REPORT_SQL_MONITOR_LIST_XML(
895,897c1041,1043
<     ELSE
<
<       L_MONITOR_LIST_XML := SYS.DBMS_AUTO_REPORT.REPORT_REPOSITORY_LIST_XML(
---
>         ELSE
>
>          L_MONITOR_LIST_XML := SYS.DBMS_AUTO_REPORT.REPORT_REPOSITORY_LIST_XML(
906,908c1052,1054
<                                   TOP_N_DETAIL_COUNT=> P_MONITOR_LIST_DETAIL);
<     END IF;
<
---
>                                   TOP_N_DETAIL_COUNT => P_MONITOR_LIST_DETAIL);
>         END IF;
>     END IF;
911,919c1057,1068
<     IF (P_ACTIVITY_DIMENSION IS NOT NULL) THEN
<
<       L_INLINE_ASH_XML := I_GET_INLINE_ACTIVITY_XML(
<                             P_INST_ID => L_INST_ID,
<                             P_SID     => L_SID,
<                             P_SERIAL  => L_SERIAL,
<                             P_START_TIME => L_START_TIME,
<                             P_END_TIME   => L_END_TIME,
<                             P_ACTIVITY_DIM => P_ACTIVITY_DIMENSION);
---
>     IF (L_IS_OMX = 0) THEN
>
>         IF (P_ACTIVITY_DIMENSION IS NOT NULL) THEN
>
>           L_INLINE_ASH_XML := I_GET_INLINE_ACTIVITY_XML(
>                                 P_INST_ID => L_INST_ID,
>                                 P_SID     => L_SID,
>                                 P_SERIAL  => L_SERIAL,
>                                 P_START_TIME => L_START_TIME,
>                                 P_END_TIME   => L_END_TIME,
>                                 P_ACTIVITY_DIM => P_ACTIVITY_DIMENSION);
>         END IF;
SYS.STANDARD - PACKAGE BODY (RU):
266,272d265
<   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;
274,280d266
<   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;
586a573,574
>     function pescsetname(csetid PLS_INTEGER) return varchar2;
>   pragma interface (c, pescsetname);
587a576,609
>   -- 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_UNIFIED_AUDIT - PROCEDURE (RU):
74c74,82
<   feature_usage := 'Number of Unified Audit policies=' ||
---
>   --Enh 31221454: Check if Pure Unified Auditing is enabled
>   if (uniaud_linkon > 0) then
>     feature_usage := 'Pure Unified Auditing=TRUE; ';
>   else
>     feature_usage := 'Pure Unified Auditing=FALSE; ';
>   end if;
>
>   feature_usage := feature_usage ||
>                    'Number of Unified Audit policies=' ||
SYS.SODA_COLLECTION_T - TYPE (RU):
52c52,61
<     RETURN SODA_Document_T
---
>     RETURN SODA_Document_T,
>
>     MEMBER FUNCTION save (document SODA_Document_T)
>     RETURN NUMBER,
>
>     MEMBER FUNCTION save_And_Get (document SODA_Document_T)
>     RETURN SODA_Document_T,
>
>     MEMBER FUNCTION truncate
>     RETURN NUMBER
SYS.SODA_OPERATION_T - TYPE (RU):
8c8
<     MEMBER FUNCTION	count
---
>     MEMBER FUNCTION count
17c17
<     MEMBER FUNCTION	get_Cursor
---
>     MEMBER FUNCTION get_Cursor
20c20
<     MEMBER FUNCTION	get_One
---
>     MEMBER FUNCTION get_One
23c23
<     MEMBER FUNCTION	keys (key_List SODA_Key_List_T)
---
>     MEMBER FUNCTION keys (key_List SODA_Key_List_T)
26c26
<     MEMBER FUNCTION	limit (limit NUMBER)
---
>     MEMBER FUNCTION limit (limit NUMBER)
29c29
<     MEMBER FUNCTION	remove
---
>     MEMBER FUNCTION remove
32c32
<     MEMBER FUNCTION	replace_One (document SODA_Document_T)
---
>     MEMBER FUNCTION replace_One (document SODA_Document_T)
35c35
<     MEMBER FUNCTION	replace_One_And_Get (document SODA_Document_T)
---
>     MEMBER FUNCTION replace_One_And_Get (document SODA_Document_T)
38c38
<     MEMBER FUNCTION	skip (offset NUMBER)
---
>     MEMBER FUNCTION skip (offset NUMBER)
41c41
<     MEMBER FUNCTION	version (version VARCHAR2)
---
>     MEMBER FUNCTION version (version VARCHAR2)
SYS.SODA_COLLECTION_T - TYPE BODY (RU):
117c117
<     MEMBER FUNCTION	INSERT_MANY (DOCUMENT_LIST SODA_DOCUMENT_LIST_T)
---
>     MEMBER FUNCTION INSERT_MANY (DOCUMENT_LIST SODA_DOCUMENT_LIST_T)
206a207,247
>                 RETURN);
>
>     MEMBER FUNCTION SAVE (DOCUMENT SODA_DOCUMENT_T)
>     RETURN NUMBER IS
>     LANGUAGE C
>     LIBRARY DBMS_SODACOLL_LIB
>     NAME "save"
>     WITH CONTEXT
>     PARAMETERS (CONTEXT,
>                 SELF,
>                 SELF       INDICATOR  SB2,
>                 DOCUMENT,
>                 DOCUMENT   INDICATOR  SB2,
>                 RETURN     INDICATOR  SB2,
>                 RETURN                );
>
>     MEMBER FUNCTION SAVE_AND_GET (DOCUMENT SODA_DOCUMENT_T)
>     RETURN SODA_DOCUMENT_T IS
>     EXTERNAL NAME "saveAndGet"
>     LANGUAGE C
>     LIBRARY DBMS_SODACOLL_LIB
>     WITH CONTEXT
>     PARAMETERS (CONTEXT,
>                 SELF,
>                 SELF       INDICATOR  SB2,
>                 DOCUMENT,
>                 DOCUMENT   INDICATOR  SB2,
>                 RETURN     DURATION   OCIDURATION,
>                 RETURN     INDICATOR  SB2,
>                 RETURN);
>
>     MEMBER FUNCTION TRUNCATE
>     RETURN NUMBER IS
>     LANGUAGE C
>     LIBRARY DBMS_SODACOLL_LIB
>     NAME "truncate"
>     WITH CONTEXT
>     PARAMETERS (CONTEXT,
>                 SELF,
>                 SELF      INDICATOR  SB2,
>                 RETURN    INDICATOR  SB2,
SYS.SODA_OPERATION_T - TYPE BODY (RU):
5c5
<     MEMBER FUNCTION	COUNT
---
>     MEMBER FUNCTION COUNT
32c32
<     MEMBER FUNCTION	GET_CURSOR
---
>     MEMBER FUNCTION GET_CURSOR
45c45
<     MEMBER FUNCTION	GET_ONE
---
>     MEMBER FUNCTION GET_ONE
73c73
<     MEMBER FUNCTION	KEYS (KEY_LIST SODA_KEY_LIST_T)
---
>     MEMBER FUNCTION KEYS (KEY_LIST SODA_KEY_LIST_T)
88c88
<     MEMBER FUNCTION	LIMIT (LIMIT NUMBER)
---
>     MEMBER FUNCTION LIMIT (LIMIT NUMBER)
103c103
<     MEMBER FUNCTION	REMOVE
---
>     MEMBER FUNCTION REMOVE
115c115
<     MEMBER FUNCTION	REPLACE_ONE (DOCUMENT SODA_DOCUMENT_T)
---
>     MEMBER FUNCTION REPLACE_ONE (DOCUMENT SODA_DOCUMENT_T)
129c129
<     MEMBER FUNCTION	REPLACE_ONE_AND_GET (DOCUMENT SODA_DOCUMENT_T)
---
>     MEMBER FUNCTION REPLACE_ONE_AND_GET (DOCUMENT SODA_DOCUMENT_T)
144c144
<     MEMBER FUNCTION	SKIP (OFFSET NUMBER)
---
>     MEMBER FUNCTION SKIP (OFFSET NUMBER)
159c159
<     MEMBER FUNCTION	VERSION (VERSION VARCHAR2)
---
>     MEMBER FUNCTION VERSION (VERSION VARCHAR2)
SYS.WRI$_REPT_SESSION - TYPE BODY (RU):
24a25,26
>     V_REPORT_LEVEL            VARCHAR2(32) := 'all';
>     V_COMPRESS_XML            NUMBER       := 1;
78c80,92
<
---
>
>         IF (V_PARAMS.EXISTS('report_level')) THEN
>             V_REPORT_LEVEL := DBMS_REPORT.GET_PARAM(V_PARAMS,'report_level',
>                                                     NULLABLE=>TRUE);
>         END IF;
>
>
>         IF (V_PARAMS.EXISTS('compress_xml')) THEN
>             V_COMPRESS_XML := TO_NUMBER(
>                                 DBMS_REPORT.GET_PARAM(V_PARAMS,'compress_xml',
>                                                       NULLABLE=>TRUE));
>         END IF;
>
90c104,106
<                                P_MONITOR_LIST_DETAIL => V_MONITOR_LIST_DETAIL);
---
>                                P_MONITOR_LIST_DETAIL => V_MONITOR_LIST_DETAIL,
>                                P_REPORT_LEVEL => V_REPORT_LEVEL,
>                                P_COMPRESS_XML => V_COMPRESS_XML);
SYS.DBA_PARALLEL_EXECUTE_CHUNKS - VIEW (RU):
8,11c8,23
<        c.START_ROWID,
<        c.END_ROWID,
<        c.START_ID,
<        c.END_ID,
---
>        case when userenv('SCHEMAID') = c.task_owner# or userenv('SCHEMAID') = 0
>          then c.START_ROWID
>          else null
>          end START_ROWID,
>        case when userenv('SCHEMAID') = c.task_owner# or userenv('SCHEMAID') = 0
>          then c.END_ROWID
>          else null
>          end END_ROWID,
>        case when userenv('SCHEMAID') = c.task_owner# or userenv('SCHEMAID') = 0
>          then c.START_ID
>          else null
>          end START_ID,
>        case when userenv('SCHEMAID') = c.task_owner# or userenv('SCHEMAID') = 0
>          then c.END_ID
>          else null
>          end END_ID,
SYS.DBA_PARALLEL_EXECUTE_TASKS - VIEW (RU):
17,19c17,28
<        t.TABLE_OWNER,
<        t.TABLE_NAME,
<        t.NUMBER_COLUMN,
---
>        case when userenv('SCHEMAID') = t.task_owner# or userenv('SCHEMAID') = 0
>          then t.TABLE_OWNER
>          else null
>          end TABLE_OWNER,
>        case when userenv('SCHEMAID') = t.task_owner# or userenv('SCHEMAID') = 0
>          then t.TABLE_NAME
>          else null
>          end TABLE_NAME,
>        case when userenv('SCHEMAID') = t.task_owner# or userenv('SCHEMAID') = 0
>          then t.NUMBER_COLUMN
>          else null
>          end NUMBER_COLUMN,
22c31,34
<        t.SQL_STMT,
---
>        case when userenv('SCHEMAID') = t.task_owner# or userenv('SCHEMAID') = 0
>          then t.SQL_STMT
>          else null
>          end SQL_STMT,
XDB.DBMS_JSON - PACKAGE (RU):
12a13,19
> ---------------------------
> -- Materialized view option
> ---------------------------
> MV_REFRESH_ON_STATEMENT CONSTANT NUMBER(2) := 1;
> MV_REFRESH_ON_COMMIT    CONSTANT NUMBER(2) := 2;
> MV_REFRESH_ON_DEMAND    CONSTANT NUMBER(2) := 3;
>
17a25
>
19a28
> FUNCTION GATHER_STATS return NUMBER PARALLEL_ENABLE;
111a121,200
> --  mvRefreshMode
> --     This parameter specifies the materialized view refresh mode. It is one
> --     of the following values:
> --     . MV_REFRESH_ON_STATEMENT (default)
> --     . MV_REFRESH_ON_COMMIT
> --     . MV_REFRESH_ON_DEMAND
> --  path
> --     The path of the JSON field to be expanded. It uses JSON path expression
> --     syntax, e.g. $ will create a view starting from the JSON document root;
> --     $.purchaseOrder will create a view starting from purchaseOrder. It
> --     expands the children/descendants under purchaseOrder, and create view
> --     columns for every scalar values.
> --     Just like create_view_on_path, the top level scalars are always include
> --     in the view, no matter if they are under the given path. In other words,
> --     one can create a view with only top level scalars by specifying a path
> --     pointing to a top level scalar (not under an array).
> --  resolveNameConflicts
> --     By default, if there are conflicts among o:preferred_column_name, an
> --     error will be raised. By setting this parameter to TRUE, the procedure
> --     will automatically resolve the view column name conflicts by appending
> --     a sequence number.
> --  colNamePrefix
> --     By default, the view column name is the same as the JSON field name.
> --     This parameter allows one to provide a prefix to prepend to the view
> --     column names.
> --  mixedCaseColumns
> --     By default, the view column names are case sensitive. This parameter
> --     allows one to change the behavior to case insensitive.
> ---------------------------------------------
> PROCEDURE create_view(viewName  VARCHAR2,
>                       tableName VARCHAR2,
>                       jcolName  VARCHAR2,
>                       dataguide CLOB,
>                       resourcePath   VARCHAR2 DEFAULT NULL,
>                       materialize    BOOLEAN  DEFAULT FALSE,
>                       mvRefreshMode  NUMBER   DEFAULT MV_REFRESH_ON_STATEMENT,
>                       path                    VARCHAR2 DEFAULT '$',
>                       resolveNameConflicts    BOOLEAN  DEFAULT FALSE,
>                       colNamePrefix           VARCHAR2 DEFAULT NULL,
>                       mixedCaseColumns        BOOLEAN DEFAULT FALSE);
>
> ---------------------------------------------
> -- Similar to create_view, but returns the creating view DDL without acutally
> -- creating the view.
> -- When viewName is null, it only returns the select statement of the view DDL.
> -- As one json_table can only produce at most 1000 columns, we will split paths
> -- into joins among multiplt json_tables if the paths are more than 1000.
> -- E.g.
> --    select rt.*, jt1.*, jt2.*
> --    from jtab rt,
> --        json_table(jcol, '$' columns
> --                    c1 number path '$.c1',
> --                    c2 number path '$.c2',
> --                    ...
> --                    c1000 number path '$.c1000') jt1,
> --         json_table(jcol, '$' columns
> --                    c1001 number path '$.c1001',
> --                    ...
> --                    c1555 number path '$.c1555') jt2;
> -- We start a new json_table only when the current field is top
> -- scalar. If the current field is under array when json_table reaches 1000
> -- limit, skip (not include them in view SQL) until we see the next top scalar.
> -- This is avoid cardinality issue. E.g.
> --    select rt.*, jt1.*, jt2.*, jt3.*
> --    from jtab rt,
> --        json_table(jcol, '$' columns
> --                    c1 number path '$.c1',
> --                    c2 number path '$.c2',
> --                    ...
> --                    c1000 number path '$.c1000') jt1,
> --         json_table(jcol, '$' columns
> --                    c1001 number path '$.c1001',
> --                    ...
> --                    nested path '$.c1555' columns
> --                    (d1 number path '$.d1',
> --                     ...                       ) jt2,
> --         json_table(jcol, '$' columns
> --                    c1556 number path '$.c1556',
> --                    ...
> --                    c1789 number path '$.c1789') jt3;
113c202
< PROCEDURE create_view(viewName VARCHAR2,
---
> FUNCTION get_view_sql(viewName  VARCHAR2,
115c204
<                       jcolName VARCHAR2,
---
>                       jcolName  VARCHAR2,
117,118c206,212
<                       resourcePath VARCHAR2 DEFAULT NULL,
<                       materialize BOOLEAN DEFAULT FALSE);
---
>                       materialize    BOOLEAN  DEFAULT FALSE,
>                       mvRefreshMode  NUMBER   DEFAULT MV_REFRESH_ON_STATEMENT,
>                       path                    VARCHAR2 DEFAULT '$',
>                       resolveNameConflicts    BOOLEAN  DEFAULT FALSE,
>                       colNamePrefix           VARCHAR2 DEFAULT NULL,
>                       mixedCaseColumns        BOOLEAN DEFAULT FALSE)
> RETURN CLOB;
155a250,255
> --  mvRefreshMode
> --     This parameter specifies the materialized view refresh mode. It is one
> --     of the following values:
> --     . MV_REFRESH_ON_STATEMENT (default)
> --     . MV_REFRESH_ON_COMMIT
> --     . MV_REFRESH_ON_DEMAND
163c263,265
<                            materialize BOOLEAN DEFAULT FALSE);
---
>                            materialize BOOLEAN DEFAULT FALSE,
>                            mvRefreshMode NUMBER
>                                          DEFAULT MV_REFRESH_ON_STATEMENT);
185a288,299
> --  resolveNameConflicts
> --     By default, if there are conflicts among o:preferred_column_name, an
> --     error will be raised. By setting this parameter to TRUE, the procedure
> --     will automatically resolve the virtual column name conflicts by
> --     appending a sequence number.
> --  colNamePrefix
> --     By default, the virtual column name is the same as the JSON field name.
> --     This parameter allows one to provide a prefix to prepend to the
> --     virtual column names.
> --  mixedCaseColumns
> --     By default, the virtual column names are case sensitive. This parameter
> --     allows one to change the behavior to case insensitive.
189c303,306
<                               dataguide CLOB);
---
>                               dataguide CLOB,
>                               resolveNameConflicts BOOLEAN  DEFAULT FALSE,
>                               colNamePrefix        VARCHAR2 DEFAULT NULL,
>                               mixedCaseColumns     BOOLEAN DEFAULT FALSE);
222c339
<                                hidden BOOLEAN DEFAULT FALSE);
---
>                               hidden BOOLEAN DEFAULT FALSE);
XDB.DBMS_JSON_INT - PACKAGE (RU):
30c30,31
<                            MATERIALIZE BOOLEAN);
---
>                            MATERIALIZE BOOLEAN,
>                            MVREFRESHMODE NUMBER);
XDB.DBMS_SODA_ADMIN - PACKAGE (RU):
56c56,59
<   procedure DROP_COLLECTION(P_URI_NAME in nvarchar2);
---
>   procedure DROP_COLLECTION(P_URI_NAME          in nvarchar2,
>                             P_PURGE             in varchar2 default 'FALSE',
>                             P_DROP_MAPPED_TABLE in varchar2 default 'FALSE');
>
81,83c84,89
<   procedure DROP_COLLECTIONS(P_COLLECTIONS out NVCNTAB,
<                              P_ERRORS out VCNTAB,
<                              P_FORCE in varchar2);
---
>   procedure DROP_COLLECTIONS(P_COLLECTIONS       out NVCNTAB,
>                              P_ERRORS            out VCNTAB,
>                              P_FORCE             in varchar2,
>                              P_PURGE             in varchar2 default 'FALSE',
>                              P_DROP_MAPPED_TABLE in varchar2 default 'FALSE');
>
99a106,120
>   -- Returns service name (cloud), and compatible param
>   --
>   procedure GET_SERVICE_AND_COMPATIBLE (P_SERVICE out VARCHAR2,
>                                         P_COMPATIBLE out number);
>   --
>   -- Returns the default metadata as CLOB
>   --
>   procedure GET_DEFAULT_METADATA_C(P_METADATA out clob);
>
>   --
>   -- Returns the default metadata as VARCHAR2
>   --
>   procedure GET_DEFAULT_METADATA_V(P_METADATA out varchar2);
>
>   --
222c243,248
<                                 P_DATA_GUIDE  in    CLOB);
---
>                                 P_DATA_GUIDE  in    CLOB,
>                                 P_MATERIALIZE in    BOOLEAN DEFAULT FALSE);
>   -- Replaces the value of the schemaName field in the metadata descriptor
>   function CHANGE_SCHEMA(P_DESCRIPTOR in varchar2,
>                          P_SCHEMA in varchar2)
>     return varchar2;
XDB.DBMS_SODA_DML - PACKAGE (RU):
12,14c12
<   PROCEDURE DO_DELETE(P_URI_NAME    IN NVARCHAR2,
<                       P_OWNER       IN VARCHAR2);
<   PROCEDURE DO_DELETE_ALL(P_OWNER   IN VARCHAR2);
---
>
15a14,18
>                       P_OWNER       IN VARCHAR2,
>                       P_SCHEMA_NAME IN VARCHAR2,
>                       P_OBJECT_NAME IN VARCHAR2,
>                       P_OBJECT_TYPE IN VARCHAR2,
>                       P_CREATE_TIME IN TIMESTAMP,
16a20,23
>                       P_DESCRIPTOR  IN VARCHAR2,
>                       P_ROW_COUNT   OUT NUMBER);
>
>   PROCEDURE DO_DELETE(P_URI_NAME    IN NVARCHAR2,
17a25,28
>   PROCEDURE DO_DELETE_ALL(P_OWNER   IN VARCHAR2);
>   PROCEDURE DO_UPDATE_MODE(P_URI_NAME    IN NVARCHAR2,
>                            P_CREATE_MODE IN VARCHAR2,
>                            P_OWNER       IN VARCHAR2);
20c31,32
<                       P_CREATE_MODE OUT VARCHAR2);
---
>                       P_CREATE_MODE OUT VARCHAR2,
>                       P_TIMEOUT     IN PLS_INTEGER DEFAULT NULL);
XDB.DBMS_SODA_DOM - PACKAGE (RU):
25c25,29
<   --
---
>
>   -- Thrown when a patch operation attempts
>   -- to remove the root node it is applied on
>   PATCH_ROOT_REMOVAL_ERROR    constant number := -40667;
>
XDB.DBMS_JSON - PACKAGE BODY (RU):
7c7,8
< TYPE STRSTK IS TABLE OF VARCHAR2(130);
---
> TYPE STRSTK IS TABLE OF VARCHAR2(130) INDEX BY VARCHAR2(130);
> TYPE STEPTAB IS TABLE OF VARCHAR2(4000);
10,15c11,20
< PROCEDURE PUSHSTR(ERRST IN OUT STRSTK, COL VARCHAR2)
< IS
< BEGIN
<   ERRST.EXTEND(1);
<   ERRST(ERRST.COUNT) := COL;
< END;
---
> S_UNICODE_U CONSTANT NUMBER := 1;
> S_UNICODE_1 CONSTANT NUMBER := 2;
> S_UNICODE_2 CONSTANT NUMBER := 3;
> S_UNICODE_3 CONSTANT NUMBER := 4;
> S_UNICODE_4 CONSTANT NUMBER := 5;
>
>
>
>
> COL1K CONSTANT NUMBER := 999;
19a25,26
>   COL    VARCHAR2(130);
>   FIRSTR BOOLEAN;
22,23c29,32
<   FOR I IN 1..ERRST.COUNT LOOP
<     IF (ERRLEN + LENGTH(ERRST(I)) + 1 > 4000) THEN
---
>   COL := ERRST.FIRST;
>   FIRSTR := TRUE;
>   WHILE COL IS NOT NULL LOOP
>     IF (ERRLEN + LENGTH(COL) + 1 > 4000) THEN
26c35,37
<     IF (I > 1) THEN
---
>     IF (FIRSTR) THEN
>       FIRSTR := FALSE;
>     ELSE
30,31c41,44
<     ERRSTR := ERRSTR || ERRST(I);
<     ERRLEN := ERRLEN + LENGTH(ERRST(I));
---
>     ERRSTR := ERRSTR || COL;
>     ERRLEN := ERRLEN + LENGTH(COL);
>
>     COL := ERRST.NEXT(COL);
35,53d47
< FUNCTION LOOKUP_H(STK STRSTK, VAL VARCHAR2,
<                   HEAD NUMBER, TAIL NUMBER) RETURN BOOLEAN
< IS
<   MID NUMBER;
<   PIV VARCHAR2(130);
< BEGIN
<   MID := HEAD + FLOOR((TAIL-HEAD)/2);
<   PIV := STK(MID);
<
<   IF HEAD = TAIL THEN
<   BEGIN
<
<
<
<
<
<     RETURN PIV = VAL;
<   END;
<   END IF;
55,61d48
<   IF PIV = VAL THEN
<     RETURN TRUE;
<   ELSIF (PIV > VAL) THEN
<     RETURN LOOKUP_H(STK, VAL, HEAD, MID);
<   ELSE
<     RETURN LOOKUP_H(STK, VAL, MID+1, TAIL);
<   END IF;
63d49
< END;
65c51,53
< FUNCTION LOOKUP(STK STRSTK, VAL VARCHAR2) RETURN BOOLEAN
---
>
> FUNCTION NORMALIZEARG(TABLENAME IN VARCHAR2)
> RETURN VARCHAR2
66a55
>  TN VARCHAR2(130) := NULL;
68,72d56
<
<   RETURN LOOKUP_H(STK, VAL, 1, STK.COUNT);
< END;
<
<
73a58,64
>   IF (TABLENAME IS NOT NULL) THEN
>     IF (TABLENAME NOT LIKE '"%"') THEN
>       TN := UPPER(TABLENAME);
>     ELSE
>       TN := SUBSTR(TABLENAME, 2, LENGTH(TABLENAME)-2);
>     END IF;
>   END IF;
74a66,67
>   RETURN TN;
> END;
79d71
<  TN VARCHAR2(130);
81c73
<   IF (TABLENAME IS NULL) THEN
---
>   IF ((TABLENAME IS NULL) OR (TABLENAME = '""'))  THEN
86,92c78
<   IF (TABLENAME NOT LIKE '"%"') THEN
<     TN := UPPER(TABLENAME);
<   ELSE
<     TN := SUBSTR(TABLENAME, 2, LENGTH(TABLENAME)-2);
<   END IF;
<
<   RETURN TN;
---
>   RETURN NORMALIZEARG(TABLENAME);
111a98
>   ESCAPEDSTEP := REPLACE(ESCAPEDSTEP,'\','\\');
122,124c109,110
<       IF (ASCII(CHARATPOS) >= ASCII('0') AND
<           ASCII(CHARATPOS) <= ASCII('9') AND
<           I = 1) THEN
---
>       IF (I = 1 AND
>           CHARATPOS >= '0' AND CHARATPOS <= '9') THEN
127,130c113,114
<       IF ((ASCII(CHARATPOS) < ASCII('a') OR
<            ASCII(CHARATPOS) > ASCII('z')) AND
<           (ASCII(CHARATPOS) < ASCII('A') OR
<            ASCII(CHARATPOS) > ASCII('Z')) AND
---
>       IF ((CHARATPOS < 'a' OR CHARATPOS > 'z') AND
>           (CHARATPOS < 'A' OR CHARATPOS > 'Z') AND
146c130,141
< FUNCTION VCERRCHECK(VCNAME VARCHAR2) RETURN VARCHAR2
---
>
>
> FUNCTION PATCHVCNAME(VCNAME           VARCHAR2,
>                      OWNER            VARCHAR2,
>                      TNAME            VARCHAR2,
>                      ERRST     IN OUT STRSTK,
>                      RCLST     IN OUT STRSTK,
>                      COLCNT           NUMBER,
>                      CREATEVIEW       BOOLEAN,
>                      IGNOREERROR      BOOLEAN,
>                      COLNAMEPREFIX    VARCHAR2,
>                      MIXEDCASECOLUMNS BOOLEAN) RETURN VARCHAR2
148a144,145
>   LEN        NUMBER;
>   VCEXISTS   BOOLEAN := FALSE;
150,151c147
<
<   IF (VCNAME = NULL) THEN
---
>   IF (VCNAME IS NULL) THEN
154c150
<
---
>
163c159,165
<   ASSERTEDNM := REPLACE(ASSERTEDNM, '"','\"');
---
>   IF (INSTR(ASSERTEDNM, '"') > 0) THEN
>     IF (IGNOREERROR) THEN
>       ASSERTEDNM := REPLACE(ASSERTEDNM, '"','');
>     ELSE
>       SYS.DBMS_JSON0.RAISEERROR(-40836, ASSERTEDNM);
>     END IF;
>   END IF;
165a168
>
167c170,215
<
---
>   IF (COLNAMEPREFIX IS NOT NULL) THEN
>     LEN := 128 - LENGTH(COLNAMEPREFIX) - LENGTH(ASSERTEDNM);
>     IF (LEN >= 0) THEN
>       ASSERTEDNM := COLNAMEPREFIX || ASSERTEDNM;
>     ELSE
>       ASSERTEDNM := COLNAMEPREFIX ||
>                     SUBSTR(ASSERTEDNM, 1, LENGTH(ASSERTEDNM)+LEN);
>     END IF;
>   END IF;
>
>   IF (MIXEDCASECOLUMNS) THEN
>
>     ASSERTEDNM := UPPER(ASSERTEDNM);
>   END IF;
>
>   IF (CREATEVIEW) THEN
>
>     IF (RCLST.EXISTS(ASSERTEDNM)) THEN
>       VCEXISTS := TRUE;
>     ELSE
>       VCEXISTS := FALSE;
>       RCLST(ASSERTEDNM) := ASSERTEDNM;
>     END IF;
>   ELSE
>
>     VCEXISTS := SYS.DBMS_JSON0.CHECKVCNAME(ASSERTEDNM, OWNER, TNAME);
>   END IF;
>   IF (VCEXISTS) THEN
>     IF (IGNOREERROR) THEN
>
>       LEN := 128 - LENGTH(ASSERTEDNM) - 1 - LENGTH(COLCNT);
>       IF (LEN >= 0) THEN
>         ASSERTEDNM := ASSERTEDNM || '_' || COLCNT;
>       ELSE
>         ASSERTEDNM := SUBSTR(ASSERTEDNM , 1, LENGTH(ASSERTEDNM)+LEN) ||
>                       '_' || COLCNT;
>       END IF;
>       IF (CREATEVIEW) THEN
>
>         RCLST(ASSERTEDNM) := ASSERTEDNM;
>       END IF;
>     ELSE
>       ERRST(ASSERTEDNM) := ASSERTEDNM;
>     END IF;
>   END IF;
>
171d218
<
175a223,424
> PROCEDURE APPENDSTEP(STEP IN OUT VARCHAR2,
>                      SLEN IN OUT NUMBER,
>                      VC   VARCHAR2,
>                      PATH VARCHAR2)
> IS
> BEGIN
>
>   IF (SLEN >= 4000) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40589, PATH);
>   END IF;
>   STEP := STEP || VC;
>   SLEN := SLEN + 1;
> END;
>
> PROCEDURE PARSEJSONPATH(PATH VARCHAR2,
>                         STEPS IN OUT STEPTAB)
> IS
>   PLEN    NUMBER;
>   SLEN    NUMBER := 0;
>   VC      VARCHAR2(10);
>   NEXTVC  VARCHAR2(10) := NULL;
>   STEP    VARCHAR2(4000) := NULL;
>   INQUOTE  BOOLEAN := FALSE;
>   INESCAPE BOOLEAN := FALSE;
>   STATE    NUMBER := 0;
>   UNICODE VARCHAR2(5);
>   NUMSTEPS NUMBER := 0;
>
> BEGIN
>   IF (PATH IS NULL) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40442);
>   END IF;
>
>   STEPS := STEPTAB();
>   PLEN := LENGTH(PATH);
>   FOR I IN 1..PLEN LOOP
>     IF (STATE = S_UNICODE_U) THEN
>       STATE := S_UNICODE_1;
>       CONTINUE;
>     ELSIF (STATE = S_UNICODE_1) THEN
>       STATE := S_UNICODE_2;
>       CONTINUE;
>     ELSIF (STATE = S_UNICODE_2) THEN
>       STATE := S_UNICODE_3;
>       CONTINUE;
>     ELSIF (STATE = S_UNICODE_3) THEN
>       STATE := S_UNICODE_4;
>       CONTINUE;
>     ELSIF (STATE = S_UNICODE_4) THEN
>       STATE := 0;
>       INESCAPE := FALSE;
>     END IF;
>
>     VC := SUBSTR(PATH, I, 1);
>
>     IF (I = 1) THEN
>       IF (VC = '$') THEN
>         CONTINUE;
>       ELSE
>         SYS.DBMS_JSON0.RAISEERROR(-40442, PATH);
>       END IF;
>     END IF;
>
>
>     IF ((I = 2) AND VC != '.') THEN
>       SYS.DBMS_JSON0.RAISEERROR(-40442, PATH);
>     END IF;
>
>
>     IF (VC = '"') THEN
>
>       IF (INESCAPE) THEN
>         APPENDSTEP(STEP, SLEN, '"', PATH);
>         INESCAPE := FALSE;
>       ELSE
>         INQUOTE := NOT INQUOTE;
>       END IF;
>
>
>     ELSIF (VC = '.') THEN
>
>       IF (I = PLEN) THEN
>         SYS.DBMS_JSON0.RAISEERROR(-40442, PATH);
>       END IF;
>       IF (INQUOTE) THEN
>         APPENDSTEP(STEP, SLEN, '.', PATH);
>         CONTINUE;
>       END IF;
>
>       IF (STEP IS NOT NULL) THEN
>         STEPS.EXTEND(1);
>         STEPS(STEPS.COUNT) := STEP;
>
>       ELSIF (I > 2) THEN
>         SYS.DBMS_JSON0.RAISEERROR(-40835, PATH);
>       END IF;
>       STEP := NULL;
>       SLEN := 0;
>       NUMSTEPS := NUMSTEPS + 1;
>
>
>     ELSIF (INQUOTE AND VC = '\') THEN
>       IF (INESCAPE) THEN
>
>         APPENDSTEP(STEP, SLEN, '\', PATH);
>         INESCAPE := FALSE;
>       ELSE
>         INESCAPE := TRUE;
>       END IF;
>
>
>     ELSIF (INESCAPE AND VC = 'u') THEN
>       STATE := S_UNICODE_U;
>
>       IF (I + 4 > PLEN) THEN
>         SYS.DBMS_JSON0.RAISEERROR(-40442, PATH);
>       END IF;
>       UNICODE := '\';
>       FOR J IN I+1..I+4 LOOP
>         NEXTVC := SUBSTR(PATH, J, 1);
>         IF ((NEXTVC >= 'a' AND NEXTVC <= 'f') OR
>             (NEXTVC >= 'A' AND NEXTVC <= 'F') OR
>             (NEXTVC >= '0' AND NEXTVC <= '9')) THEN
>           UNICODE := UNICODE || NEXTVC;
>         ELSE
>           SYS.DBMS_JSON0.RAISEERROR(-40442, PATH);
>         END IF;
>       END LOOP;
>
>       APPENDSTEP(STEP, SLEN, UNISTR(UNICODE), PATH);
>
>
>     ELSIF (INESCAPE) THEN
>       NEXTVC := NULL;
>       IF (VC = '/') THEN
>         NEXTVC := '/';
>       ELSIF (VC = 'b') THEN
>         NEXTVC := TO_CHAR(U'\0008');
>       ELSIF (VC = 'f') THEN
>         NEXTVC := TO_CHAR(U'\000C');
>       ELSIF (VC = 'n') THEN
>         NEXTVC := TO_CHAR(U'\000A');
>       ELSIF (VC = 'r') THEN
>         NEXTVC := TO_CHAR(U'\000D');
>       ELSIF (VC = 't') THEN
>         NEXTVC := TO_CHAR(U'\0009');
>       ELSE
>         SYS.DBMS_JSON0.RAISEERROR(-40442, PATH);
>       END IF;
>       IF (NEXTVC IS NOT NULL) THEN
>         APPENDSTEP(STEP, SLEN, NEXTVC, PATH);
>         INESCAPE := FALSE;
>       END IF;
>
>     ELSE
>
>       IF (NOT INQUOTE) THEN
>
>         IF (VC <= CHR(127)) THEN
>
>           IF (VC >= '0' AND VC <= '9') THEN
>             IF (SLEN = 0) THEN
>               SYS.DBMS_JSON0.RAISEERROR(-40835, PATH);
>             END IF;
>           ELSIF (NOT
>                  ((VC >= 'a' AND VC <= 'z') OR
>                   (VC >= 'A' AND VC <= 'Z') OR
>                   (VC = '_'))) THEN
>             SYS.DBMS_JSON0.RAISEERROR(-40835, PATH);
>           END IF;
>         END IF;
>       END IF;
>       APPENDSTEP(STEP, SLEN, VC, PATH);
>     END IF;
>
>   END LOOP;
>
>
>   IF (INQUOTE) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40442, PATH);
>   END IF;
>
>
>   IF (STEP IS NOT NULL) THEN
>     STEPS.EXTEND(1);
>     STEPS(STEPS.COUNT) := STEP;
>   END IF;
>
>
>   IF (NUMSTEPS != STEPS.COUNT) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40835, PATH);
>   END IF;
>
>
>
>
>
>
>
> END;
>
>
198a448,452
> FUNCTION GATHER_STATS RETURN NUMBER PARALLEL_ENABLE AS
> BEGIN
>   RETURN 4;
> END;
>
206,208c460,465
< DGELE JSON_ELEMENT_T;
< DGOBJ JSON_OBJECT_T;
< PROPELE JSON_ELEMENT_T;
---
> DGELE    JSON_ELEMENT_T;
> DGOBJ    JSON_OBJECT_T;
> PROPELE  JSON_ELEMENT_T;
> TYP      VARCHAR2(40);
> ITEMELEM JSON_ELEMENT_T;
> ITEMOBJ  JSON_OBJECT_T;
211c468
<     SYS.DBMS_JSON0.RAISEERRORMESG(-40594, 'dataguide is null');
---
>     SYS.DBMS_JSON0.RAISEERROR(-40594, 'the dataguide is null');
212a470
>
215c473
<     SYS.DBMS_JSON0.RAISEERRORMESG(-40594, 'root element is not object');
---
>     SYS.DBMS_JSON0.RAISEERROR(-40594, 'the root element is not an object');
219,222c477,501
<   IF (DGOBJ.HAS('type') AND DGOBJ.HAS('properties')) THEN
<     IF (DGOBJ.GET_STRING('type') <> 'object') THEN
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
<           'root element type is not object');
---
>   IF (NOT DGOBJ.HAS('type')) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40594,
>         'the root element does not have child "type"');
>   END IF;
>   TYP := DGOBJ.GET_STRING('type');
>   IF (TYP = 'object') THEN
>     IF (DGOBJ.HAS('properties')) THEN
>       PROPELE := DGOBJ.GET('properties');
>     ELSE
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
>         'the root element (type=object) does not have child "properties"');
>     END IF;
>   ELSIF (TYP = 'array') THEN
>     IF (DGOBJ.HAS('items')) THEN
>       ITEMELEM := DGOBJ.GET('items');
>       ITEMOBJ := TREAT(ITEMELEM AS JSON_OBJECT_T);
>       IF (ITEMOBJ.HAS('properties')) THEN
>         PROPELE := ITEMOBJ.GET('properties');
>       ELSE
>         SYS.DBMS_JSON0.RAISEERROR(-40594,
>           'the root element (type=array) does not have grandchild "properties"');
>       END IF;
>     ELSE
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
>         'the root element (type=array) does not have child "items"');
225,226c504,505
<     SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
<         'root element does not have child "type" or "properties"');
---
>     SYS.DBMS_JSON0.RAISEERROR(-40594,
>           'the root element is neither an object nor an array');
228c507
<   PROPELE := DGOBJ.GET('properties');
---
>
235c514,530
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594, 'checkDGMainObj: ' || SQLERRM);
---
>       SYS.DBMS_JSON0.RAISEERROR(-40594, SQLERRM);
> END;
>
> PROCEDURE VALIDATELENGTH(PROP JSON_OBJECT_T, NAME VARCHAR2)
> IS
> BEGIN
>
>     IF (PROP.HAS('o:length') = FALSE) THEN
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
>         NAME || ' is missing "o:length" property');
>     END IF;
>
>
>     IF (PROP.GET('o:length').IS_NUMBER = FALSE) THEN
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
>         NAME || ': "o:length" is not a number');
>     END IF;
252c547,555
<                       COLCNT IN OUT NUMBER)
---
>                       COLCNT   IN OUT NUMBER,
>                       JTCOLCNT IN OUT NUMBER,
>                       JTPOS    IN OUT NUMBER,
>                       CNAME            VARCHAR2,
>                       IGNOREERROR    BOOLEAN,
>                       COLNAMEPREFIX  VARCHAR2,
>                       MIXEDCASECOLUMNS BOOLEAN,
>                       FROMVIEW         BOOLEAN,
>                       UNDERARRAY       BOOLEAN)
258a562,563
> TYP     VARCHAR2(30);
> I       NUMBER;
260c565,566
<   IF (COLCNT >= 1000) THEN
---
>
>   IF (FROMVIEW AND COLCNT >= 1000) THEN
262a569,603
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>   IF ((NOT FROMVIEW) AND (JTCOLCNT >= COL1K)) THEN
>     IF (UNDERARRAY) THEN
>       RETURN;
>     END IF;
>     JDDL := JDDL||') JT'||TO_CHAR(JTPOS);
>     JDDL := JDDL||','||CHR(10)||'JSON_TABLE(';
>     JDDL := JDDL||DBMS_ASSERT.ENQUOTE_NAME(CNAME,FALSE);
>     JDDL := JDDL||', ''$[*]'' COLUMNS ';
>     JTCOLCNT := 0;
>     JTPOS := JTPOS + 1;
>     FIRST := TRUE;
>   END IF;
>
267a609,618
>
>
>   IF (COLOBJ.HAS('o:preferred_column_name') = FALSE) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40594,
>                    'missing "o:preferred_column_name" in ' || PATH);
>   END IF;
>
>
>   JDDL := JDDL || CHR(10);
>
270c621,623
<   VCNAME := VCERRCHECK(VCNAME);
---
>   VCNAME := PATCHVCNAME(VCNAME, NULL, NULL, ERRST, RCLST, COLCNT, TRUE,
>                         IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
>   JDDL := JDDL || VCNAME;
272,273c625,626
<   JDDL := JDDL || DBMS_ASSERT.ENQUOTE_NAME(VCNAME,FALSE);
<   IF (COLOBJ.GET_STRING('type') = 'array') THEN
---
>   TYP := COLOBJ.GET_STRING('type');
>   IF (TYP = 'array') THEN
275,276c628,629
<
<   ELSIF (COLOBJ.GET_STRING('type') = 'string') THEN
---
>   ELSIF (TYP = 'string') THEN
>     VALIDATELENGTH(COLOBJ, VNM);
284,287c637,641
<   ELSIF (COLOBJ.GET_STRING('type') = 'boolean' OR
<          COLOBJ.GET_STRING('type') = 'null') THEN
<     TYPESTR := ' varchar2('||COLOBJ.GET_STRING('o:length')||') path ';
<   ELSIF (COLOBJ.GET_STRING('type') = 'number') THEN
---
>
>   ELSIF (TYP = 'boolean' OR TYP = 'null') THEN
>     VALIDATELENGTH(COLOBJ, VNM);
>     TYPESTR := ' varchar2('||COLOBJ.GET_NUMBER('o:length')||') path ';
>   ELSIF (TYP = 'number') THEN
290c644
<   ELSIF (COLOBJ.GET_STRING('type') = 'GeoJSON') THEN
---
>   ELSIF (TYP = 'GeoJSON') THEN
293,296c647
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594, VNM || ': invalue "type" value');
<   END IF;
<   IF RCLST.COUNT > 0 AND LOOKUP(RCLST, VNM) THEN
<     PUSHSTR(ERRST, VNM);
---
>     SYS.DBMS_JSON0.RAISEERROR(-40594, VNM || 'has invalid type ' || TYP);
300a652,653
>   JTCOLCNT := JTCOLCNT + 1;
>
318c671
<   JDDL := JDDL || ' NESTED PATH ';
---
>   JDDL := JDDL || CHR(10) || ' NESTED PATH ';
360c713,715
<     PUSHSTR(RCSTK, COLNAME);
---
>
>     RCSTK(COLNAME) := COLNAME;
>
377c732,733
<                      FIRST IN OUT BOOLEAN, JDDL IN OUT CLOB,
---
>                      FIRST IN OUT BOOLEAN,
>                      JDDL IN OUT CLOB,
381c737,749
<                      COLCNT IN OUT NUMBER)
---
>                      COLCNT   IN OUT NUMBER,
>                      JTCOLCNT IN OUT NUMBER,
>                      JTPOS    IN OUT NUMBER,
>                      CNAME              VARCHAR2,
>                      STEPS              STEPTAB,
>                      POS                NUMBER,
>                      INPATH             BOOLEAN,
>                      UNDERARRAY         BOOLEAN,
>                      PATHSTEPPED IN OUT BOOLEAN,
>                      IGNOREERROR    BOOLEAN,
>                      COLNAMEPREFIX  VARCHAR2,
>                      MIXEDCASECOLUMNS BOOLEAN,
>                      FROMVIEW         BOOLEAN)
397c765,769
<   N NUMBER;
---
>   N             NUMBER;
>   TYP           VARCHAR2(30);
>   CHILDINPATH   BOOLEAN;
>   ANYCHILDSTEPPED BOOLEAN := FALSE;
>
407d778
<     MULTITYPED := PROPOBJ.HAS('oneOf');
408a780
>     MULTITYPED := PROPOBJ.HAS('oneOf');
420c792
<           SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
---
>           SYS.DBMS_JSON0.RAISEERROR(-40594,
442c814,817
<         BUILDJCOLS(TEMPOBJ, PATH, FIRST, JDDL, MAXVC, ERRST, RCLST, COLCNT);
---
>         BUILDJCOLS(TEMPOBJ, PATH, FIRST, JDDL, MAXVC, ERRST, RCLST, COLCNT,
>                    JTCOLCNT, JTPOS, CNAME,
>                    STEPS, POS, INPATH, UNDERARRAY, PATHSTEPPED,
>                    IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS, FROMVIEW);
448a824,843
>
>
>
>
>
>
>
>
>
>     CHILDINPATH := FALSE;
>     IF (INPATH) THEN
>       IF (POS > STEPS.COUNT) THEN
>         CHILDINPATH := TRUE;
>       ELSIF (COLKEYS(I) = STEPS(POS)) THEN
>         CHILDINPATH := TRUE;
>         ANYCHILDSTEPPED := TRUE;
>       END IF;
>     END IF;
>
>
451c846
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
---
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
454a850
>     TYP := PROPOBJ.GET_STRING('type');
456c852
<     IF (PROPOBJ.GET_STRING('type') = 'object') THEN
---
>     IF (TYP = 'object') THEN
465,466c861,864
<       BUILDJCOLS(PROPSOBJ, PATH ||'.'|| ESCAPEPATHSTEP(COLKEYS(I)), FIRST,JDDL,
<                  MAXVC, ERRST, RCLST, COLCNT);
---
>       BUILDJCOLS(PROPSOBJ, PATH ||'.'|| ESCAPEPATHSTEP(COLKEYS(I)), FIRST,
>                  JDDL, MAXVC, ERRST, RCLST, COLCNT, JTCOLCNT, JTPOS, CNAME,
>                  STEPS, POS+1, CHILDINPATH, UNDERARRAY, PATHSTEPPED,
>                  IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS, FROMVIEW);
469c867
<     ELSIF (PROPOBJ.GET_STRING('type') = 'array') THEN
---
>     ELSIF (TYP = 'array') THEN
472c870,879
<       IF (COLCNT >= 1000) THEN
---
>       IF (JTCOLCNT >= COL1K) THEN
>         CONTINUE;
>       END IF;
>
>
>       IF (FROMVIEW AND COLCNT >= 1000) THEN
>         CONTINUE;
>       END IF;
>
>       IF (NOT CHILDINPATH) THEN
477,479c884,889
<         BUILDCOLUMN(PROPOBJ, PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), FIRST,JDDL,
<                     MAXVC, ERRST, RCLST, COLCNT);
<       ELSE BEGIN
---
>
>         BUILDCOLUMN(PROPOBJ, PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), FIRST,
>                     JDDL, MAXVC, ERRST, RCLST, COLCNT, JTCOLCNT, JTPOS, CNAME,
>                     IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS,
>                     FROMVIEW, TRUE);
>       ELSE
484c894,898
<         STARTNESTED(PATH||'.'||COLKEYS(I), FIRST, JDDL, FIRSTINNESTED);
---
>         STARTNESTED(PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), FIRST, JDDL,
>                     FIRSTINNESTED);
>
>
>         JTCOLCNT := JTCOLCNT + 1;
488d901
<         BEGIN
490,492c903,905
<                       ERRST, RCLST, COLCNT);
<           COLCNT := COLCNT + 1;
<         END;
---
>                       ERRST, RCLST, COLCNT, JTCOLCNT, JTPOS, CNAME,
>                       IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS,
>                       FROMVIEW, TRUE);
497d909
<         BEGIN
501,502c913,915
<                      ERRST, RCLST, COLCNT);
<         END;
---
>                      ERRST, RCLST, COLCNT, JTCOLCNT, JTPOS, CNAME,
>                      STEPS, POS+1, CHILDINPATH, TRUE, PATHSTEPPED,
>                      IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS, FROMVIEW);
506c919
<       END;
---
>
511,517c924,935
<     ELSIF (PROPOBJ.GET_STRING('type') = 'number' OR
<            PROPOBJ.GET_STRING('type') = 'string' OR
<            PROPOBJ.GET_STRING('type') = 'boolean' OR
<            PROPOBJ.GET_STRING('type') = 'GeoJSON' OR
<            PROPOBJ.GET_STRING('type') = 'null') THEN
<       BUILDCOLUMN(PROPOBJ, PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), FIRST, JDDL,
<                   MAXVC, ERRST, RCLST, COLCNT);
---
>     ELSIF (TYP = 'number' OR
>            TYP = 'string' OR
>            TYP = 'boolean' OR
>            TYP = 'GeoJSON' OR
>            TYP = 'null') THEN
>
>       IF ((NOT UNDERARRAY) OR CHILDINPATH) THEN
>         BUILDCOLUMN(PROPOBJ, PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), FIRST,
>                     JDDL, MAXVC, ERRST, RCLST, COLCNT, JTCOLCNT, JTPOS, CNAME,
>                     IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS,
>                     FROMVIEW, UNDERARRAY);
>       END IF;
520,521c938,939
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
<           COLKEYS(I) || ' has invalid "type" value');
---
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
>           COLKEYS(I) || ' has invalid type ' || TYP);
524a943,946
>
>   IF (ANYCHILDSTEPPED AND (POS = STEPS.COUNT)) THEN
>     PATHSTEPPED := TRUE;
>   END IF;
535,539c957,964
<                           ERRST IN OUT STRSTK,
<                           ERRSTR IN OUT VARCHAR2,
<                           COLCNT IN OUT NUMBER,
<                           RESOURCEPATH VARCHAR2,
<                           MATERIALIZE BOOLEAN)
---
>                           DDL   IN OUT CLOB,
>                           MATERIALIZE BOOLEAN,
>                           MVMODE      NUMBER,
>                           PATH           VARCHAR2,
>                           STEPS          STEPTAB,
>                           IGNOREERROR    BOOLEAN,
>                           COLNAMEPREFIX  VARCHAR2,
>                           MIXEDCASECOLUMNS BOOLEAN)
545d969
< DDL    CLOB;
547a972,974
> ERRST STRSTK;
> ERRSTR VARCHAR2(4000);
> COLCNT NUMBER := 0;
549,550c976,980
< DUPCOL EXCEPTION;
< PRAGMA EXCEPTION_INIT(DUPCOL, -957);
---
> JTCOLCNT  NUMBER := 0;
> JTPOS     NUMBER := 1;
> I         NUMBER := 0;
> PATHSTEPPED BOOLEAN := FALSE;
> FROMVIEW    BOOLEAN;
552a983
>   ERRST := STRSTK();
555,557c986,987
<   DBMS_LOB.CREATETEMPORARY(RELDDL,TRUE,DBMS_LOB.SESSION);
<   DBMS_LOB.CREATETEMPORARY(JSNDDL,TRUE,DBMS_LOB.SESSION);
<   DBMS_LOB.CREATETEMPORARY(DDL,TRUE,DBMS_LOB.SESSION);
---
>   DBMS_LOB.CREATETEMPORARY(RELDDL,TRUE,DBMS_LOB.CALL);
>   DBMS_LOB.CREATETEMPORARY(JSNDDL,TRUE,DBMS_LOB.CALL);
560c990,997
<   BUILDJCOLS(PROPS, '$', FIRSTJCOL, JSNDDL, MAXVC, ERRST, RCSTK, COLCNT);
---
>   IF (VNAME IS NULL) THEN
>     FROMVIEW := FALSE;
>   ELSE
>     FROMVIEW := TRUE;
>   END IF;
>   BUILDJCOLS(PROPS, '$', FIRSTJCOL, JSNDDL, MAXVC, ERRST, RCSTK, COLCNT,
>              JTCOLCNT, JTPOS, CNAME, STEPS, 1, TRUE, FALSE, PATHSTEPPED,
>              IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS, FROMVIEW);
563c1000,1004
<   COLCNT := COLCNT - RELCOLCNT;
---
>   IF ((STEPS.COUNT > 0) AND (NOT PATHSTEPPED)) THEN
>     DBMS_LOB.FREETEMPORARY(RELDDL);
>     DBMS_LOB.FREETEMPORARY(JSNDDL);
>     SYS.DBMS_JSON0.RAISEERROR(-40589, PATH);
>   END IF;
566,567c1007,1011
<   IF (RELCOLCNT = 0 AND COLCNT = 0) THEN
<     RETURN;
---
>   IF (ERRST.FIRST IS NOT NULL) THEN
>     DBMS_LOB.FREETEMPORARY(RELDDL);
>     DBMS_LOB.FREETEMPORARY(JSNDDL);
>     COLERRSTR(ERRST,ERRSTR);
>     SYS.DBMS_JSON0.RAISEERROR(-40593, ERRSTR);
571,577c1015,1022
<   IF (MATERIALIZE) THEN
<     DDL := 'CREATE MATERIALIZED VIEW ';
<     IF (SYS.DBMS_JSON0.CHECKPK(OWNER, TNAME)) THEN
<       HASPK := TRUE;
<     END IF;
<   ELSE
<     DDL := 'CREATE OR REPLACE VIEW ';
---
>
>   JTCOLCNT := COLCNT - RELCOLCNT;
>
>
>   IF (RELCOLCNT = 0 AND JTCOLCNT = 0) THEN
>     DBMS_LOB.FREETEMPORARY(RELDDL);
>     DBMS_LOB.FREETEMPORARY(JSNDDL);
>     RETURN;
579,580c1024
<   DDL := DDL||DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE)||'.';
<   DDL := DDL||DBMS_ASSERT.ENQUOTE_NAME(VNAME,FALSE);
---
>
582,583c1026,1047
<   IF (MATERIALIZE) THEN
<     DDL := DDL||'BUILD IMMEDIATE REFRESH FAST ON STATEMENT WITH ';
---
>   IF (FROMVIEW) THEN
>     IF (MATERIALIZE) THEN
>       DDL := 'CREATE MATERIALIZED VIEW ';
>       IF (SYS.DBMS_JSON0.CHECKPK(OWNER, TNAME)) THEN
>         HASPK := TRUE;
>       END IF;
>     ELSE
>       DDL := 'CREATE OR REPLACE VIEW ';
>     END IF;
>     DDL := DDL||DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE)||'.';
>     DDL := DDL||DBMS_ASSERT.ENQUOTE_NAME(VNAME,FALSE);
>
>     IF (MATERIALIZE) THEN
>       DDL := DDL||'BUILD IMMEDIATE REFRESH FAST ON ';
>       IF (MVMODE = MV_REFRESH_ON_STATEMENT) THEN
>         DDL := DDL || 'STATEMENT ';
>       ELSIF (MVMODE = MV_REFRESH_ON_COMMIT) THEN
>         DDL := DDL || 'COMMIT ';
>       ELSE
>         DDL := DDL || 'DEMAND ';
>     END IF;
>     DDL := DDL || 'WITH ';
589,590c1053,1059
<   END IF;
<   DDL := DDL||' AS SELECT ';
---
>     END IF;
>     DDL := DDL||' AS ';
>   ELSE
>     DDL := '';
>   END IF;
>
>   DDL := DDL||'SELECT ';
600,604c1069,1071
<   IF (COLCNT = 0) THEN
<   BEGIN
<     DDL := DDL||'FROM '||DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE);
<     DDL := DDL||'.'||DBMS_ASSERT.ENQUOTE_NAME(TNAME,FALSE)||' RT ';
<   END;
---
>   IF (JTCOLCNT = 0) THEN
>     DDL := DDL||CHR(10)||'FROM '||DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE);
>     DDL := DDL||'.'||DBMS_ASSERT.ENQUOTE_NAME(TNAME,FALSE)||' RT';
609,611c1076,1089
<     DDL := DDL||'JT.* FROM '||DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE);
<     DDL := DDL||'.'||DBMS_ASSERT.ENQUOTE_NAME(TNAME, FALSE)||' RT ';
<     DDL := DDL||', JSON_TABLE(';
---
>     IF (JTPOS > 1) THEN
>      FOR I IN 1..JTPOS
>      LOOP
>        IF (I > 1) THEN
>          DDL := DDL||',';
>        END IF;
>        DDL := DDL||'JT'||I||'.*';
>      END LOOP;
>     ELSE
>      DDL := DDL||'JT.*';
>     END IF;
>     DDL := DDL||CHR(10)||'FROM '||DBMS_ASSERT.ENQUOTE_NAME(OWNER,FALSE);
>     DDL := DDL||'.'||DBMS_ASSERT.ENQUOTE_NAME(TNAME, FALSE)||' RT,';
>     DDL := DDL||CHR(10)||'JSON_TABLE(';
613c1091
<     DDL := DDL||' FORMAT JSON, ''$'' COLUMNS ';
---
>     DDL := DDL||', ''$[*]'' COLUMNS ';
615,639c1093,1097
<     DDL := DDL||')JT';
<   END IF;
<
<
<
<
<   COLCNT := COLCNT + RELCOLCNT;
<
<
<
<   IF (COLCNT <= 0) THEN
<     RETURN;
<   END IF;
<
<   EXECUTE IMMEDIATE DDL;
<
<   IF (RESOURCEPATH IS NOT NULL) THEN
<   BEGIN
<
<
<     EXECUTE IMMEDIATE 'declare cresRet boolean; begin cresRet := dbms_xdb.createresource(:resourcePath, :ddl); end;' USING RESOURCEPATH, DDL;
<   EXCEPTION
<     WHEN OTHERS THEN
<       NULL;
<   END;
---
>     IF (JTPOS > 1) THEN
>       DDL := DDL||') JT'||TO_CHAR(JTPOS);
>     ELSE
>       DDL := DDL||')JT';
>     END IF;
642,654c1100
<   EXCEPTION
<     WHEN DUPCOL THEN
<       BEGIN
<         COLERRSTR(ERRST,ERRSTR);
<
<         DBMS_LOB.FREETEMPORARY(RELDDL);
<         DBMS_LOB.FREETEMPORARY(JSNDDL);
<         DBMS_LOB.FREETEMPORARY(DDL);
<         SYS.DBMS_JSON0.RAISEERROR(-40593, ERRSTR);
<       END;
<
<
<   DBMS_LOB.FREETEMPORARY(RELDDL);
---
>   DBMS_LOB.FREETEMPORARY(RELDDL);
656d1101
<   DBMS_LOB.FREETEMPORARY(DDL);
658d1102
<   RETURN;
680,682c1124,1125
<                    PATH VARCHAR2,
<                    TYP VARCHAR2,
<                    ADDNEW BOOLEAN,
---
>                    PATH   VARCHAR2,
>                    TYP    VARCHAR2,
684c1127,1131
<                    ERRST IN OUT STRSTK)
---
>                    ERRST IN OUT STRSTK,
>                    COLCNT IN OUT NUMBER,
>                    IGNOREERROR      BOOLEAN,
>                    COLNAMEPREFIX    VARCHAR2,
>                    MIXEDCASECOLUMNS BOOLEAN)
686,687c1133
<   NEW    BOOLEAN := ADDNEW;
<   OKNAME BOOLEAN;
---
>   RCLST  STRSTK;
692d1137
<   VC     VARCHAR2(130);
694c1139,1141
<   VCEXISTS EXCEPTION;
---
>   VCEXISTS BOOLEAN := FALSE;
>   KVCNAMEEXISTS EXCEPTION;
>   KVCEXISTS EXCEPTION;
696c1143,1144
<   PRAGMA EXCEPTION_INIT(VCEXISTS, -1430);
---
>   PRAGMA EXCEPTION_INIT(KVCNAMEEXISTS, -1430);
>   PRAGMA EXCEPTION_INIT(KVCEXISTS, -54015);
701c1149,1150
<     SYS.DBMS_JSON0.RAISEERRORMESG(-40594, 'missing "o:preferred_column_name"');
---
>     SYS.DBMS_JSON0.RAISEERROR(-40594,
>                    'missing "o:preferred_column_name" in ' || PATH);
706,719c1155,1156
<   VC := PRVCNM;
<   PRVCNM := VCERRCHECK(PRVCNM);
<
<
<
<   OKNAME := SYS.DBMS_JSON0.CHECKVCNAME(VC, OWNER, TNAME, CNAME);
<
<
<
<   IF (OKNAME = FALSE) THEN
<     PUSHSTR(ERRST, VC);
<
<     RETURN;
<   END IF;
---
>   PRVCNM := PATCHVCNAME(PRVCNM, OWNER, TNAME, ERRST, RCLST, COLCNT, FALSE,
>                         IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
727,731c1164
<   IF (ADDNEW = TRUE) THEN
<     VCSTMT := VCSTMT || ' add ';
<   ELSE
<     VCSTMT := VCSTMT || ' modify ';
<   END IF;
---
>   VCSTMT := VCSTMT || ' add ';
744,745c1177
<     WHEN VCEXISTS THEN
<     BEGIN
---
>     WHEN KVCEXISTS OR KVCNAMEEXISTS THEN
747,750c1179,1181
<       CREATEVC(OWNER, TNAME, CNAME, PROPOBJ, PATH, TYP, FALSE, LIMITREACHED,
<                ERRST);
<       NEW := FALSE;
<     END;
---
>
>
>       VCEXISTS := TRUE;
760c1191
<   IF (NEW = TRUE AND LIMITREACHED = FALSE) THEN
---
>   IF (VCEXISTS = FALSE AND LIMITREACHED = FALSE) THEN
792a1224
>                   MAXVC NUMBER,
794c1226,1230
<                   ERRST IN OUT STRSTK)
---
>                   ERRST IN OUT STRSTK,
>                   COLCNT IN OUT NUMBER,
>                   IGNOREERROR      BOOLEAN,
>                   COLNAMEPREFIX    VARCHAR2,
>                   MIXEDCASECOLUMNS BOOLEAN)
809d1244
< ARRAYTYPED    BOOLEAN := FALSE;
847c1282,1284
<         ADDVC_H(OWNER, TABLENAME, COLNAME, PATH, TEMPOBJ, LIMITREACHED, ERRST);
---
>         ADDVC_H(OWNER, TABLENAME, COLNAME, PATH, TEMPOBJ, MAXVC,
>                 LIMITREACHED, ERRST, COLCNT,
>                 IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
857c1294
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
---
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
868,869c1305,1306
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
<           COLKEYS(I) || ' has invalid "type" value');
---
>       SYS.DBMS_JSON0.RAISEERROR(-40594,
>           COLKEYS(I) || ' has invalid type ' || TYP);
873,886c1310
<     IF (PROPOBJ.HAS('o:length') = FALSE) THEN
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
<         COLKEYS(I) || ' is missing o:length property');
<     END IF;
<
<
<     IF (PROPOBJ.HAS('o:length') = TRUE AND
<         PROPOBJ.GET('o:length').IS_NUMBER = FALSE) THEN
<       SYS.DBMS_JSON0.RAISEERRORMESG(-40594,
<           COLKEYS(I) || ': "o:length" is not a number');
<     END IF;
<
<
<     IF (PROPOBJ.GET_STRING('type') = 'object') THEN
---
>     IF (TYP = 'object') THEN
894c1318,1319
<               PROPSOBJ, LIMITREACHED, ERRST);
---
>               PROPSOBJ, MAXVC, LIMITREACHED, ERRST, COLCNT,
>               IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
897c1322
<     ELSIF (PROPOBJ.GET_STRING('type') = 'number') THEN
---
>     ELSIF (TYP = 'number') THEN
899,907c1324,1341
<                PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), 'number',
<                TRUE, LIMITREACHED, ERRST);
<
<     ELSIF (PROPOBJ.GET_STRING('type') = 'string' OR
<            PROPOBJ.GET_STRING('type') = 'boolean' OR
<            PROPOBJ.GET_STRING('type') = 'null') THEN
<       CREATEVC(OWNER, TNAME, CNAME, PROPOBJ, PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)),
<                'varchar2('|| PROPOBJ.GET_STRING('o:length')||')', TRUE,
<                LIMITREACHED, ERRST);
---
>                PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), TYP,
>                LIMITREACHED, ERRST, COLCNT,
>                IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
>
>     ELSIF (TYP = 'string' OR TYP = 'boolean' OR TYP = 'null') THEN
>       VALIDATELENGTH(PROPOBJ, COLKEYS(I));
>       IF (PROPOBJ.GET_NUMBER('o:length') <= MAXVC) THEN
>         CREATEVC(OWNER, TNAME, CNAME, PROPOBJ,
>                  PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)),
>                  'varchar2('|| PROPOBJ.GET_STRING('o:length')||')',
>                  LIMITREACHED, ERRST, COLCNT,
>                  IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
>       ELSE
>         CREATEVC(OWNER, TNAME, CNAME, PROPOBJ,
>                PATH||'.'||ESCAPEPATHSTEP(COLKEYS(I)), 'clob',
>                LIMITREACHED, ERRST, COLCNT,
>                IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
>       END IF;
909c1343
<     ELSIF (PROPOBJ.GET_STRING('type') = 'GeoJSON') THEN
---
>     ELSIF (TYP = 'GeoJSON') THEN
912c1346,1347
<                TRUE, LIMITREACHED, ERRST);
---
>                LIMITREACHED, ERRST, COLCNT,
>                IGNOREERROR, COLNAMEPREFIX, MIXEDCASECOLUMNS);
1051,1059c1486,1496
<
<
<
< PROCEDURE CREATE_VIEW(VIEWNAME VARCHAR2,
<                       TABLENAME VARCHAR2,
<                       JCOLNAME VARCHAR2,
<                       DATAGUIDE CLOB,
<                       RESOURCEPATH VARCHAR2 DEFAULT NULL,
<                       MATERIALIZE BOOLEAN DEFAULT FALSE)
---
> FUNCTION GET_VIEW_SQL_H(VNAME  VARCHAR2,
>                         TABLENAME VARCHAR2,
>                         JCOLNAME  VARCHAR2,
>                         DATAGUIDE CLOB,
>                         MATERIALIZE    BOOLEAN,
>                         MVREFRESHMODE  NUMBER,
>                         PATH                    VARCHAR2,
>                         RESOLVENAMECONFLICTS    BOOLEAN,
>                         COLNAMEPREFIX           VARCHAR2,
>                         MIXEDCASECOLUMNS        BOOLEAN)
> RETURN CLOB
1062d1498
< VNAME VARCHAR2(130);
1066,1071c1502,1503
< ERRST STRSTK;
< ERRSTR VARCHAR2(4000);
< CRESRET BOOLEAN;
< COLCNT NUMBER := 0;
< DUPCOL EXCEPTION;
< PRAGMA EXCEPTION_INIT(DUPCOL, -957);
---
> STEPS STEPTAB;
> DDL   CLOB;
1077d1508
<   VNAME := ARGERRCHECK(VIEWNAME);
1081,1082c1512,1517
<
<
---
>
>   IF (MVREFRESHMODE NOT IN (MV_REFRESH_ON_STATEMENT,
>                     MV_REFRESH_ON_COMMIT, MV_REFRESH_ON_DEMAND)) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40837);
>   END IF;
>
1087d1521
<   ERRST := STRSTK();
1089,1090c1523,1555
<   BUILDCREATEVIEW(UNAME, VNAME, TNAME, CNAME, DGPROPS, ERRST,
<                   ERRSTR, COLCNT, RESOURCEPATH, MATERIALIZE);
---
>   STEPS := STEPTAB();
>   PARSEJSONPATH(PATH, STEPS);
>
>   DBMS_LOB.CREATETEMPORARY(DDL,TRUE,DBMS_LOB.SESSION);
>
>   BUILDCREATEVIEW(UNAME, VNAME, TNAME, CNAME, DGPROPS, DDL,
>                   MATERIALIZE, MVREFRESHMODE, PATH, STEPS,
>                   RESOLVENAMECONFLICTS, COLNAMEPREFIX, MIXEDCASECOLUMNS);
>   RETURN DDL;
>
> END;
>
>
>
>
> PROCEDURE CREATE_VIEW(VIEWNAME VARCHAR2,
>                       TABLENAME VARCHAR2,
>                       JCOLNAME VARCHAR2,
>                       DATAGUIDE CLOB,
>                       RESOURCEPATH  VARCHAR2 DEFAULT NULL,
>                       MATERIALIZE   BOOLEAN  DEFAULT FALSE,
>                       MVREFRESHMODE NUMBER   DEFAULT MV_REFRESH_ON_STATEMENT,
>                       PATH                    VARCHAR2 DEFAULT '$',
>                       RESOLVENAMECONFLICTS    BOOLEAN  DEFAULT FALSE,
>                       COLNAMEPREFIX           VARCHAR2 DEFAULT NULL,
>                       MIXEDCASECOLUMNS        BOOLEAN DEFAULT FALSE)
> IS
> VNAME       VARCHAR2(130);
> DDL         CLOB;
> BEGIN
>
>   VNAME := ARGERRCHECK(VIEWNAME);
>
1091a1557,1616
>   DDL := GET_VIEW_SQL_H(VNAME, TABLENAME, JCOLNAME, DATAGUIDE, MATERIALIZE,
>                       MVREFRESHMODE, PATH, RESOLVENAMECONFLICTS, COLNAMEPREFIX,
>                       MIXEDCASECOLUMNS);
>
>   IF (DBMS_LOB.COMPARE(DDL, EMPTY_CLOB()) = 0) THEN
>     RETURN;
>   END IF;
>
>   BEGIN
>     EXECUTE IMMEDIATE DDL;
>
>   EXCEPTION
>     WHEN OTHERS THEN
>       DBMS_OUTPUT.PUT_LINE('DDL:['||DDL||']');
>
>       DBMS_LOB.FREETEMPORARY(DDL);
>       RAISE;
>   END;
>
>   IF (RESOURCEPATH IS NOT NULL) THEN
>   BEGIN
>
>
>     EXECUTE IMMEDIATE
>       'declare cresRet boolean;
>        begin cresRet := dbms_xdb.createresource(:resourcePath, :ddl);
>        end;' USING RESOURCEPATH, DDL;
>   EXCEPTION
>     WHEN OTHERS THEN
>
>       DBMS_LOB.FREETEMPORARY(DDL);
>   END;
>   END IF;
>
>
>   DBMS_LOB.FREETEMPORARY(DDL);
>   RETURN;
>
> END;
>
> FUNCTION GET_VIEW_SQL(VIEWNAME  VARCHAR2,
>                       TABLENAME VARCHAR2,
>                       JCOLNAME  VARCHAR2,
>                       DATAGUIDE CLOB,
>                       MATERIALIZE    BOOLEAN  DEFAULT FALSE,
>                       MVREFRESHMODE  NUMBER   DEFAULT MV_REFRESH_ON_STATEMENT,
>                       PATH                    VARCHAR2 DEFAULT '$',
>                       RESOLVENAMECONFLICTS    BOOLEAN  DEFAULT FALSE,
>                       COLNAMEPREFIX           VARCHAR2 DEFAULT NULL,
>                       MIXEDCASECOLUMNS        BOOLEAN DEFAULT FALSE)
> RETURN CLOB
> IS
>   VNAME       VARCHAR2(130);
> BEGIN
>
>   VNAME := NORMALIZEARG(VIEWNAME);
>
>   RETURN GET_VIEW_SQL_H(VNAME, TABLENAME, JCOLNAME, DATAGUIDE, MATERIALIZE,
>                       MVREFRESHMODE, PATH, RESOLVENAMECONFLICTS, COLNAMEPREFIX,
>                       MIXEDCASECOLUMNS);
1103c1628,1630
<                               MATERIALIZE BOOLEAN DEFAULT FALSE)
---
>                               MATERIALIZE BOOLEAN DEFAULT FALSE,
>                               MVREFRESHMODE NUMBER
>                                             DEFAULT MV_REFRESH_ON_STATEMENT)
1110a1638
> STEPS STEPTAB;
1122a1651,1659
>   IF (MVREFRESHMODE NOT IN (MV_REFRESH_ON_STATEMENT,
>                     MV_REFRESH_ON_COMMIT, MV_REFRESH_ON_DEMAND)) THEN
>     SYS.DBMS_JSON0.RAISEERROR(-40837);
>   END IF;
>
>
>
>
>
1125c1662
<                                  MATERIALIZE);
---
>                                  MATERIALIZE, MVREFRESHMODE);
1135c1672,1675
<                               DATAGUIDE CLOB)
---
>                               DATAGUIDE CLOB,
>                               RESOLVENAMECONFLICTS BOOLEAN  DEFAULT FALSE,
>                               COLNAMEPREFIX        VARCHAR2 DEFAULT NULL,
>                               MIXEDCASECOLUMNS     BOOLEAN DEFAULT FALSE)
1141a1682
> MAXVC NUMBER;
1143a1685
> COLCNT NUMBER := 0;
1158c1700,1703
<   ADDVC_H(UNAME, TNAME, CNAME, '$', DGPROPS, LIMITREACHED, ERRST);
---
>   MAXVC := SYS.DBMS_JSON0.GETMAXVCSIZE();
>   ADDVC_H(UNAME, TNAME, CNAME, '$', DGPROPS, MAXVC, LIMITREACHED,
>           ERRST, COLCNT,
>           RESOLVENAMECONFLICTS, COLNAMEPREFIX, MIXEDCASECOLUMNS);
1160,1164c1705,1709
<   IF (ERRST.COUNT > 0) THEN
<   BEGIN
<     COLERRSTR(ERRST,ERRSTR);
<     SYS.DBMS_JSON0.RAISEERROR(-40592, ERRSTR);
<   END;
---
>   IF (ERRST.FIRST IS NOT NULL) THEN
>     BEGIN
>       COLERRSTR(ERRST,ERRSTR);
>       SYS.DBMS_JSON0.RAISEERROR(-40592, ERRSTR);
>     END;
XDB.DBMS_JSON_INT - PACKAGE BODY (RU):
92c92,93
<                            MATERIALIZE BOOLEAN)
---
>                            MATERIALIZE BOOLEAN,
>                            MVREFRESHMODE NUMBER)
127c128,130
<               MATERIALIZE            INDICATOR SB4
---
>               MATERIALIZE            INDICATOR SB4,
>               MVREFRESHMODE              OCINUMBER,
>               MVREFRESHMODE          INDICATOR SB4
XDB.DBMS_SODA_ADMIN - PACKAGE BODY (RU):
5a6,7
>
>   MAX_BINARY_SIZE                 CONSTANT VARCHAR2(50) := '32m';
58a61,62
>   V_COMPATIBLE NUMBER := NULL;
>   V_SERVICE VARCHAR2(200) := NULL;
301c305,306
<     IF (P_CONTENT_COLUMN_TYPE IN ('CLOB', 'NCLOB', 'BLOB')) THEN
---
>     IF ((P_CONTENT_COLUMN_TYPE IN ('CLOB', 'NCLOB', 'BLOB')) AND
>         (P_CONTENT_COLUMN_JSON_FORMAT IS NULL)) THEN
314,315c319,322
<     P_DESCRIPTOR := P_DESCRIPTOR||','||QUOTE_JSON_VALUE('validation')||
<                     ':'||QUOTE_JSON_VALUE(P_CONTENT_VALIDATION);
---
>     IF (P_CONTENT_VALIDATION IS NOT NULL) THEN
>       P_DESCRIPTOR := P_DESCRIPTOR||','||QUOTE_JSON_VALUE('validation')||
>                       ':'||QUOTE_JSON_VALUE(P_CONTENT_VALIDATION);
>     END IF;
623,626c630,691
<
<   PROCEDURE AJD_SETTINGS(P_CONTENT_COLUMN_JSON_FORMAT  OUT VARCHAR2,
<                          P_SIZE_LIMIT                  OUT VARCHAR2,
<                          P_URI_NAME                    IN NVARCHAR2,
---
>   PROCEDURE ENFORCE_ATP_AND_ADW_SETTINGS(P_CONTENT_COLUMN_TYPE         IN VARCHAR2,
>                                  P_CONTENT_COLUMN_LEN          IN NUMBER,
>                                  P_CONTENT_VALIDATION          IN VARCHAR2,
>                                  P_CONTENT_LOB_COMPRESS        IN VARCHAR2,
>                                  P_CONTENT_LOB_CACHE           IN VARCHAR2,
>                                  P_CONTENT_LOB_ENCRYPT         IN VARCHAR2,
>                                  P_CONTENT_LOB_TS              IN VARCHAR2)
>   IS
>   BEGIN
>
>
>       IF ((P_CONTENT_COLUMN_TYPE <> 'BLOB') AND
>           (DBMS_SODA_ADMIN.V_COMPATIBLE < 20)) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.sqlType',
>           P_CONTENT_COLUMN_TYPE,
>           'BLOB');
>
>
>       ELSIF ((P_CONTENT_COLUMN_TYPE <> 'JSON') AND
>              (P_CONTENT_COLUMN_TYPE <> 'BLOB') AND
>              (DBMS_SODA_ADMIN.V_COMPATIBLE >= 20)) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.sqlType',
>           P_CONTENT_COLUMN_TYPE,
>           'JSON, BLOB');
>       ELSIF (P_CONTENT_COLUMN_LEN <> 0) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.maxLength',
>           TO_CHAR(P_CONTENT_COLUMN_LEN),
>           TO_CHAR(0));
>       ELSIF (P_CONTENT_VALIDATION IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.validation',
>           P_CONTENT_VALIDATION,
>           'NULL');
>       ELSIF (P_CONTENT_LOB_COMPRESS IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.compress',
>           P_CONTENT_LOB_COMPRESS,
>           'NULL');
>       ELSIF (P_CONTENT_LOB_CACHE IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.cache',
>           P_CONTENT_LOB_CACHE,
>           'NULL');
>       ELSIF (P_CONTENT_LOB_ENCRYPT IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.encrypt',
>           P_CONTENT_LOB_ENCRYPT,
>           'NULL');
>       ELSIF (P_CONTENT_LOB_TS IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.tablespace',
>           P_CONTENT_LOB_TS,
>           'NULL');
>       END IF;
>
>   END ENFORCE_ATP_AND_ADW_SETTINGS;
>
>   PROCEDURE ENFORCE_AJD_SETTINGS(P_URI_NAME                    IN NVARCHAR2,
>                          P_CREATE_MODE                 IN VARCHAR2,
660,661d724
<       P_CONTENT_COLUMN_JSON_FORMAT := 'OSON';
<       P_SIZE_LIMIT := '32m';
665c728,730
<       IF (P_SCHEMA_NAME <> SYS_CONTEXT('USERENV','CURRENT_SCHEMA')) THEN
---
>       IF (P_CREATE_MODE <> 'DDL') THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40826, P_CREATE_MODE);
>       ELSIF (P_SCHEMA_NAME <> SYS_CONTEXT('USERENV','CURRENT_SCHEMA')) THEN
706a772,775
>
>
>
>
707a777
>              (P_KEY_ASSIGNMENT_METHOD <> 'CLIENT') AND
712c782
<           'UUID, OID');
---
>           'UUID, CLIENT');
718,723d787
<       ELSIF ((P_KEY_ASSIGNMENT_METHOD = 'UUID') AND
<              (P_KEY_PATH IS NOT NULL)) THEN
<         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
<           'keyColumn.path',
<           P_KEY_PATH,
<           'NULL');
734a799,805
>
>
>       ELSIF (P_MEDIA_TYPE_COLUMN_NAME IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'mediaTypeColumn.name',
>           P_MEDIA_TYPE_COLUMN_NAME,
>           'NULL');
740c811,814
<       ELSIF (P_CONTENT_COLUMN_TYPE <> 'BLOB') THEN
---
>
>
>       ELSIF ((P_CONTENT_COLUMN_TYPE <> 'BLOB') AND
>              (DBMS_SODA_ADMIN.V_COMPATIBLE < 20)) THEN
744a819,827
>
>
>       ELSIF ((P_CONTENT_COLUMN_TYPE <> 'JSON') AND
>              (P_CONTENT_COLUMN_TYPE <> 'BLOB') AND
>              (DBMS_SODA_ADMIN.V_COMPATIBLE >= 20)) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
>           'contentColumn.sqlType',
>           P_CONTENT_COLUMN_TYPE,
>           'JSON, BLOB');
750c833
<       ELSIF (P_CONTENT_VALIDATION <> 'STANDARD') THEN
---
>       ELSIF (P_CONTENT_VALIDATION IS NOT NULL) THEN
754,755c837,838
<           'STANDARD');
<       ELSIF (P_CONTENT_LOB_COMPRESS <> 'NONE') THEN
---
>           'NULL');
>       ELSIF (P_CONTENT_LOB_COMPRESS IS NOT NULL) THEN
759,760c842,843
<           'NONE');
<       ELSIF (P_CONTENT_LOB_CACHE <> 'true') THEN
---
>           'NULL');
>       ELSIF (P_CONTENT_LOB_CACHE IS NOT NULL) THEN
764,765c847,848
<           'true');
<       ELSIF (P_CONTENT_LOB_ENCRYPT <> 'NONE') THEN
---
>           'NULL');
>       ELSIF (P_CONTENT_LOB_ENCRYPT IS NOT NULL) THEN
769c852
<           'NONE');
---
>           'NULL');
806c889
<       ELSIF (P_VERSIONING_METHOD <> 'SHA256') THEN
---
>       ELSIF (P_VERSIONING_METHOD <> 'UUID') THEN
810,815c893
<           'SHA256');
<       ELSIF (P_MEDIA_TYPE_COLUMN_NAME IS NOT NULL) THEN
<         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40774,
<           'mediaTypeColumn.name',
<           P_MEDIA_TYPE_COLUMN_NAME,
<           'NULL');
---
>           'UUID');
845c923,942
<   END AJD_SETTINGS;
---
>   END ENFORCE_AJD_SETTINGS;
>
>   FUNCTION CHANGE_SCHEMA(P_DESCRIPTOR IN VARCHAR2,
>                          P_SCHEMA IN VARCHAR2)
>     RETURN VARCHAR2
>   IS
>     V_DESCRIPTOR JSON_OBJECT_T;
>   BEGIN
>
>     IF (P_DESCRIPTOR IS NULL)
>     THEN
>       SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40801);
>     END IF;
>
>     V_DESCRIPTOR := JSON_OBJECT_T.PARSE(P_DESCRIPTOR);
>     V_DESCRIPTOR.PUT('schemaName', P_SCHEMA);
>
>     RETURN V_DESCRIPTOR.TO_STRING;
>
>   END CHANGE_SCHEMA;
919c1016,1017
<     V_AJD                        BOOLEAN       := FALSE;
---
>     V_DEFAULT_METADATA           BOOLEAN       := FALSE;
>     V_CONSTRAINT                 BOOLEAN       := TRUE;
949a1048
>
951c1050
<       SYS.DBMS_SODA_UTIL.CHECKCOMPAT();
---
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
958,960c1057,1059
<
<
<     V_AJD := SYS.DBMS_SODA_UTIL.ISJDCS;
---
>     IF (V_SERVICE IS NULL) THEN
>       V_SERVICE := SYS.DBMS_SODA_UTIL.GETSERVICENAME;
>     END IF;
1110c1209,1219
<       V_VERSIONING_METHOD := 'SHA256';
---
>
>
>       IF ((V_SERVICE = 'JDCS') OR
>           (V_SERVICE = 'DWCS') OR
>           (V_SERVICE = 'OLTP') OR
>           (V_SERVICE = 'PAAS')) THEN
>         V_VERSIONING_METHOD := 'UUID';
>       ELSE
>         V_VERSIONING_METHOD := 'SHA256';
>       END IF;
>
1112c1221,1226
<       V_CONTENT_LOB_CACHE := 'true';
---
>       IF ((V_SERVICE <> 'JDCS') AND
>           (V_SERVICE <> 'DWCS') AND
>           (V_SERVICE <> 'OLTP') AND
>           (V_SERVICE <> 'PAAS')) THEN
>         V_CONTENT_LOB_CACHE := 'true';
>       END IF;
1114a1229
>       V_DEFAULT_METADATA := TRUE;
1169a1285
>
1171c1287,1301
<       V_CONTENT_COLUMN_TYPE := 'BLOB';
---
>       IF (V_MEDIA_TYPE_COLUMN_NAME IS NOT NULL) THEN
>         V_CONTENT_COLUMN_TYPE := 'BLOB';
>       ELSE
>         V_CONTENT_COLUMN_TYPE := 'BLOB';
>         IF ((V_SERVICE = 'JDCS') OR
>             (V_SERVICE = 'OLTP') OR
>             (V_SERVICE = 'DWCS') OR
>             (V_SERVICE = 'PAAS')) THEN
>           V_CONTENT_COLUMN_JSON_FORMAT := 'OSON';
>           V_SIZE_LIMIT := MAX_BINARY_SIZE;
>         ELSE
>           V_CONTENT_COLUMN_JSON_FORMAT := NULL;
>           V_SIZE_LIMIT := NULL;
>         END IF;
>       END IF;
1187a1318,1328
>       IF (((V_SERVICE = 'JDCS') OR
>            (V_SERVICE = 'OLTP') OR
>            (V_SERVICE = 'DWCS') OR
>            (V_SERVICE = 'PAAS')) AND
>           (V_MEDIA_TYPE_COLUMN_NAME IS NULL)) THEN
>          V_CONTENT_COLUMN_JSON_FORMAT := 'OSON';
>          V_SIZE_LIMIT := MAX_BINARY_SIZE;
>        ELSE
>          V_CONTENT_COLUMN_JSON_FORMAT := NULL;
>          V_SIZE_LIMIT := NULL;
>        END IF;
1257,1258c1398,1401
<     IF (V_CONTENT_VALIDATION IS NULL) THEN
<       V_CONTENT_VALIDATION := 'STANDARD';
---
>     IF (V_CONTENT_VALIDATION IS NULL) THEN
>       IF (V_CONTENT_COLUMN_JSON_FORMAT IS NULL) THEN
>         V_CONTENT_VALIDATION := 'STANDARD';
>       END IF;
1268c1411,1412
<     IF (V_CONTENT_COLUMN_TYPE IN ('CLOB', 'NCLOB', 'BLOB')) THEN
---
>     IF ((V_CONTENT_COLUMN_TYPE IN ('CLOB', 'NCLOB', 'BLOB')) AND
>         (V_CONTENT_COLUMN_JSON_FORMAT IS NULL)) THEN
1316c1460,1465
<           SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40646, V_CONTENT_COLUMN_TYPE);
---
>           IF (V_CONTENT_COLUMN_JSON_FORMAT = 'OSON') THEN
>             SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40822);
>           ELSE
>             SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40646,
>                                                   V_CONTENT_COLUMN_TYPE);
>           END IF;
1318,1319d1466
<       ELSE
<         V_CONTENT_LOB_COMPRESS := 'NONE';
1323c1470,1475
<           SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40646, V_CONTENT_COLUMN_TYPE);
---
>           IF (V_CONTENT_COLUMN_JSON_FORMAT = 'OSON') THEN
>             SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40822);
>           ELSE
>             SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40646,
>                                                   V_CONTENT_COLUMN_TYPE);
>           END IF;
1325,1326d1476
<       ELSE
<         V_CONTENT_LOB_CACHE := 'false';
1330c1480,1485
<           SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40646, V_CONTENT_COLUMN_TYPE);
---
>           IF (V_CONTENT_COLUMN_JSON_FORMAT = 'OSON') THEN
>             SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40822);
>           ELSE
>             SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40646,
>                                                   V_CONTENT_COLUMN_TYPE);
>           END IF;
1332,1333d1486
<       ELSE
<         V_CONTENT_LOB_ENCRYPT  := 'NONE';
1482,1484c1635,1660
<     IF (P_CREATE_MODE = 'MAP') THEN
<       V_CREATE_MODE := P_CREATE_MODE;
<     ELSIF (P_CREATE_MODE = 'DDL') THEN
---
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>     IF ((P_CREATE_MODE = 'MAP') OR (P_CREATE_MODE = 'REPLACE_AND_MAP')) THEN
>       V_CREATE_MODE := 'MAP';
>     ELSIF ((P_CREATE_MODE = 'DDL') OR (P_CREATE_MODE = 'PRESERVE_DDL') OR
>            (P_CREATE_MODE = 'REPLACE_AND_PRESERVE_DDL')) THEN
1487c1663,1675
<           V_CREATE_MODE := 'MAP';
---
>
>
>
>
>           IF ((P_CREATE_MODE = 'PRESERVE_DDL') OR
>               (P_CREATE_MODE = 'REPLACE_AND_PRESERVE_DDL')) THEN
>             SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40802, P_CREATE_MODE);
>
>
>
>           ELSE
>             V_CREATE_MODE := 'MAP';
>           END IF;
1489c1677
<           V_CREATE_MODE := P_CREATE_MODE;
---
>           V_CREATE_MODE := 'DDL';
1497a1686,1688
>     ELSIF (P_CREATE_MODE = 'DDL_WITHOUT_DEPENDENTS') THEN
>       V_CONSTRAINT := FALSE;
>       V_CREATE_MODE := 'DDL';
1526a1718,1728
>     IF (V_KEY_ASSIGNMENT_METHOD IN ('EXTRACT', 'INSERT', 'OID')) THEN
>
>      IF (V_KEY_PATH IS NULL) THEN
>        SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40746, V_KEY_ASSIGNMENT_METHOD);
>
>
>      ELSIF (V_KEY_COLUMN_TYPE <> 'VARCHAR2') THEN
>       SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40828, 'VARCHAR2');
>      ELSIF (V_KEY_COLUMN_LEN <> MAX_KEY_LENGTH) THEN
>       SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40829, MAX_KEY_LENGTH);
>      END IF;
1528,1530c1730,1733
<     IF ((V_KEY_PATH IS NULL) AND
<         (V_KEY_ASSIGNMENT_METHOD IN ('EXTRACT','INSERT','OID'))) THEN
<       SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40746, V_KEY_ASSIGNMENT_METHOD);
---
>     ELSE
>       IF (V_KEY_PATH IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40827, V_KEY_ASSIGNMENT_METHOD);
>       END IF;
1569a1773,1782
>     IF (V_CONTENT_COLUMN_JSON_FORMAT = 'OSON') THEN
>       IF (V_CONTENT_VALIDATION IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40823);
>       ELSIF (V_CONTENT_LOB_TS IS NOT NULL) THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40824);
>       ELSIF (V_MEM_OPTIMIZE_READ <> 'false') THEN
>         SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40825);
>       END IF;
>     END IF;
>
1574,1577c1787,1800
<     IF (V_AJD) THEN
<       AJD_SETTINGS(
<         V_CONTENT_COLUMN_JSON_FORMAT,
<         V_SIZE_LIMIT,
---
>     IF (((V_SERVICE = 'DWCS') OR
>          (V_SERVICE = 'OLTP') OR
>          (V_SERVICE = 'PAAS')) AND
>         (V_MEDIA_TYPE_COLUMN_NAME IS NULL)) THEN
>       ENFORCE_ATP_AND_ADW_SETTINGS(
>         V_CONTENT_COLUMN_TYPE,
>         V_CONTENT_COLUMN_LEN,
>         V_CONTENT_VALIDATION,
>         V_CONTENT_LOB_COMPRESS,
>         V_CONTENT_LOB_CACHE,
>         V_CONTENT_LOB_ENCRYPT,
>         V_CONTENT_LOB_TS);
>     ELSIF (V_SERVICE = 'JDCS') THEN
>       ENFORCE_AJD_SETTINGS(
1578a1802
>         V_CREATE_MODE,
1719,1732c1943,1982
<
<
<
<         EXCEPTION WHEN DUP_VAL_ON_INDEX THEN
<           DECLARE
<             V_EXISTING_DESCRIPTOR VARCHAR2(4000);
<             V_EXISTING_CREATE_TIME TIMESTAMP(6);
<           BEGIN
<             DBMS_SODA_DML.DO_READ_DESCRIPTOR(P_URI_NAME,
<                                              V_OWNER,
<                                              V_EXISTING_DESCRIPTOR,
<                                              V_EXISTING_CREATE_TIME);
<
<             IF (P_DESCRIPTOR <> V_EXISTING_DESCRIPTOR) THEN
---
>
>
>
>       EXCEPTION WHEN DUP_VAL_ON_INDEX THEN
>         DECLARE
>           V_EXISTING_DESCRIPTOR VARCHAR2(4000);
>           V_EXISTING_CREATE_TIME TIMESTAMP(6);
>           V_UPDATED_COUNT NUMBER := 0;
>         BEGIN
>           DBMS_SODA_DML.DO_READ_DESCRIPTOR(P_URI_NAME,
>                                            V_OWNER,
>                                            V_EXISTING_DESCRIPTOR,
>                                            V_EXISTING_CREATE_TIME);
>
>
>
>           IF (P_DESCRIPTOR <> V_EXISTING_DESCRIPTOR) THEN
>             IF ((P_CREATE_MODE = 'REPLACE_AND_MAP') OR
>                 (P_CREATE_MODE = 'REPLACE_AND_PRESERVE_DDL')) THEN
>               DBMS_SODA_DML.DO_UPDATE(P_URI_NAME, V_OWNER, V_SCHEMA,
>                                       V_OBJECT_NAME, V_OBJECT_TYPE,
>                                       V_CREATE_TIME, V_CREATE_MODE,
>                                       P_DESCRIPTOR, V_UPDATED_COUNT);
>
>
>
>               IF (V_UPDATED_COUNT = 0) THEN
>                 IF (I = 3) THEN
>                   ROLLBACK;
>                   SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40670);
>                 ELSE
>                   CONTINUE;
>                 END IF;
>
>
>
>               ELSE
>                 EXIT;
>               END IF;
>             ELSE
1733a1984,1989
>               IF (V_DEFAULT_METADATA = TRUE) THEN
>                 P_DESCRIPTOR := V_EXISTING_DESCRIPTOR;
>                 P_CREATE_TIME := TO_CHAR(V_EXISTING_CREATE_TIME,
>                                          'YYYY-MM-DD"T"HH24:MI:SS.FF');
>                 RETURN;
>               END IF;
1735,1738c1991,2006
<
<             ELSE
<               P_CREATE_TIME := TO_CHAR(V_EXISTING_CREATE_TIME,
<                                        'YYYY-MM-DD"T"HH24:MI:SS.FF');
---
>             END IF;
>
>           ELSE
>             P_CREATE_TIME := TO_CHAR(V_EXISTING_CREATE_TIME,
>                                      'YYYY-MM-DD"T"HH24:MI:SS.FF');
>             ROLLBACK;
>             RETURN;
>           END IF;
>
>
>
>
>
>
>           EXCEPTION WHEN NO_DATA_FOUND THEN
>             IF (I = 3) THEN
1740c2008,2010
<               RETURN;
---
>               SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40670);
>             ELSE
>               CONTINUE;
1742,1754d2011
<
<
<
<
<
<
<             EXCEPTION WHEN NO_DATA_FOUND THEN
<               IF (I = 3) THEN
<                 ROLLBACK;
<                 SYS.DBMS_SODA_UTIL.RAISE_SYSTEM_ERROR(-40670);
<               ELSE
<                 CONTINUE;
<               END IF;
1762c2019,2020
<     IF (V_CREATE_MODE <> 'DDL') THEN
---
>     IF ((V_CREATE_MODE <> 'DDL') OR (P_CREATE_MODE = 'PRESERVE_DDL') OR
>         (P_CREATE_MODE = 'REPLACE_AND_PRESERVE_DDL')) THEN
1781c2039,2043
<           V_SQLTEXT := V_SQLTEXT||' not null, ';
---
>           IF (V_CONSTRAINT) THEN
>             V_SQLTEXT := V_SQLTEXT||' not null, ';
>           ELSE
>             V_SQLTEXT := V_SQLTEXT||', ';
>           END IF;
1786c2048,2053
<             ' varchar2(255) default ''application/json'' not null, ';
---
>             ' varchar2(255) default ''application/json''';
>           IF (V_CONSTRAINT) THEN
>             V_SQLTEXT := V_SQLTEXT||' not null, ';
>           ELSE
>             V_SQLTEXT := V_SQLTEXT||', ';
>           END IF;
1791c2058,2063
<             ' timestamp default sys_extract_utc(SYSTIMESTAMP) not null, ';
---
>             ' timestamp default sys_extract_utc(SYSTIMESTAMP)';
>           IF (V_CONSTRAINT) THEN
>             V_SQLTEXT := V_SQLTEXT||' not null, ';
>           ELSE
>             V_SQLTEXT := V_SQLTEXT||', ';
>           END IF;
1796c2068,2073
<             ' timestamp default sys_extract_utc(SYSTIMESTAMP) not null, ';
---
>             ' timestamp default sys_extract_utc(SYSTIMESTAMP)';
>           IF (V_CONSTRAINT) THEN
>             V_SQLTEXT := V_SQLTEXT||' not null, ';
>           ELSE
>             V_SQLTEXT := V_SQLTEXT||', ';
>           END IF;
1802c2079,2084
<             V_SQLTEXT := V_SQLTEXT||' number not null, ';
---
>             V_SQLTEXT := V_SQLTEXT||' number';
>             IF (V_CONSTRAINT) THEN
>               V_SQLTEXT := V_SQLTEXT||' not null, ';
>             ELSE
>               V_SQLTEXT := V_SQLTEXT||', ';
>             END IF;
1804c2086,2091
<             V_SQLTEXT := V_SQLTEXT||' number not null, ';
---
>             V_SQLTEXT := V_SQLTEXT||' number';
>             IF (V_CONSTRAINT) THEN
>               V_SQLTEXT := V_SQLTEXT||' not null, ';
>             ELSE
>               V_SQLTEXT := V_SQLTEXT||', ';
>             END IF;
1808c2095,2100
<             V_SQLTEXT := V_SQLTEXT||' varchar2(255) not null, ';
---
>             V_SQLTEXT := V_SQLTEXT||' varchar2(255)';
>             IF (V_CONSTRAINT) THEN
>               V_SQLTEXT := V_SQLTEXT||' not null, ';
>             ELSE
>               V_SQLTEXT := V_SQLTEXT||', ';
>             END IF;
1818c2110,2114
<           V_SQLTEXT := V_SQLTEXT||' not null, ';
---
>           IF (V_CONSTRAINT) THEN
>             V_SQLTEXT := V_SQLTEXT||' not null, ';
>           ELSE
>             V_SQLTEXT := V_SQLTEXT||', ';
>           END IF;
1826,1828d2121
<         V_SQLTEXT := V_SQLTEXT||', ';
<
<         V_SQLTEXT := V_SQLTEXT||'primary key ('||V_QUOT_KEY_NAME||')';
1829a2123,2126
>         IF (V_CONSTRAINT) THEN
>           V_SQLTEXT := V_SQLTEXT||', ';
>           V_SQLTEXT := V_SQLTEXT||'primary key ('||V_QUOT_KEY_NAME||')';
>         END IF;
1832d2128
<         V_SQLTEXT := V_SQLTEXT||', check (';
1834,1840c2130,2151
<         IF (V_NESTED_CHECK) THEN
<           V_SQLTEXT := V_SQLTEXT||'('||V_QUOT_CONTENT_NAME||' is null) or (';
<         END IF;
<         IF (V_MEDIA_TYPE_COLUMN_NAME IS NOT NULL) THEN
<           IF (NOT(V_NESTED_CHECK)) THEN
<             V_SQLTEXT := V_SQLTEXT||'(';
<             V_NESTED_CHECK := TRUE;
---
>         IF (V_CONSTRAINT) THEN
>           V_SQLTEXT := V_SQLTEXT||', check (';
>
>           IF (V_NESTED_CHECK) THEN
>             V_SQLTEXT := V_SQLTEXT||'('||V_QUOT_CONTENT_NAME||' is null) or (';
>           END IF;
>           IF (V_MEDIA_TYPE_COLUMN_NAME IS NOT NULL) THEN
>             IF (NOT(V_NESTED_CHECK)) THEN
>               V_SQLTEXT := V_SQLTEXT||'(';
>               V_NESTED_CHECK := TRUE;
>             END IF;
>             V_SQLTEXT := V_SQLTEXT||V_QUOT_MEDIATYPE_NAME||
>                          ' <> ''application/json'') or (';
>           END IF;
>           V_SQLTEXT := V_SQLTEXT||V_QUOT_CONTENT_NAME||' is json';
>           IF (V_CONTENT_COLUMN_JSON_FORMAT = 'OSON') THEN
>             V_SQLTEXT := V_SQLTEXT||' format oson';
>           ELSIF (V_CONTENT_COLUMN_TYPE IN ('BLOB','RAW')) THEN
>             V_SQLTEXT := V_SQLTEXT||' format json';
>           END IF;
>           IF (V_SIZE_LIMIT IS NOT NULL) THEN
>             V_SQLTEXT := V_SQLTEXT||' (size limit '||V_SIZE_LIMIT;
1842,1853d2152
<           V_SQLTEXT := V_SQLTEXT||V_QUOT_MEDIATYPE_NAME||
<                        ' <> ''application/json'') or (';
<         END IF;
<         V_SQLTEXT := V_SQLTEXT||V_QUOT_CONTENT_NAME||' is json';
<         IF (V_CONTENT_COLUMN_JSON_FORMAT = 'OSON') THEN
<           V_SQLTEXT := V_SQLTEXT||' format oson';
<         ELSIF (V_CONTENT_COLUMN_TYPE IN ('BLOB','RAW')) THEN
<           V_SQLTEXT := V_SQLTEXT||' format json';
<         END IF;
<         IF (V_SIZE_LIMIT IS NOT NULL) THEN
<           V_SQLTEXT := V_SQLTEXT||' (size limit '||V_SIZE_LIMIT;
<         END IF;
1855,1862c2154,2159
<
<         IF (V_CONTENT_VALIDATION = 'STRICT') THEN
<           V_SQLTEXT := V_SQLTEXT||' strict with unique keys)';
<         ELSIF (V_CONTENT_VALIDATION = 'STANDARD') THEN
<           V_SQLTEXT := V_SQLTEXT||' strict)';
<         ELSE
<           V_SQLTEXT := V_SQLTEXT||')';
<         END IF;
---
>
>           IF (V_CONTENT_VALIDATION = 'STRICT') THEN
>             V_SQLTEXT := V_SQLTEXT||' strict with unique keys';
>           ELSIF (V_CONTENT_VALIDATION = 'STANDARD') THEN
>             V_SQLTEXT := V_SQLTEXT||' strict';
>           END IF;
1864,1868c2161
<
<
<         IF (V_SIZE_LIMIT IS NOT NULL) THEN
<           V_SQLTEXT := V_SQLTEXT||')';
<         END IF;
---
>           V_SQLTEXT := V_SQLTEXT ||')';
1870,1872c2163,2172
<         IF (V_NESTED_CHECK) THEN
<           V_SQLTEXT := V_SQLTEXT||')';
<         END IF;
---
>
>
>           IF (V_SIZE_LIMIT IS NOT NULL) THEN
>             V_SQLTEXT := V_SQLTEXT||')';
>           END IF;
>
>           IF (V_NESTED_CHECK) THEN
>             V_SQLTEXT := V_SQLTEXT||')';
>           END IF;
>         END IF;
1894c2194,2195
<         IF (V_CONTENT_COLUMN_TYPE IN ('CLOB','NCLOB','BLOB')) THEN
---
>         IF ((V_CONTENT_COLUMN_TYPE IN ('CLOB','NCLOB','BLOB')) AND
>             (V_CONTENT_COLUMN_JSON_FORMAT IS NULL)) THEN
1950,1951c2251,2252
<               NOT(V_FORCE_CREATE)) THEN
<             DBMS_SODA_DML.DO_UPDATE(P_URI_NAME, 'MAP', V_OWNER);
---
>               NOT(V_FORCE_CREATE) AND (NOT(V_SERVICE = 'JDCS'))) THEN
>             DBMS_SODA_DML.DO_UPDATE_MODE(P_URI_NAME, 'MAP', V_OWNER);
1991,2003c2292,2297
<         IF (V_LAST_MODIFIED_INDEX IS NOT NULL) THEN
<           V_SQLTEXT := 'create index '||V_QUOT_SCHEMA||'.'||
<                        V_QUOT_MODIFIED_INDEX||' on '||
<                        V_QUOT_OBJECT||' ('||V_QUOT_MODIFIED_NAME||
<                        ','||V_QUOT_KEY_NAME||')';
<
<           IF (P_VERBOSE) THEN
<             DBMS_OUTPUT.PUT_LINE(V_SQLTEXT);
<           END IF;
<
<           BEGIN
<             DO_DDL(V_SQLTEXT);
<           EXCEPTION WHEN OTHERS THEN
---
>         IF (V_CONSTRAINT) THEN
>           IF (V_LAST_MODIFIED_INDEX IS NOT NULL) THEN
>             V_SQLTEXT := 'create index '||V_QUOT_SCHEMA||'.'||
>                          V_QUOT_MODIFIED_INDEX||' on '||
>                          V_QUOT_OBJECT||' ('||V_QUOT_MODIFIED_NAME||
>                          ','||V_QUOT_KEY_NAME||')';
2005,2010c2299,2300
<             IF ((SQLCODE = XDB.DBMS_SODA_ADMIN.SQL_OBJECT_EXISTS) AND
<                 NOT(V_FORCE_CREATE)) THEN
<               NULL;
<             ELSE
<               ROLLBACK;
<               RAISE;
---
>             IF (P_VERBOSE) THEN
>               DBMS_OUTPUT.PUT_LINE(V_SQLTEXT);
2012,2013c2302,2316
<           END;
<         END IF;
---
>
>             BEGIN
>               DO_DDL(V_SQLTEXT);
>             EXCEPTION WHEN OTHERS THEN
>
>               IF ((SQLCODE = XDB.DBMS_SODA_ADMIN.SQL_OBJECT_EXISTS) AND
>                   NOT(V_FORCE_CREATE)) THEN
>                 NULL;
>               ELSE
>                 ROLLBACK;
>                 RAISE;
>               END IF;
>             END;
>           END IF;
>         END IF;
2106c2409,2411
<   PROCEDURE DROP_COLLECTION(P_URI_NAME IN NVARCHAR2)
---
>   PROCEDURE DROP_COLLECTION(P_URI_NAME          IN NVARCHAR2,
>                             P_PURGE             IN VARCHAR2 DEFAULT 'FALSE',
>                             P_DROP_MAPPED_TABLE IN VARCHAR2 DEFAULT 'FALSE')
2125c2430
<       SYS.DBMS_SODA_UTIL.CHECKCOMPAT();
---
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
2148c2453,2454
<     IF (V_CREATE_MODE = 'DDL') THEN
---
>     IF (V_CREATE_MODE = 'DDL' OR
>         (V_CREATE_MODE = 'MAP' AND UPPER(P_DROP_MAPPED_TABLE) = 'TRUE')) THEN
2154a2461,2463
>         IF (UPPER(P_PURGE) = 'TRUE') THEN
>           V_SQLTEXT := V_SQLTEXT||' purge';
>         END IF;
2201,2204c2510,2514
<   PROCEDURE DROP_COLLECTIONS(P_COLLECTIONS OUT NVCNTAB,
<                              P_ERRORS OUT VCNTAB,
<                              P_FORCE IN VARCHAR2)
<
---
>   PROCEDURE DROP_COLLECTIONS(P_COLLECTIONS         OUT NVCNTAB,
>                              P_ERRORS              OUT VCNTAB,
>                              P_FORCE               IN VARCHAR2,
>                              P_PURGE               IN VARCHAR2 DEFAULT 'FALSE',
>                              P_DROP_MAPPED_TABLE   IN VARCHAR2 DEFAULT 'FALSE')
2217c2527
<       SYS.DBMS_SODA_UTIL.CHECKCOMPAT();
---
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
2225c2535,2537
<         DBMS_SODA_ADMIN.DROP_COLLECTION(COLLECTION_REC.URI_NAME);
---
>         DBMS_SODA_ADMIN.DROP_COLLECTION(COLLECTION_REC.URI_NAME,
>                                         P_PURGE,
>                                         P_DROP_MAPPED_TABLE);
2260c2572
<       SYS.DBMS_SODA_UTIL.CHECKCOMPAT();
---
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
2287c2599
<       SYS.DBMS_SODA_UTIL.CHECKCOMPAT();
---
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
2368a2681,2775
>   PROCEDURE GET_SERVICE_AND_COMPATIBLE(P_SERVICE OUT VARCHAR2,
>                                        P_COMPATIBLE OUT NUMBER)
>   IS
>   BEGIN
>
>
>     IF (DBMS_SODA_ADMIN.V_COMPATIBLE_CHECK_PASSED != TRUE) THEN
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
>       DBMS_SODA_ADMIN.V_COMPATIBLE_CHECK_PASSED := TRUE;
>     END IF;
>     P_COMPATIBLE := DBMS_SODA_ADMIN.V_COMPATIBLE;
>
>
>     IF (V_SERVICE IS NULL) THEN
>       V_SERVICE := SYS.DBMS_SODA_UTIL.GETSERVICENAME;
>     END IF;
>
>     P_SERVICE := V_SERVICE;
>
>   END GET_SERVICE_AND_COMPATIBLE;
>
>   PROCEDURE GET_DEFAULT_METADATA_C(P_METADATA OUT CLOB)
>   IS
>     V_METADATA VARCHAR2(4000) := NULL;
>   BEGIN
>     GET_DEFAULT_METADATA_V(V_METADATA);
>     P_METADATA := TO_CLOB(V_METADATA);
>   END GET_DEFAULT_METADATA_C;
>
>   PROCEDURE GET_DEFAULT_METADATA_V(P_METADATA OUT VARCHAR2)
>   IS
>     P_COMPATIBLE NUMBER := NULL;
>   BEGIN
>
>     IF (DBMS_SODA_ADMIN.V_COMPATIBLE_CHECK_PASSED != TRUE) THEN
>         DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
>         DBMS_SODA_ADMIN.V_COMPATIBLE_CHECK_PASSED := TRUE;
>     END IF;
>     P_COMPATIBLE := DBMS_SODA_ADMIN.V_COMPATIBLE;
>
>
>     IF (V_SERVICE IS NULL) THEN
>       V_SERVICE := SYS.DBMS_SODA_UTIL.GETSERVICENAME;
>     END IF;
>
>     P_METADATA := '{"keyColumn":{"name":"ID",' ||
>                                 '"sqlType":"VARCHAR2",' ||
>                                 '"maxLength":255,' ||
>                                 '"assignmentMethod":"UUID"},';
>     IF ((V_SERVICE = 'JDCS') OR
>         (V_SERVICE = 'OLTP') OR
>         (V_SERVICE = 'DWCS') OR
>         (V_SERVICE = 'PAAS')) THEN
>       IF (P_COMPATIBLE >= 20) THEN
>         P_METADATA := P_METADATA ||
>                       '"contentColumn":{"name":"JSON_DOCUMENT",' ||
>                                        '"sqlType":"JSON"},';
>       ELSE
>         P_METADATA := P_METADATA ||
>                       '"contentColumn":{"name":"JSON_DOCUMENT",' ||
>                                        '"sqlType":"BLOB",' ||
>                                        '"jsonFormat":"OSON"},';
>       END IF;
>       P_METADATA := P_METADATA ||
>                     '"lastModifiedColumn":{"name":"LAST_MODIFIED"},' ||
>                     '"versionColumn":{"name":"VERSION",' ||
>                                      '"method":"UUID"},';
>     ELSE
>       IF (P_COMPATIBLE >= 20) THEN
>         P_METADATA := P_METADATA ||
>                       '"contentColumn":{"name":"JSON_DOCUMENT",' ||
>                                         '"sqlType":"JSON"},';
>         P_METADATA := P_METADATA ||
>                      '"lastModifiedColumn":{"name":"LAST_MODIFIED"},' ||
>                      '"versionColumn":{"name":"VERSION",' ||
>                                       '"method":"UUID"},';
>       ELSE
>         P_METADATA := P_METADATA ||
>                       '"contentColumn":{"name":"JSON_DOCUMENT",' ||
>                                        '"sqlType":"BLOB",' ||
>                                        '"compress":"NONE",' ||
>                                        '"cache":true,' ||
>                                        '"encrypt":"NONE",' ||
>                                        '"validation":"STANDARD"},';
>         P_METADATA := P_METADATA ||
>                      '"lastModifiedColumn":{"name":"LAST_MODIFIED"},' ||
>                      '"versionColumn":{"name":"VERSION",' ||
>                                       '"method":"SHA256"},';
>       END IF;
>     END IF;
>     P_METADATA := P_METADATA ||
>                   '"creationTimeColumn":{"name":"CREATED_ON"},' ||
>                   '"readOnly":false}';
>   END GET_DEFAULT_METADATA_V;
>
2728a3136,3139
>           IF (P_DATATYPES(J) IS NULL)
>           THEN
>             P_DATATYPES(J) := 'VARCHAR2';
>           END IF;
2851c3262
<       SYS.DBMS_SODA_UTIL.CHECKCOMPAT();
---
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
4036c4447,4448
<                                 P_DATA_GUIDE  IN    CLOB)
---
>                                 P_DATA_GUIDE  IN    CLOB,
>                                 P_MATERIALIZE IN    BOOLEAN DEFAULT FALSE)
4054c4466
<       SYS.DBMS_SODA_UTIL.CHECKCOMPAT();
---
>       DBMS_SODA_ADMIN.V_COMPATIBLE := SYS.DBMS_SODA_UTIL.CHECKANDGETCOMPAT;
4084c4496,4497
<                           V_CONTENT_COLUMN_NAME, P_DATA_GUIDE);
---
>                           V_CONTENT_COLUMN_NAME, P_DATA_GUIDE,
>                           MATERIALIZE => P_MATERIALIZE);
XDB.DBMS_SODA_DML - PACKAGE BODY (RU):
21a22,45
> PROCEDURE DO_UPDATE(P_URI_NAME IN NVARCHAR2,
>                     P_OWNER    IN VARCHAR2,
>                     P_SCHEMA_NAME IN VARCHAR2,
>                     P_OBJECT_NAME IN VARCHAR2,
>                     P_OBJECT_TYPE IN VARCHAR2,
>                     P_CREATE_TIME IN TIMESTAMP,
>                     P_CREATE_MODE IN VARCHAR2,
>                     P_DESCRIPTOR  IN VARCHAR2,
>                     P_ROW_COUNT OUT NUMBER)
> IS
> BEGIN
>     UPDATE XDB.JSON$COLLECTION_METADATA
>     SET OBJECT_SCHEMA = P_SCHEMA_NAME,
>         OBJECT_NAME = P_OBJECT_NAME,
>         OBJECT_TYPE = P_OBJECT_TYPE,
>         CREATED_ON = P_CREATE_TIME,
>         CREATE_MODE = P_CREATE_MODE,
>         JSON_DESCRIPTOR = P_DESCRIPTOR
>     WHERE   OWNER    = P_OWNER
>         AND URI_NAME = P_URI_NAME;
>     P_ROW_COUNT := SQL%ROWCOUNT;
> END DO_UPDATE;
>
>
40,42c64,66
< PROCEDURE DO_UPDATE(P_URI_NAME    IN NVARCHAR2,
<                     P_CREATE_MODE IN VARCHAR2,
<                     P_OWNER       IN VARCHAR2)
---
> PROCEDURE DO_UPDATE_MODE(P_URI_NAME    IN NVARCHAR2,
>                          P_CREATE_MODE IN VARCHAR2,
>                          P_OWNER       IN VARCHAR2)
49c73
< END DO_UPDATE;
---
> END DO_UPDATE_MODE;
53c77,78
<                   P_CREATE_MODE OUT VARCHAR2)
---
>                   P_CREATE_MODE OUT VARCHAR2,
>                   P_TIMEOUT     IN  PLS_INTEGER DEFAULT NULL)
54a80
>   V_STMT VARCHAR2(2000);
56,61c82,92
<     SELECT CREATE_MODE
<       INTO P_CREATE_MODE
<       FROM XDB.JSON$COLLECTION_METADATA
<      WHERE OWNER = P_OWNER
<        AND URI_NAME = P_URI_NAME
<        FOR UPDATE;
---
>   V_STMT := 'select CREATE_MODE
>                from xdb.JSON$COLLECTION_METADATA
>               where OWNER = :1' ||
>               ' and URI_NAME = :2' ||
>               ' for update';
>   IF (P_TIMEOUT IS NOT NULL) THEN
>     V_STMT := V_STMT || ' wait ' || P_TIMEOUT;
>   END IF;
>   EXECUTE IMMEDIATE V_STMT
>      INTO P_CREATE_MODE
>     USING P_OWNER, P_URI_NAME;
XDB.DBMS_SODA_DOM - PACKAGE BODY (RU):
58a59,61
>     IF (JVAL IS NULL) THEN
>       RETURN NULL;
>     END IF;
85a89,91
>     IF (JVAL IS NULL) THEN
>       RETURN NULL;
>     END IF;
114a121,123
>     IF (JVAL IS NULL) THEN
>       RETURN NULL;
>     END IF;
138a148,150
>     IF (JVAL IS NULL) THEN
>       RETURN NULL;
>     END IF;
164a177,179
>     IF (JVAL IS NULL) THEN
>       RETURN NULL;
>     END IF;
187a203,205
>     IF (JVAL IS NULL) THEN
>       RETURN NULL;
>     END IF;
219c237,239
<           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR (EXCEPTIONS = 'ALL')) THEN
---
>           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR
>           ((EXCEPTIONS = 'ALL') AND
>            (SQLCODE != XDB.DBMS_SODA_DOM.PATCH_ROOT_REMOVAL_ERROR))) THEN
242c262,264
<           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR (EXCEPTIONS = 'ALL')) THEN
---
>           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR
>           ((EXCEPTIONS = 'ALL') AND
>            (SQLCODE != XDB.DBMS_SODA_DOM.PATCH_ROOT_REMOVAL_ERROR))) THEN
272c294,296
<           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR (EXCEPTIONS = 'ALL')) THEN
---
>           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR
>           ((EXCEPTIONS = 'ALL') AND
>            (SQLCODE != XDB.DBMS_SODA_DOM.PATCH_ROOT_REMOVAL_ERROR))) THEN
294c318,320
<           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR (EXCEPTIONS = 'ALL')) THEN
---
>           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR
>           ((EXCEPTIONS = 'ALL') AND
>            (SQLCODE != XDB.DBMS_SODA_DOM.PATCH_ROOT_REMOVAL_ERROR))) THEN
319c345,347
<           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR (EXCEPTIONS = 'ALL')) THEN
---
>           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR
>           ((EXCEPTIONS = 'ALL') AND
>            (SQLCODE != XDB.DBMS_SODA_DOM.PATCH_ROOT_REMOVAL_ERROR))) THEN
341c369,371
<           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR (EXCEPTIONS = 'ALL')) THEN
---
>           (EXCEPTIONS = 'INVALID_PATCH_SPEC')) OR
>           ((EXCEPTIONS = 'ALL') AND
>            (SQLCODE != XDB.DBMS_SODA_DOM.PATCH_ROOT_REMOVAL_ERROR))) THEN

Leave a Reply

Your email address will not be published.