Selecting data from MySql in MSSQL

Setup Link Server

  • right click to add new linked server. Fill in all the appropriate details accordingly. Follow the database name in mysql to be use as data source over here.
  • Provider string: DRIVER={MySQL ODBC 5.3 ANSI Driver};SERVER=ip address;PORT=port number;DATABASE=mt4_demo;USER=username;PASSWORD=password;Option=3

l2

  • test connection and save it.

l6

 

  • after setup

l4

  • To query the data from the table

select * FROM OPENQUERY(MT4DBDEMONew, ‘SELECT * FROM mt4_trades’)

 

 

 

One thought on “Selecting data from MySql in MSSQL

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s