How can I check the order of type dependencies in order to remove them and replace / change the initial type?

I tried changing the type using the following code and it gave me the error code: ORA-02303 . I am not very good at Oracle or PL / SQL, but I need to solve this; therefore, I will appreciate further assistance in this.

Thanks in advance. The code is just an example. But then again, I need to check out his dependents first.

create or replace type A as object (
  x_ number, 
  y_ varchar2(10),
  member procedure to_upper
);
/
+3
source share
5 answers

DBA_DEPENDENCIES, ALL_DEPENDENCIES, or USER_DEPENDENCIES, :

SELECT OWNER, NAME, TYPE
  FROM DBA_DEPENDENCIES 
 WHERE REFERENCED_OWNER = [type owner]
   AND REFERENCED_NAME  = [type name]
   AND REFERENCED_TYPE  = 'TYPE'
/
+3

, , :

select * from all_tab_columns
where data_type_owner not in ('SYS');

Alex ALTER TYPE

+2

DROP FORCE, ( ), , . - :

ALTER TYPE type_name DROP ATTRIBUTE attr_name INVALIDATE;
ALTER TYPE type_name ADD ATTRIBUTE attr_name varchar2(50) CASCADE;

/.

+1

Oracle, .

'TYPE' :

  • DROP TYPE mytype FORCE;
  • DROP TYPE mytype_dependent FORCE;
  • mytype_dependent .
  • .

. 3..5 , " ".

'TABLE' :

, .

ORA-02303:

from Annals of Oracle Improbable Errors blog

0
source

Source: https://habr.com/ru/post/1740820/


All Articles