Is DBCC command a stored procedure or a function?

582 Views Asked by At

What should be the DBCC commands be called ? DBCC procedure or DBCC function?

It is confusing because DBCC PAGE could be executed without prefixing a EXEC statement much like stored procedures. But EXEC DBCC PAGE(1,1,1,3) throws an error

Syntax error - Msg 156 Incorrect syntax near the keyword 'DBCC'

And it isn't a function because function calling must be made in SELECT, but

SELECT DBCC PAGE(1,1,1,3)

shows the same error.

1

There are 1 best solutions below

0
s_allegrini On

As far as I know DBCC stands for Data-Base-Console-Command. Therefore, DBCC by its self is neither a procedure nor a function. It is simply a console that you recall.