DBCC UNPINTABLE

Transact-SQL Reference

Transact-SQL Reference

DBCC UNPINTABLE

Marks a table as unpinned. After a table is marked as unpinned, the table pages in the buffer cache can be flushed.

Syntax

DBCC UNPINTABLE ( database_id , table_id )

Arguments

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.

Remarks

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.

Result Sets

DBCC UNPINTABLE returns this result set (message):

DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Permissions

DBCC UNPINTABLE permissions default to members of the sysadmin fixed server role and are not transferable.

Examples

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)

See Also

DB_ID

DBCC

DBCC PINTABLE

Memory Architecture

OBJECT_ID

sp_tableoption