Explicitly locking XML data

You can use a LOCK TABLE statement to explicitly lock XML data

About this task

Introductory concepts

Procedure

Begin program-specific programming interface information.
Use any of the following approaches to manage XML tables spaces by using LOCK TABLE statements:

  • Use LOCK TABLE statements to control the number of locks acquired on the auxiliary table. Locking the auxiliary table eliminates the need for lower-level XML locks.
  • Issue the following statement to prevent other applications from modifying the data.
    LOCK TABLE IN SHARE MODE
  • Issue the following statement to prevent other applications from reading the data.
    LOCK TABLE IN EXCLUSIVE MODE
    This statement also prevents uncommitted readers from accessing the data in the XML table space. However, it does not prevent readers from accessing versioned XML documents.
    End program-specific programming interface information.