Showing posts with label MySql. Show all posts
Showing posts with label MySql. Show all posts

SSIS Convert Data From MySql to SQL (Thai Language and Other )

Oh! My God! If we do some thing in first time, It quite hard for us but after we started walking then running it was easy for us ^_^ do you agree with me? I spent about full day to find the solution to fixed my Thai alien language in database, Every things look perfect in MySql database but after I have transfer all Thai data to SQL server why it SUCK!!! (OOP! sorry I was rude but T_T it because my pressure for a day to searching solution) I am guarantee if you do all step as I suggested you will do not miss beside you do on wrong way ^_^...then go ahead!
My Thai Character before convert data in SQL DB

STEP-1
Set up your region as the language you are Click here for more details 

STEP-2
Be sure that you have to configuration character on ODBC is tis620 (For Thai language and for an other language please choose your) Click here for more details

STEP-3
SQL server are the same character set (For this step let's me skip please ^_^ but I guess it will not too difficult)

STEP-4
Open SSIS for develop to transfer data from MySql to SQL server then click on your job
As the image below I pick up ADO Net Source because my source database is MySql, I have tried choose an other one but that did't work.


STEP-5
Drag and Drop "Data Conversion" on your window job for convert type of data, Then double on box data conversion



STEP-6You will see the popup window for you to pick up the data as your want to convert, Then change the data, almost text from MySql have to convert to Unicode String and be sure in your SQL database have already set data type was "nvachar".


STEP-7
Map data to the new one (Double click on OLE DB Destination, then click on "Mappings") , After you have set convert data to the new one, SSIS will automatic create new field for you immediately like "copy to thainame", please see image below






STEP-8
Now LET'S GO!! run your process then you will see the magic ^_^, now you can read your language
Congratulation with you too!!



Character Setup for Transfer data from MySql to SQL Server

WHY!!!! my language it was an alien after I have transfer data from MySql database to SQL server? Yeah! I know that many developer was upset when it was not as we wished, I have set tis-620 at my MySql database and I also did the same on SQL server but WHY!?. OKEY! please clam down and I have a solution for you, Just do it carefully by step by step then I am guarantee that you will get the answer and I am sure for an other language it will be the same, you just need to change character as your needs.

STEP-1
Go to control panel on the window menus


STEP-2
Find "Region" menu but if you do not see please change your view to small icon

STEP-3
Then you will see the popup window as photo below then click on "Administrative" tab


STEP-4
Click on "Change System Locale...", Exactly the default will be "English" if you installed window and choose the language as English or depend on your choose, You have to selected language as you want (In image I have to selected Thai)


STEP-5
You almost be done! ^_^ just click "Ok, Ok and Ok" then Restart window but my Warning is please save all jobs before you have to restart, I confirmed that your Thai language or any language will be fine after you have transfer data from MySql to SQL Server if you miss that mean you were wrong XOXO ^__^ and please set ODBC to tis620 or character code as you needs too. Click here for setup ODBC Character

STEP-6
For more add-on, If you have to transfer data from MySql to SQL server by SSIS you have to set conversion data, Please see in next stop by click on here