June 8, 2006 at 10:41 am
In sql server 2000 enterprise manager, for the check constraints . When you right click a table and choose design table, and then choose Manage constraints tab, the check existing data on creation is always blank, even after I click it to make it with a check mark. Then I save the table and when I open it again to see if the check mark is there on check existing data on creation , it is still blank.(even after I reconnect the server).
Also, how can I verify that the check existing data on creation is on or off if this enterprise manager is not displaying correctly? I try the sp_help on the table and it doesn't show if the check constraint is on or off and I try to script out the table to include scripting out the constraints, it also doesn't tell much if the check constraint is on or off.
Is this a bug from Microsoft or am I missing something??
June 8, 2006 at 2:32 pm
The 'check existing' setting on constraint creation is not stored anywhere, afaik. Once you create the constraint, there's no need to track the value.
You can determine the state of a check constraint using the OBJECTPROPERTY() function:
SELECT OBJECTPROPERTY(OBJECT_ID('MyConstraint'), 'CnstIsDisabled')
1 = True (constraint is disabled)
0 = False (constraint is being enforced)
-Eddie
Eddie Wuerch
MCM: SQL
June 8, 2006 at 2:59 pm
Thank you so much for your response.
Your response was almost correct:
Except the CnstIsDisabled is not the parameter to be used for my question. It is: CnstIsNotTrusted the correct parameter that will let me know whether the existing row was checked when the check constraint was created.
The CnstIsDisabled parameter only let you know is the constraint is enabled or not enabled which is different from CnstIsNotTrusted.
Nevetherless, you guide me to the query which I didnot thought of.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply