Migrate SQL Server database to SQL Azure - azure

What's the best way to move a normal SQL server database to SQL Azure? Is it right that you can't restore from a backup file? The only way I've found so far is to script the database (and its data) and run those scripts on the SQL Azure database but this is slow when you have lots of data.

Use the SQL Azure Migration Wizard if running SQL 2008: http://sqlazuremw.codeplex.com/
For older versions the best thing I've seen is to either first upgrade to 2008 then port, or (unfortunately) to port the data using scripts as you've suggested. If you have to do so, might I suggest SubSonic for generating your scripts?

Patch SQL Management Studio 2014 with the latest patches
Connect to your onsite sql server
Right click Database > Tasks > Deploy Database to Windows Azure SQL
DONE!
Thank you:
http://blogs.msdn.com/b/brunoterkaly/archive/2013/09/26/migrating-an-on-premises-sql-server-2012-database-to-windows-azure-sql-database.aspx

Use the SQL Azure Migration Wizard if running SQL 2008:
http://sqlazuremw.codeplex.com/
https://code.msdn.microsoft.com/The-best-way-to-migrate-6c4a7326

Be warned, backup your local copy before attempting SQLAzureMW. If the BCP entries aren't just right, it will target your local DB instead of Azure. Just recently had SQLAzureMW v3.3.9 successfully create tables on Azure, but (re)load the data (rows) in the source (local) DB.

Use:
SqlServer DataBase > Task > ExportData > Source > Destination
All Done..

Use Microsoft Data migration assistant tool which can be downloaded from here. https://www.microsoft.com/en-us/download/details.aspx?id=53595
First you have to install it. By using the Azure portal create new SQL database.Now you can deploy your local SQL database into Azure SQL database. If you have some warnings at the end of the migration process please ignore it.

Related

SSRS on Azure SQL Database Why its not supported?

I came across one issue that I cannot create SSRS databases on Azure SQL Database, netiher I can use the migrated databases of report server in the SSRS Config manager, can anyone explain why is this a limitation and something like Managed Instance or Azure SQL VM is needed in this case?
Is there no other way of configuring Azure SQL Database with SSRS?
Azure SQL database didn't explain why SSRS is not supported in Azure SQL database.
I think the reason the that Azure SQL database is PAAS and different between IAAS: Azure MI and SQL server in VMS:
And for now, there is no way to configure SSRS for Azure SQL database. SQL database product team confirmed this. Ref this feedback:
"Thanks for your feedback here. You can do SSRS today in an Azure VM.
I’m closing this as we have no plans in SQL DB to significantly grow
it’s scope to SSRS."
If you still want to SSRS, you need to choose Azure SQL managed instance or SQL Server in VMs.
HTH.
I think that you can pick a Azure Virtual Machine and then get things done by yourself, from scratch.
Or you can create RDLC and run them inside a web application, using Azure Database as data source.

How to import a local SQL database back-up file to an Azure SQL server database?

I have a project that is running on a local SQLExpress server. I have exported my database to a .bacpac file.
I am trying to restore that DB to an Azure SQL server. So what I am trying to do is to create a DB on Azure using this back-up file.
How can I do that?
The easiest way to migrate a database to Azure SQL Database is using Data Migration Assistant (DMA). This tool performs an assessment first to verify the database does not use incompatible statements with Azure SQL Database, and it also migrate the schema and/or the data, as you wish. Download it from here.
I imported it through SSMS by connecting to my Azure SQL server and doing import data-tier application

Run BCP without SQL Client

I had a Access database, since the database limit is 2 GB, I am planning to migrate to Azure Database. I need to upload data with the help of BCP but I was wondering how users will be able to use it since they wont have SSMS installed in their PC. Please help
Use either:
SQL Server Migration Assistant (SSMA) v7.3
or perhaps the new (still in preview):
SQL Operations Studio

Upload SQL Database and its Data to Azure

I created an SQL database using ASP.NET Core 1.1 Migrations.
After I created the database I added some data to the database.
What options do I have to upload this database to Azure?
I need to send the Scheme and the initial data.
Is it possible to run Entity Framework migrations on Azure?
This article describes the possibilities to migrate an existing database to SQL Azure.
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
However, in your scenario, this might be overkill to go through the steps of realy doing a migration.
If your number of tables and data is rather small, why not create a SQL script to create the tables & insert the data?
Connect to your SQL Azure using SQL Server Management Studio and execute the script.
As for the Entity Framework, yes, you can run those on SQL Azure as well.

Support for SQL Server Compact 4.0 on Azure

My website is a .net 4.5 mvc site built with VS 2012. I have a SQL Server Compact DB in my app_data folder. All works great on my localhost. I deploy to Azure website and get this error?
Unable to find the requested .Net Framework Data Provider. It may not be installed.
I've googled it and get lots of possible answers, but none specific to Azure and SQL server compact. So my question is simple. Does a windows Azure Website which is deployed to an Azure shared hosting server support SQL Server Compact? If so, what do I need to do to eliminate the aforementioned error and make it work?
It certainly is possible to use SQL Server Compact on Windows Azure. However, you need to ask yourself:
Will I change anything in database?
This includes adding, updating and removing data. If you do, you should not use SQL Server Compact on Windows Azure. Because, if you use SQL Server Compact on Windows Azure and change anything in the database, you'll run into two problems:
Data is not replicated.
You risk losing data.
Data is not replicated
If you change anything in the database, the changes stays local. This means that if you have multiple instances running your web application, then each web application will have their own database, and if you change something in one of them, the change won't be replicated to other instances, which will result in unpredictable behaviour in your application.
You risk losing data
If you change anything in the database after deployment, you risk losing data, because Windows Azure might decide to redeploy your instance to another virtual or physical machine. When this happens, the new instance will be setup with the deployment package you originally uploaded to Windows Azure, and this package does not contain any changes you make to the database. And this redeployment can happen at any time for several reasons.
Conclusion
So, SQL Compact on Azure? Sure, no problem if your data is read-only. However, note that you won't get the performance you would with SQL Azure. But if your need changes down the road, you can always migrate your application from SQL Server Compact to SQL Azure.
If you want to use SQL Server Compact with Windows Azure, you can use the "private deployment" method, as explained on "ErikEJ"'s blog.
Edit: Microsoft has announced that they now provide 1 free 20 MB SQL Azure Database for every Azure subscription. This means you can create a subscription and create a free website, with a free SQL Azure Database. (As long as it's less than 20 MB) You can also have multiple Web Sites associated with the same SQL Azure Database for free. So, if you're considering SQL Server Compact on Windows Azure because your database will be very small and you don't want to pay for a 100 MB database, you can consider this option. In most cases, it will be a better solution. Your website will perform better, your database performance will be better and you have the ability to change your data and it will be replicated.
It's possible for SQL Server Compact 4.0 on Azure!!
I write an an article for it
And this is the English version I found
By few step:
Below is the solution after my research:
Step by Step like this:
Install two nuget: EntityFrame.SqlServerCompact & Microsoft SQL Server Compact Edition
put your SQL database file(.sdf/.mdf) in APP_Data folder
(Put the connection string like this in order to use it:
<add name ="DefaultConnection" connectionString ="Data Source=|DataDirectory|CompactDB.sdf" providerName ="System.Data.SqlServerCe.4.0" />)
Publish full project include above SQL database file to AzureWebsites.
you can find it can work well and is totally free.
Second Wenchao Zeng of Microsoft the Azure don't support Sql Compact.
I could use once but this is not recommended because the Windows Azure work with replication of the data (this is the cloud, remember?) and the Sql CE does not support this functionality. If you can to put a Sql CE in Azure sometimes will not get access or users see data outdated or broken because the async.
The best way is you to use the Azure Sql ou BLOB storage.

Resources