Hi DB Gurus..
I need to lock one table ( table-level locking) as i dont want anyone to modify till i finish my stored procedure.
I need simple example on how to Lock the table and unlock..
Something like this
Lock Table Name...
...
statements go here
...
Unlock table...
Is this possible in Sql server 2000
waiting for ur replies..
Thanks in AdvanceI dont know whether this is efficient method
begin transaction
...
statements go here
...
Commit transaction|||Hey Guys..
anymore suggestions...|||Whenever I see anyone suggest locking a table, the first thing that comes to my mind is to stop SQL Server, then restart it in single user mode. While some folks consider this a bit drastic, it has about the same effect on scalability, it is far more efficient, and it is less uncertain.
-PatP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment