all groups > sql server replication > january 2007 >
You're in the

sql server replication

group:

Skipping Errors on Transactional Replication 2005


Skipping Errors on Transactional Replication 2005 georgeg
1/29/2007 6:24:00 AM
sql server replication: I am seeting up a transactional replication where the subscriber database has
a lot of Historical data. When the distributor agent runs I get errors like

Cannot Insert duplicate key in objwct... Error number 2601.

Violation of UNIQUE KEY constraint ... Cannot insert duplicate key ..Error
number 2627.

I set the -SkipErrors parameter on the distributor agent to skip skip error
2601:2627 but I keep getting the errors.

Do I need to set another anything else to skip these errors.

Thanks,
--
George Gopie
Re: Skipping Errors on Transactional Replication 2005 georgeg
1/29/2007 10:24:00 AM
Yes. Why the Distributor agent does not skip these errors? Is there another
setting somewhere else.
--
George Gopie



[quoted text, click to view]
Re: Skipping Errors on Transactional Replication 2005 Paul Ibison
1/29/2007 3:54:25 PM
George - does this still happen if you stop and start the agent?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Re: Skipping Errors on Transactional Replication 2005 georgeg
1/30/2007 7:47:00 AM
Paul,
I did specify it on the profile, and keep getting the errors and replication
stops and then continues again after a timeout.

I look Error details and notice that it uses the bcp commands to insert the
records. For example

bcp RYS_Historian.dbo.code in code_8#1.bcp -e "errorfile"

How can you add -skiperrors on the bcp command?

Thanks again.
--
George Gopie



[quoted text, click to view]
Re: Skipping Errors on Transactional Replication 2005 georgeg
1/30/2007 8:04:00 AM
Paul,

Here is the Full Error mEssage

Error messages:
The process could not bulk copy into table '"dbo"."Code"'. (Source:
MSSQL_REPL, Error number: MSSQL_REPL20037)
Get help: http://help/MSSQL_REPL20037
Batch send failed
Violation of PRIMARY KEY constraint 'Code_PK'. Cannot insert duplicate key
in object 'dbo.Code'. (Source: MSSQLServer, Error number: 2627)
Get help: http://help/2627
To obtain an error file with details on the errors encountered when
initializing the subscribing table, execute the bcp command that appears
below. Consult the BOL for more information on the bcp utility and its
supported options. (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253
bcp "RYS_Historian"."dbo"."Code" in
"\\sprs77\rysrepldata\unc\SPRS77_RYS_RYS_SPRS77_PUBL\20070129112777\Code_8#1.bcp"
-e "errorfile" -t"\n<x$3>\n" -r"\n<,@g>\n" -m10000 -SSPRS77 -T -w (Source:
MSSQLServer, Error number: 20253)

--
George Gopie



[quoted text, click to view]
Re: Skipping Errors on Transactional Replication 2005 Paul Ibison
1/30/2007 11:32:20 AM
You can specify this on the profile or on the commandline. Pls try adding
the -SkipErrors parameter to the commandline of the job and run the job
manually.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .



Re: Skipping Errors on Transactional Replication 2005 Paul Ibison
1/30/2007 7:28:36 PM
OK - I haven't used the -SkipErrors for the initialization process before.
I'll try to repro tomorrow.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

AddThis Social Bookmark Button