Marks a table as unpinned. After a table is marked as unpinned, the table pages in the buffer cache can be flushed.
DBCC UNPINTABLE ( database_id , table_id )
database_id
Is the database identification (ID) number of the database containing the table to be pinned. To obtain the database ID, use DB_ID.
table_id
Is the object ID of the table to be pinned. To determine the object ID, use OBJECT_ID.
DBCC UNPINTABLE does not cause the table to be immediately flushed from the data cache. It specifies that all of the pages for the table in the buffer cache can be flushed if space is needed to read in a new page from disk.
DBCC UNPINTABLE returns this result set (message):
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
DBCC UNPINTABLE permissions default to members of the sysadmin fixed server role and are not transferable.
This example unpins the authors table in the pubs database.
DECLARE @db_id int, @tbl_id int
USE pubs
SET @db_id = DB_ID('pubs')
SET @tbl_id = OBJECT_ID('pubs..authors')
DBCC UNPINTABLE (@db_id, @tbl_id)