Search the Reference Library pages:  

Oracle DBMS_REGISTRY
Version 11.1
 
General Information
Source {ORACLE_HOME}/rdbms/admin/prvtcr.plb (wrapped header and body)
Constants RELEASE_STATUS (used by LOADED proc)
RELEASE_VERSION (used by IS_VALID & LOADED procs)
Data Types schema_list_t (used by UPDATE_SCHEMA_LIST proc)

Dependencies
SELECT name
FROM dba_dependencies
WHERE referenced_name = 'DBMS_REGISTRY'
UNION
SELECT referenced_name
FROM dba_dependencies
WHERE name = 'DBMS_REGISTRY';
 
INVALIDATION_REGISTRY$ REGISTRY$DEPENDENCIES REGISTRY$LOG
REGISTRY$ REGISTRY$ERROR REGISTRY$PROGRESS
REGISTRY$DATABASE REGISTRY$HISTORY REGISTRY$SCHEMAS
Related Query SELECT *
FROM registry$log;
 
CHECK_SERVER_INSTANCE
Database must be open for upgrade or downgrade for this to be used dbms_registry.check_server_instance
exec dbms_registry.check_server_instance;
 
COMP_NAME

Undocumented
dbms_registry.comp_name(comp_id IN VARCHAR2) RETURN VARCHAR2
desc registry$

SELECT pid FROM registry$;

-- loaded procedure from $ORACLE_HOME/rdbms/admin/catcr.sql
-- altered to only show the use of this procedure
 

Warning: Running this code could be fatal to your system.
This is here as a demo for education purposes: Not to be run

PROCEDURE loaded(comp_id IN VARCHAR2) IS
 p_id VARCHAR2(30) := NLS_UPPER(comp_id);
 p_version VARCHAR2(17) := NLS_UPPER(comp_version);
 p_banner VARCHAR2(80) := comp_banner;
BEGIN
  IF exists_comp(p_id) THEN
    IF p_version IS NULL THEN
      SELECT version INTO p_version FROM v$instance;
    END IF;

    IF p_banner IS NULL THEN
      SELECT banner INTO p_banner FROM v$version
      WHERE rownum = 1;

      p_banner:= substr(p_banner, instr(p_banner,'-',1) + 2);
      p_banner:= dbms_registry.comp_name(p_id) || ' Release ' ||
      p_version || ' - ' || p_banner;
    END IF;
  ELSE
    raise NO_COMPONENT;
  END IF;
END loaded;
/

 
DELETE_PROGRESS_ACTION (new 11g)
Undocumented dbms_registry.delete_progress_action(
comp_id IN VARCHAR2,
action  IN VARCHAR2);
TBD
 
DOWNGRADED
Undocumented dbms_registry.downgraded(comp_id IN VARCHAR2, old_version IN VARCHAR2);
TBD
 
DOWNGRADING
Undocumented dbms_registry.downgrading(
comp_id    IN VARCHAR2,
old_name   IN VARCHAR2,
old_proc   IN VARCHAR2,
old_schema IN VARCHAR2,
old_parent IN VARCHAR2);
TBD
 
GET_DEPENDENT_COMPS (new 11g)
Returns a list of dependent components dbms_registry.get_dependent_comps(?)
RETURN dbms_registry.comp_depend_list_t
TBD
 
GET_DEPENDENT_COMPS_REC (new 11g)
Undocumented dbms_registry.get_dependent_comps_rec(?)
RETURN dbms_registry.comp_depend_rec
TBD
 
GET_PROGRESS_STEP (new 11g)
Undocumented dbms_registry.get_progress_step(
comp_id IN VARCHAR2,
action  IN VARCHAR2)
RETURN NUMBER;
TBD
 
GET_PROGRESS_VALUE (new 11g)
Undocumented dbms_registry.get_progress_value(
comp_id IN VARCHAR2,
action  IN VARCHAR2)
RETURN NUMBER;
TBD
 
GET_REQUIRED_COMPS (new 11g)
Undocumented dbms_registry.get_required_comps(?)
RETURN dbms_registry.comp_depend_list_t
TBD
 
GET_REQUIRED_COMPS_REC (new 11g)
Undocumented dbms_registry.get_required_comps_rec(?)
RETURN dbms_registry.comp_depend_rec
TBD
 
INVALID

Mark an item in the registry as invalid
dbms_registry.invalid(comp_id IN VARCHAR2);
col comp_id format a10

SELECT comp_id
FROM dba_registry
ORDER BY 1;

PROCEDURE validate IS
 start_time DATE;
 end_time   DATE;
 option_val VARCHAR2(64);
 g_null     CHAR(1);
BEGIN
  BEGIN
    SELECT null INTO g_null FROM obj$ 
    WHERE owner#=0 AND name='V$CACHE_TRANSFER';
    -- valid if v$ges_statistics exists;
    SELECT value INTO option_val FROM v$option
    WHERE parameter = 'Real Application Clusters';
    -- check if RAC option has been linked in
    IF option_val = 'TRUE' THEN
      dbms_registry.valid('RAC');
    ELSE
      dbms_registry.invalid('RAC');
    END IF;
  EXCEPTION
    WHEN NO_DATA_FOUND THEN
      dbms_registry.invalid('RAC');
  END;
END validate;
/
 
IS_COMPONENT 

Determines whether a component id corresponds with a component
dbms_registry.is_component(comp_id IN VARCHAR2)
RETURN BOOLEAN;
set serveroutput on

BEGIN
  IF dbms_registry.is_component('XML') THEN
    dbms_output.put_line('Is a component');
  ELSE
    dbms_output.put_line('Not a component');
  END IF;
END;
/
 
IS_IN_REGISTRY

Determines whether a component is loaded into the registry
dbms_registry.is_in_registry(comp_id IN VARCHAR2)
RETURN BOOLEAN;
set serveroutput on

BEGIN
  IF dbms_registry.is_in_registry('XML') THEN
    dbms_output.put_line('Is in the registry');
  ELSE
    dbms_output.put_line('Not in the registry');
  END IF;
END;
/
 
IS_LOADED
Undocumented dbms_registry.is_loaded(
comp_id IN VARCHAR2,
version IN VARCHAR2)
RETURN NUMBER;
SELECT comp_id, version
FROM dba_registry;

SELECT dbms_registry.is_loaded('XML', '11.1.0.3.0') FROM dual;

SELECT dbms_registry.is_loaded('XML', '11.1.0.4.0') FROM dual;
 
IS_STARTUP_REQUIRED
Returns whether a registry component requires a startup dbms_registry.is_startup_required(comp_id IN VARCHAR2) RETURN NUMBER;
SELECT comp_id, procedure, startup
FROM dba_registry;

SELECT dbms_registry.is_startup_required('XML') FROM dual;
 
IS_VALID
Determines if a registry component is valid dbms_registry.is_valid(
BEGIN
  IF dbms_registry.is_valid('JAVAVM', dbms_registry.release_version) =1
  THEN
    dbms_registry.loaded('CATJAVA');
    dbms_registry_sys.validate_catjava;
  END IF;
END;
/
 
LOADED
Indicate load complete dbms_registry.loaded(
BEGIN
  dbms_registry.loaded('CATALOG');
END;
/
 
LOADING

Indicate that the component is in the process of being loaded

Overload 1
dbms_registry.loading(
comp_id     IN VARCHAR2,
comp_name   IN VARCHAR2,
comp_proc   IN VARCHAR2,
comp_schema IN VARCHAR2,
comp_parent IN VARCHAR2)
set linesize 121
col comp_name format a35
col procedure format a35
col schema format a10
col parent_id format a10

SELECT comp_id, comp_name, procedure, schema, parent_id
FROM dba_registry;

BEGIN
  dbms_registry.loading('CATALOG', 'Oracle Database Catalog Views',
'dbms_registry_sys.validate_catalog');
END;
/
Overload 2 dbms_registry.loading(
comp_id      IN VARCHAR2,
comp_name    IN VARCHAR2,
comp_proc    IN VARCHAR2,
comp_schema  IN VARCHAR2,
comp_schemas IN dbms_registry.schema_list_t,
comp_parent  IN VARCHAR2)
TBD
 
NOTHING_SCRIPT
Returns the path to nothing.sql dbms_registry.nothing_script RETURN VARCHAR2
SELECT dbms_registry.nothing_script FROM dual;
 
PREV_VERSION
Returns the previous version of a registry component dbms_registry.prev_version(comp_id IN VARCHAR2) RETURN VARCHAR2
SELECT dbms_registry.prev_version('XML') FROM dual;
 
REMOVED
A component has been removed from the registry dbms_registry.removed(?comp_id IN VARCHAR2);
EXECUTE dbms_registry.removed('EXF');
 
REMOVING
Removes a component from the registry dbms_registry.removing(?comp_id IN VARCHAR2);
REM Drop the Expression Filter user with cascade option 
REM 
EXECUTE dbms_registry.removing('EXF');
drop user exfsys cascade;
 
RESET_VERSION
Undocumented dbms_registry.reset_version(comp_id IN VARCHAR2);
exec dbms_registry.reset_version('EXF');
 
SCHEMA
Returns the schema owner of a registry component dbms_registry.schema(COMP_ID IN VARCHAR2) RETURN VARCHAR2
SELECT dbms_registry.schema('EXF') FROM dual;
 
SCHEMA_LIST
Returns the schema owners of a registry component dbms_registry.schema_list(COMP_ID IN VARCHAR2)
RETURN dbms_registry.schema_list_t
TBD
 
SCHEMA_LIST_STRING
Undocumented dbms_registry.schema_list_string(COMP_ID IN VARCHAR2) RETURN VARCHAR2
SELECT dbms_registry.schema_list_string('EXF') FROM dual;
 
SCRIPT
Undocumented dbms_registry.script(comp_id IN VARCHAR2, script_name IN VARCHAR2)
RETURN VARCHAR2
Rem Create helper package for text index on xdb resource data

COLUMN xdb_name NEW_VALUE xdb_file NOPRINT;

SELECT dbms_registry.script('CONTEXT','@dbmsxdbt.sql') AS xdb_name
FROM DUAL;
@&xdb_file
 
SCRIPT_PATH
Returns the path to the script for a registry component dbms_registry.script_path(comp_id IN VARCHAR2) RETURN VARCHAR2;
SELECT dbms_registry.script_path('EXF') FROM dual;
 
SCRIPT_PREFIX
Returns a registry component's prefix dbms_registry.script_prefix(comp_id IN VARCHAR2) RETURN VARCHAR2
SELECT dbms_registry.script_prefix('EXF') FROM dual;
 
SESSION_NAMESPACE
Returns the namespace for a session dbms_registry.session_namespace
SELECT dbms_registry.session_namespace FROM dual;
 
SET_COMP_NAMESPACE
Sets a registry component's namespace dbms_registry.set_comp_namespace(
comp_id   IN VARCHAR2,
namespace IN VARCHAR2);
exec dbms_registry.set_comp_namespace('RAC', 'SERVER');
 
SET_PROGRESS_ACTION (new 11g)
Undocumented dbms_registry.set_progress_action(
comp_id IN VARCHAR2,
action  IN VARCHAR2,
value   IN VARCHAR2,
step    IN NUMBER);
TBD
 
SET_PROGRESS_STEP (new 11g)
Undocumented dbms_registry.set_progress_step(
comp_id IN VARCHAR2,
action  IN VARCHAR2,
step    IN NUMBER);
TBD
 
SET_REQUIRED_COMPS (new 11g)
Undocumented dbms_registry.set_required_comps(?)
TBD
 
SET_SESSION_NAMESPACE
Sets the registry namespace for a component dbms_registry.set_session_namespace(namespace IN VARCHAR2);
exec dbms_registry.set_session_namespace('SERVER');
 
STARTUP_COMPLETE
Undocumented dbms_registry.startup_complete(comp_id IN VARCHAR2);
exec dbms_registry.startup_complete('RAC');
 
STARTUP_REQUIRED
Updates the registry to indicate that a component requires startup dbms_registry.startup_required(comp_id IN VARCHAR2);
TBD
 
STATUS

Determine the status of a database component from the registry
dbms_registry.status(? IN VARCHAR2) RETURN VARCHAR2;
BEGIN
  IF dbms_registry.status('CATJAVA') IS NULL THEN
    RAISE_APPLICATION_ERROR(-20000, 'CATJAVA has not been loaded.'); 
  END IF;
END;
/

BEGIN
  IF dbms_registry.status('XDB') = 'VALID' THEN
    execute immediate 'create table xdb.migr9202status (n integer)';
    execute immediate 'insert into xdb.migr9202status values (1000)';
  END IF;
END;
/
 
STATUS_NAME

Undocumented
dbms_registry.status_name(status IN NUMBER) RETURN VARCHAR2
SELECT dbms_registry.status_name(1)
FROM dual;

SELECT dbms_registry.status_name(0)
FROM dual;

SELECT dbms_registry.status_name(-1)
FROM dual;
 
SUBCOMPONENTS
Undocumented dbms_registry.subcomponents(
comp_id     IN VARCHAR2,
comp_option IN NUMBER,
RETURN dbms_registry.comp_list_t;
TBD
 
UPDATE_SCHEMA_LIST

Undocumented
dbms_registry.update_schema_list(
set serveroutput on

Rem Indicate CATPROC load complete and check validity
BEGIN
  dbms_registry.update_schema_list('CATPROC',
  dbms_registry.schema_list_t('SYSTEM', 'OUTLN', 'DBSNMP'));
  dbms_registry.loaded('CATPROC');
  dbms_registry_sys.validate_catproc;
  dbms_registry_sys.validate_catalog;
END;
/

set serveroutput off
 
UPGRADED
Undocumented dbms_registry.upgraded(
comp_id     IN VARCHAR2,
new_version IN VARCHAR2,
new_banner  IN VARCHAR2)
TBD
 
UPGRADING
Undocumented

Overload 1
dbms_registry.upgrading(
comp_id    IN VARCHAR2,
new_name   IN VARCHAR2,
new_proc   IN VARCHAR2,
new_schema IN VARCHAR2,
new_parent IN VARCHAR2);
TBD
Overload 2 dbms_registry.upgrading(
comp_id     IN VARCHAR2,
new_name    IN VARCHAR2,
new_proc    IN VARCHAR2,
new_schema  IN VARCHAR2,
new_schemas IN dbms_registry.schema_list_t,
new_parent  IN VARCHAR2);
TBD
 
VALID
Mark an item in the registry as valid dbms_registry.valid(comp_id IN VARCHAR2);
See INVALID Demo Above
 
VERSION
Returns the version of a registry component dbms_registry.version(comp_id IN VARCHAR2) RETURN VARCHAR2
SELECT dbms_registry.version('CATPROC') FROM dual;
 
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us    © 2003 - 2024 psoug.org
-----