Steps to reproduce:
1. Connect to LUW 9.7 or later version
2. Create simple table and create sql function which depends on this table
3. Extract DDL from this table (include drop statements + include dependent objects)
4. Try to execute generated script
As result - Toad generates following statements: DROP TABLE , CREATE TABLE, CREATE OR REPLACE FUNCTION
Note that this only happens if “auto_reval” db parameter is "DISABLED" .
In this case the script fails with error:
ERROR [42893] [IBM][DB2/NT64] SQL0478N DROP, ALTER, TRANSFER OWNERSHIP or REVOKE on object type "TABLE" cannot be processed because there is an object "TEMP.SQL130117162139700", of type "FUNCTION", which depends on it.
Toad does not take into account the“auto_reval” db parameter .
If “auto_reval” db parameter is in "IMMEDIATE" or "DEFERRED" state the script works fine
WORKAROUND
Fix the script manually
STATUS
Enhancement request CR106510 has been submitted to Development for consideration in a future release of Toad for DB2
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center