how to release a table lock..?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deepuv04
    Recognized Expert New Member
    • Nov 2007
    • 227

    how to release a table lock..?

    hi,
    One of the table in my database is got locked. actually it has many dependencies in the database. i don't know where it has get locked.

    how can i unlock the table with out restarting database or system. any help is appriciated.


    thanks
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Originally posted by deepuv04
    hi,
    One of the table in my database is got locked. actually it has many dependencies in the database. i don't know where it has get locked.

    how can i unlock the table with out restarting database or system. any help is appriciated.


    thanks
    kill the process that locks it..

    -- ck

    Comment

    • deepuv04
      Recognized Expert New Member
      • Nov 2007
      • 227

      #3
      Originally posted by ck9663
      kill the process that locks it..

      -- ck

      Thanks for reply...
      can you please tell me how to know which process is get locked or what are the processes are running on the database server....?

      thanks

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        Originally posted by deepuv04
        Thanks for reply...
        can you please tell me how to know which process is get locked or what are the processes are running on the database server....?

        thanks
        on your sql 2000 enterprise manager , go to Management - Current Activity - Process Info. check the Blocked By Column to get the process id that's locking your process. click the process id. right-lick then choose Kill Process


        -- ck

        Comment

        • deepuv04
          Recognized Expert New Member
          • Nov 2007
          • 227

          #5
          Originally posted by ck9663
          on your sql 2000 enterprise manager , go to Management - Current Activity - Process Info. check the Blocked By Column to get the process id that's locking your process. click the process id. right-lick then choose Kill Process


          -- ck

          Thank you for your kind reply.... it is really very helpful for me

          Comment

          • sbharate
            New Member
            • Feb 2014
            • 2

            #6
            Yes , Killing the process the is the answer of above question which removes the lock from table in database, but

            Offcourse , it will terminate the current process which saves my data into database.





            My Scenarion : We are processing policies and we are having concurrentConsu mers=20; so while working in concurrent environemnt,
            1st consumer will locks the table for manipulation,
            2nd consumers will locks the table for manipulation,
            3rd consumers will locks the table for manipulation,
            4th consumers will locks the table for manipulation,
            5th consumers will locks the table for manipulation,
            .
            .
            .
            .
            and
            20th consumers will locks the table for manipulation,

            Here, tables are locked so it may be possibility that 5th consumer is waiting for releasing that lock.

            So I have to avoid "LockAcquistion Exception".

            Please help me in this.

            Many thanks in advance.

            Waiting for quick reply.

            Comment

            • ashish1305
              New Member
              • Feb 2014
              • 1

              #7
              I am also facing the same issue .
              please help on this.

              Many thanks in advance

              Comment

              Working...