Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table constraints

Status
Not open for further replies.

SBTBILL

Programmer
May 1, 2000
515
US
I've had an on and off problem with a bogus constraint on one of my tables.

Finally found and figured out how to use SP_helpconstraint so I now know that 2 constraints have turned up on the table. One is for the primary key. I think this is all right. The other is a Check table Level constraint. it appears to be enabled and set to check for the password.

The line reads
Constraint_type CHECK Table Level
Constraint_name CK_event_log
Delete_action n/a
update_action n/a
Status_enabled Enabled
Status_for_replication Not for Replication
Constraint_keys N 'user name' = N 'password'

I've changed the last line slightly for security reasons it gives a valid user name and password.

I have never placed any constraints on the table. It runs fine for months with lots of stable code hitting it. The user name and password are fixed for the program that runs the code

Last time this happened renamed the table and rebuild it. Then everything worked fine. While drastic I can get away with that with this table. There are others I can't.
 
One more thing I have a solution to the problem but it seems drastic. If I send alter table even_log drop constraint ck_event_log that pulls the constraint and the problem goes away. So my real question is what is causing it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top