We are in the process of migrating a fairly large Oracle database (approx. 200 tables) to MariaDB. We used CA ERwin to help create the MariaDB schema objects, and are now trying to figure out the best way to migrate the data. For example, if I use SQL Developer's export utility, the resulting Insert statements are created with Oracle syntax, which can differ quite a bit from MariaDB's syntax. Rather than handling every set of Inserts on an individual basis, I'm hoping somebody has been through this before and can suggest an alternative.
We looked at the MySQL Workbench Migration Wizard, but it doesn't directly support migration from Oracle to MariaDB/MySQL (no surprise as Oracle owns MySQL).
Has anybody come across a utility that will make this task easier and save time? Thanks.
Related
Has anyone been successful in creating DDL using Erwin for Amazon Redshift? If not, does anyone know of a way to convert, say a MySQL DDL from Erwin, to an Amazon Redshift compliant DDL?
I understand that Redshift is based on PostgreSQL 8.0.2. However, there are numerous PostgreSQL features that are no compatible with Redshift. So, if I use a tool to convert MySQL DDL to PostgreSQL DDL and try to execute is against Redshift, I always run into issues.
I would appreciate any help.
One approach that works (with limited features) is to forward engineer erwin model into ODBC 3.x compliant schema i.e.
Select Target Database (Actions ---> Target Database) as ODBC/Generic with version as 3.0.
The reason this works is because ODBC/Generic sql can be executed on Redshift without any changes.
NOTE: Features like
Identity
Encode
may need manipulating FET template or more.
However, just selecting target database to ODBC may suffice in general.
Update:
this link suggests that newer DM may have further support for Redshift.
I have one MS SQL DB (very big) and MySQL. I must move data from MS SQL DB to MySQL by doing SQL. It mean that source data & destination data arenot same structure. When source data is updated, the updating is reflected into destionation. Please give me an advice which is the suitable way?
Using SSIS
Using store procedure & write my own script
Other way.
Any advice is highly appreciated.
Cleanest way will be using stored procedures since it is not a complete immigration. By doing this you will have everything under control. MSSQL has a nice feature linked servers, a bit slow but worths it in most of cases. You can find instructions here: http://www.sqlservercentral.com/Forums/Topic340912-146-1.aspx
An example:
UPDATE your_mysql_database.dbo.your_mysql_table SET col1=...
To migrate from MSSQL to MYSQL, Please use MYSQL Migration Toolkit
To download and use the MYSQL Migration Toolkit, Please use the following link http://dev.mysql.com/downloads/gui-tools/5.0.html
The MySQL Workbench Migration Wizard is designed to save DBA and developer time by providing visual, point and click ease of use around all phases of configuring and managing a complex migration process:
Database migrations - enables migrations from Microsoft SQL Server, PostgreSQL, Sybase ASE, Sybase SQL Anywhere, SQLite, and more.
Migration project management - allows migrations to be configured, copied, edited, executed and scheduled.
Source and Target selection - allows users to define specific data sources and to analyze source data in advance of the migration.
Object migration - allows users to select objects to migrate, assign source to target mappings where needed, edit migration scripts and create the target schema.
Data migration - allows users to map source and target data and data types, set up data transfer and assign post data transfer events where needed.
Version Upgrades - using migration users can easily move databases off older MySQL versions to the latest.
I'm importing data from SQL Server to mysql.
Currently I need to migrate a single a table with a simple data structure (no constraints, only values), to mysql. The table is 1.6 milion rows
What is a good way to accomplish this?
(I saw other related topics here, but don't see something that I can work with)
The best approach is to write a program using your favorite language to migrate the data. If you are looking for a tool to accomplish this, have a look at MySQL Migration Toolkit. It migrates data from various data sources to MySQL database.
MySQL Migration Toolkit.
You could use SSIS, it can connect to ODBC data destinations and might be quicker to implement than writing an application from scratch.
How do I convert a Microsoft SQL Server database backup file such that to import in MySQL database? Is there any way or free tool available for this?
Not sure about how complex a database you have, but if its just some tables and data, there is a free script here that will automagically convert Microsoft SQL Server tables and data over to MySQL.
If you need something more sophisticated, then MySQL has a migration toolkit which allows you to migrate from Microsoft SQL Server to MySQL. In addition here is a tutorial on how to use it. Note that this has now been discontinued, in favor of MySQL Workbench, which has data migration built in.
In addition, this converter will convert everything except stored procedures from MSSQL to MySQL, for a price of only $50 which isn't bad.
Also you may want to check out this whitepaper from MySql's website on how to plan a migration from SQL Server to MySQL, as well as some resources.
ms2my (Pre-Alpha, free)
http://sourceforge.net/projects/ms2my/
"A tool that helps with MSSQL to MySQL converting/replicating (both csv&dump) under *nix.Possible to use it with crontab for regular data fetching.Keeping mySQL-based data warehouse refreshed could also be one of the possibilities of using this script."
MSSQL to MySQL Converter (free trial download, for purchase $49)
http://www.convert-in.com/mss2sql.htm
I've looked for quite awhile, and if you don't want to try ms2my, the above is about the only other option. And it isn't free.
Best of luck finding a free one, hopefully there is one that is hidden away out there on the internet that I can't find.
If you are using a living MS SQL Server and a living MySQL server, then I think your best AND MORE ACCURACY option is to use an ETL/data transformation tool like Pentaho Data Integration (Kettle).
With Kettle you can visually design (using easy-to-learn data flow steps) almost any data transformation from single/multiple data source(s) to single/multiple data destination(s). One of the features you may be interested is the database/tables migration wizard.
If the community distribution of Kettle is not enough for you, then you can use the Enterprise Edition with more features, support, etc.
Take a look at Omega Sync it supports export import and synchronisation between different DBMS's including Schema and table data.
Is there a standard or recommended method of exporting the data from an Oracle DB into a SQL Server or mySQL database? Was thinking exporting the Oracle data into XML then importing the XML into SQL Server...or this recommmened?
Thanks,
If you were moving house from the USA to Canada would you go via Japan?
While the differences between Oracle and other SQL rDBMS are even more pronounced that the differences between other SQL rDBMS, the shortest route seems to be from one database to database. I'd go with exporting the schema in SQL DDL to a text file so it can be manually tinkered with, then use a program to move the actual data across - e.g. using odbc links. I reckon the latter could be written in about 100 lines of code assuming that its not available off the shelf.
Alternatively, since you don't seem to have decided on a DBMS yet, you might want to have a look at Enterprise DB (based on PostgreSQL) which comes with tools for migrating from Oracle.
C.
My advice:
always make an export so you can re-import (with IMP) into oracle again. EXP documentation: http://wiki.oracle.com/page/Oracle+export+and+import+
use a tool like Data Architect to migrate the schema (http://www.sqlpower.ca/page/architect). This tool allows you to import the structure of the Oracle DB, and then make a comparison with a target schema. It can then genereate and/or execute a script to reconcile structural changes. Although this will help you define the table DDL and indexes (and unique constraints and primary key constraints) you will most certainly need to manually modify the target model. Choosing the right data type is always something you need to consider - i disrecommend automated data type mapping. Foreign keys can be a challenge too when going to MySQL. For that particular case you need to ensure you are moving the data to InnoDB tables.
use a tool like kettle aka pentaho data integration (http://kettle.pentaho.org/ download here http://sourceforge.net/projects/pentaho/files/) to actually move the data. kettle includes a wizard to copy all table contents. I believe data architect can do migration too, but I prefer using kettle
These EXP/IMP tools are part of oracle. They are in the bin dir of your oracle server install.
The other tools are FOSS - (free software)
Another tool that might help you is Oracle's own SQL developer