Oracle DBMS_REGISTRY_EXTENDED
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Utility supporting Preupgrade, Upgrade, and Downgrade.
AUTHID DEFINER
Dependencies
DBMS_STANDARD    
Documented No
First Available 12.2
Security Model Owned by SYS with
Source {ORACLE_HOME}/rdbms/admin/dbms_registry_extended.sql
Subprograms
 
COMPARE_VERSIONS
Returns 1 if the first parameter is of a higher version than the later, zero if the same, otherwise -1

Overload 1
dbms_registry_extended.compare_versions(
version1 IN VARCHAR2,
version2 IN VARCHAR2)
RETURN NUMBER;
SELECT dbms_registry_extended.compare_versions('12.2.0.1', '19.3.0.1') AS RETVAL
FROM dual;

RETVAL
------
    -1


SELECT dbms_registry_extended.compare_versions('21.1.0.0', '19.7.0.1') AS RETVAL
FROM dual;

RETVAL
------
     1
Same as Overload 1 except it compares only the number of digits indicated by the "number_of_dots" parameter
Overload 2
dbms_registry_extended.compare_versions(
version1       IN VARCHAR2,
version2       IN VARCHAR2,
number_of_dots IN NUMBER)
RETURN NUMBER;
SELECT dbms_registry_extended.compare_versions('19.1.0.2', '19.1.0.1', 2) AS RETVAL
FROM dual;

RETVAL
------
     0


SELECT dbms_registry_extended.compare_versions('19.1.0.2', '21.1.0.1', 2) AS RETVAL
FROM dual;

RETVAL
------
    -1
 
CONVERT_VERSION_TO_N_DOTS
Returns the version number with n number of decimal places with value zero dbms_registry_extended.convert_version_to_n_dots(
version IN VARCHAR2,
n       IN NUMBER)
RETURN VARCHAR2;
SELECT dbms_registry_extended.convert_version_to_n_dots('21', 1)
FROM dual;

DBMS_REGISTRY_EXTENDED.CONVERT_VERSION_TO_N_DOTS('20',3)
---------------------------------------------------------
21.0
 
ELEMENT
Returns the element between the specified delimiters in the element_number position dbms_registry_extended.element(
src            IN VARCHAR2,
delimiter      IN CHAR,
element_number IN NUMBER)
RETURN VARCHAR2;
SELECT dbms_registry_extended.element('19.3.0.1', '21.1', 3) AS RETVAL
FROM dual;

RETVAL
----------------
            21.1


SELECT dbms_registry_extended.element('21.1.0.1', '19.7.0.0', 1) AS RETVAL
FROM dual

RETVAL
----------------
        21.1.0.1
 
OCCURS
Returns the number of occurrences of the search string in the source dbms_registry_extended.occurs(
src           IN VARCHAR2,
search_string IN VARCHAR2)
RETURN NUMBER;
SELECT dbms_registry_extended.occurs('Dan Morgan', 'an')
FROM dual;

DBMS_REGISTRY_EXTENDED.OCCURS('DANMORGAN','AN')
-----------------------------------------------
                                              2

Related Topics
Built-in Functions
Built-in Packages
DBMS_REGISTRY
DBMS_REGISTRY_SERVER
DBMS_REGISTRY_SIMPLE
DBMS_REGISTRY_SYS
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx