Could not find CHECK constraint??

Could not find CHECK constraint??

Post by Michael MacGrego » Wed, 20 Nov 2002 02:36:01



When attempting to copy a database using DTS, I get the following error
message:

"Could not find CHECK constraint for '<Table>', although the table is
flagged as having one."

What the heck does this mean and where is this flag? I've checked the table
and all the check constraints that are supposed to be against the table
exist.

Michael MacGregor
Database Architect
SalesDriver

 
 
 

Could not find CHECK constraint??

Post by Anith Se » Wed, 20 Nov 2002 03:53:26


My guess is that while scripting the Database for DTS, the
dependent objects are ignored. Set up as transfer of Database
objects, select 'Include dependant objects' and try the DTS
again.

--
- Anith

 
 
 

Could not find CHECK constraint??

Post by Michael MacGrego » Wed, 20 Nov 2002 04:12:19


Yuk. I find using that option causes all sorts of other weird problems as
DTS doesn't sequence the objects properly.

Never mind, I'll use the more dependable backup/restore option then.

MTM

 
 
 

Could not find CHECK constraint??

Post by BlueG » Wed, 20 Nov 2002 05:23:48


CHECK constraints enforce domain integrity by limiting the values that can
be placed in a column (per BOL).

The easiest thing I could recommend doing is to generating a script for the
table in question and looking at how the columns are defined.  One of them
should have a the syntax of "CONSTRAINT name CHECK (fieldname <boolean
condition>)"

This might give you a clue to narrow down the reason.


Quote:> When attempting to copy a database using DTS, I get the following error
> message:

> "Could not find CHECK constraint for '<Table>', although the table is
> flagged as having one."

> What the heck does this mean and where is this flag? I've checked the
table
> and all the check constraints that are supposed to be against the table
> exist.

> Michael MacGregor
> Database Architect
> SalesDriver

 
 
 

Could not find CHECK constraint??

Post by Michael MacGrego » Thu, 21 Nov 2002 00:16:40


Please note that in my original post I did mention that the table does have
all the appropriate check constraints that were defined against it. What I
did not mention is that both the original and the copied tables are
identical.

This particular problem has been bugging me for sometime and I have been
totally unable to figure out why it occurs, other than the fact that using
DTS to copy over a database does not seem to be reliable, regardless of what
options are set with regard to dependant objects.

Most of the time, I do not use DTS for this, I find using backup/restore to
be much more consistent and reliable though a little more involved.

Michael MacGregor
Database Architect
SalesDriver

 
 
 

Could not find CHECK constraint??

Post by BlueG » Thu, 21 Nov 2002 01:28:51


Well, I'm sure you already did this, but searching the KB, the only article
I was able to find was a listing of the error code.  This error happens to
be error 433, but I cannot find any reason for it.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trbl...
syserrors1_0cqh.asp



Quote:> Please note that in my original post I did mention that the table does
have
> all the appropriate check constraints that were defined against it. What I
> did not mention is that both the original and the copied tables are
> identical.

> This particular problem has been bugging me for sometime and I have been
> totally unable to figure out why it occurs, other than the fact that using
> DTS to copy over a database does not seem to be reliable, regardless of
what
> options are set with regard to dependant objects.

> Most of the time, I do not use DTS for this, I find using backup/restore
to
> be much more consistent and reliable though a little more involved.

> Michael MacGregor
> Database Architect
> SalesDriver

 
 
 

Could not find CHECK constraint??

Post by Michael MacGrego » Thu, 21 Nov 2002 02:41:01


Thanks for your time and effort anyway.

I'd hoped that maybe someone would know off the top of their heads, what
this was and why it occurs. Guess it's just another anomoly with DTS. Oh
well.

MTM

 
 
 

1. Could not find check constraint for table 'x', although the table is flagged...

Hello,

I am using the DTS Import/Export Wizard in Enterprise
Manager on SQL Server 2000 sp2 to copy one database to
another on the same server.  The package fails with the
error message "Could not find check constraint for
table 'x', although the table is flagged as having one."

Table x does have two check constraints defined!  So what!

Why can't the package find them?  How do I fix this?

Thanks in advance.

2. Is SQLPlus supported on SunOS 5.5.1 Generic sun4u sparc?

3. DELETE does not check CHECK constraint

4. Testing for no input with CONSTRUCT statement

5. Column check constraint vs table check constraint

6. Multiuser Problem with record ids

7. Change table check constraint to column check constraint?

8. same new code

9. Find check constraints given Table and Column

10. Does anyone know why CHECK Constraint text does not appear

11. Union All view that is not updateable - problem with the check constraint

12. Check constraint does not work on update

13. Check constraint does not work, need help