开发者

Oracle merge statement not multithreaded

开发者 https://www.devze.com 2022-12-16 17:34 出处:网络
Just looking for some comfirmation here.We are attempting to use the merge statement for two tables called from C# thru stored procs.the calls are made from seperate threads and/or processes.We are ge

Just looking for some comfirmation here. We are attempting to use the merge statement for two tables called from C# thru stored procs. the calls are made from seperate threads and/or processes. We are getting unique key violations on the two columns that also make up the on statement.

Our theory for this is that the statements are happening concurrently with the same data and the merge statement isn't multithread safe. Anyone else have or see this issue before?

Any thoughts on solutions for this issue?

开发者_如何学Go

Dan


Oracle has nothing to do with the threads and processes on the calling side.

Instead, it implements it own locking mechanisms which prevent concurrent updates from two logical sessions (which may or may not be initiated by different threads, processes and even machines).

The key violations you see are the result of (probably correct) work of these mechanisms.

If you post the query you run, I probably will be able to give a more specific answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号