DROP schema "BFST" RESTRICT 异常
提示信息:
[Code: -478, SQL State: 42893] DB2 SQL Error: SQLCODE=-478, SQLSTATE=42893, SQLERRMC=SCHEMA;BFST.SEQ_ACCLOG_SEQNO;SEQUENCE, DRIVER=4.19.49
原因: 是否存在依赖该schema 的Functions, Sequences.......
解决方案: 先删除该schema中的Functions, Sequences; 然后在删除对应的schema
查找方法问题的过程:
登录db2数据库服务器
切换到db2inst1或其他dbadm权限的账户,命令: su - dbinst1
执行两句命令: 1. db2 2. DROP schema "BFST" 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: "BFGL.SQL200611134016565". Type of object that
is dependent on the target object: "FUNCTION". SQLSTATE=42893