Unbinds all objects that are bound to a cache.
sp_unbindcache_all cache_name
sp_unbindcache_all pub_cache
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.
The permission checks for sp_unbindcache_all differ based on your granular permissions settings.
Setting | Description |
---|---|
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. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|