MSM-Sql & PHP

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

MSM-Sql & PHP

Post 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
User avatar
cactus
Forum Regular
Posts: 343
Joined: Tue Jun 10, 2003 4:16 am
Location: UK

Post by cactus »

How much data are we talking about, how many databases/tables ?

Regards,
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post 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!
User avatar
cactus
Forum Regular
Posts: 343
Joined: Tue Jun 10, 2003 4:16 am
Location: UK

Post 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,
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post 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. :cry:

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?
User avatar
cactus
Forum Regular
Posts: 343
Joined: Tue Jun 10, 2003 4:16 am
Location: UK

Post 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,
Nunners
Forum Commoner
Posts: 89
Joined: Tue Jan 28, 2003 7:52 am
Location: Worcester, UK
Contact:

Post by Nunners »

Please please please find those methods!!!!!!! :D :D :D 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 :D

Thanks for you help.....
User avatar
cactus
Forum Regular
Posts: 343
Joined: Tue Jun 10, 2003 4:16 am
Location: UK

Post 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.
Post Reply