what are the minimum possible chances a stored procedure can to go to deadlock state.
like im having a stored procedure with the following citeria's what is the possible way that dead lock or lock wiill occur and how to prevent it ?
1) Using a 2-3 cursor
2) inside each and every cursor few temp table insert and update and finallly main table insert and update is happening.
3) minimum 50 users were connecting from various places and trying to access the same sp Via .Net connection.
what are the possible ways that deadlock or lock_U occur in the database and how to prevent it ?