Wednesday, March 21, 2012

MSmerge_genhistory error-515

Can't insert value NULL into column nicknames.

This error generated when I try start sync.

SQL Profiler is not helping w/ locating specific error.

I tried to allow NULLS in nickname column, for this table, but this table gets dropped and recreated each time.

Pls. advise on where to make correction.

thx..bt

Can you tell us what version of sql server you're using, including Service Pack # (if any)?|||

Setup:

Server A: SQL Server 2000, Enterprise Ed, SP4 (setup as subscriber)

Server B: SQL Server 2000, Personal Ed, SP4 (setup as publisher/distributor, using PUSH subscription type service).

Server B is a Tablet PC running Win XP 2005, SP2.

When I force 'start sync' to run for Merge Agent, I get failure in Agent logs, but when I query Server A I see the updated data sets. Why would I get failure "error 515 for insert of NULL to nicknames column in Process table and still pass updates?

|||

Additional information that may or may not be helpful:

My data entries are stored on Server B (no connection to LAN or wireless), when I return the tablet PC to cradle I expect snapshot creation and merge to occur.

Server A-subscription -status shows 'Never Started'.

How can this be? When I query tables on Server A I see the updates have occured in my tables.

Apparently I can force 'start sync' from the Merge Agent, but I can't get the agent to successfully run w/o intervention.

Here's the latest error:

process could not bulk copy into table 'x' - error 20037.

thx. for taking the time to review and provide input..bt

|||

You've described three different problems, but it's unclear what the root problem is.

First, replication does not ship anything out of the box that would allow your tablet pc to automatically sync when first connecting to the cradle. You have to either sync manually, schedule a sync, or write a program to sync on connect.

Regarding the last error, 20037, can you drill down to get the exact error message? I don't know what error 20037 is, but if you cannot apply your snapshot, then you cannot sync properly afterwards. I'm guessing that you were able to apply part of your snapshot successfully, which is why you see some rows in your table.

|||

Error 20037 indicates article already exists in another publication w/ different article resolver. (I think this occurs if merge agent is being re-ran w/ same snapshot files.)

I have not figured out how to delete the snapshot directory files directly after Merge agent runs. Maybe it will not delete until it can run successfully w/o manual push.

If delete MSmerge_contents, MSmerge_tombstone,MSmerge_genhistory tables, then re-run Merge agent, result is:

'can't insert value NULL into column nicknames.table Process.dbo.MSmerge_genhistory, column does not allow nulls.'

Review of same tables, I see MSmerge_genhistory has records, but other two tables have none.

If re-run Merge agent, result is:

error 20037 (see above), but data copies to server tables.

So the cycle continues.

|||

Manually deleting merge metadata tables is an unsupported option. This explains why you're getting the "cannot insert NULL" error message. The only workaround now is to remove replication completely and start over. What can happen when you manually delete rows from metadata tables is that cleanup/setup/etc. will try to reference rows that don't exist, or tables will have orphaned rows.

Once you start over on a clean slate, and you're still getting errors, please post the first error and error message that you get.

|||

I deleted the publication and articles via use of stored procedures in SQL Books Online and verified no rowsets in tables.

I then re-created a new Process publication and a new PUSH subscription, it ran. The snapshot created successfully, but the merge agent gave this error.

cannot insert value NULL into column 'nicknames'.table 'Process.dbo.MSmerge_genhistory'. column does not allow nulls. INSERT fails. error 515.

|||

After the publication deletion process and getting same error 515, I did the following: because you indicated the metatables were trashed after I did some manual deletions.

I have looked at MSmerge_history table on both servers. The number of row sets does not match (don't know if it should though).

Anyway, the two rowsets on subscriber do match 2 of the 11 that exist on publisher server.

MSmerge_contents table does match across both servers-w/ 3 rowsets.

MSmerge_tombstone matches on both servers-w/ no rowsets.

Not sure what else to check or whether I should detach my db and remove SQL Server from both systems and start over.

|||

Why does nickname column from MSmerge_genhistory have to accept non-NULL values?

This is the crux of my problem. I can't change the table design becuase it gets re-created each time merge agent runs.

Does anyone know what stored procedure is used to drop/create this table each time?

|||Are there any other errors that you can see in the Merge history table? Can you do "select * from distribution.dbo.MSmerge_history" and see if there are any other errors returned from that particular sync? This may be just one of several errors that showed up, and unfortunately it's not enough info at the moment to determine where the problem is.|||Have you renamed one of your machines recently, or in the past, while SQL Server was installed?

No comments:

Post a Comment