Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Why my transaction has not been replicated? What was the transaction sequence number?

$
0
0

I have been troubleshooting a replication problem, according to the picture below:

the replication Problem

with reference to the picture above,

the bit that says Sessions of the distribution agent I can get using the following query:

--================================================================================
-- finally the contents 
-- sessions of the distribution agent:
--================================================================================
use [master]
exec [distribution]..sp_MSenum_distribution_s 
@name = N'MYSERVER-Product-Product-MYSUBSCRIPTION-184', 
@hours = -1, 
@session_type = 1

Actions in the selected session

--========================================================
-- get the actions in the selected session:
-- for each row on the above data, we can get the details:
--========================================================
-- example of the last session - without errors
use [master]
exec [distribution]..sp_MSenum_distribution_sd 
@name = N'MYSERVER-Product-Product-MYSUBSCRIPTION-184', 
@time = N'20170411 14:16:03.920'

enter image description here

-- example of the second session - with errors
use [master]
exec [distribution]..sp_MSenum_distribution_sd 
@name = N'MYSERVER-Product-Product-MYSUBSCRIPTION-184', 
@time = N'20170410 15:50:27.650'

enter image description here

Now this bit of code below gives me the errors I am looking for:

Error details or message of the solected session:

And here goes the Question too:

How can I get the number 5468694 from the result above and use it in the query below?

--========================================================================
-- Error details or message of the solected session:
--=========================================================================
    use [master]
    exec [distribution]..sp_MSenum_distribution_sd 
    @name = N'SQLAPPLON1-Product-Product-REPLON1-184', 
    @time = N'20170410 15:50:27.650'

    use [master]
    exec [distribution]..sp_MSget_repl_error 
    @id = 5468694

enter image description here


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>