Hi, Wondering if anyone can help me with this.. I am running a linux server and I need to Query a MSSQL database. I have succesfully connected and Queried the MSSQL Database using freetds http://www.freetds.org/ and sqsh http://www.sqsh.org/ What I need to do is have the sqsh software "dump" the data into a Text file that I can then import into MySql Database. I am able to "pipe" the results of the query into a .txt file, except it's not in the correct format :-( Does anyone have some advice ? Thank you Red.
Is this something that needs to be done repeatedly or just once? Depending on your programming language and if you can connect to the mysql and mssql database from the same script, you could just query the one db, the loop through and insert it into the other db. Skip the write text file, read text file part. You could also look into creating a wddx packet and writing that to a file. What language are you using?
I have actually just managed to get a connection to the MSSQL database using PHP. And that is excatly what I am doing now, I connect to the MSSQL Database, SELECT * FROM TABLE then loop through the results Inserting them into the MYSQL database. Problem now is the MSSQL database is HUGE and I PHP keeps running out of memory. :-(
If there is some sort of id on the field you are selecting from, just do a limit (if you can with mssql) and grab a thousand rows at a time (or a bigger/smaller number).