I used following procedure to drop schema first.
db2 "CALL SYSPROC.ADMIN_DROP_SCHEMA('TRIDATA', NULL, 'ERRORSCHEMA', 'ERRORTABLE')"
The status came as 0, but there are 33 entries created in ERRORSCHEMA.ERRORTABLE.
Most entries' STATEMENT column are related to Procedures, like the one below.
DROP SPECIFIC PROCEDURE "TRIDATA "."SQL240708124326977"
As suggested, when tried to run the above command, there is further dependent object that caused issues, see below.
[triinst@usocitrid01v ~]$ db2 DROP SPECIFIC PROCEDURE "TRIDATA "."SQL240708124326977"
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0204N "TRIDATA.SQL240708124326977" is an undefined name. SQLSTATE=42704
There was a suggestion on IBM page about this, but both didn't work.
Dropping a schema in DB2 may fail with SQL0478N error
When Option 1 was tried using the command below, 0 records are found, so there was nothing to drop in terms of JAR files.
db2 "select JARSCHEMA,JAR_ID,DEFINER from SYSIBM.SYSJAROBJECTS where JARSCHEMA='TRIDATA'"
When I tried Option 2 (DROP command), the subsequent dependent object couldn't be ascertained as to what it is.
DROP SCHEMA TRIDATA RESTRICT;
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0478N The statement failed because one or more dependencies exist on the
target object. Target object type: "SCHEMA". Name of an object that is
dependent on the target object: "TRIDATA.CUR_SPECATTR". Type of object that is
dependent on the target object: "TYPE". SQLSTATE=42893
How do you figure out what is TRIDATA.CUR_SPECATTR so that it can be dropped?
Can you help drop the SCHEMA clean by either of these methods?
------------------------------
Kamal Subedi
------------------------------