Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Replication / January 2007

Tip: Looking for answers? Try searching our database.

Skipping Errors on Transactional Replication 2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
georgeg - 29 Jan 2007 14:24 GMT
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,
Signature

George Gopie

Paul Ibison - 29 Jan 2007 15:54 GMT
George - does this still happen if you stop and start the agent?
        Cheers,
            Paul Ibison SQL Server MVP, www.replicationanswers.com .
georgeg - 29 Jan 2007 18:24 GMT
Yes.  Why the Distributor agent does not skip these errors? Is there another
setting somewhere else.
Signature

George Gopie

> George - does this still happen if you stop and start the agent?
>          Cheers,
>              Paul Ibison SQL Server MVP, www.replicationanswers.com .
Paul Ibison - 30 Jan 2007 11:32 GMT
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 .
georgeg - 30 Jan 2007 15:47 GMT
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.
Signature

George Gopie

> 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 .
Paul Ibison - 30 Jan 2007 19:28 GMT
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 .
georgeg - 30 Jan 2007 16:04 GMT
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)

Signature

George Gopie

> 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 .
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.