sp_unbindcache_all

Unbinds all objects that are bound to a cache.

Syntax

sp_unbindcache_all cache_name

Parameters

Examples

Usage

There are additional considerations when using sp_unbindcache_all:
  • When you unbind entities from a cache, all subsequent I/O for the cache is performed in the default cache.

  • To unbind individual objects from a cache, use the system procedure sp_unbindcache.

  • You cannot use sp_unbindcache_all if the system tempdb is bound to pub_cache. If you do, you get an error message, and sp_unbindcache_all rejects the unbind for all objects.

    Use sp_unbindcache to unbind the system tempdb first.

  • See sp_unbindcache for more information about unbinding caches.

Permissions

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

SettingDescription
Enabled

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

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:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • 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

Related reference
sp_bindcache
sp_helpcache
sp_unbindcache