A weird thing with DBCC CHECKDB

  • Hi Guys

    I come across a weird thing with DBCC CheckDB. So I can successfully run it manually via Query window BUT when I execute from Maintenance plan ( Using EXECUTE T_SQL STATEMENT TASK )

    It failed with error :

    “DTExec: The package execution returned DTSER_FAILURE (1). Started: 15:57:49 Finished: 16:02:13 Elapsed: 263.252 seconds. The package execution failed. The step failed. “

    The example of DBCC statement that I run is as below :

    USE DB1

    GO

    DBCC CHECKDB(N'DB1') WITH NO_INFOMSGS

    What I did was running this script :

    EXEC sp_configure 'allow updates', 0

    GO

    RECONFIGURE

    GO

    The result :

    “Configuration option 'allow updates' changed from 0 to 0. Run the RECONFIGURE statement to install.”

    It doesn’t help at all , The error is still there

    Any feedback are much appreciated !

    Cheers

  • Go into the maintenance plan and enable logging. You need to see the actual error to fix whatever's wrong.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for the feedback

    I check the logging, it is successful

    The result as below :

    Microsoft(R) Server Maintenance Utility (Unicode) Version 10.0.6000

    Report was generated on "ABC".

    Maintenance Plan: DBCC

    Duration: 00:04:38

    Status: Succeeded.

    Details:

    Execute T-SQL Statement Task (ETSPDCSQL1-VW)

    Task start: 2016-01-15T13:32:01.

    Task end: 2016-01-15T13:36:38.

    Success

    BUT the weird thing is in JOB area it is failed ( as attached )

    So why it is not the same ? I expect both will produce the same result

    Cheers

  • Go into the maintenance plan/job and enable detailed logging. All you're showing are high level messages and none say anything useful.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gail ,

    Appreciate your feedback .

    I did enable LOG Extended Information from Reporting and Logging ( Maintenance plan ) . I am not 100% sure that this is what you mean by enable log detail information

    The result that I got is as below :

    Microsoft(R) Server Maintenance Utility (Unicode) Version 10.0.6241

    Report was generated on "MyServer".

    Maintenance Plan: DBCC

    Duration: 00:03:52

    Status: Succeeded.

    Details:

    Check Database Integrity Task (MyServer)

    Check Database integrity on Local server connection

    Databases: DB1,DB2,DB3

    Include indexes

    Task start: 2016-01-18T13:25:19.

    Task end: 2016-01-18T13:29:10.

    Success

    Command:

    USE [DB1]

    GO

    DBCC CHECKDB(N''DB1'') WITH NO_INFOMSGS

    GO

    USE [DB2]

    GO

    DBCC CHECKDB(N''DB2'') WITH NO_INFOMSGS

    GO

    USE [DB3]

    GO

    DBCC CHECKDB(N''DB3'') WITH NO_INFOMSGS

    GO

    Please kindly advise …

    Thank you

  • This same thing happened to me as well. I had a clean output file but the job said failed. I manually ran the integrity check and it was fine. The other step in the maint plan was deleting old txt files. I deleted the Maint plan and recreated it and it ran fine.

  • Thanks Marcus !!

    It works now .. Thanks for sharing ?

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply