How to import a MS SQL server table into mysql? - mysql

I need to export about 300,000 rows from a table on MS SQL server and import into mysql on a different server (non windows).
There is some text stored in some fields and commas in the text will mess up the format if I export into txt format.
I can't install any software on the server.

You may have several options:
use SSIS or DTS Wizard on another host to interconnect MSSQL and MySQL
write your own small app to move the data
script the MSSQL DB's DATA into script file with SSMS' scripting features, adopt the script manually to mysql and run it

I'm pretty sure you can connect to MySQL from SSIS. I'd go down that route.

Related

Importing .bak from MSSQL into MySQL database

My companies site uses a mysql database. One of our clients just trying to take advantage of our API is only able to give us the data in the form of a MSSQL .bak file
I have been trying to import the file using the migration tool built inot mysql workbench but have no luck.
On top of that I am trying to see if this can be done in powershell as I would like to automate this process in the future.
Any suggestions or help would be appreciated
You cannot. MS SQL Server backups are proprietary to MS SQL Server and cannot be used with any other RDBMS. You will need to restore this backup to SQL Server, then use an additional tool to transfer the data from SQL Server into MySQL.
Can you do that second portion through PowerShell? Probably. Though SSIS would probably be a better method.

Create MySQL database from .mdf and .ldf files from SQL Server 2008

I have some .mdf and .ldf files of database size greater than 10 GB with me.
I want to create a MySQL database using the same.
Is there any provision in MySQL to do it?
Please consider that MySQL and SQL Server 2008 can not be installed on the same machine (or even the same network) in my current setup.
I don't have enterprise edition of SQL Server management studio in our network and will not be able to install it.
Is there any other elegant way to export data from SQL Server 2008 and import it in MySQL?
I don't think it is possible without attaching.
If you find a way how to attach it, you can use some specific migrating tools like this.
Some tools allow to create database specific queries from another solution, that need to be only executed on your side.
The MDF and LDF files belong to Microsoft SQL Server and use Microsoft's own binary format, so you cannot connect these files to other database management systems. The only approach I can think of, is to script out the database code and data from the SQL Server database to a text file (.sql file), and import this file into MySQL.

How to migrate large amount of data from MySQL database to SQL Server database with C# service

I have a MySQL database contains large amount of data.
I wanted to write a C# service program to migrate that data into SQL Server database.(Service should work fine with Insert as well as update with out performance issue).
Please help us if there is a way to accomplish this. If there is another way to achieve this is also fine. But, the MySQL client is not present in the local machine. But we could access the database from the server.
You can use the import and export functions in sqlserver, after installing a odbc mysql

Downgrade mdf file from 661 to 655

I created and database in sql server 2008. I took the mdf and ldf files to Visual Studio 2010 project and tried to connect to that db with entity-framework. and got the following message:
I cannot reinstall or upgrade the software on the specific computer.
So is there any way to downgrade the version of the mdf and ldf files?
No, you cannot downgrade, you will need to move the schema and data another way if you can't install the right version. This recent question is essentially the same:
Failure attaching SQL Server 2008 database to SQL Server 2005
Essentially you can use the Generate Scripts tool or the Export Data wizard to get your destination database to look like the source. You will not be able attach your MDF file.
And this blog post shows some 3rd party tools that can help with this:
http://bertrandaaron.wordpress.com/2012/04/20/re-blog-the-cost-of-reinventing-the-wheel/
No, you need to install the same or newer version of SqlServer.
There is no known way to downgrade an MDF file.
Links
http://blog.sqlauthority.com/2008/10/16/sql-server-downgrade-database-to-previous-version/
Perhaps, if you have access to the SqlServer 2008, you could use the command
"Tasks" -> "Create Scripts" to start the wizard to create a script with schema and data.
On the options page there is the button 'Advanced' where you can select the syntax version of SqlServer
The way that I found that worked was to export the database and stored procedures from the original database. Then upload them into the second database(second computer).
Firstly export the DB content (data) - I used SQL server export data wizard. on the database you wish to export from right click then choose tasks, then export data. Follow the instructions and save in whichever format is best for you - I used excel for the data.
then to export the stored procedures rightclick the database name again. choose tasks and this time choose generate scripts. again follow the instructions of the wizard.
To import the data simply go to the second computer and right click the database you wish to import the data into. again tasks > import data. Follow the instructions to import all of the data from the database.
Finally to import the stored procedures, I opened up a new stored procedures command and dragged and dropped the script file that I had previously saved them in and dropped it into this window. The new stored procedure window filled with the entire list of my stored procedures.
Finally change the name of the database name that will be used by the SP ( if this is different from the original DB name). (This is the first line USE [DBName].
then simply execute and the SP's will be fully restored.
This has helped me get my entire database up and running again very quickly.
Hope this helps.
U can open it on another pic and then publish it to sql script with or without data then create database on target PC using sqlcmd or anything. Then run sql script...

filemaker import and export from MySQL

I have database in MySQL V5. I wants to import and export data to MySQL using File Maker pro 11 without creating any file.i.e. I want direct connection between File Maker and MySQL.
Please help me......
I can highly recommend the Open Source Databases ODBC driver from Actual Technologies. It's a Mac OS X ODBC driver that I've used it on multiple occasions to connect FileMaker to a MySQL database. With it you can create a "shadow table" that actually shows data from the MySQL database and import from a FileMaker table to a MySQL table using the standard script steps for import and export. This is the ESS that Sam was speaking of. For the Windows equivalent, see FileMaker's list of ODBC drivers.
We have a JDBC Plugin for that. You can do a SELECT query on your MySQL DB, then loop over the returned rows and read values out. It also supports dumping the SELECT to a txt file, which you can then import.
For importing into MySQL, your best bet is to do INSERT/UPDATE queries.
Also, you might consider using ESS, which is FileMaker's built-in way of talking to MySQL.