Answered by:
SRSS - Error in XML document

Question
-
Running Report Count all instances of software registered in add remove programs. Run fine in the "old" native SCCM
On Reporting services the report also displays correctly but when drilling down to the linked report "Computers with specific software registered in Add Remove Programs" get the error below
Seems to be for any item in this report - has anyone else seen this ?
- There is an error in XML document (1, 478919).
- '', hexadecimal value 0x02, is an invalid character. Line 1, position 478919.
Ian Burnell, London (UK)
Tuesday, June 19, 2012 9:53 AM
Answers
-
I have seen it where the ASP report don’t convert correctly for whatever reason. Re-converting them seem to solve the problem, a lot of the time. However in a few cases (I have not personally seen this), there are unprintable character in the CM07 data. In these case you need to fix the data first.
Reviewing you error message again I think you are falling into the second issue “hexadecimal value 0x02, is an invalid character” Hex 02 = “Start of Text” character and this is not going to be printable.
You can confirm this by reviewing the data within the APR view using SSMS and see if there are any “funny” characters.
Try this query to see if you get any matches , don’t forget to update the HEX value, in it.
Select distinct CHARINDEX(cast(0x28 as varchar(1)),DisplayName0), DisplayName0 from dbo.v_Add_Remove_Programs Where CHARINDEX(cast(0x28 as varchar(1)),DisplayName0) > 0
http://www.enhansoft.com/
- Marked as answer by Ian Burnell Wednesday, June 20, 2012 12:28 PM
Tuesday, June 19, 2012 1:10 PM
All replies
-
There are two possible solution that I know of for this:
- Re-converting the ASP reports to SSRS – Easy.
- Remove non-printable character from the data http://iso30-sql.blogspot.ca/2010/10/remove-non-printable-unicode-characters.html - Hard.
http://www.enhansoft.com/
- Edited by Garth JonesMVP Tuesday, June 19, 2012 12:39 PM typo.
Tuesday, June 19, 2012 10:35 AM -
Thanks Garth - what do you mean by option 1 ?. I have just copied the "Software - Companies and Products" category via SCCM console into SRSS and chose overwrite but no dice. Wouldn't this be a generic problem since these are the out of the box standard reports?
Ian Burnell, London (UK)
Tuesday, June 19, 2012 12:36 PM -
I have seen it where the ASP report don’t convert correctly for whatever reason. Re-converting them seem to solve the problem, a lot of the time. However in a few cases (I have not personally seen this), there are unprintable character in the CM07 data. In these case you need to fix the data first.
Reviewing you error message again I think you are falling into the second issue “hexadecimal value 0x02, is an invalid character” Hex 02 = “Start of Text” character and this is not going to be printable.
You can confirm this by reviewing the data within the APR view using SSMS and see if there are any “funny” characters.
Try this query to see if you get any matches , don’t forget to update the HEX value, in it.
Select distinct CHARINDEX(cast(0x28 as varchar(1)),DisplayName0), DisplayName0 from dbo.v_Add_Remove_Programs Where CHARINDEX(cast(0x28 as varchar(1)),DisplayName0) > 0
http://www.enhansoft.com/
- Marked as answer by Ian Burnell Wednesday, June 20, 2012 12:28 PM
Tuesday, June 19, 2012 1:10 PM -
Thanks Garth - with the help of the SQL DBA there were indeed spurious characters which were removed. Good to know this
Ian Burnell, London (UK)
Wednesday, June 20, 2012 12:29 PM -
I have this exact problem when a Windows Update that contains invalid characters appears in the table dbo.add_remove_programs_data. I remove those invalid rows using the following SQL Query statement in SQL Management Studio. (insert your invalid character in between the two "%" wildcards) (remember to change "CM_BBB" to match your Config Manager site name)
DELETE FROM [CM_BBB].[dbo].[Add_Remove_Programs_DATA]
WHERE DisplayName00 LIKE '%%'Wednesday, November 14, 2012 9:27 AM -
I have this exact problem when a Windows Update that contains invalid characters appears in the table dbo.add_remove_programs_data. I remove those invalid rows using the following SQL Query statement in SQL Management Studio. (insert your invalid character in between the two "%" wildcards) (remember to change "CM_BBB" to match your Config Manager site name)
DELETE FROM [CM_BBB].[dbo].[Add_Remove_Programs_DATA]
WHERE DisplayName00 LIKE '%%'
Greetings,
Thanks Dorian your solution has solved my problem :-)
Thanks Rahul$
Wednesday, November 14, 2012 11:32 AM -
I have this exact problem when a Windows Update that contains invalid characters appears in the table dbo.add_remove_programs_data. I remove those invalid rows using the following SQL Query statement in SQL Management Studio. (insert your invalid character in between the two "%" wildcards) (remember to change "CM_BBB" to match your Config Manager site name)
DELETE FROM [CM_BBB].[dbo].[Add_Remove_Programs_DATA]
WHERE DisplayName00 LIKE '%%'
This will not actually solve the problem. It is a temp solution as that data will come back to CM07 database when the client preform a full inventory. So.. it is best to solve this issue on the workstations themselves.
BTW, editing the database is completely unsupported.
http://www.enhansoft.com/
Wednesday, November 14, 2012 3:32 PM -
I have this exact problem when a Windows Update that contains invalid characters appears in the table dbo.add_remove_programs_data. I remove those invalid rows using the following SQL Query statement in SQL Management Studio. (insert your invalid character in between the two "%" wildcards) (remember to change "CM_BBB" to match your Config Manager site name)
DELETE FROM [CM_BBB].[dbo].[Add_Remove_Programs_DATA]
WHERE DisplayName00 LIKE '%%'
This will not actually solve the problem. It is a temp solution as that data will come back to CM07 database when the client preform a full inventory. So.. it is best to solve this issue on the workstations themselves.
BTW, editing the database is completely unsupported.
http://www.enhansoft.com/
Greetings,
Is there any technet link or guide to achieve this solution on permanent Level.
Thanks Rahul$
Thursday, November 15, 2012 5:24 AM -
It is a two part solution:
- Fix the MSI that are causing the problem
- Fix the registry on any PC that already has the issue
There are no other work arounds.
http://www.enhansoft.com/
Thursday, November 15, 2012 11:50 AM -
Which MSI have to fixed & how ?
We have 2,000 clients how to identify which PC has issue ?
Thanks Rahul$
Friday, November 16, 2012 5:14 AM -
The MSI/setup will correspond to the Display name that is giving your issues within the reporting. How to fix it I just simply change h display name within the MSI. BTW if it is not a internal company MSI. I would contact the author and tell them they there is a problem with their MSI/setup.
http://www.enhansoft.com/
Friday, November 16, 2012 1:28 PM -
Hello Grath,
I run the following command in sql & find some updates:-
Select distinct CHARINDEX(cast(0x28 as varchar(1)),DisplayName0), DisplayName0 from dbo.v_Add_Remove_Programs Where CHARINDEX(cast(0x28 as varchar(1)),DisplayName0) > 0
Screenshot:-
Mentioned above updates makes problem hows to resolve this.
Please suggest the solution on this.
Thanks Rahul$
Wednesday, November 21, 2012 5:25 AM -
This query is better find problem ARP entries.
select DisplayName0, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN ,DisplayName0) as [Position], substring(DisplayName0,patindex('%[^ !-~]%' COLLATE Latin1_General_BIN,DisplayName0), 1) as [InvalidCharacter], ascii(substring(DisplayName0,patindex('%[^ !-~]%' COLLATE Latin1_General_BIN,DisplayName0), 1)) as [ASCIICode] from v_Add_Remove_Programs where patindex('%[^ !-~]%' COLLATE Latin1_General_BIN, DisplayName0) > 0
The only permanent solution is to edit the registry on all WS that have the invalid characters.
http://www.enhansoft.com/
Wednesday, November 21, 2012 1:13 PM -
hello Garth Jones
thx for all ,yet no solution only workarounds
http://social.technet.microsoft.com/Forums/he-IL/systemhe/thread/8caad673-9a77-4131-ae6f-362b3e13e225?prof=required
I have the same problem with Hebrew so don't feel alone Ian Burnell I provide this 2 link regarding this issue
Wednesday, November 28, 2012 1:03 PM -
Hello
I have the same issue in CM12SP1If I check the database for Gath Jones sql script then get alot of programs to alter (over 1000) so its not an idea to manually fix the registry manally on these clients because it is impossible because it is to many clients involved
-> This issue also break all the other reports on installed software so this issue is high matter to have a solution on it.
https://connect.microsoft.com/ConfigurationManagervnext/feedback/details/719772/total-usage-trend-analysis-for-a-specific-metered-software-program-report-error#tabsAny realistic workaounds or fixes for this issue is appreciated !
// Daniel
- Edited by Daniel_Olsson Wednesday, April 10, 2013 7:29 PM
Wednesday, April 10, 2013 7:27 PM -
Hi Daniel, The only way you are going to get this permanently fix is by contacting CSS. I have been told this is fixed in SP1 but if you are still seeing it then MS needs to know about it.
http://www.enhansoft.com/
Sunday, April 14, 2013 5:19 PM -
Hi Garth
Thanx for your reply in this matter
I have Infomed Microsoft connect site about it and I have also posted this issue on the partnersupport site now.
I Think that they will escalate it to CSS if they cant find a solution for the issue.
// Daniel
Thursday, April 18, 2013 3:11 PM -
I saw the post in the partner forum… Keep in mind that post to the partner forum or connect will NOT mean that you not see a hot fix any time soon. Only connect CSS is the only way to ensure that you will see a Hot fix sooner than later..
BTW you should post the Connect link here so that other can vote it up.
http://www.enhansoft.com/
Saturday, April 20, 2013 4:05 PM -
Hi Garth
I have now opened a Microsoft support case in this matter and are waiting the response.
I'll update this thread when I have a solution or workaround for the issue.// Daniel
- Edited by Daniel_Olsson Saturday, April 20, 2013 5:44 PM
Saturday, April 20, 2013 5:03 PM -
I have easy workaround from MS now :)
access http://%Server%/reportserver instead.. That works :)
// Daniel
Monday, May 6, 2013 1:12 PM -
Ok, so why does that work?
What is that site?
Thursday, March 20, 2014 8:12 PM -
I know it's quite old, but was having the same issue with invalid character 0x06
hexadecimal value 0x06, is an invalid character
apparently the issue was corrected in SP1 forthe v_add_remove_programs table,
but I had to look into v_MeteredProductRule table to find the error, using the query
Select distinct CHARINDEX(cast(0x06 as varchar(1)),productname), productname from v_MeteredProductRule Where CHARINDEX(cast(0x06 as varchar(1)),productname) > 0
in my case the problem came from an automated created rule, named
WTouch User Mode Driver - Wacom_TouchUser.exe - „0LegalCopyright (1033)
(the query actually show special character that are not displayed here),
as soon as I deleted this rule the reports ran fine. (maybe I could just have renamed it)
hope that helps.
- Edited by ersatyle Wednesday, December 23, 2015 4:56 PM add
Wednesday, December 23, 2015 4:55 PM