How can I move database from azure sql server to virtual machine? - azure

I'm having windows azure. I've two virtual machine setup in azure and both virtual machine has sites. I've database on azure sql server . I just want to move azure sql server database to virtual machine's sql server.
How can I move database from azure sql server to virtual machine?

Follow this link, this will describe step by step process
http://blogs.msdn.com/b/sqlazure/archive/2010/05/17/10014014.aspx

You can also export you Azure SQL Database as BACPACK file, move it to your VM and import BACKPACK into on-prem database. This process is easier and has less than exporting via Data Export.
Here is an article how to export/import BACKPACK files: http://fabriccontroller.net/blog/posts/backup-and-restore-your-sql-azure-database-using-powershell/
Not much of GUI explained there, but the first 2 scereenshots show you how to get to exporting and importing menus.
I recommend to practice on non-production DBs first, before you go ahead with your critical data.

Related

What extra one gets by selecting Azure SQL Managed Instance vis-a-vis Azure SQL DB PaaS

I would like to know what extra benefits one get by choosing Azure SQL Managed Instance compared to Azure SQL DB PaaS. I know SQL Managed Instance is offered as a vCore based purchasing model only. Apart from this what is the extra add on and benefits that one gets over the other. Any reply would be appreciated.
With Azure SQL Managed Instance, you essentially get a full fledged SQL Server that you can control any way you want, just like you would control a locally configured SQL Server. All the power and access and customization you want.
With, Azure SQL DB PaaS, you are essentially getting a database service, so, you give up a lot of control.
For example, take server collation. With the database service, SQL_Latin1_General_CP1_CI_AS , is all you get. With the Managed Instance, its your server. So, go ahead and select whatever collation you want, just like how you would select the collation at the time of creatoin.
Another issue is with auditing, if that is something that is important to your setup. with SQL Managed Instance, auditing happens at server level, because, you are getting the full database server. With the database service, it only database, because, you are only getting a database.
These are just the main details that I found. more details here at this Azure doc - https://learn.microsoft.com/en-us/azure/azure-sql/database/features-comparison
Of course, Managed is going to cost you more because you are paying for the license of the SQL server too.
Lastly, for me, this is the almost (not the exact same thing) like you running your own File Server on a Windows VM on Azure (Managed Instance) versus, just using Blob Storage. In both cases, you are just trying to store some files, but its how much control you have.
I would say think about Azure SQL DB vs Azure SQL Managed Instance (MI) as
Azure SQL DB = Resources dedicated to individual DBs like a container. They are grouped under a Azure SQL Server but that SQL Server is just for grouping.
Azure SQL MI = Almost same as on-prem SQL Server except you don't have to worry about OS, backups, high availability.
Here is a good comparison.
https://learn.microsoft.com/en-us/azure/azure-sql/database/features-comparison
Hopefully this will help
Azure SQL Database - The usual PaaS way. You have vCore, DTU, and Serverless billing mode. And Elastic pool support.
Azure SQL Managed Instance - Similar as below. When you want to use instance-scoped features of Azure SQL Managed Instance like Service Broker, CLR, SQL Server Agent, and Linked servers. As if you have an SQL Server on premise, Azure is responsible for patching, upgrading version etc.
SQL Server on Azure Virtual Machines - Similar as above. But you are responsible for OS and SQL server upgrade.

How to migrate to a non-SQL Server virtual machine

I provisioned an Azure VM with SQL Server pre-installed on Azure, but the decision has been made to re-install SQL Server with a different license. According to Azure documentation that means that I need to "deploy a new virtual machine and migrate the data and applications to the new virtual machine". Can I back up the OS VHD and migrate that to a new Azure VM without losing the applications and other prep work that's already been done and as a result drop the extra costs associated with using a SQL Server VM? How would I go about doing that?
As far as I know, unfortunately not.
You need to backup your data, move it off the VM (say to blob storage using AzCopy), build a new VM choosing the right license/sku from the store, then restore your backup and redeploy your apps.
See a similar question here

SQL Server Agent available on Azure?

I would like to delete records from an database table on Azure when the table reaches a certain size.
I would normally do this by scheduling a stored procedure job using SQL Server Agent.
Is the SQL Server Agent available on databases held on Azure?
Should I use an alternative approach?
If you run SQL Server in a Virtual Machine (or a cluster of Virtual Machines), you'll have all available features at your disposal.
If you are using Azure SQL Database service, there are some differences in terms of features offered. With SQL Database, SQL Server Agent is not available. If use of SQL Server Agent is a necessity, you'll need to run SQL Server in a VM.
The list of limitations is documented here.

Questions on sharing SQL Server on VM and making it accessible to various other VM

Is it possible to create a Azure VM (medium or large) running an instance of SQL Server. This machine would contain various databases (one of each client). These databases would then need to be accessible from different Azure VM's which would be hosting either a single website per vm or multiple website per vm each requiring to access different databases.
If it is possible:
How do the other Azure VMs connect to the relevant VM that's running SQL server and connect to a specific database?
What cost implication are there? We store a lot of data including documents as blobs.
Our software supports both storing the documents as blobs or as actual files. Should we consider storing the files directly onto the hard drive instead of storing them in the database? Would this improve performances when running on Azure VM and/or reduce cost?
What's the recommended solution for backup? I assume that Azure VM can go down, though less likely, just like any other machines. What the recommended solution to restore a back?
Same for SQL Server. What is the recommended solution to backup database. Since we'd be running a full version of SQL on a Azure VM, is the best solution to have a separate storage drive and backup databases on this?
Thanks.
1-)You can create a Virtual Network and after that, create your VM's and set them to use this virtual network. Doing that, your vm's would call the vm with your sql server.
2-) You'll be billed for network, storage and vm compute (including vm size). The best you can do is create a vm and test for a little (with this settings). So you'll know how much your are spending.
3-) When you create a vm, the vhd is stored in a storage account. There's a backup for that, but you can download the vhd and make a version of that on premises.
4-) My suggestion, attach a extra disk to your VM and use it to SQL Server Backup.

How to Backup Windows Azure Server

I have a workgroup server on Windows Azure. I have used Rackspace before and simply image the server to back it up BUT thats not so easy on Azure as imaging the server deletes it!
My Azure server is used to run an application that uses an SQL Database. I backup the DB off site BUT need ensure I have a strategy for downtime of the server. I have looked into roles and instances but am fuzzy on it and getting lost in the many articles. See below what I have so far BUT I don't want the cost of two servers running for one application so **DOES ANYONE KNOW HOW TO ENSURE AVAILABILITY OF AN AZURE SERVER AND BACKUP THE CONTENTS IN THE EVENT OF A CRASH WITHOUT ftping EVERYTHING OFF SITE?
Azure is georedundant BUT you have to set up your server to avail of this feature
Current Azure setup is that we set up Workgroup servers and license them BUT I am fuzzy on where to go from here.
This is where it gets tricky
The number of per-role instances in a Windows Azure application is controlled by the Instances setting in the configuration (cscfg) file.
Windows Azure Service Configuration Schema http://msdn.microsoft.com/en-us/library/windowsazure/ee758710.aspx
How to Configure the Roles for a Windows Azure Application with Visual Studio http://msdn.microsoft.com/en-us/library/windowsazure/hh369931.aspx
Change the Number of Instances
To improve the performance of your application, you can change the number of instances of a role that are running, based on the number of users or the load expected for a particular role. A separate virtual machine is created for each instance of a role when the application runs in Windows Azure. This will affect the billing for the deployment of this application. For more information about billing, see Windows Azure Billing Basics.
• I will continue to research but if any of you know the answer (how can I easily backup my Azure server docs and data without ftping offsite) please feel free to weigh in!
If all you want is to back up the server, then you could use Recovery Services Vaults. This feature allows you to backup any Azure VM. The backup is a snapshot of the entire server.
You can test your contingency plan by restoring the backup to a new VM.
It depends on what you are trying to backup and scale. A proper cloud architecture should not store or persist data on local Azure servers, since that does not scale. You should be persisiting data to azure table storage, blob storage, SQL db and backup the data from there. Then you can use the APIs to backup anything from a central location.
if you are running something like SQL Server or SharePoint then there are some files peristed on the local VMs that you will need to backup. Luckily, those vhd drives are stored on BLOB storage and can be backed up as well in addition to geo redundant backup.

Resources