.bak file from MYSQL to MS SQL SERVER - mysql

I have got a .bak file of mysql database created using Linked server concept, the MYSQL Database has been accessed through SQLServer Instance. I wanted to import that to SQLSERVER 2019 database.
Is it same as a normal restore process or Is there anything I have to be careful about?

Related

Exporting from MySQL and importing into Microsoft SQL

I exported a MySQL DB, both structure and data, using PHPMyAdmin, with the option of exporting it as MSSQL compatible single file: mydb.sql
The resulting file is large (about 2GB).
I have a DB set up on a Microsoft SQL Server.
How do I import the mydb.sql file, into the Microsoft SQL Server? I installed the Microsoft SQL Server Management Studio, and was able to use it to connect to the Microsoft SQL Server, and connect to the DB, but I can't figure out how to use it to import mydb.sql, to create the table and data.
Any ideas?
Choose File->Open from SSMS menu.
Pick your SQL file.
Once the file is loaded be sure that you are in the context of your database.
Click Execute button.

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.

Open Existing DB in MySQL WorkBench

I got a DB files that created in My SQL , and I want open them in My SQL WorkBench 6.1.
The files I got contains : FRM ,MYD , MYI for each table, and another file calls db.opt.
how can I import that to the workbench?
thanks.
so first you restore the database in mysql server like explained in the linked anwser. Then you connect the workbench tool to you mysql server to open your database, note sometimes the word schema is used for "database".
to do so you need to create a database connection in workbench, i am just away from my machine. restoring the database in mysql server needs to be done before you can import / sync / reverse engineer the schema into workbench model.

Restoring huge MySQL dump file to MS SQL Server 2008

I have a 19 GB .sql file which is a dump of a MySQL database.
How could I go about mounting that to MS SQL server? Is it just a matter of loading the 19 GB file into management studio and hitting F5?
I don't have access to the original MySQL databases or the server they were running on.
Thank you.
I would go about it like this.
Restore the MySQL databases to a MySQL server.
Setup a linked server from MS SQL to MySQL
Do a SELECT * INTO destinationtable FROM linkedserver.dbo.sourcetable
The only problem here is that you will need to make sure that index definitions etc are recreated.
Youre MySQL backup file will not run in MSSQL without a LOT of work.

Convert a .bak file to .sql file

I have a asp script that I'm intending to write it with PHP so I have to get its database and use it.
I have the database as .bak file which I understood that it's a backup and I wanna change it to be .sql to import it in phpMyAdmin
I read about this matter in the web but I didn't find an accurate tutorial that goes through the whole process.
They are talking about mssql database but I didn't even reach this step..
Any help will be highly appreciated. Thanks in advance :)
Note, all of this applies to MS SQL because .bak is a usually a MS SQL backup.
A .bak can't be converted to SQL directly -- it contains a backup of a database which does not have a clear relationship to SQL.
You could restore the backup and then use SQL Server tools and then use that to make some SQL to recreate the SQL server objects but not the dat.
From SQL Server Management Studio: Datbases item, right click "Restore
Database" then from datbase right click script database.
This won't script the data.
The other option is to use RedGate's excellent tools, which should do everything you want.
http://www.red-gate.com/products/sql-development/sql-toolbelt/
Most probably the .bak file is indeed a binary backup of a Microsoft SQL Server database (which is something completely different than MySQL).
So you will first need to install Microsoft SQL Server (Express) together with the SQL Server Management studio (I think there is a bundled download "SQL Server Express including Tools".
In the Management Studio you can then import the .bak file into a new database. Once the import is finished you can use it to create SQL script out of the database.