Retired products

Unlocking objects

Anyone can unlock any locked object, no matter who locked it.

Unlocking objects using the UI

  1. Go to the SQL Lock tab. This tab lists all the objects that are locked on the server:

    To see this information, you need database owner permissions for the RedGate database. For more information about the RedGate database, see How it works.

  2. To make sure the list of locked objects is up to date, click Refresh.

  3. Select the objects you want to unlock, and click Unlock.

Alternatively, right-click an object in the Object Explorer and select Unlock object with SQL Lock:

Unlocking an object using SQL

To unlock an object using SQL, run the following SQL, replacing each field with the relevant details:

SQL to unlock an object

EXEC [tempdb].[dbo].[UnlockObject] 
   @db_name ='the database name'
  ,@schema_name ='schema name (eg dbo)'
  ,@object_name ='name of the object'

Didn't find what you were looking for?