Locking a DB while updating...

  • Thread starter Thread starter Bucko
  • Start date Start date
B

Bucko

How important do you guys feel locking a database is while
updating/adding information? Do you do it with every app you make? Only
very high volume (traffic) apps? I'm trying to decide if my app needs it.
 
Not clear what do you mean by "updating/adding information".
If you are changing the database/tables structure then I would bring the IIS
down for that period of time.

But if you are updating/inserting records then there is no universal
solution. You should use appropriate Transaction level and it all depends on
the nature of your updates.

But you do not need to lock the database/tables. Only the updated records.


George.
 
probably your app doesn't need it, as you are asking yourself. when you
need it, you will know ;)
 
You don't lock a database because you force every thing touching the data
base to wait. Lock the row you want to adjust. I believe this is only
available in informix, otherwise lock the page.
Set lock mode to wait will do the trick for row level locking
 
Back
Top