Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Primary Key Violations 1

Status
Not open for further replies.

umbogo

IS-IT--Management
Oct 21, 2003
11
0
0
US
I have a multi-threaded map (Max Concurrent Map Instance 0, mercator.ini MaxThreads=20) that uses a DBQUERY to insert a record into an Oracle database table.

It is triggered by an MQ message arriving on a queue, and checks for the presence of a set of records in a source table. If the records are all present the map inserts them into the destination table. They are then deleted from the source table.

As the map is multi-threaded, a second instance of the map can sometimes be triggerred before the source records are deleted. This second instance tries to insert the same records, causing a primary key violation.

I have created a separate single-threaded (Max Concurrent Map Instance 1) submap that is a called using RUN to (1) check for the presence of the records in the destination table, (2) do the insert. This does not solve the problem. It seems like the secondary map is not truly single-threaded.

Any ideas?

 
The max concurrent maps applies to the map being run by the msl not maps that are run from that map. You need to set the max concurrent maps on the .msl map. that is receiving the triggers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top