Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Mode Element (XMLA)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Identifies the mode to be used by the parent Lock element when creating a lock on a specified object.




Data type and length

String (enumeration)

Default value



1-1: Required element that occurs once and only once.



Parent elements

Lock, Unlock

Child elements


The parent Lock element uses the Mode element to determine the type of lock to create on an object. The value of this element is limited to one of the strings listed in the following table.




A shared lock is established on the specified object. Other shared locks can be created for the same object.

A shared lock prevents transactions containing write operations, such as an Execute method call running an Alter command, on a specified object, from committing until the shared lock is removed. A shared lock does not prevent transactions containing read operations, such as a Discover method call or an Execute method call running a Statement command, from committing.


An exclusive lock is established on the specified object. Other shared or exclusive locks cannot be created for the same object.

An exclusive lock prevents transactions containing either read or write operations on a specified object from committing until the exclusive lock is removed.

Community Additions

© 2015 Microsoft