In Query Analyzer (SQL 2000), I try to execute a string variable whose contents asked to have DBCC CHECKDB executed and get the following error message:
DBCC CHECKDB(DS1) WITH NO_INFOMSGS
Server: Msg 2812, Level 16, State 62, Line 9
Could not find stored procedure 'DBCC CHECKDB(DS1) WITH NO_INFOMSGS'.
The following is the code executed:
Use master
Declare @String varchar (255)
set @string = 'DBCC CHECKDB'
set @string = @string + '('
set @string = @string + 'DS1'
set @string = @string + ')'
SET @string = @string + ' WITH NO_INFOMSGS'
print @string
EXEC @string
The first thing I find perplexing is that I did not think DBCC was a stored procedure.
Any clues to the problem, comments, etc., would be appreciated.
TIA solart