Finding the last successful CHECKDB
One very important part of your SQL Server maintenance procedure should be running consistency checks on a regular basis using CHECKDB. Not only does CHECKDB check the health of important internal pages of your database like PFS, GAM, IAM and many more, it also check for errors in your data pages (and it does a lot more than just checking pages!). As you – hopefully – know, running CHECKDB is really important to make sure your database is consistent and uncorrupted.
There are however scenarios where you have to manage a database and you are not sure when, or if, CHECKDB completed successfully. Thankfully we can find the date and time the last successful CHECKDB completed, though it isn’t as easy as it should be…
Undocumented fun
What I mean with finding the last successful CHECKDB date/time not being easy is that we need to use an undocumented DBCC command to get that data back from the database. Undocumented usually means fun, so let’s get started!
The information we are after is stored in the boot page of a database.
Every database has one boot page and it is always in the same location, the 9th page in the first file of the database. The boot page stores important information about the database like the database name, database creation date, the compatibility of the database and much more interesting stuff. It also contains the date and time of the last successful CHECKDB that has ran on that specific database!
When we are talking about getting information back from pages we need to use the undocumented DBCC PAGE command. To get the contents of the boot page we can execute the command below:
DBCC PAGE (databasename, 1, 9, 3) WITH TABLERESULTS
I’m using the WITH TABLERESULTS command so we do not have to set TF 3604 and TF 3605 to output the page information.
The information we are looking for is in the field ‘dbi_dbccLastKnownGood’ as that shows us the last successful CHECKDB run.
In this case I have ran the command against the AdventureWorks2012 database on my test machine:
On my test machine CHECKDB had the last successful run on 2014-05-30 at 11:56.
If you see a date of ‘1900-01-01 00:00:00.000’ it means CHECKDB has either never ran, or – even worse – has never had a successful run.
I hope you noticed I used the word successful a lot in this article, this is because the date and time in the boot page is really the last successful run. If CHECKDB encountered an error during execution the ‘dbi_dbccLastKnownGood’ value will not change in the boot page!
91 comments to “Finding the last successful CHECKDB”
Unquestionably believe that which you stated.
Your favorite justification seemed to be on the web the
easiest thing to be aware of. I say to you, I definitely get annoyed while people think
about worries that they plainly don’t know
about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects ,
people could take a signal. Will probably be back to get more.
Thanks
Good article! We will be linking to this particularly great article on our site.
Keep up the great writing.
Hello! Would you mind if I share your blog with my myspace group?
There’s a lot of people that I think would really appreciate your
content. Please let me know. Thanks
Thanks for sharing such a pleasant opinion, article is
nice, thats why i have read it completely
Thanks for some other excellent article. The place else could anyone get that kind of info in such a perfect method of writing?
I have a presentation subsequent week, and I’m on the look for
such info.
An intriguing discussion is worth comment. I do
think that you ought to publish more about
this issue, it may not be a taboo subject but typically people don’t
talk about such issues. To the next! Kind regards!!
Very shortly this web site will be famous amid all blogging people, due to
it’s good posts
Hi there colleagues, its fantastic piece of writing concerning cultureand fully defined, keep it up all the time.
It’s an remarkable article designed for all the online people;
they will get benefit from it I am sure.
Excellent way of telling, and good article to obtain data concerning my presentation topic,
which i am going to convey in institution of higher education.
I read this article fully concerning the resemblance of most recent and previous technologies, it’s awesome article.
obviously like your website however you have to test the
spelling on several of your posts. Several of them are rife with
spelling issues and I find it very troublesome to inform the reality nevertheless I will definitely come
back again.
Good write-up. I certainly love this website.
Thanks!
It’s fantastic that you are getting thoughts from this paragraph as well as from our discussion made here.
This paragraph is truly a good one it assists new the web people, who are wishing
for blogging.
I read this piece of writing completely about the difference of newest and earlier technologies,
it’s amazing article.
This is really fascinating, You’re a very professional blogger.
I’ve joined your feed and stay up for in quest of extra of your excellent post.
Additionally, I’ve shared your website in my social networks
It’s genuinely very complex in this full of activity life to
listen news on TV, so I only use the web for that purpose, and take the most recent news.
Hey There. I found your blog the usage of msn. That
is a very well written article. I will make sure to bookmark it and return to
read more of your helpful info. Thanks for the post.
I’ll certainly comeback.
Thanks for finally writing about > Finding the last
successful CHECKDB – DotNine < Loved it!
If you would like to increase your experience just keep visiting this web page and be updated with the latest information posted here.
It’s an remarkable paragraph designed for all the web viewers; they
will take advantage from it I am sure.
I am regular reader, how are you everybody? This piece of writing
posted at this website is in fact pleasant.
I know this site presents quality depending posts and other data, is there any other web
site which provides such data in quality?
With havin so much content do you ever run into any problems of plagorism or copyright infringement?
My blog has a lot of completely unique content I’ve either written myself or outsourced but it seems a lot of it is popping it up all over the web without
my permission. Do you know any methods to help protect against content from being stolen?
I’d genuinely appreciate it.
whoah this weblog is magnificent i like reading your articles.
Keep up the good work! You recognize, a lot of people are hunting around for this info,
you can help them greatly.
Because the admin of this site is working, no hesitation very rapidly it will be famous, due
to its feature contents.
For latest news you have to go to see web and on web I found
this web page as a best web page for most recent updates.
you’re really a excellent webmaster. The site loading pace is amazing.
It sort of feels that you’re doing any unique trick. Also, The contents are masterwork.
you’ve done a excellent job in this topic!
I am regular visitor, how are you everybody? This paragraph posted at this web page is
actually pleasant.
Please let me know if you’re looking for a article author for your site.
You have some really good articles and I feel I would be a good asset.
If you ever want to take some of the load off, I’d love to write some articles for your blog in exchange for a link back to mine.
Please shoot me an email if interested. Regards!
When some one searches for his necessary thing, therefore he/she needs
to be available that in detail, thus that thing is maintained over here.
Hello to every one, for the reason that I am really eager of reading
this web site’s post to be updated on a regular basis.
It contains nice data.
Hello, this weekend is pleasant for me, as this time i am reading this wonderful informative article here at my
house.
My relatives always say that I am killing my time here at net, but I
know I am getting knowledge all the time by reading thes
nice articles or reviews.
For most recent information you have to go to see the web and on the
web I found this site as a most excellent web site
for hottest updates.
This article offers clear idea designed for the new people
of blogging, that in fact how to do running a blog.
It’s nearly impossible to find well-informed people in this particular topic,
however, you sound like you know what you’re talking about!
Thanks
This piece of writing is in fact a nice one it assists new internet
people, who are wishing in favor of blogging.
I savour, lead to I found just what I was looking
for. You have ended my four day lengthy hunt! God Bless you man.
Have a great day. Bye
It’s an amazing post designed for all the online users; they will take benefit from it I am sure.
What’s up, after reading this amazing piece of writing i am also cheerful to share my
knowledge here with friends.
Hi there, after reading this remarkable post i am also glad to share my knowledge here with friends.
whoah this blog is fantastic i love studying
your posts. Keep up the great work! You already know, a lot of persons
are hunting round for this information, you can help
them greatly.
It’s amazing for me to have a website, which is valuable in favor
of my knowledge. thanks admin
Quality posts is the secret to interest the visitors to go to see the website, that’s what this web page is providing.
This page really has all of the information I needed concerning this subject
and didn’t know who to ask.
I am in fact pleased to read this weblog posts
which contains tons of useful facts, thanks for providing these kinds of statistics.
magnificent post, very informative. I ponder why the other experts of this sector don’t realize this.
You must proceed your writing. I’m confident, you’ve a huge readers’ base
already!
What’s up colleagues, how is all, and what you
would like to say on the topic of this paragraph,
in my view its really remarkable in support of me.
It’s going to be end of mine day, except before ending I am reading this great article to increase my experience.
This article is really a good one it helps new
net viewers, who are wishing in favor of blogging.
You could definitely see your skills within the work
you write. The world hopes for more passionate writers like you who are not afraid to say how they believe.
All the time go after your heart.
First off I would like to say excellent blog! I had a quick question in which I’d like to ask if you do
not mind. I was interested to find out how you center yourself and clear your thoughts prior to writing.
I have had trouble clearing my mind in getting my ideas out there.
I truly do enjoy writing however it just seems like the first 10
to 15 minutes are generally lost just trying to figure
out how to begin. Any suggestions or hints? Appreciate it!
Why users still make use of to read news papers when in this technological
globe everything is accessible on web?
I pay a visit day-to-day some web pages and websites to read articles or
reviews, however this blog provides feature based writing.
This paragraph will assist the internet viewers for setting up
new website or even a blog from start to end.
This website truly has all of the information I needed about this subject and didn’t know
who to ask.
Hmm it appears like your blog ate my first comment (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog.
I too am an aspiring blog blogger but I’m still new to everything.
Do you have any helpful hints for novice blog writers?
I’d certainly appreciate it.
Heya! I’m at work browsing your blog from my
new iphone! Just wanted to say I love reading your blog and look forward
to all your posts! Carry on the superb work!
What a data of un-ambiguity and preserveness of valuable familiarity on the
topic of unexpected emotions.
Good way of telling, and pleasant article to take facts regarding my presentation focus,
which i am going to convey in institution of higher education.
This blog was… how do I say it? Relevant!! Finally I have
found something which helped me. Cheers!
Hi there, after reading this amazing article i am too happy to share my experience here with colleagues.
There is definately a great deal to find out about this issue.
I like all of the points you’ve made.
wonderful put up, very informative. I wonder why the opposite experts
of this sector do not realize this. You must proceed your writing.
I am sure, you’ve a huge readers’ base already!
If you desire to take a great deal from this piece of writing
then you have to apply such techniques to your won website.
I am actually delighted to read this blog posts which carries lots of useful facts, thanks for providing
such data.
Thanks a lot for sharing this with all people you really realize what
you are speaking approximately! Bookmarked. Please also consult with my website =).
We can have a hyperlink alternate agreement among us
This excellent website really has all the information and facts I wanted
about this subject and didn’t know who to ask.
Hi everybody, here every one is sharing such know-how, therefore it’s
nice to read this blog, and I used to pay a visit this website every day.
I have been exploring for a little bit for any high-quality articles or weblog posts on this kind of house .
Exploring in Yahoo I ultimately stumbled upon this web site.
Studying this information So i’m glad to exhibit that
I’ve an incredibly excellent uncanny feeling I found out exactly what I
needed. I such a lot certainly will make sure to don?t
forget this site and provides it a look on a relentless
basis.
I do not know if it’s just me or if everybody
else encountering issues with your blog. It looks like some of the written text in your posts
are running off the screen. Can someone else please provide feedback and let
me know if this is happening to them too? This might be a
problem with my internet browser because I’ve
had this happen previously. Appreciate it
This excellent website truly has all of the information I wanted about this
subject and didn’t know who to ask.
Quality articles or reviews is the key to invite the viewers to pay a quick visit the site, that’s what this site is providing.
If you are going for best contents like myself, just visit this web site daily
because it provides feature contents, thanks
I got this website from my friend who told me on the topic of this web page and now
this time I am browsing this site and reading very informative articles or reviews
here.
Nice replies in return of this issue with genuine arguments and telling the whole thing concerning that.
Hello, yup this post is genuinely good and I have learned lot of things from it
about blogging. thanks.
excellent publish, very informative. I ponder why the other specialists of
this sector don’t notice this. You must continue your writing.
I’m sure, you’ve a huge readers’ base already!
Nice blog right here! Also your web site rather a lot up very fast!
What host are you the use of? Can I get your associate link in your host?
I desire my site loaded up as fast as yours lol
magnificent points altogether, you just received a new reader.
What would you recommend in regards to your publish
that you made some days ago? Any certain?
Hi there mates, its great paragraph on the topic of educationand entirely defined,
keep it up all the time.
I am regular visitor, how are you everybody? This paragraph posted at this web page is actually nice.
First off I would like to say great blog! I had a quick question in which I’d
like to ask if you do not mind. I was interested to find out how
you center yourself and clear your head prior to writing.
I’ve had a tough time clearing my mind in getting my ideas
out there. I do take pleasure in writing but it just seems like
the first 10 to 15 minutes are lost simply just trying to figure
out how to begin. Any ideas or hints? Cheers!
You can certainly see your skills in the work you write. The world hopes for more passionate writers such as you who are not
afraid to mention how they believe. All the time go after your heart.
What’s up to every body, it’s my first go to see of this blog;
this blog carries remarkable and genuinely excellent material in favor of visitors.
It’s genuinely very difficult in this active life to listen news on Television, therefore I simply use world wide web for that reason, and take the hottest information.
I was suggested this blog by means of my cousin. I am now not positive whether this put
up is written through him as no one else realize such special about my difficulty.
You’re wonderful! Thank you!
interesting review. Moreover visit your site to recognise slot online.
This website has received reputation right from agen slot deposit pulsa gambling online dating services
in Negara sendiri. Right now there tend to be plenty of beautiful promos inside
event you join at the moment.
important review. Moreover visit your personal site to have enjoyment from slot.
The actual web-site has received conclusion from the comfort
of slot pulsa online gambling members in Negara sendiri.
Right now there are actually loads of appealing promos just in case you join right now.