Reason:
The foreign key being created fails to satisfy all of the requirements for a foreign key. See the table below, for the specific problem.
The SQLSTATE that equates to this SQL return code is 53S03.
Action:
Interpret the error message using the chart below. If the error message has been truncated, run a DBUTLTY REPORT AREA=PXX for a complete error summary (search for the -36 error message). For more information on creating valid foreign keys, see CA Datacom/DB SQL User Guide.
|
Reason Code |
Reason for Rejection |
|
|---|---|---|
|
1 |
SET NULL was specified but no foreign key columns are nullable.
|
|
|
2 |
SET DEFAULT was specified but at least one of the columns lacks a default value specification.
|
|
|
3 |
ON DELETE actions conflict as described in the CA Datacom/DB SQL User Guide.
|
|
|
4 |
This foreign key references the table on which it is being defined. This is not allowed.
|
|
|
5 |
This foreign key indirectly references the table on which it is being defined, or the definition of the new foreign key caused a different foreign key (possibly on a different table) to become self-referencing.
|
|
Note: The four characters that appear in item D of reason code 3 indicate how the update and delete rules conflicted between the foreign keys named in items B and C. The first character is Y if the delete rules of B and C conflict. The second is Y if B's delete rule conflicts with C's update rule. The third is Y if B's update rule conflicts with C's delete rule. The fourth is Y if the two update rules conflict. In general, update and delete rules conflict if their actions are different (CASCADE and RESTRICT, for example) and an attempt could be made to take both actions on the same row at the same time. See the CA Datacom/DB SQL User Guide for a detailed description of which update and delete rules conflict.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|