| klm@ag 2006-03-14, 8:23 pm |
| I used the maintenance wizard to create a plan to backup the databases. Then
I modified the plan, adding a Database Integrity Check Task. This appears to
incorrectly report the following error: "An exception occurred while
executing a Transact-SQL statement or batch." Since I want the Backup
Databases task to run only if the Integrity Check is successful, this false
error is creating a problem.
Troubleshooting this has been difficult. Information concerning the
individual tasks within the job do not show up when viewing the maintenance
plan history or job history. Even though the job is supposed to allow for
logging to a file, I discovered from other posts that there is a bug that
keeps this feature from being available if a wizard-generated maintenance
plan is edited. Eventually, I found a way to detect what was happening. I
ran Profiler while the job was exectuing. This is where I noted the error
indicating an exception had occurred. However, when I checked the SQL Server
log entries that were created by the job, they indicate that the DBCC CHECKDB
ran successfully and did not find any problems. Also, when I pull out the
SQL and run it in Query Analyzer, I don't get an error. To verify that the
Database Integrity Check Task is failing, I changed the constraint to only
run backups if this step failed. After this change, the backups ran.
Now I have to figure out how to get the Check Database Integrity Task to
report correctly or find out if there really is an error, what it is and how
to fix it. Any ideas?
Thanks.
|