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!

Single transaction Issue

Status
Not open for further replies.

SqlHunter

Programmer
Jun 3, 2004
166
0
0
US
I took this specific paragraph from
Avoid INSERTing, UPDATEing, or DELETEing large numbers of records in a single transaction. If you do, all the records affected by your action will be locked until the transaction is done. If you find that you need to perform mass data changes, it is better to batch them into smaller, shorter transactions to prevent unnecessary locking

Iam actually in a confused state..Iam working in a project where we have to insert/update from staging to a prod database where there is a lot of individual stored procedure executed from a single stored procedure in a single transaction.Currently I have 2 options where there is a mass update or pass one emp_id to the main stored procedure and process each emp details using cursor..Currently its doing mass update in a single transaction.

Iam scared of the single transation because it may cause blocking or locking..Is there any way we can avoid it.......
 
Check out FAQ183-3141. It suggests how to do mass transactions.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top