Skip to Content
author's profile photo Former Member
Former Member

Trace duplicate transaction

Dear Expert,

I have two primary connections (RASQL1 and RASQL2005) to a single target (SVC_HERBOPOSSAP), if an error occurs like this how do I know or trace of a transaction where the primary connection that is causing duplicate key on the target (SVC_HERBOPOSSAP)?

T. 2016/09/02 16:21:14. (182): 'insert into dbo.Trx_4 (KodeTrx, NoDokumen, Tanggal, KodeBarang, Barcode, KodeGudang, .....

E. 2016/09/02 16:21:15. ERROR #1028 DSI EXEC(110(1) SVC_HERBOPOSSAP.Hartono) - neric/dsi/dsiqmint.c(5112)

Message from server: Message: 30291, State 0, Severity 19 -- '[[Message Iteration=1|Data Source Name=DSN_HERBOPOSSAP|SQL Function=INSERT|SQLState=23000|Native Error=2627|Message=[Microsoft][SQL Server Native Client 10.0][SQL Server]Violation of PRIMARY KEY constraint 'PK_Trx.

H. 2016/09/02 16:21:15. THREAD FATAL ERROR #5049 DSI EXEC(110(1) SVC_HERBOPOSSAP.Hartono) - neric/dsi/dsiqmint.c(5125)

The DSI thread for database 'SVC_HERBOPOSSAP.Hartono' is being shutdown. DSI received data server error #30291 which is mapped to STOP_REPLICATION. See logged data server errors for more information. The data server error was caused by output command #1 mapped from input command #2 of the failed transaction.

H. 2016/09/02 16:21:15. THREAD FATAL ERROR #5273 DSI EXEC(110(1) SVC_HERBOPOSSAP.Hartono) - neric/dsi/dsiqmint.c(5153)

To write the failed transaction into log, please execute 'sysadmin log_first_tran, SVC_HERBOPOSSAP, Hartono'. Please analyze the transaction and provide an appropriate fix based on your analysis, then resume the connection.

I. 2016/09/02 16:21:15. The DSI thread for database 'SVC_HERBOPOSSAP.Hartono' is shutdown.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 05, 2016 at 01:43 PM

    All transactions are tagged with the id of the origin/source database. This origin id is just another name for the associated rs_databases.dbid column.

    You can get the source's origin id from a few different places ...

    - sysadmin dump_queue output (of the txn in question) should include a column named Orgn Siteid

    - if you dump the txn in question to the RSSD (eg, via sysadmin log_first_tran), rs_helpexception will list the source under the column Org Site; rs_helpexception/v should show a call to rs_update_lastcommit with @origin set to the source's origin id; alternatively, you may see a direct update of rs_lastcommit that mentions the origin id value in the update's where clause

    - if the target dataserver can trace incoming SQL then you should be able to see the call to rs_update_lastcommit (alternatively, an update of rs_lastcommit)

    With the origin id you can look up the source database's name in the RSSD of the PRS and/or RRS:

    ======================

    select dsname, dbname

    from rs_databases

    where dbid = <orign_id>

    ======================

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.