Azure SQL Server to .sql dump file - sql-server

I have an Azure SQL Server which I would like to dump out into a .sql file. How can I achieve this most easily, and preferably only using the provided tools? I have tried using the export functionality on the azure portal but that only seems to be for backing up the DB to another part of Azure. I need it to be a .sql dump file such that I can reconstruct this DB in postgres

Are you looking for something different than generating scripts with data?
This post discusses it:
Script all data from SQL Server database

Related

How to import MSSQL database dump from Plesk into local MS SQL server?

I have a plesk account and an MS SQL database from which I got a dump through this interface they provide:
So I downloaded the dump file but it does not come as a .txt file but it comes without any extension and when I try to import it in my local MS SQL Server it fails always.
And when I try to open the dump file with notepad it shows weird characters(see picture below).
What am I doing wrong?
I got it to work by extracting the dump file from the zip and renaming it with a .bak extension. Then did a Database restore in MS SQL Management Studio and selected this backup file (.bak). Hope that helps.
I finally found my way using a php script found on github I had to fork it to update couple things cause it became obsolete.
I had to go this way for couple reasons:
I didn't have admin access to the plesk server to enable remote DB access
I wasn't able to export it into any format readable by mysql
So with the php script i could load it unto the server and run it,
The script copies an MSSQL into MySQL. Here is my fork.

How to create BAK file from azure sql db

I want to move my azure sql db to another host. However my new host allows to import sql db backup-files (.BAK) only;
I found out how to generate .BACPAK files with SQL Server Management Studio but I could not find a way to create a BAK-file from my azure sql db.
Please help.
However my new host allows to import sql db backup-files (.BAK) only;
SQL Azure doesn't provide a native way to generate '.bak' format backup file. If you did need this format file, you could import the BACPAC File to a local SQL Server which supports importing BACPAC File. After that, a new User Database will be created. Then you could generate a '.bak' format file from the local SQL Server.
In addition, you also could try a tool named SqlAzureBakMaker which could make '.bak' file for you easily.

Restore SQL Server database from a script

I have a database stored on SQL Server with my web site at a regular windows hosting solution. I need to migrate to Azure.
The only backup mean I have is to use SQL Server Management Studio and do a Task -> Generate scripts that saves schema and data in a sql file. I did it and I got a 260Mb file.
My question is about importing that to Azure. Can I do it in Mngt Studio too? How?
Thanks
If you have exported it all to scripts, yes, you can run them against your SQL Database. However, before you do that I'd suggest looking at https://azure.microsoft.com/en-us/documentation/articles/sql-database-cloud-migrate/. It might shed some light on other options that will include verifying compatibility. The BacPac method might be better than the scripts.
To answer the specific question of using SSMS with Azure SQL DB, this article https://azure.microsoft.com/en-us/documentation/articles/sql-database-manage-azure-ssms/ shows how to make the connection.

Uploading database to Azure SQL

I need to upload an MDF file to Azure SQL. According to Is it possible to attach a MDF file to an Azure SQL database? the correct way to do this is to import the MDF to SQL Server Management Studio and then right click and export it to Azure SQL.
However all I'm getting is an error claiming that:
I have no idea what this actually means nor why I am unable to upload the database to Azure. Any suggestions?
In order to import a Database to Azure, you will need to create a BACPAC file. Instructions can be found in this MSDN blog post.
And just in case you run into it, this question has some good links for where to get the SQL Server Data Tools required to import a BACPAC from Azure. You probably need to get those installed before being able to export to BACPAC.
Update: Adding this so you can see my export options:
This message means that you will need to create a Windows VM within Azure that has a full install of SQL Server on it.
https://msdn.microsoft.com/en-us/library/azure/jj823132.aspx
Another way is using this tool.
http://sqlazuremw.codeplex.com/
It will generate the script from your local database and execute it on Azure Sql.

Deploying .bak file from SQL Server in Mac

Ok, I know this may sound stupid but, is there any way to deploy a database from a .bak file exported from SQL Server into any kind of Mac software? If there, which one?
If that is not possible, is there a way that I could deploy that database if I first deploy it into SQL Server and export it, maybe in a different way?
Thanks in advance.
The bak file created by SQL Server is a database backup file, and you will only be able to restore it to a Microsoft SQL Server instance.
If you want to port a MSSQL database to some other RDBMS, your best bet is to use a tool for migrating the data directly from the running MSSQL datbbase to another running RDBMS. Perhaps a third party tool, or you could build an SSIS package to do the migration.
You can create a MySQL database and try the MySQL migration tool.
But just given a .bak file, you will not be able simply to read the file; you will need to extract data from a running database instance.

Resources