Nope. DBCC CHECKDB ... is a builtin statement of MS SQL Server used to check the status of a database, while the dbo.dbAdm_Daily is a stored procedure and stored procedures should be executed using the EXEC keyword (you do not have to use the EXEC, but only if the procedure call is the very first statement in a batch.
I just tried to call the procedure without the EXEC ... did not make any difference.
In either case both the commands work just fine in Query Analyzer, both execute using $dbh->do(...), but I have to use the prepare+execute to be able to capture the messages and that only works for the DBCC command. God only knows why :-(
|