DBCC UNPINTABLE (T-SQL)

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 number (ID) of the database containing the table to be pinned. To obtain the database ID, use DB_ID.
table_id
Is the object identification number (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 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.

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 OBJECT_ID
DBCC PINTABLE sp_tableoption
Memory Architecture DBCC

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.