Problem:
After you install Microsoft SQL Server 2005 Service Pack 2 (SP2), you use a clean-up task in SQL Server 2005. However, the clean-up task does not delete database maintenance plan reports. Additionally, you receive an error message that resembles the following:
Error: 2006-12-06 16:52:39.92
Code: 0xC002F210
Source: Maintenance Cleanup Task 1 Execute SQL Task
Description: Executing the query "EXECUTE master.dbo.xp_delete_file 1,N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\sdtest.txt' " failed with the following error: "Error executing xp_delete_file extended stored procedure: Specified file is not a Maintenance Plan report file." Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
End Error Warning: 2006-12-06 16:52:39.92 Code: 0x80019002 ... The package execution failed ... The step failed.
Cause:
This problem occurs because the first line of the report contains the following text:
NEW COMPONENT OUTPUT
The "xp_delete_file system" stored procedure examines the first line of the report to determine whether it's a database maintenance plan report or not. If the first line reads, "NEW COMPONENT OUTPUT," the "xp_delete_file system" stored procedure cannot recognize the report as a database maintenance plan report.
Solution:
To resolve this problem, obtain Cumulative Update Package 2 for SQL Server 2005 Service Pack 2. The Microsoft Knowledge Base article on how to obtain Cumulative Update Package 2 is here:
936305 (
http://support.microsoft.com/kb/936305/) Cumulative Update Package 2 for SQL Server 2005 Service Pack 2
Workaround: To work around this problem, delete the first line of the report if the first line is, "NEW COMPONENT OUTPUT." The report will be deleted the next time you use the clean-up task.
________________________________________
TechNote Written by: Brad Maust, PlanetMagpie Consulting Services
July 27, 2008