English

Problem: CHECKOUT returns 'Feature(s) already locked by another transaction.'

Description

Attempting to CHECKOUT features from an ArcStorm layer returns the message:

Executing CHECKOUT request...
Feature(s) already locked by another transaction.
There may be additional information in the wservice log.

Cause

Features can be locked for two reasons:

1. Legitimate feature locking due to another user of the database checking features out for the purpose of editing. The selected features may be locked directly or through topological association.

2. Features are locked due to a problematic transaction which was not completed successfully. This could potentially leave features locked but not associated to an existing transaction shown by the LISTTRANSACTIONS command.

Solution or Workaround

 

  1. Find the locked features within your selection.
     
    Use the LOCKSYMBOL command in ARCEDIT to display locked features in a layer with a user specified symbol and color. The symbolization of locked features will take affect each time the DRAW command is issued and indicate which features not to select interactively:
    Code:
    Arcedit: locksymbol 10 red
    Arcedit: draw
  2. Find the value of LOCK__ID for the locked features.
     
    Use the LIST command, in either ARCEDIT or ARCPLOT, to determine the value of the item LOCK__ID from your selected set:
    Code:
    arcedit: list lock__id
    Record LOCK__ID
        5      12
        9      12
        13     11
  3. Get a list of the active or valid transactions for the layer.
     
    The LISTTRANSACTIONS command from ArcEdit or ArcPlot will list all transactions that are currently active:
    Code:
    arcedit: LISTRANSACTIONS LAYER . .
    
    ID STATUS OWNER
    -- ------ -----
    12 CHECKOUT_COMPLETE AS_USER
  4. Compare the LOCK__ID values with the list of TRANSACTION IDs. Use the DESCRIBETRANS command in ARCEDIT or ARCPLOT to determine the status of these transactions.

    Values that appear as LOCK__IDs and Transaction IDs are valid transactions. If any LOCK__IDs do not appear as transaction IDs, you can consider them lost locks and you will need to release them.
     
    Two methods to release locked features from an ArcStorm layer.
    Procedure:
     
    • Automatic release of locked features (recommended):

      1. Find the value of the transaction-id
       
      a) Use the SchemaEdit LISTTRANSACTIONS command to find all the existing valid transaction-id values.
      Code:
      SchemaEdit: LISTTRANSACTIONS
      Listing transactions for Database: sample_db (2 found)
      
      		12 CHECKOUT_COMPLETE user
      		14 CHECKOUT_COMPLETE user
      

      b) Record the transaction-id values and quit SchemaEdit.

      c) Open the layer in ArcEdit and make it editable.

      d) Select the features that are not associated with a valid transaction.
      Code:
      arcedit: SELECT lock__id <> 0 or lock__id <> 12 or lock__id <> 14
      2 element(s) now selected
      
      arcedit: LIST lock__id
      
      Note:
      The lock__id and transaction-id are the same value.

      2. Run the RECOVERDB command in ArcPlot.
      Code:
      RECOVERDB LIBRARY <asdatabase>.<library> <transaction_id>
    • Manual release of locked features (caution is required):

      1. Find the value of the transaction-id.
       
      a) Use the SchemaEdit LISTTRANSACTIONS command to find all the existing valid transaction-id values.
       
      Code:
      SchemaEdit: LISTTRANSACTIONS
      Listing transactions for Database: sample_db (2 found)
      
      		12 CHECKOUT_COMPLETE user
      		14 CHECKOUT_COMPLETE user
      

      b) Record the transaction-id values and quit SchemaEdit.

      c) Open the layer in ArcEdit and make it editable.

      d) Select the features that are not associated with a valid transaction.
      Code:
      arcedit: SELECT lock__id <> 0 or lock__id <> 12 or lock__id <> 14
      2 element(s) now selected
      
      arcedit: LIST lock__id
      
      Note:
      The lock__id and transaction-id are the same value.
      2. Locate the files that the locked features.
      Code:
      Arcedit: select lock__id <> 0
      Arcedit: setdrawsymbol 2
      Arcedit: mapextent select
      Arcedit: backcoverage .index 4
      Arcedit: backenvironment polygon
      Arcedit: draw
      Arcedit: apc polygontext .index tile-name
      
      Record the tile numbers that contain a locked feature.

      3. In SchemaEdit, use the SETEDITMODE command to make the layer editable.
      Schemaedit: SETEDITMODE layer   all edit
      4. Visit each of the tiles recorded in step 2 and use ArcEdit to calculate the locked features back to 0.
      Code:
      Arcedit: EDITCOVER <layer>
      Arcedit: EDITFEATURE <feature class>
      Arcedit: SELECT lock__id = <transaction-id>
      Arcedit: CALCULATE lock__id = 0
      Arcedit: SAVE
      Arcedit: QUIT
      
      5. Set the edit mode back to protect with the SETEDITMODE command.
       
      Code:
      Schemaedit: SETEDITMODE layer <library> <layer> all protect