sp_dbcc_deletedb

Description

Deletes from dbccdb all the information related to the specified target database.

Syntax

sp_dbcc_deletedb [dbname | dbid]

Parameters

dbname

specifies the name of the target database for which you want the configuration information deleted. If you do not specify a value for dbname, Adaptive Server deletes data from all databases in dbccdb..dbcc_config. If the target database is dbccdb, and dbccalt exists, Adaptive Server deletes the data from dbccalt.

dbid

specifies the database ID number of the target database for which you want the configuration information deleted.

Examples

Example 1

Deletes all information for the database named engdb from dbccdb:

sp_dbcc_deletedb "engdb"
All information for database engdb has been deleted from dbccdb.

Usage

Permissions

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

Granular permissions enabled

With granular permissions enabled, you must be the database owner of dbccdb (or dbccalt), or have the manage checkstorage privilege on the specified database.

Granular permissions disabled

With granular permissions disabled, you must be the database owner of the specified database or have sa_role to run sp_dbcc_deletedb.

See also

See the System Administration Guide for information about the dbccalt database.

Commands dbcc

dbcc stored procedures sp_dbcc_deletehistory, sp_dbcc_evaluatedb

System procedures sp_plan_dbccdb