Hi,
I want to write a job that will check for DB errors (as in dbcc checkdb) and
will operate if errors exists.
Is there a way to extract errors returned by dbcc checkdb?Have you consider setting up a DB Maintenance plan..? If you use the
Database Maintenance Plan Wizard you get the option to fix any errors the
checking finds. This can be scheduled to run as a job
HTH
Ryan Waight, MCDBA, MCSE
"Hagay Lupesko" <hagayl@.nice.com> wrote in message
news:ukCzmFZkDHA.688@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I want to write a job that will check for DB errors (as in dbcc checkdb)
and
> will operate if errors exists.
> Is there a way to extract errors returned by dbcc checkdb?
>|||That maintenance plan option does require the database to be in single user
mode though, even when it doesn't have to repair anything. That can cause
quite some problems. I prefer to have dbcc checkdb run as a job and check if
the job runs as expected and act when something goes wrong. At least then I
know if something goes wrong, which might indicate an underlying problem,
rather than have problems repaired automatically.
--
Jacco Schalkwijk
SQL Server MVP
"Ryan Waight" <Ryan_Waight@.nospam.hotmail.com> wrote in message
news:uZqZKYZkDHA.2232@.TK2MSFTNGP09.phx.gbl...
> Have you consider setting up a DB Maintenance plan..? If you use the
> Database Maintenance Plan Wizard you get the option to fix any errors the
> checking finds. This can be scheduled to run as a job
>
> --
> HTH
> Ryan Waight, MCDBA, MCSE
> "Hagay Lupesko" <hagayl@.nice.com> wrote in message
> news:ukCzmFZkDHA.688@.TK2MSFTNGP10.phx.gbl...
> > Hi,
> > I want to write a job that will check for DB errors (as in dbcc checkdb)
> and
> > will operate if errors exists.
> >
> > Is there a way to extract errors returned by dbcc checkdb?
> >
> >
>
No comments:
Post a Comment