Hi everybody, is there any way which I can schedule DBCC CHECKDB to run every hour besides using the maintenance plan? Thanks.
You can wrap this inside a stored procedure and execute that procedure via a job. -- Frank Kalis Microsoft SQL Server MVP http://www.insidesql.de Heute schon gebloggt?http://www.insidesql.de/blogs Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)
You can create a fresh job and under the Steps pane for command line submit the DBCC CHECKDB by selecting the required database. Refer to the SQL server books online about scheduling jobs. BTW why do you want to run this DBCC statement every hour? Satya SKJ Contributing Editor & Forums Moderator http://www.SQL-Server-Performance.Com This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
Even using Maintenance plan, you can run it every hour. Now, like Satya said, why? Luis Martin Moderator SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important Bertrand Russell All postings are provided “AS IS†with no warranties for accuracy.
quote:Originally posted by LuisMartin Even using Maintenance plan, you can run it every hour. Now, like Satya said, why? Luis Martin Moderator SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important Bertrand Russell All postings are provided “AS IS†with no warranties for accuracy. i am backing up the transaction log every hour, just thinking about check the database before backing up the log. Will this be a good practice?
I don't think so. -- Frank Kalis Microsoft SQL Server MVP http://www.insidesql.de Heute schon gebloggt?http://www.insidesql.de/blogs
Yes and you are contributing more space to transaction log and that can take longer time to finish the transaction lgo backup. If you want to verify the backup you can do so by restoring them on to a standby server which can work as a HOT standby in case of any failures with current production. Satya SKJ Contributing Editor & Forums Moderator http://www.SQL-Server-Performance.Com This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
Is not a good practice, also impact performance. Luis Martin Moderator SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important Bertrand Russell Nunca esperes el reconocimiento de tus hijos, eso ocurrirá luego de tu muerte All postings are provided “AS IS†with no warranties for accuracy.
Just create a job with a step (DBCC CHECKDB) for each database. Then, schedule the job as you wish. This is the simplest approach. Alim