Toad World® Forums

Check constraints not showing properly

I have created a table with some not null constraints. When i look at the script for the table, the constraints are shown as below.

image

I created the constraint by checking not null column in the alter table window

Short version
This is due to an Oracle bug. in Toad 13.0 and 13.1, you can work around it by adding the Toad.ini setting mentioned below. In Toad 13.2, the Toad.ini setting is not necessary.

Long version
In Oracle version 12.1, Oracle added a SEARCH_CONDITION_VC column to DBA_CONSTRAINTS, to replace the SEARCH_CONDITION column (which was a LONG). They still have both columns in current version.

Toad version 12.12 started using SEARCH_CONDITION_VC and stopped using SEARCH_CONDITION, but as it turned out, Oracle doesn't always populate SEARCH_CONDITION_VC. When this was first reported, I thought it was an isolated case. I didn't want to add the extra overhead of always checking both columns, so If you have Toad version 13.0 or 13.1, you can add this to your Toad.ini and Toad should work around it.

Under [SETTINGS], add:
SEARCH_CONDITION_WORKAROUND=1

More recently I discovered that the problem in Oracle is a bit more widespread, so In the 13.2 beta, the Toad.ini setting is not necessary, and Toad will always check both columns, and the problem is solved.

1 Like