简体   繁体   中英

Exctract database using php from MS SQL Server and import it into MySQL in realtime?

i have 2 servers one is using MS SQL database and it is under Windows OS and the other is using MySQL and it is under Ubuntu Server 14.04. Because the Windows server is active and it is using a software that i dont/cant change it or use other software i am stuck for now with using the MS SQL server for entering the data into the data base, but i need to use the data and expand the this data (data base) using a custom build website (php with mysql). So is there a way i can make a custom php function and extract the MS SQL data base on daily base and import it into the MySQL server? If this can be done i will be very greatful if someone can point me the way.

Alternativly: if someone can show/help me using the MS SQL code to connect and retrieve data from MS SQL server it will be great as well, but i prefer using the MySQL server if it can be done somehow.

Thank you!

I manage to do this by using 2 connections at the same time. One for the ms sql database and the other for mysql data base. I am using SQL Server 2005 for the ms sql data base and phpmyadmin for the mysql data base. i manage to do the connections using the functions:

for mssql:

mssql_connect, mssql_select_db, mssql_fetch_array and mssql_query

and for mysql:

mysqli

hope that helps someone in need! if u have questions let me know!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM