Link to home
Start Free TrialLog in
Avatar of Jose Bredariol
Jose BredariolFlag for Brazil

asked on

PH copy tables from MSSQL to MYSQL

Hi, I need php code to copy a table from MS SQL to MYSQL.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

How are you currently accessing the MS SQL server?
Avatar of Jose Bredariol

ASKER

I´m not accessing it yet. MSSQL is on my windows server (2008R2) and there we use asp and .net. Now I want some tables on my new server linux debian with php. I´m accessing MYSQL using :

 mysql_connect($hostname, $username, $password) or die(mysql_error());
 mysql_select_db("DATABASENAME") or die(mysql_error());
You should write a program that runs on the Windows Server to fetch the data you need and send it to your Linux server.  To get the data from a PHP program on your Linux server can be difficult.  You would first have to make sure that TCP/IP and remote connections are enabled on your MS SQL server.  Then you would have to struggle thru setting up FreeTDS on Linux.  And even then you may find that FreeTDS does not support all of the data types that are available in SQL Server 2008 and newer.
Yes,  TCP/IP and remote connections are enabled on your MS SQL server. I can´t do that on Linux using PHP ? Are you sure ?
SOLUTION
Avatar of Ahmed Merghani
Ahmed Merghani
Flag of Sudan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks all