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]"
sp_dbcc_createws dbccdb, scanseg, scan_wspubs2, scan, "10M"
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 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.
drop table workspace_name
dbcc in Reference Manual: Commands
See the System Administration Guide for more information on the scan and text workspaces, and the dbccalt database.
The permission checks for sp_dbcc_createws differ based on your granular permissions settings.
Setting | Description |
---|---|
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. |