Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 3.16 KB

File metadata and controls

72 lines (52 loc) · 3.16 KB
title sys.sp_xtp_unbind_db_resource_pool (Transact-SQL)
description Removes an existing binding between a database and a resource pool for purposes of tracking In-Memory OLTP memory usage.
author markingmyname
ms.author maghan
ms.reviewer randolphwest
ms.date 06/23/2025
ms.service sql
ms.subservice system-objects
ms.topic reference
f1_keywords
sp_xtp_unbind_db_resource_pool_TSQL
sp_xtp_unbind_db_resource_pool
sys.sp_xtp_unbind_db_resource_pool_TSQL
sys.sp_xtp_unbind_db_resource_pool
helpviewer_keywords
sp_xtp_unbind_db_resource_pool
sys.sp_xtp_unbind_db_resource_pool
dev_langs
TSQL

sys.sp_xtp_unbind_db_resource_pool (Transact-SQL)

[!INCLUDE sqlserver]

This system procedure removes an existing binding between a database and a resource pool for purposes of tracking [!INCLUDE inmemory] memory usage. If there's no pool currently bound to the specified database, success is returned. When the database is unbound, the previously allocated memory for memory-optimized objects stays allocated to the previous resource pool. You need to restart the database to free up the allocated memory. Once a database is unbound from the resource pool, the binding resorts to the DEFAULT resource pool.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sys.sp_xtp_unbind_db_resource_pool
    [ @database_name = ] 'database_name'
[ ; ]

Arguments

[ @database_name = ] 'database_name'

The name of an existing [!INCLUDE inmemory] enabled database. @database_name is sysname.

Messages

If a database was bound to a named resource pool, the procedure returns successfully. However, you must restart the database for unbinding to take effect.

If there's no existing binding for the database specified, sp_xtp_unbind_db_resource_pool returns success, but gives the informational message:

Msg 41374, Level 16, State 1, Procedure sp_xtp_unbind_db_resource_pool_internal, Line 140.
Database 'Hekaton_DB' does not have a binding to a resource pool.

Examples

The following code unbinds the database Hekaton_DB from the [!INCLUDE inmemory] resource pool it's bound to. If Hekaton_DB isn't currently bound to a [!INCLUDE inmemory] resource pool, a message is given. The database must be restarted for the unbinding to take effect.

EXECUTE sys.sp_xtp_unbind_db_resource_pool N'Hekaton_DB';

Requirements

  • The database specified by @database_name must have a binding to an [!INCLUDE inmemory] resource pool.

  • Requires CONTROL SERVER permission.

Related content