sp_dbcc_createws

Description

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

dbname

is the name of the database in which the workspace is to be created. Values are dbccdb and dbccalt.

segname

is the name of the segment for the workspace.

wsname

is the name of the workspace. If the value is null, sp_dbcc_createws generates the name scan_ws_nnnnnn for the scan workspace and text_ws_nnnnnn for the text workspace, where nnnnnn is a unique 6-digit number.

wstype

specifies the type of workspace to be create. Values are scan and text.

wssize

is the workspace size, specified with K (kilobytes) or M (megabytes). If you do not specify K or M, wssize specifies the number of pages. The minimum size for a workspace is 24 pages.

Examples

Example 1

Creates a 10MB scan workspace named scan_ws_pubs2 on the scanseg segment in dbccdb:

sp_dbcc_createws dbccdb, scanseg, scan_ws_pubs2, scan, "10M"

Example 2

Creates a 14MB scan workspace named text_ws_000001 on the textseg segment in dbccdb:

sp_dbcc_createws dbccdb, textseg, text, "14M"

Usage

Permissions

Only a System Administrator or the Database Owner can run sp_dbcc_createws.

See also

Commands dbcc

dbcc stored procedures sp_dbcc_alterws, sp_dbcc_evaluatedb

System procedures sp_addsegment, sp_plan_dbccdb, sp_helpsegment