A fix is available
APAR status
Closed as program error.
Error description
An ALTER TABLE <table> FOREIGN KEY had a mispelled REFERENCES column name (a user error) and no error was detected. For example: ALTER TABLE PMRJEJ11.CHILD FOREIGN KEY FATHERPK (FATHERPK) REFERENCES PMRJEJ11.FATHER (FATHERPM) <----- should have been FATHERPK ON DELETE RESTRICT ENFORCED ; The compare received the following message: Column FATHERPK deleted from foreign key FATHERPK for table PMRJEJ11.CHILD because column FATHERPM was deleted from the primary/unique key for table PMRJEJ11.FATHER Foreign key FATHERPK dropped because all the columns were deleted from the primary/unique key The column FATHERPM never exited so could not have been deleted from the primary/unique key.
Local fix
n/a
Problem summary
**************************************************************** * USERS AFFECTED: Users of DB2 Administration Tool for z/OS * * and DB2 Object Comparison Tool for z/OS * * who analyze an ALTER TABLE statement. * * * **************************************************************** * PROBLEM DESCRIPTION: Analyzing a change that has an * * invalid ALTER TABLE FOREIGN * * KEY statement with references- * * clause, the process ends without * * error. * **************************************************************** * RECOMMENDATION: * **************************************************************** When analyzing a change that has an invalid ALTER TABLE FOREIGN KEY statement with references-clause, the process ends without error. The erroneously successful completion of the analyze process will result in not generating the foreign key in the final DDL. Example of the invalid statement: ALTER TABLE MYSCHMA.CHILDTB FOREIGN KEY MYPK (MYPK) REFERENCES MYSCHMA.PARENTTB (MYPM) <--- should have been MYPK ON DELETE RESTRICT ENFORCED ; SYSPRINT has below messages when referencing column does not exists: Column MYPK deleted from foreign key MYPK for table PMYSCHMA.CHILDTB because column MYPM was deleted from the primary/unique key for table MYSCHMA.PARENTTB Foreign key MYPK dropped because all the columns were deleted from the primary/unique key
Problem conclusion
The problem has been resolved. The fix will throw an error ADB8061E and terminate the analyze process. ADB8061E The column name, col_name, referenced in a foreign key was not found in a table, table_name.
Temporary fix
Comments
APAR Information
APAR number
PI80498
Reported component name
DB2 OBJECT COMP
Reported component ID
5697G6400
Reported release
B20
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2017-04-25
Closed date
2017-11-01
Last modified date
2017-12-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI51622 UI51623
Modules/Macros
ADBCCMM ADBMSG ADB8000
Fix information
Fixed component name
DB2 ADMIN TOOL
Fixed component ID
568851500
Applicable component levels
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSCVQTD","label":"IBM Db2 Administration Tool for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.2.0"}]
Document Information
Modified date:
10 January 2021