SQL Server Backup to MySQL - mysql

I want to back up SQL Server Database and than LATER import it into MySQL. Is there any tool for it?
I would rather have portable SQL file(without SQL Server specific SQL)

For small and medium databases. I've used script from this page.
http://kofler.info/english/mssql2mysql/
http://kofler.info/uploads/mysql/mssql2mysql.txt

Related

Convert My SQL database to MS SQL database

I wanted to know if there is a way to convert a .sql file (My SQL backup) to .bak file (MS SQL backup)?
I am currently using MS SQL Server Management Studio Express 2005
Not really. An almost easy way to accomplish this is below.
Install a MySQL server and restore the .sql into it.
Then in your SQL Server create a linked server to the MySQL server.
You can then select the tables in the MySQL server over to SQL Server with something similar to below.
SELECT *
INTO [TABLENAME]
FROM OPENQUERY([LINKEDSERVERNAME], 'SELECT * FROM MYSQLTABLENAME')
Using INFORMATION_SCHEMA on the MySQL server, dynamic SQL, variables and a cursor you can loop through all the tables without coding for each table.
Don't forget to turn off the temporary MySQL instance. It only needs to be on while you're restoring/extracting from it.
And since *.bak are proprietary you have to create that once you've pulled all the tables into the SQL Server DB. Not sure if you really needed the BK or just the SQL Server Database.
While this may sound painful you're really talking less the 50 lines of code. Also, SQL Server will mostly handle the typing for you.

how to copy table data from sql server 2008 to sql server 2005 db?

does anyone know how to copy data from a sql server 2008 db to an sql server 2005 db? I tried to use the sql server export wizard to no avail:(
Here is a link to a tutorial that will walk you through generating scripts for a table including data. This is good for a once off operation.
Walk through on Scripting table with data
... this is very useful when you have many table that need to be scripted, but watch for the 2GB limit.
Try this:
1.If both the servers are in same network,create the linked server and use
select * into tblename from servername.dbname.dob.tblname
2.Or you can use SSIS to transfer the data
3.Use export wizard of sql server

Is it possible to export a database from SQL Server 2008 and import it into SQL Server 2005?

I need to move a database from SQL Server 2008 to 2005, did the backup format changed or can I import the exported DB in the SQL Server 2005?
The database has tables, views and stored procedures, and it is not using any 2008 specific features.
If it's not possible, would setting the compatibility mode to SQL-Server 2005 (90) help in this case?
Thank you.
Select your database in SSMS, right-click, select Tasks, select Generate Scripts. In the dialog box that pops-up, enable all options, including script data and make sure you select "Script for SQL Server 2005". Execute the generated scripts on your SQL Server 2005 machine. This is workable only for a relatively small database, of course. Else, you'll have to export/import data via bcp.
You won't be able to do this - the backup file contains a version number, and SQL 2005 will refuse to restore the backup. Similarly, you won't be able to detach and reattach the raw data files.
The only option you have, short of upgrading SQL 2005 to 2008, is to export the SQL schema and sprocs using SSMS's ability to generate scripts, and then migrate the data using (for example) BCP or an SSIS package.
There will be third party tools that might be able to help with some of this (for example, a combination of Redgate's SQL Compare and SQL Data Compare). However this is something you will have to research.

Turning MySQL queries into SQL Server queries

I was given the task of building a database and the queries to interact with it.
They did not tell me what kind of database to use, so I chose the one I know: MySQL
Now It seems that the database has to be a SQL Server one and dead line for this task is within hours :(
I have already converted the database from MySQL to SQL Serverusing a program called DBConvert.
But now I have to change all my queries and I have no idea about SQL Server.
Is there any program/web that can do the magic, that can turn MySQL queties into SQL Serverones?
I'm learning about the SQL Serverenvironment so I'm installing the NET Framework and SQL Server 2005 Express, is that correct?
I'm looking for something like phpMyAdmin in SQL Server, is it SQL Server 2005 Express?
Sorry for all of this questioning, but as I said it is a matter of hours.
First of all the SQL Server 2005 Express is the MYSQL server and not like phpMyAdmin. For phpmyAdmin of SQL Server you can use MSSQL query analyzer (if you install MSSQL whole package this will be installed)
And I dont think so there is any program which will convert MYSQL queries to MSSQL queries.

how to import database created in microsoft sql server 2005 to MySql server 5.0

I have created database in microsoft sql server 2005 can i use that particular database in mysql server 5.0 .
There is no common way to perform such kind of migration because of much of differences between these two RDBMS.
The quick suggestion can be: export you MSSQL database into SQL file, open it via favorite text editor, remove MSSQL specific instructions, and load into MySQL using mysql console tool.
This way should be OK for non-complex databases without complex constraints, foreign keys and stored procedures.
Otherwise, you'll need to rewrite these type of database artifacts using MySQL dialect.