locked
Data Migration Error RRS feed

  • Question

  • Dear, All.

    I need Solution for this. 

    when i try to migrate data from oracle to sql server, then i get a warning. 

    "XML parsing: line 1, Character 45 unable to switch the encoding"

    Monday, August 31, 2015 7:38 AM

Answers

  • Hi Dara, With which tool are you doing migration, Seems something is mismatching of the string datatype declared in SQL compared to the XML. I am assuming you have XML with an encoding="utf-16", but your column is a non-Unicode column, please confirm. for resolution, First, you need to cast to NTEXT (or NVARCHAR(MAX)), and then you have to cast that result to XML, before you can use it. It will help to solve your issue.

    Thanks, If my reply is helpful please mark as answer or vote as helpful.

    Monday, August 31, 2015 7:56 AM

All replies

  • Hi Dara, With which tool are you doing migration, Seems something is mismatching of the string datatype declared in SQL compared to the XML. I am assuming you have XML with an encoding="utf-16", but your column is a non-Unicode column, please confirm. for resolution, First, you need to cast to NTEXT (or NVARCHAR(MAX)), and then you have to cast that result to XML, before you can use it. It will help to solve your issue.

    Thanks, If my reply is helpful please mark as answer or vote as helpful.

    Monday, August 31, 2015 7:56 AM
  • It depends in how you migrate the data. You didn't give us any clue. Usually I migrate the data using TSQL, just insert into from, you can do this manually table by table or writing a procedure that read all the table. It's up to you. 

    Please mark as answer if this post helped you

    Monday, August 31, 2015 7:57 AM
  • Are you using SSMS ?

    There is no guarantee that SSMA would migrate each and every query written in oracle to SQl Server, where ever it fails you have to manually do it.


    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My Technet Wiki Article

    MVP

    Monday, August 31, 2015 9:06 AM