Creates a workspace of the specified type and size on the specified segment and database.
sp_dbcc_createws dbname, segname, [wsname], wstype, "wssize[K|M]"
is the name of the database in which the workspace is to be created. Values are dbccdb and dbccalt.
is the name of the segment for the workspace.
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.
specifies the type of workspace to be create. Values are scan and text.
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.
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"
Creates a 14MB scan workspace named text_ws_000001 on the textseg segment in dbccdb:
sp_dbcc_createws dbccdb, textseg, text, "14M"
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% 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 the System Administration Guide for more information on the scan and text workspaces.
See the System Administration Guide for information on the dbccalt database.
Only a System Administrator or the Database Owner can run sp_dbcc_createws.
Commands dbcc
dbcc stored procedures sp_dbcc_alterws, sp_dbcc_evaluatedb
System procedures sp_addsegment, sp_plan_dbccdb, sp_helpsegment