This page shows
| how to find some undocumented dbcc parameters, | |
| lists the ones found by the method and | |
| shows where they have been used |
--************************************************
--***** Finding Undocumented DBCC's in sp's ******
--************************************************
use master
go
-- only gets first instance in each sp --
select convert(varchar(40),so.name)
,replace(
replace(
replace(substring(text,charindex('dbcc',text,1),100)
,char(13)
,' ')
,char(10)
,' ')
,char(9)
,' ')
from syscomments sc, sysobjects so
where so.id=sc.id
and text like '%dbcc%'
order by name
/******************
| SP | dbcc usage |
| sp_MS_marksystemobject | dbcc LockObjectSchema(@objname) |
| sp_MS_upd_sysobj_category | dbcc traceon (1717) |
| sp_MSinit_replication_perfmon | dbcc deleteinstance ("SQL Replication Agents","%") |
| sp_MSkilldb | dbcc dbrepair |
| sp_add_file_recover_suspect_db | dbcc dbrecover (' + @dbName + ')' |
| sp_adddistributiondb | dbcc traceon (1806) |
| sp_adddistributiondb | dbcc detachdb(@database) |
| sp_addextendedproc | dbcc addextendedproc( @functname, @dllname) |
| sp_bindefault | dbcc LockObjectSchema(@vc1) --- Undocu. Locks out other schema changes until commit, and increments |
| sp_bindrule | dbcc LockObjectSchema(@vc1) --- Undocu. Locks out other schema changes until commit, and increments |
| sp_configure | dbcc freeproccache |
| sp_cycle_errorlog | dbcc errorlog |
| sp_db_upgrade | dbcc upgradedb (@currentDb) |
| sp_dbcmptlevel | dbcc flushprocindb(@dbid) |
| sp_dboption | dbcc dbcontrol(@dbname,online) |
| " | dbcc flushprocindb(@dbid) |
| sp_dbremove | dbcc dbrepair(@dbname,dropdb,noinit) |
| sp_dropdevice | dbcc dbrepair('', 'dropdevice',@logicalname, 1) |
| sp_dropextendedproc | dbcc dropextendedproc( @functname ) |
| sp_fixindex | dbcc dbrepair(@dbname, repairindex, @tabname,@indid) |
| sp_fulltext_column | dbcc lockobjectschema(@tabname) |
| sp_fulltext_table | dbcc lockobjectschema(@tabname) |
| sp_indexoption | dbcc LockObjectSchema (@QuotedName) |
| sp_msupg_removesystemcomputedcolumns | dbcc lockobjectschema (@tab) |
| sp_renamedb | dbcc dbrepair (@newname,markdirty) |
| sp_spaceused | dbcc updateusage(0) with no_infomsgs |
| sp_unbindefault | dbcc LockObjectSchema(@vc1) --- Undocu. Locks out other schema changes until commit, and increments |
| sp_unbindrule | dbcc LockObjectSchema(@vc1) --- Undocu. Locks out other schema changes until commit, and increments |
| sp_user_counter1 | dbcc setinstance ('SQLServer:User Settable','Query', 'User counter 1', @newvalue) |
/**** dbcc info from elsewhere, sometimes documented *********
| dbcc pss(@suid,@spid,0) | There is one process status structure (PSS) slot for each configured user connection; only for sysadmin; |
| dbcc inputbuffer (@spid) | does not take variables in parameter; default permissions to sysadmin role; others can only see own spid |
****************************************/