Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Commit in a Stored Procedure

Author  Topic 

TexDec
Starting Member

22 Posts

Posted - 2002-10-24 : 12:34:17
I have a SP that needs to runs daily to update the PRODUCT table in a forecasting/planning DB. The product table is loaded from our Sales DB into a raw table (using DTS).
The SP
1/ drops all FK constraints that ref the PRODUCT table
2/ delete * from PRODUCT
3/ insert into PRODUCT from RAW
4/ re-instates all FK constraints that ref the PRODUCT table

What is the best transaction/commit policy for this type of SP. Everything I've tried either doesn't work or end up locking the PRODUCT table.

Thanks
Declan

Declan K


The only Keane we need is Robbie
   

- Advertisement -