Do you have this kind of error message ?

SQL> drop user MYUSER cascade;
drop user MYUSER cascade
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [kqd-objerror$], [U], [0], [101],
[MYTRIGGER_MYCALCULATION], [], [], [], [], [], [], []

It means that one or more object is invalid. And in the error message you have the object name causing this error and then you can find the ids of instances of this object causing errors.

SQL> select object_id from dba_objects where object_name='MYTRIGGER_MYCALCULATION';

 OBJECT_ID
----------
    867767
    840888

Now you can have logs about these objects.

SQL> select name, type , line, position, text from all_errors where name like 'MYTRIGGER_MYCALCULATION';

NAME                           TYPE               LINE   POSITION
------------------------------ ------------ ---------- ----------
TEXT
--------------------------------------------------------------------------------
MYTRIGGER_MYCALCULATION           TRIGGER               2          6
PLS-00049: bad bind variable 'NEW.SYSVERSION'

MYTRIGGER_MYCALCULATION           TRIGGER               3          4
PLS-00049: bad bind variable 'NEW.SYSVERSION'

MYTRIGGER_MYCALCULATION           TRIGGER               6          4
PLS-00049: bad bind variable 'NEW.SYSVERSION'

Here we understand the errors are caused by compilation errors on a trigger. As we just want to drop the user object that contains this trigger, we can ignore these errors :

SQL>  insert into sys.objerror$ values(867767);
 insert into sys.objerror$ values(840888);
1 row created.

SQL> insert into sys.objerror$ values(840888);
 insert into sys.objerror$ values(840888);insert into sys.objerror$ values(840888)
1 row created.

Then we can drop the user successfully.

SQL> drop user MYUSER cascade;

User dropped.

To go further, here is an interesting source: https://www.oratable.com/check-invalid-objects-in-oracle/

Partager sur les réseaux