D
Darren
This is an ado .net transaction in C# with a SQL Server 2000 database.
Have 1000 or more inserts/updates/deletes to do in a transaction. All
or none must be committed. Each stored proc operates on the same
table and performs only one insert, update or delete.
Will locking occur at the page or row level of the table for the
duration of the transaction?
If specify ROWLOCK on each update/insert/delete statement would this
guarantee that only the rows affected will be locked and not the table
(or page)?
Will there be a performance hit for other processes hitting the table
during this transaction? (either select/insert/delete/update)
Thanks
Simplified Example:
myCommand.Transaction = myTrans;
for I = 1 to 1000
{
if...
{
myCommand.ExecuteNonQuery( "stored_proc_insert");
}
if...
{
myCommand.ExecuteNonQuery( "stored_proc_update");
}
if...
{
myCommand.ExecuteNonQuery( "stored_proc_delete");
}
}
myTrans.Commit();
Have 1000 or more inserts/updates/deletes to do in a transaction. All
or none must be committed. Each stored proc operates on the same
table and performs only one insert, update or delete.
Will locking occur at the page or row level of the table for the
duration of the transaction?
If specify ROWLOCK on each update/insert/delete statement would this
guarantee that only the rows affected will be locked and not the table
(or page)?
Will there be a performance hit for other processes hitting the table
during this transaction? (either select/insert/delete/update)
Thanks
Simplified Example:
myCommand.Transaction = myTrans;
for I = 1 to 1000
{
if...
{
myCommand.ExecuteNonQuery( "stored_proc_insert");
}
if...
{
myCommand.ExecuteNonQuery( "stored_proc_update");
}
if...
{
myCommand.ExecuteNonQuery( "stored_proc_delete");
}
}
myTrans.Commit();