Monday, March 19, 2012

2PC transaction replication problem

I created a 2PC transaction replication on a simple database for testing.
Changes in the publisher are successfully replicated to the subscriber.
However, when changes are made to the subscriber, the following error
message is shown:
"Another user has modified the contents of this table or view; the database
row you are modifying no longer exists in the database."
Could somebody help to solve the problem?
Thanks in advance!
KM
KM,
can you do a search on hte publisher for the PK value of the row you are
changing. Presumably it is not there and sp_browsereplcmds on the
distributor should reveal a relevant delete statement.
HTH,
Paul Ibison
|||where are you seeing this message? DataGrid?
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"krygim" <krygim@.hotmail.com> wrote in message
news:OAZEcl2hEHA.3348@.TK2MSFTNGP12.phx.gbl...
> I created a 2PC transaction replication on a simple database for testing.
> Changes in the publisher are successfully replicated to the subscriber.
> However, when changes are made to the subscriber, the following error
> message is shown:
>
> "Another user has modified the contents of this table or view; the
database
> row you are modifying no longer exists in the database."
>
> Could somebody help to solve the problem?
>
> Thanks in advance!
>
> KM
>
|||Hi Paul,
There are only 3 rows in my table. The PK values in the subscriber and
publisher are exactly the same. The PK column of both the subscriber and the
publisher are marked as Identity (Not For Replication). I got the same
message even if I add a new row in the subscriber.
In the Query Analyzer on the publishing database, I tried the
sp_browsereplcmds and got the message:
"Could not find stored procedure 'sp_browsereplcmds'."
KM
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:em3ZXU3hEHA.4064@.TK2MSFTNGP12.phx.gbl...
> KM,
> can you do a search on hte publisher for the PK value of the row you are
> changing. Presumably it is not there and sp_browsereplcmds on the
> distributor should reveal a relevant delete statement.
> HTH,
> Paul Ibison
>
|||Hi Hilary,
I opened the subscriber database table by selecting "Open Table | Return All
Rows" in the Enterprise Manager. Made change to one of the rows. When I
tried to leave the row, a dialog box popped up which showed the message:
Another user has modified the contents of this table or view; the database
row you are modifying no longer exists in the database.
Database error: '[Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB
provider returned message: New transaction cannont enlist in the specified
transaction coordinator]...
.... The operation could not be performed because the OLE DB provider
'SQKOLEDB' was unable to begin a distributed transaction'
KM
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:%23XSgUZ3hEHA.244@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> where are you seeing this message? DataGrid?
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "krygim" <krygim@.hotmail.com> wrote in message
> news:OAZEcl2hEHA.3348@.TK2MSFTNGP12.phx.gbl...
testing.
> database
>
|||try running this command in the distributor.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Krygim" <krygim@.hotmail.com> wrote in message
news:u24De94hEHA.3476@.tk2msftngp13.phx.gbl...
> Hi Paul,
> There are only 3 rows in my table. The PK values in the subscriber and
> publisher are exactly the same. The PK column of both the subscriber and
the
> publisher are marked as Identity (Not For Replication). I got the same
> message even if I add a new row in the subscriber.
> In the Query Analyzer on the publishing database, I tried the
> sp_browsereplcmds and got the message:
> "Could not find stored procedure 'sp_browsereplcmds'."
> KM
>
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:em3ZXU3hEHA.4064@.TK2MSFTNGP12.phx.gbl...
>
|||Hi Hilary,
I get the same message when running the command in both the distributor and
the subscriber.
KM
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:uCyeWO6hEHA.3548@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> try running this command in the distributor.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "Krygim" <krygim@.hotmail.com> wrote in message
> news:u24De94hEHA.3476@.tk2msftngp13.phx.gbl...
> the
are
>
|||KM,
I wasn't very precise but by distributor I meant distribution database on
the distributor - the sp should be there. Please post back after running it
to tell us if the rows you refer to are have been modified on the publisher.
TIA,
Paul Ibison
|||Hi Paul,
I found the stored procedure in BOL. I think I must have done something
wrong. Please let me know if I have carried out the steps correctly or not:
1. In the Query Analyzer, connect to the distribution SQL server.
2. Select the distribution database in the dropdown list
3. Enter exec sp_browsereplcmds and press F5
The following message was displayed in the message pane:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'sp_browsereplcmds'.
Thanks in advance.
KM
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23qrm%23XCiEHA.592@.TK2MSFTNGP11.phx.gbl...
> KM,
> I wasn't very precise but by distributor I meant distribution database on
> the distributor - the sp should be there. Please post back after running
it
> to tell us if the rows you refer to are have been modified on the
publisher.
> TIA,
> Paul Ibison
>
|||Krygim,
everything you've done looks correct, but I've never heard of this before.
Can you run this:
sp_browsereplcmds
go
select db_name()
(just to check that you are in the correct database). If it returns
'distribution' then perhaps a service-pack install didn't succeed and you
could check sqlsp.log file from the c:\windows directory to see if this is
the case.
HTH,
Paul Ibison

No comments:

Post a Comment