Any idea what are the possible scenarios where SAP TID can be duplicate & how we can fix the issue.
While executing a sap transaction an SAP TID is generated & it is stored in log database table as a primary key. Later on after 7 months ,for an other sap transaction the same SAP TID has generated which is causing primary key constraint issue.
Any solution on how we can fix it.
Are you refering to the TID returned by ID_OF_BACKGROUNDTASK or a similar FM, I don't think you can use it as primary key, look at a database like TRFCQOUT, SAP added other fields to create a unique key. (queue, RFC dest and a counter)
As per note:1610630, if work process is restarted very quickly (t < 1s), duplicate entries might appear in the table.
This occurs only on machines in which the work process restart requires less than one second if a large number of transactional RFCs are started and a work process is restarted at the same time.
To rectify this you have to Set the profile parameter "rdisp/build_tid_millisec_based" to 1 in all instances of your system.
Kindly refer the note for better assistance. Hope this will solve your issue.