September 27, 2010 at 12:25 pm
Hi,
We have SQL Server 2005 EE with SP3 and have 52 databases and using weekly Maintenance job for DBCC CHECKDB.
Question:
What is difference between using Maintenance paln for DBCC CHECKDB and just using t-sql command DBCC CHECKDB (DB_NAME) WITH NO_INFOMSGS?
I mean SQL Agent job for DBCC CHECKDB for the 52 databases, by having the job steps as below
DBCC CHECKDB (DB1) WITH NO_INFOMSGS
Go
DBCC CHECKDB (DB2) WITH NO_INFOMSGS
GO
.
.
DBCC CHECKDB (DB52) WITH NO_INFOMSGS
Which one is the best method? Maintenance plan or having t-sql statements as above? and why
Thanks
September 27, 2010 at 12:56 pm
I prefer scripting everything I can. I want to know exactly what is happening, no surprises. You can easily port a script to another server if need be or make a quick line change without redoing a wizard.
September 27, 2010 at 1:08 pm
raistlinx (9/27/2010)
I prefer scripting everything I can. I want to know exactly what is happening, no surprises. You can easily port a script to another server if need be or make a quick line change without redoing a wizard.
I agree with this. I know people who use maintenance plans and have no issues, but I prefer to do everything with my own scripts/jobs.
In your case, you could set up a cursor to run through all databases on the server and get the same results as the maintenance plan job.
September 27, 2010 at 3:40 pm
I understand that the manageability and clear visibility to do the work with t-sql scripts. But I just want to make sure that the functionality done by the Database Integrity Maintenance plan task and T-sql is same or not?
Thank you
September 27, 2010 at 3:42 pm
Yes, functionally it is the same.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply