Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

System database integrity check Expand / Collapse
Author
Message
Posted Wednesday, January 29, 2014 4:55 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 6:34 AM
Points: 257, Visits: 1,017
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 ?
Post #1535836
Posted Wednesday, January 29, 2014 5:06 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 40,438, Visits: 36,895
Have you opened up the job and looked at exactly what it does?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1535841
Posted Wednesday, January 29, 2014 7:21 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 6:34 AM
Points: 257, Visits: 1,017
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 !!!
Post #1535904
Posted Wednesday, January 29, 2014 7:33 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 40,438, Visits: 36,895
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 2008, MVP
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

Post #1535915
Posted Wednesday, January 29, 2014 7:37 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 10:20 AM
Points: 12,927, Visits: 32,332
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1535921
Posted Wednesday, January 29, 2014 11:35 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:30 AM
Points: 4,613, Visits: 11,016
Thanks for recommending my script, Lowell.

--
Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
Post #1536060
Posted Thursday, January 30, 2014 2:28 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 6:34 AM
Points: 257, Visits: 1,017
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.
Post #1536213
Posted Thursday, January 30, 2014 2:37 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 40,438, Visits: 36,895
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 2008, MVP
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

Post #1536217
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse