sp_dbcc_createws

Creates a workspace of the specified type and size on the specified segment and database.

Syntax

sp_dbcc_createws dbname, segname, [wsname], wstype, "wssize[K|M]"

Parameters

Examples

Usage

There are additional considerations when using sp_dbcc_createws:
  • sp_dbcc_createws creates a workspace with the specified name and size and initializes it.

  • Before you create a workspace, create the segment with sp_addsegment.

  • Before you create a workspace, make sure you have configured a buffer pool of at least 16K, to achieve maximum performance.

  • When you create a workspace, make sure to add a 5 percent overhead on the space needed on the device because of large page allocation scheme used when creating the workspace.

  • Use sp_plan_dbccdb to determine size estimates.

  • After creating a workspace, run sp_dbcc_updateconfig to record the new configuration information in dbcc_config.

  • Each workspace must have a unique name.

  • 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_createws 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 dbccdb (or dbccalt), or have sa_role to run sp_dbcc_createws.

Related reference
sp_addsegment
sp_dbcc_alterws
sp_dbcc_evaluatedb
sp_dbcc_updateconfig
sp_plan_dbccdb
sp_helpsegment