Sunday, March 23, 2008

Copy data from mysql data files to sql server 2005

Download “mysql-connector-odbc

Then open ODBC data source administrator in Administrative Tools.

Select user DNS tab and Add button.

Then select mysql odbc driver and finish.

Then,

DNS as export

Server as localhost if it’s same machine

User as user name of mysql server and password of it.

Then you can select the appropriate database from the drop down.

You will successfully create connection with mysql database.

Then open sql server 2005 and create new database.

Right click on that select tasks and then select import data.

Click next then select data source as .Net framework data provider for odbc

Type Dsn as export and driver as myodbc

Click next and select destination database(default it will select no need to do any changes simply click next)

Again next and write sql query to get data. (table by table)

Like “select * from grades

Then next, next and next and finished.

You will see that particular table will copy to sql server database..

No comments: