Tuesday, May 17, 2005

SMS reporting import error

I just finished importing around 75 custom reports from my old SMS 2003 site to my new SMS 2003 SP1 site. As I'm checking through the reports I noticed that one of the reports generates this error:

Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument

/SMSReporting_NIC/Report.asp, line 689

Puzzled, I googled the error to quickly see if I got any hits. Next, I tried the report in my dev SMS environment. Oddly the report worked fine there. At that point I'm thinking that I've got something bad on my reporting point or with the SQL DB. Just for fun, I decided to verify that the views that my SQL report referenced did exist. As expected, they were there. Still scratching my head, I decided to begin removing items out of my SQL statement to see if through process of elimination, the report could be fixed. After getting down to a bare "SELECT DISTINCT SYS.Netbios_Name0 FROM v_R_System SYS", the report still generated the same error. Realizing how strange this was, I decided to create a whole new report and copy the same SQL statement into it. Guess what? That actually worked. I'm still not sure exactly what happened, but it appears that the export of the report from my old SMS site to my new SMS site contained corrupt data somewhere. I do know that the corruption wasn't in the SQL, as I'm now using the original SQL statement in an entirely new report without any issues at all.

Lesson learned...In the future, I'll be sure to copy the SQL to a new report first when troubleshooting imported reports.

No comments: