January 29, 2014 at 4:55 am
Hi
I have a weekly job that checks the integrity of the system databases on my servers.
It was created by the previous dba and is just simply a job created via the maintenance plan wizard.
Now the issue I have is that in the job history it says it ran, but my sql monitor is showing me an alert that the database has not had an integrity check for over a week. The scheduled job runs every week on a Sunday evening.
If i manually run
dbcc checkdb (master) with no_infomsgs
then i can see in the log that the dbcc command was run against the databases. I do not see this confirmation when the scheduled job runs.
How come it it saying the job ran successfully, yet the error log and sql monitor contradict this ?
January 29, 2014 at 5:06 am
Have you opened up the job and looked at exactly what it does?
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
January 29, 2014 at 7:21 am
Yes I have opened the job up. It is under the 'Management' \Maintenance plans folder and when i open it I see that it is a 'Check database Integrity Task' for 'All system databases' with no other steps involved.
When I look at the job under the 'multi-server Jobs' folder I have checked that all the servers required to have this job applied are selected in the 'Target Servers' option.
I have noticed there is a Rebuild indexes job for the user databases which runs 15 mins before hand . If these jobs where to 'overlap' each other, could that be the cause of the problem?
Might it be worth redesigning the Maintenance plan so instead of 2 separate jobs, I create 1 job with 2 steps, the first being database integrity checks of the system db's then follow that on completion with the index rebuild job of the user db's ?
I was actually thinking about using Michelle Uffords' script to run the index rebuild operations anyway on a scheduled basis !!!
January 29, 2014 at 7:33 am
PearlJammer1 (1/29/2014)
If these jobs where to 'overlap' each other, could that be the cause of the problem?
No.
Check that it's scheduled, check that the settings are correct, check that it's actually running.
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
January 29, 2014 at 7:37 am
i deprecated my oldstyle maintenance plans in favor of TSQL scripts for the same steps. for example, i really liked Gianluca Sartori's version of capturing only relevant errors from DBCC CheckDB that he put together below, because i can run it as a job, but receive an email when something comes up in the results. that way i don't have to check the job for failures.
http://spaghettidba.com/2011/11/28/email-alert-dbcc-checkdb/
Lowell
January 29, 2014 at 11:35 am
Thanks for recommending my script, Lowell. 🙂
-- Gianluca Sartori
January 30, 2014 at 2:28 am
Gail in answer to the following:
Check that it's scheduled, check that the settings are correct, check that it's actually running.
The job is scheduled and the job is enabled - the job says it ran when I look in the history. There is a green tick next to the job and i have the following message:
Executed as user: MydomainXXX\ServiceAccount. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 23:30:00 DTExec: The package execution returned DTSER_SUCCESS (0). Started: 23:30:00 Finished: 23:31:17 Elapsed: 76.437 seconds. The package executed successfully. The step succeeded
Yet there is no message in the sql error log to say that a dbcc checkdb command ran on the system databases or another databases for that matter. If I manually run the dbcc checkdb against each system db then I get a successful entry in the error log and my sql monitor reports back the 'database integrity check overdue' error has now ended.
January 30, 2014 at 2:37 am
PearlJammer1 (1/30/2014)
Yet there is no message in the sql error log to say that a dbcc checkdb command ran on the system databases or another databases for that matter.
Then it isn't doing anything. Dig into the details of the maintenance plan and check exactly what it's actually doing.
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
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply