Alters a thread pool.
alter thread pool is not supported in process mode.
alter thread pool pool_name with { pool name = “new_name” thread count = thread_count, [pool description = “description”]} [idle timeout = time_period] [for instance inst_name | global ]
alter thread pool order_pool with pool name = 'sales_pool'
alter thread pool sales_pool with thread count = 7
alter thread pool sales_pool with pool name = "larger_sales_pool", pool description = 'thread pool exclusive to sales group'
alter thread pool order_pool with idle timeout = 500
alter thread pool order_pool with idle timeout = -1
thread_count must be greater than or equal to 1.
When you reduce a thread count, the thread pool you specify must wait for currently running tasks to yield before it reduces the number of threads, which may cause a slight delay in the SAP ASE server shrinking the pool.
You cannot rename system-created thread pools (which begin with syb_). However, you can use alter thread pool to change the number of threads or idle timeout in system-created thread pools.
You cannot use Transact-SQL variables as parameters with alter thread pool.
You can set idle timeout only for engine thread pools.
You may issue alter thread pool with execute immediate.
ANSI SQL – Compliance level: Transact-SQL extension
The permission checks for alter thread pool differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must have the manage any thread pool privilege. |
Disabled | With granular permissions disabled, you must have sa_role. alter thread pool permission is not included in the grant all command. |
Information | Values |
---|---|
Event | 143 |
Audit option | |
Command or access audited | |
Information in extrainfo | The old name, new name, and thread count |