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)
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 DBCC SHRINKFILE permissions default to members of the sysadmin fixed server role or the db_owner fixed database role, or the table owner, 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)
DB_ID | OBJECT_ID |
DBCC PINTABLE | sp_tableoption |
Memory Architecture | DBCC |