Page 1 of 1
MSM-Sql & PHP
Posted: Thu Jun 12, 2003 9:47 am
by Nunners
Has anyone ever got PHP running from Redhat Linux to access MSM-SQL via ODBC?
I'm currently using about three different processes to copy the data from MSM-SQL into MSSQL then transferring into MySQL..... as you can tell, quite a lengthy and labourious process.... anyone any ideas?
Cheers
James
Posted: Thu Jun 12, 2003 9:48 am
by cactus
How much data are we talking about, how many databases/tables ?
Regards,
Posted: Fri Jun 13, 2003 9:23 am
by Nunners
Hi Cactus,
About 30-40 tables, some of which have up to 50 fields.
The current data transfer files total about 4Gb.....
Hence, why I'm trying to find an easy way of doing it!
Your help would be greatly appreciated!
Posted: Fri Jun 13, 2003 9:38 am
by cactus
Is MSM-SQL another name for the old ANSI
MUMPS ? By a company called
Micronetics, primeraly used for Medical systems, currently used by a company called
EMIS.
??
Post a link to some info on the software.
Regards,
Posted: Mon Jun 16, 2003 3:30 am
by Nunners
Hi Cactus,
You have found the only information I can gind on the database (
Micronetics).
It doesn't give any other inforation.
Unfortunately, the database I am accessing - I have no control over; nor can I get any support for it from the providers.
I notice EMIS use ASP - as I mentioned before, I can access it using ASP, and thought about using ASP to copy it into PHP (both via ODBC links); however, the live PHP database is not accessible from outside of the server it runs on (bloody security!)...
Any ideas?
Posted: Mon Jun 16, 2003 5:11 am
by cactus
I used to work for EMIS and I had to write a set of C methods to do what you want, but bypassing MSSQL, I've been digging through my archives and I can't find the damn things!
The only other (but scary) thing I could suggest is the if you could try and dump out your database as standard SQL statements (INSERTs ect) to a flat file. MySQL is happy with most SQL statements and AFAIK MSM-SQL dumps out the same, there would just be alot of them!
Where's my damn C methods!
Regards,
Posted: Mon Jun 16, 2003 5:21 am
by Nunners
Please please please find those methods!!!!!!!

Please!
As for SQL insert statements, I've found that MySQL/PHP can process CSV files quicker than it can process SQL files - not sure why, but when you are dealing with 000's of lines, a quicker process is always better.... I can also write in some error reporting into this as well - which I have done.
So it's stick to the ASP to CSV, then PHP/MySQL - slightly amended from previous workings - again slightly quicker.
I've also found that once I've done the initial data transfer, I only need select records that have been amended - and they've included date fields in each table, for when they were last updated - which is even better.
Now all I've got to do is go through each table, and create it in MySQL (i.e. field types etc....) ZZZZZzzzzzz
Thanks for you help.....
Posted: Mon Jun 16, 2003 5:28 am
by cactus
Hey, so what's your problem
Looks like you've got it cracked!
Froma data point of view, CSV will be quicker, but I suggest that you try and dump out your database definitions as SQL (not data), which mySQL would be happy to run (unless there are some strange column types in your databases).
I'm on msngr at the mo with another guy who used to work there, he's having a look on some old backup CD's for my C methods
Regards,
TO ADD:
This software I recommended to another forum
user:
http://www.ispirer.com/products
There is an eval version, it may help you get your data into mySQL quicker, yeah right! Have a look anyway.
Update:
Grr, my friend can't find the C methods anywhere, I'll have a check on some of my backups when I get home.