sp_unbindcache

Description

Unbinds a database, table, index, text object, or image object from a data cache.

Syntax

sp_unbindcache dbname [,[owner.]tablename 
	[, indexname | "text only"]] 

Parameters

dbname

is the name of database to be unbound or the name of the database containing the objects to be unbound.

owner

is the name of the table’s owner. If the table is owned by the database owner, the owner name is optional.

tablename

is the name of the table to be unbound from a cache or the name of a table whose index, text object, or image object is to be unbound from a cache.

indexname

is the name of an index to be unbound from a cache.

text only

unbinds text or image objects from a cache.

Examples

Example 1

Unbinds the titles table from the cache to which it is bound:

sp_unbindcache pubs2, titles

Example 2

Unbinds the titleidind index from the from the cache to which it is bound:

sp_unbindcache pubs2, titles, titleidind

Example 3

Unbinds the text or image object for the au_pix table from the cache to which it is bound:

sp_unbindcache pubs2, au_pix, "text only"

Example 4

Unbinds the transaction log, syslogs, from its cache:

sp_unbindcache pubs2, syslogs

Usage

Permissions

The permission checks for sp_unbindcache differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must be a user with manage data cache privilege.

Granular permissions disabled

With granular permissions disabled, you must be a user with sa_role

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

System procedures sp_bindcache, sp_dboption, sp_help, sp_helpdb, sp_helpcache, sp_helpdb, sp_helpindex, sp_unbindcache_all