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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data access synchronization

Status
Not open for further replies.

romantwo

Technical User
Jun 15, 2005
1
CA
Hello,

Need an advise on how to synchronize an acess to data.

Scenario:

Table A with 5 records in it:

Stored ProcXXX ()

--need to lock this row from other stored procXXX()
--no other processes can access this row (no read, write,
--update. uncommited read can be allowed)
read table A row X


do data manipulation

--unlock here
update table A row X

Basically, I want to stop parallel stored procs (all stored procXXX()) from reading, writing or updating Table A row X, but not from accessing Table A row Y throughout duration of 'data manipulation' section in stored procXXX()

Is LOCK TABLE statement is my only option to have this 'manual' non DB locking? IBM warns abount issuing LOCK TABLE command in a simple segmented schema, since DB manager will ignore table name specified in LOCK TABLE statement and lock all tables in a schema. Can I acheive similar explicit exclusive locking but on row level?

Need an advise and options.

Thanks in advance

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top