Hello,
I am creating a job that deletes records from a table X. I am using DB2 connector stage. There is another process that inserts data in to Table X.
Will my delete statement lock the table. I am using all the default settings in connector stage. If both inserts and delete happen simultaneously will it lock the table?
Thanks
delete on table which has simultaneous inserts
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Inserts and deletes should not be a problem if you are using row-level locking, since you can't delete a non-existent record and you can't insert an existing record.
If, however, you are using page or table level locking, then you may encounter lock contention.
If, however, you are using page or table level locking, then you may encounter lock contention.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I don't see anywhere that the DB2 Connector let's you control the level of locking used - however you can lock the entire table should you so desire. Plus I see a 'Lock with force' property for how to deal with any other applications that hold conflicting locks.
In your shoes I'd have a chat with your friendly neighborhood DBA man regarding row or page level locking and how that all works in DB2.
In your shoes I'd have a chat with your friendly neighborhood DBA man regarding row or page level locking and how that all works in DB2.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers