Results 1 to 3 of 3

Thread: Table Locking

  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Unanswered: Table Locking

    hi

    can i lock my table while doing an updation so that all others in n/w can insert into the table only after my operation is completed?

    if a user attempts to save/update the 'locked'table, will he get an error message or will his application (using ADO) will wait till the table gets unlocked?
    Cheers....

    baburajv

  2. #2
    Join Date
    Dec 2003
    Location
    Delhi INDIA
    Posts
    58
    hi,
    This feature is already present in sql but in a bit diffrent way that... whenever you will execute a insert/update/delete statement it will lock data accordingly.

    have u ever seen an error message like : "failed to open a rowset"

    http://www.sql-server-performance.co...able_hints.asp

    pls check the BOL of sql under locking section for more information.
    Deep..

    MCDBA
    ------------------------------------------
    How much data you can afford to lose??

  3. #3
    Join Date
    Dec 2003
    Location
    Delhi INDIA
    Posts
    58
    check this also...


    SYNTAX
    [ FROM { < table_source > } [ ,...n ] ]

    < table_source > ::=
    table_name [ [ AS ] table_alias ] [ WITH ( < table_hint > [ ,...n ] ) ]

    < table_hint > ::=
    { INDEX ( index_val [ ,...n ] )
    | FASTFIRSTROW
    | HOLDLOCK
    | NOLOCK
    | PAGLOCK
    | READCOMMITTED
    | READPAST
    | READUNCOMMITTED
    | REPEATABLEREAD
    | ROWLOCK
    | SERIALIZABLE
    | TABLOCK
    | TABLOCKX
    | UPDLOCK
    | XLOCK
    }
    Deep..

    MCDBA
    ------------------------------------------
    How much data you can afford to lose??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •