select rows database lock?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: gl (gl_at_discussions.microsoft.com)
Date: 02/25/05


Date: Fri, 25 Feb 2005 05:47:02 -0800

When in the sql enterprise manager, if you right click a table and go to open
table--> select all rows, does that "lock" the database? As in if you select
all rows will someone else trying to read the data (via app or web interface)
and update it be locked out of it? We're often told that we shouldn't use
this method at our work and we should only run statements with nolocks on
live data. I had always thought that the data only locks when you put the
cursor in one of the rows to actually edit it.

What is the correct ruling? I could do tests myself but i'm not sure they
would be accurate. I mainly want to know what happens when you select all
rows (or select top) but don't put your cursor in the data.



Relevant Pages

  • Re: Timeout Expired for no apparent reason
    ... The cursor itself was probably doing some of the locking. ... This caused a table lock ... The DLL method was a workaround to avoid this behaviour. ... The DLL method does not block other statements but it times out. ...
    (microsoft.public.sqlserver.clients)
  • Re: Parameterization of Object Models
    ... Lock down Access to the system -- ... Attempt to prevent deadlocks see The Concepts of Database Management, ... recovery; that is, you say that you recovered the database. ... database (called a backup or a save). ...
    (comp.lang.misc)
  • Re: Limit FORM mailer submissions to 5 on website, then pause until reviewed by webmaster
    ... have a script that creates a temporary row in a sessions table as soon ... then don't display the input form and instead display the message, ... You wouldn't lock the file from the time they come to the page until ... the database occurs, ...
    (comp.lang.perl.misc)
  • Re: Running Analysis Server 2000 on seperate box
    ... On further investigation regarding the lock up problem. ... the dimension processing running and although the database rows are ... changing the service account sorted things. ... The server has both the database and Analysis Services ...
    (microsoft.public.sqlserver.olap)
  • Re: Command Line for Backing up Source Safe.
    ... If anybody else know of a command line way to lock the database let me know. ... Archive to a backup. ... > @echo off ...
    (microsoft.public.vstudio.sourcesafe)