SQL Server uses two additional lock types called schema locks to prevent table and metadata alterations during query execution. This chapter will discuss schema locks in depth along with low-priority locks, which were introduced in SQL Server 2014 to reduce blocking during online index rebuilds and partition switch operations.
Schema Locks
SQL Server needs to protect database metadata in order to prevent situations where a table’s structure is changed in the middle of query execution. The problem is more complicated than it seems. Even ...