Azure Data Studio - cannot find backup option - azure

I need to backup a database I've got access to, but cannot find the option.
According to https://learn.microsoft.com/en-us/sql/azure-data-studio/tutorial-backup-restore-sql-server?view=sql-server-ver15 I can simply right-click the database, go to Manage, and it should be there.
I can right-click on the database and get a "Manage" option, but that just gives me some info:

The Azure Data Studio database backup functionality is for on-prem or IaaS SQL Server databases. For Azure SQL Database, create a bacpac export instead. This can be done from within ADS by installing the SQL Server Dacpac extension for ADS.

Related

Azure Import Data Tier Application does not have Standard DB option

I created the backup of my live Azure DB using Export option in Azure Portal. I am trying to restore this DB on my staging Azure DB using "Import Data Tier Application". The options listed under Azure DB Editions are Web and Business as shown in screenshot. However I need to create a Standard DB.
Is there a way I can create Standard Azure DB using "Import Data Tier Application"?
This problem was addressed in an updated version of SSMS which you can find in the link below. The SSMS is also in a new stand alone installer now:
https://msdn.microsoft.com/en-us/library/mt238290.aspx
I couldn't find such option in my ssms right now. You can choose web or business and import. after importing, change the service tier from the portal to 'standard'.

VS SSDT project - Compare Azure & on-premises database

Recently we have decided to move our old stuff from SQL Server 2012 to Azure SQL server. I have created a SSDT project using 'Import->Database' option and deployed existing database from SQL Server 2012 to Azure Database.
For some reason we must continue to use existing 'SQL Server 2012' database, so our DBA is changing schema on 'SQL Server 2012' database for new business features. In order to make sure that both the schema ( SQL Server 2012 and Azure SQL Server ) I am planning to use 'Schema compare' option. My source is on-premises 'SQL Server 2012' database and destination is 'Azure SQL Server' database.
After finishing comparison I am getting below error.
"A project which specifies SQL Server 2012 as the target platform cannot be published to SQL Azure."
Is there any way for comparing on-premises database with SQL Azure and push changes to Azure db suing SSDT ?
In the Schema Compare window, click the Options button, go to General, and select "Allow incompatible platforms". This will allow you to compare different platforms such as this. Similarly when publishing you can select this in the Advanced publish options.
I would actually recommend setting the target platform for your database project as Azure rather than SQL 2012, as it enforces a more restrictive set of rules than SQL 2012 does at present. You should be able to deploy anything built with Azure validation to SQL 2012, but the same isn't true the other way around. The same "Allow incompatible platforms" setting will work that way too.

How to create a backup in Windows Azure

I was trying to create a WindowsAzure backup but I have no success because only create tables structure without data. This is the procedure which I was following:
1.Select the database you want to back up in new portal of windows azure https://manage.windowsazure.com
2.In the footer you will have an option to import/export. Click export. This opens a modal popup. Select the storage account you want to use and type in a appropriate name to save the *.bacpac file.
3.Once the file is saved to storage, download it to local, open sql server 2012 management studio. Select the database server. Right click on it and in the context menu you will find Import Data-Tier Application. Select the bacpac file from you local and follow the settings.
How can I create a backup but also saving the data?
CREATE DATABASE XXXXXX AS COPY OF YYYYY
MSDN link has a full article on all the different ways you can do this, the above is only one of them.
LMGTFY: http://msdn.microsoft.com/en-us/library/windowsazure/ff951624.aspx
There are a few approaches apart from the T-SQL scripted approach, two provided by Red Gate are:
SQL Azure Backup Application - A free desktop application, as well as a command line tool, that allows you to transfer a complete backup of an SQL Azure database to your local environment, or another environment thta you have access to.
SQL Azure Backup Hosted - A hosted solution variant, which has a number of features
Microsoft recently did a pretty comprehensive blog covering all the ways to backup a SQL Azure database.
http://blogs.msdn.com/b/windows_azure_technical_support_wats_team/archive/2013/03/04/different-ways-to-backup-your-windows-azure-sql-database.aspx
Just so you know - I develop option number 7 :)

How to add SQL DB tables to Azure?

I have signed up for Azure, created a SQL Server item, but cannot see how to, from there, create a DB (create and design the tables, IOW the DDL part of things). Is this something I need to do with the SQL Design Tools, and then export this from Visual Studio / import into the Azure account? Or how is it done?
If you don't want to use the SSMS as other have suggested you can use the silverlight management tool online to execute TSQL Commands; the upside of this is that you have designer support which SSMS lacks.
Once you have selected your DB in the Azure portal click the manage button:
From there a new window will open where you will have to log into the SQL Server.
Once you have logged into your SQL Server you will have the option to create new tables, create procedures etc.
One handy hint, if you go into your SQL Azure details screen you will notice a section to retrieve connection string snippets that may come in handy hooking up your back-end to your application:
You can install SQL Server Management Studio to connect with your SQL Azure database, and from there you can create tables in the designer, or by entering SQL queries.
Keep in mind that you have to whitelist your IP address in order to access the database. Azure uses whitelisting, meaning that only authorized IP addresses can connect to the database.
You can connect to your database in Azure through Visual Studio and/or SQL Server Management Studio (SSMS).
Check this link for details.
SQL Azure Management

How to restore my Local database to Windows Azure Database?

I have uploaded my application to Windows Azure Now I want to store My Local database to Windows Azure Database.
Please Suggest me how do I create table and backup the table there?
There are couple of ways to do that:
The most reliable (that I usually use) is using the SQL Azure Migration Wizard
Then you have the "Generate Scripts" option in your SSMS (SQL Server Management Studio 2008 R2 or later). The generate Scripts option does have a feature to make SQL Azure compliant script. It can also script data. But I suggest using method one if you want to migrate data, too. SQL Azure Migration Wizard uses BCP tool, which dumps the data into binary files, while SSMS just generates inline INSERT Statements
SSIS (SQL Server Integration Services) - you can create a Data Transfer task, but I would use it very rare for small DBs.
Export/Import data tier application (using DACPAC package) - this will migrate your schema and can migrate your data as well.
UPDATE 2017-10-24
Azure SQL Database now supports transactional replication from your on-premises SQL Server. You can configure your Azure SQL Database as subscriber and your SQL Server on-premise as publisher. You can read more about database migration options and strategies here: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
Update 2017-12-23
SQL Azure Migration Wizard has been replaced by Data Migration Assistant: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
If you already have a database on local machine then you can migrate it directly on Azure using SQL Management Studio. Follow these steps:
Right click on the database name in SSMS
Follow the wizard that appears then
There are a few ways in which to achieve this functionality.
SQL Azure Import/Export. "DACPAC" & "BACPAC"
Microsoft Codename "Data Transfer"
SQL Azure Data Sync Windows Azure SQL Data Sync
Migrating Databases using Import/Export Wizard in SSMS
SQL Azure Migration Wizard (As Mentioned in other Answers)
I'm assuming you're referring to SQL Azure? If so, you'll probably want to use the SQL Azure Migration Wizard # http://sqlazuremw.codeplex.com/
SQL Server 2012 Management Studio and SQL Azure Tools also now has this option I believe.
In SSMS if you right click on the Databases root, there is an option "Import Data-tier Application...", which allows you to restore a BACPAC (you can also right click on a database, and select "Export Data-tier Application..." to export an existing database to a BACPAC).
SQL Server Data Tools enables Visual Studio 2010 with a Data Compare option, which can also be used to move data between two database instances (which would be suited to smaller data patches).

Resources