Merge replication and computed columns

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,
I wonder if any of you guys can help me. I've got a fully reproducible
problem with merge replication. Later in this message are instructions
on how try it out yourself. It looks like a bug in sql server to me,
but if it's intended behaviour, I'd love a pointer to a document saying
this cannot be done.

The error message that appears is "The process could not log conflict
information.".

The error details are:
The process could not log conflict information.
(Source: Merge Replication Provider (Agent); Error number: -2147200992)
---------------------------------------------------------------------------------------------------------------
Invalid date format
(Source: PRIMARY (Data source); Error number: 0)
---------------------------------------------------------------------------------------------------------------

The steps to reproduce are:
- On 2 identically configured Windows 2003 servers, install sql server
2000 and SP4. Set the sql server and agent services to log on as domain
admin.
- Using Query Analyzer, on each server, run the script below. This will
create a new database and table.

use [master]
go

create database [MyDb]
go

USE [MyDb]
GO

CREATE TABLE [MyTable]
(
[TimeToAnswer] AS 1,
[IsVMail] AS 1,
[StartTime] [datetime] NOT NULL,
)
GO

ALTER TABLE [MyTable] ADD [DummyColumn] AS NULL
GO

ALTER TABLE [MyTable] DROP COLUMN [DummyColumn]
GO

ALTER TABLE [MyTable] ADD [R] [uniqueidentifier] NULL ROWGUIDCOL
GO

- Set up merge replication between the 2 boxes. You will see the
problem faster if you set the agent to run every minute
- In Query Analyzer, run the following on 1 of the boxes:

declare @s datetime
set @s = convert(datetime, '2006-11-08 16:09:11')
insert into MyTable
("starttime", "r")
values
(@s, 'DD6AC9B4-5EFD-476F-9966-36E3528CE71A')

- When the merge agent next runs, you'll see the "The process could not
log conflict information." and "Invalid date format" messages. The next
time the agent runs the row will be deleted (probably moved into the
conflict table).


Note that this is an artificial example of how to reproduce the
problem. It is a massively simplified version of what we're seeing with
our normal schema. For example in the full schema the ROWGUIDCOL would
be NOT NULL and would have an index associated with it.
If you remove either of the TimeToAnswer or IsVMail columns, or the
drop DummyColumn line, then the merge replication works fine.

So, is it a bug (and if so, what would be the workaround/is there a
patch), or is it me not reading the docs properly?

Thanks for looking,
Chris

.



Relevant Pages

  • RE: Replication Error
    ... > account that the SQL Agent runs under. ... > snapshot and merge job. ... >>> I have been trying to setup SQL Server Replication between two SQL Server ...
    (microsoft.public.sqlserver.replication)
  • Merge replication intermittent error.
    ... Windows 2003 Server Standard, SQL Server 2000. ... Two identical machines. ... domain and all the replication is working. ... agents impersonating the SQL Server Agent login. ...
    (microsoft.public.sqlserver.replication)
  • Re: snapshot replication problem
    ... I changed to SQL Server authentication on the subscriber instead of trusted. ... I had to deactivate my snapshot replication for a modification on some tables. ... "The SQL Server Agent didnt have access to the duplication agent. ...
    (microsoft.public.sqlserver.replication)
  • RE: Snapshot Replication
    ... You can use the Replication Monitor to monitor the Snapshot Agent. ... On the computer that is running SQL Server 2005, ... and then click SQL Server Management Studio. ...
    (microsoft.public.sqlserver.replication)
  • Re: Transactional replication from SQL Server 2005 to SQL Server 7 - how?
    ... SQL Server 7.0 from the SQL2005 management tools but I would encourage to ... primary keys are replicated as unique indexes if you ... configure replication using the SQL2000 Enterprise Manager. ... If you plan to reinitialize your SQL2000->SQL2005 subscription in the ...
    (microsoft.public.sqlserver.replication)