BUG: NOT FOR REPLICATION clause causes SQL Server CE replication to fail (300597)
The information in this article applies to:
- Microsoft SQL Server 2000 Windows CE Edition
- Microsoft SQL Server 2000 Windows CE Edition 2.0
This article was previously published under Q300597 SYMPTOMS
A Microsoft SQL Server 2000 Windows CE Edition Subscriber produces the following error messages when you invoke the merge process: NOTE: This first error does not occur for SQL Server CE 2.0, but the following two message do apply.
RESULT:NUMBER = 80040E14
NATIVE_ERROR = 25501, SSCE_M_QP_BADPARSE
You may also receive the following additional native error messages:
28557 (SSCE_M_UNUSABLEDATABASE):
"The database is in an unusable state. Delete it and recreate it."
28560 (SSCE_M_EXECUTEFAILED):
"OLE DB Execute Method failed; bad or invalid SQL statement"
CAUSE
If the table that is part of the publication contains constraints with the NOT FOR REPLICATION option that was enabled by using the ALTER TABLE statement, the SQL Server replication provider is not parsing out the ALTER TABLE statement when it sends the initial snapshot to SQL Server CE.
RESOLUTION
To resolve the problem, use either of these methods:
- Do not create constraints with the NOT FOR REPLICATION option.
If constraints in your database have the NOT FOR REPLICATION option, drop the constraints, and then re-create them without the NOT FOR REPLICATION option. Then, re-run the Snapshot Agent.
-or-
- Select the Enforce relationship for replication check box that is located under the Relationships tab of the Table Design properties page (for each constraint) in the SQL Server Enterprise Manager, and then re-run the Snapshot Agent.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCES
SQL Server 2000 Books Online
Modification Type: | Minor | Last Reviewed: | 9/20/2005 |
---|
Keywords: | kbBug kbpending KB300597 |
---|
|