sp_dbcc_alterws

Changes the size of the specified workspace to a specified value, and initializes the workspace.

Syntax

sp_dbcc_alterws dbname, wsname, "wssize[K|M]"

Parameters

Examples

Usage

There are additional considerations when using sp_dbcc_alterws:
  • sp_dbcc_alterws changes the size of the specified workspace to the specified value and initializes the workspace.

  • To achieve maximum performance, make sure you have configured a buffer pool of at least 16K before you alter a workspace.

  • Use sp_plan_dbccdb to determine size estimates before altering the workspace.

  • The workspace must exist before it can be altered. For information on creating workspaces, see sp_dbcc_createws.

  • To delete a workspace, in dbccdb issue:
    drop table workspace_name
See also:
  • dbcc in Reference Manual: Commands

  • See the System Administration Guide for more information on the scan and text workspaces, and the dbccalt database.

Permissions

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

SettingDescription
Enabled

With granular permissions enabled, you must be the database owner of dbccdb (or dbccalt).

Disabled

With granular permissions disabled, you must be the database owner of the specified database, or a user with sa_role.

Related reference
sp_dbcc_createws
sp_dbcc_evaluatedb
sp_plan_dbccdb
sp_helpdb