Migration from MS-SQL to MySQL? 18
GuardianKnight asks: "I am working for an organization who is going from WinNT to Linux. They have a fairly large database and I was wondering is there a way or does anyone know how to convert an Microsoft Access database to a MySQL database (other than retyping all the data)? Is there any software that can do this?" How difficult would it be to create a program for all SQL based databases that would create export scripts that you could import into any engine that would recognize INSERT statements? Does something like this exist?
MDAC is a DBMS?? (Score:1)
Dump? (Score:1)
Re:MDAC is a DBMS?? (Score:1)
ODBC - Its Easy (Score:1)
http://www.is erver.com/support/addonhelp/database/mysql/msacce
Then just link in the table, and you can use an Append Query to dump all the data.
--Ed
Re:Why not PostgreSQL? (Score:1)
Postgtres is very nice but limited in some ways. It's improving very fast though. If your main goal is to get rid of NT then you can also consider Oracle or interbase. Interbase will be opened up soon and oracle just dropped their prices (or atleast made them a little more flexable.)
Read O'Reilly MySQL and mSQL book (Score:1)
Sorry (Score:1)
After reading that I realized that I need to be a little more specific. The Tables are made in Access...then exported to a MS-SQL server (that's VERY easy to do)
Thanks for all the help!
Database Conversion (Score:1)
>create a program for all SQL based databases that
>would create export scripts that you could import
>into any engine that would recognize INSERT
>statements? Does something like this exist?
Look into ODBC. I know, it has been tainted by microsoft -- but seriously, it is intended as a standard for communicating with databases. It requires a driver to connect to a database, and then the driver handles all conversions into the native SQL dialect. Code written to access an ODBC driver will work in Sybase/M$ SQL Server, Oracle, MySQL, Informix, Access -- you name it, providing you have a driver to integrate with the database.
As for the Database decision, you may want to take a look at the linux port of Sybase SQL Server ASE 11.0.3 [sybase.com]. I am more comfortable with the TransactSQL than I am with the MySQL dialect (specifically I found setting up users and permissions to be much easier). The downside (as pointed out to me by a friend) is that Sybase does not dynamically allocate space for the database. This means that you will have to manually increase the size of the database as it grows. This can be a major headache, or a minor irritation depending on your knowledge of SQL.
As a side note: Sybase's SQL Server can be linked with an Access database (what's this mean? you can set up a table in Access that references a table in the Sybase database. This is good for data entry / modification -- but you cannot modify the columns or the underlying database from Access). To do this, download the M$ SQL Server 7 driver from the M$ site (M$ SQL Server and Sybase SQL Server were the same until 6, then they both diverged -- but are still almost identical -- so you can use the free M$ driver to connect with the Sybase database). Then, make sure that your Sybase database is running on port 1433 (default for M$ SQL Server). Then open your Access database, select File->Get External Data->Link Tables. From here you aught to be set, follow the directions to connect to an ODBC datasource (if the MySQL database was set up with an ODBC driver you could use this database instead -- I only tried it with Sybase though). I was able to link tables from a Sybase database running at home, to an Access database at work. Fun Stuff!
MDAC4? You mean MSDE (Score:1)
Its fully compatible with MS SQL 7, but only as scalable as Access. Supposed to make it so you can program MS SQL apps on a laptop if you don't want to waste the space for the laptop version of MS SQL(or whatever their lite install is called) Also a good way for workgroup apps that might scale up later to start.
Database data load (Score:1)
Um, MS Access is good for one thing... (Score:2)
As for going from MS SQL Server to MySQL, once you put aside the fact that MySQL simply can't *do* some of the things MS SQL and other larger databases can do, moving the data itself isn't bad either, especially if you have SQL Server 7.0, which I'm told has a migration utility that can take data from any ODBC data source and export it to another.
I guess there are more complex and spartan ways to do this, but it should be noted that there are some things in this world that don't *require* perl and 8 or 9 libraries and packages.
Criteria for a portable database (Score:2)
Problems start to appear when you require transactions, subselects, or heavily utilise stored procedures. These can be compensated for in two ways. Either use Postgres instead, which supports many of these (I'm not 100% on transactions, but it does the others for sure) or get someone who knows MySQL programming well to duplicate the functionality outside the database itself (in accessing scripts etc).
You will however, need an expert to do such a translation if it is a complex structure, you'll probably need an expert even for a port to PostGres. Databases are not easy to work with, large volumes of data often make visualisation difficult, and it can take considerable time to become familiar with structure. Trying to learn the database syntax and capabilities at the same time is asking for trouble, or at least slow progress.
And don't forget the last option: Some times its just too damn hard.
Incorrect Tittle - And why? (Score:2)
MySQL is an excellent database and probably beats MS Access feature for feature. That said it is by no means a powerful database. Its lack of support for nested sub-queries causes many dba's to turn cheek when they see it. What it lacks in features it makes up in speed.
To answer your question directly, asp2php includes database conversion, it will convert your Access to MySQL or other SQLs (see webpage, search freshmeat)
If your database is simple, use MySQL, if you are moving because you would have otherwise moved to MS SQL Server, Oracle, or other larger database, you may want to look at PostgreSQL or even running Oracle or Informix on linux.
Much also depends on how you will access this data, if you will depend heavily on views to abstract the tables to your users, you won't want to use MySQL. If you don't really have a user base it is relatively trivial to work around this in your source. Afterall, last time I heard, slashdot was MySQL driven, all that info and its so darned fast.
Re:Incorrect Tittle - And why? (Score:2)
Re:MDAC is a DBMS?? (Score:2)
My bad. You are correct, it's an API, (or maybe just a layer, I'm not sure). I was a little confused at that time. I thought I had installed MDAC 4 to add functionality that wasn't in the previous version, but I remember now that I installed to be able to add an Access 2000 ODBC source.
The original points still stand though. mySQL is nowhere near even Access because it lacks transactions and subselects. These are two very large problems with it. Another large problem for me is the lack of foreign keys, but that is from a data integrety perspective, not a functional one, so it's not such a big deal for most people. Her e [mysql.org] are the missing mySQL functions. There isn't a real deadline on transactions yet either, although they will be adding in automic multistatements for the next version subnumber.
I want to start playing around with PostgreSQL, since it seems to have all the features I want in a linux dB.
Watch out with SQL logic when moving to mySQL (Score:3)
I realize that Sybase costs money when it is implemented in production, and I mean no disrespect to mySQL, which I consider an unbelievable value. I just want to suggest that the analysis of your existing application needs to be quite thorough before making this move.
I think the O'Reilly mySQL book does a fairly credible job pointing out some of the issues associated with going to mySQL from a traditional, enterprise-class RDBMS. So, check that out, if you don't know what all the issues are.
However, if there is no server side logic at all, or if the logic that does exist executes equally well in Access as it does in MS SQL Server, I think the path is clear to go to mySQL. My advice to anyone that wants to scale up from Access would be to consider mySQL and Sybase ASE on Linux first.
FWIW, I have not used PostgreSQL, so I have no opinion on that. The competing Enterprise-class RDBMSes, Oracle and Informix are quite good, but they are not similar enough from SQL dialect and tools perspective to satisfy someone with an investment in understanding MS SQL / Sybase.
--
Dave Aiello
Why not PostgreSQL? (Score:3)
Not that I have anything against MySQL, but depending on your needs, PostgreSQL [postgresql.org] may be a better choice for an RDMS. It is open source, and has transactions, triggers, a procedural language, and API's for languages like C, C++, perl, and python (and MySQL may have some of these as well). Of course, your mileage may vary.
Exportsql - that litle script... (Score:3)
that's my 2 cents