Comments
3 comments
-
That means that one of our queries came back with an unexpected NULL in it. Databases in the kind of state which commonly causes this problem can often be used normally with no visible problems, but may have something corrupted underneath. Or, it could be some problem with our query we haven't found yet.
If you could run SQL Server Profiler on that instance, perform the comparison, and look for the last query generated by SQL Compare, then send that query and the results of that query run against that database to support@red-gate.com, we should be able to work out what went wrong with our query (or suggest further troubleshooting steps). If you can't send the results of the query for any reason, an indication of where NULL values appear in the query results will be equally useful. -
Hi Michelle,
this is a last started query
SELECT so.name AS TableName,
sys.schemas.name AS TableOwner,
cc.name AS ConstraintName,
cc.object_id AS Constraint_id,
cc.is_not_for_replication AS NotForReplication,
cc.is_not_trusted AS WithNoCheck,
cc.is_disabled AS Disabled,
sc.name AS ColumnName,
cc.parent_column_id AS colid,
cc.definition AS Text
FROM sys.check_constraints cc WITH (NOLOCK)
INNER JOIN sys.objects so WITH (NOLOCK) ON so.object_id=cc.parent_object_id
LEFT JOIN sys.schemas WITH (NOLOCK) ON sys.schemas.schema_id=so.schema_id
LEFT JOIN sys.columns sc WITH (NOLOCK) ON sc.column_id=cc.parent_column_id AND sc.object_id=cc.parent_object_id
ORDER BY so.name, cc.name
These are results of executing query by the same user as in SQLCompare
intfiles dbo CK_intfiles 162815642 0 0 0 type 3 NULL
These results under sa:
intfiles dbo CK_intfiles 162815642 0 0 0 type 3 ([type] = N't1' or [type] = N't2' or [type] = N't3')
profile_types dbo CK_profile_types 1075691080 0 1 0 type_id 3 ([type_id]>(0) AND [type_id]<=(9)) -
What permissions does the user have that you're running SQL Compare with? It looks like the user is lacking one of the permissions needed for running SQL Compare (see http://www.red-gate.com/supportcenter/C ... 000072.htm for details).
Add comment
Please sign in to leave a comment.
During the database registering I have got:
mydb-Reading constraints
An unexpected null value has been encountered while queriyng the database system tables. Please make sure that db is in consistent state by running DBCC CHECKDB.
Some users works with this db and have no problem...
Regards,
Oleg.