Migrating Azure VM to Another (SQL Version Upgrade) - sql-server

I have an Azure VM (windows Server 2016 and SQL Server 2016) running a production web app that serves as both the app and db server for performance and cost reasons. There is some corruption that has caused various issues like windows updates fail, SQL Server auto patching fails, can't open SQL Server Configuration tools, etc. I'd also like to upgrade from SQL Server to a newer version (2019) for some features.
I've read that it is not possible to do an in-place version upgrade, so the recommended path is to spin up a new VM with the latest SQL image and migrate from the old to the new. I know that link is for an Edition upgrade, which it seems they now do support. But I haven't seen this as being possible on version upgrades. As such, I assume migration is still the path?
I have 2 data disks on the current VM to house the data and log files that I can move over to the new VM...but there are a lot of other aspects to consider like public IP, network security group, SSL Certs, IIS config, etc.
I'm an app developer, not a windows admin, and new to Azure as well. Are there any check lists on how to do this as painlessly as possible? My google searches were fruitless (got moving to different regions, migrating from SQL server to Azure SQL, etc). For example, create the new VM, move the data/log disks over to the new VM, restore the DB on the new VM, script out SQL jobs/logins from source to new, point the external IP and NSG to the new VM, manually create IIS websites and reinstall SSL certs....

As far as I know, currently, you still need migration VM for SQL version upgrading as that answer explained.
In fact, you have found the main steps in the migration path. You will backup your important data and logs, backup the DB and the web app, export the SSL certs. Then you will create the SQL virtual machines with a new image SQL server 2019 on the Azure portal. Then you will import the SSL certs and configure IIS websites, restore the DB on the new VM, script out SQL jobs/logins from source to new.
When you create the new Azure VM, you can deploy the new VM in the same region and subnet as the old Azure VM, you can also attach the new Azure VM with the old subnet level NSG. Optionally, a new public IP will be assigned to the new Azure VM, you will use this new Public IP to connect to your web app and DB. After validating the deployment, installation, and configurations. You can remove the old Azure VM, Network interface, old SQL OS and data disks.
For more information:
Migrate a SQL Server database to SQL Server in an Azure VM
Associate network security group to subnet
Move or copy an SSL certificate from a Windows server to another Windows server

Related

Using Power Desktop with an Azure VM and Enterprise Gateway

I am developing a report in PowerBI Desktop based on data hosted in an Azure SQL Server VM.
When publishing a report, I get the below error:
Publishing succeeded, but the published report cannot connect to the
data source because we were unable to find a gateway. Please install
and configure an enterprise gateway
I believe this is because the enterprise gateway is installed locally on my azure VM, however I'm accessing it from my desktop by going over the web and through the firewall. Therefore I believe the issue is that my pc acceses the machine at
mymachine.cloudapp.net
Whilst the enterprise gateway knows the machine as
netbios-name
Is there any way that I can upload a desktop report to powerBI web using this configuration? The other solution would be to get the machine and sql server to identify itself as "mymachine.cloudapp.net" so that I can use this as the name to connect to through the enterprise gateway, but I'm not sure how to do that (adding the alias to SQL Server isn't enough).
It's a bit hacky, but I've got a work around.
Open the server and edit your hosts file and add the following line:
127.0.0.1 mymachine.cloudapp.net
Make sure that mymachine.cloudapp.net has been configured in SQL Server as an alias.
In PowerBI, add a new enterprise gateway data source, this time, use mymachine.cloudapp.net to connect rather than netbios-name. You will need to use SQL Authentication to connect.
Obviously connecting PowerBI to an Azure VM in this way is not ideal, as it could potentially be unencrypted, but this works around the issue of different host names between PowerBI Desktop and Web.

Loading data into a SQL Server database of Microsoft Azure VM through SSIS

I have come to learn that we can push the source data file from our local machine to Azure VM to load the database of VM's SQL Server. I have activated my Azure trial account and have setup SQL Server in a VM. Now, I am really clueless how to load data from my local machine.
How it can be achieved by using SSIS flow? Trying to search over the internet, please share any references.
Thanks
You need to be able to connect from your local machine to the Azure VM. One way of doing this is give your VM a public IP and configure the right firewall rules. An VPN or other tunneling can also work. Your solution also depends on where your SSIS server lives.
I did it by following the steps mentioned in Connect to a SQL Server Virtual Machine on Azure (Resource Manager)

How to connect an Azure PostgreSQL Database created in a VM to my website?

I have a website deployed on Azure. I used PostgreSQL to create my database (with Sequelize as my ORM).
I know that Azure doesn't natively support PostgreSQL (I believe?) so I created a PostgreSQL database on a VM running on Ubuntu, while running on Azure.
However, I have to connect my website's server to the VM database, and I'm not quite sure how to do that, while also establishing the models I created in Sequelize.
You need to forward a port (usually 5432) on that VM firewall.
Then you simply connect to that machine by specifying your VM public IP address, or URL.
It makes sense to have your website and this VM inside same Virtual Network for performance reasons. You can actually do that with Azure Apps (former Websites).

Alias to remote SQL Server in local computer

I have an application that uses SQL Server Express Edition. Unfortunately it can connect only to local instance. The problem is I have a remote instance bought from one of internet providers.
The question is, id there any possibility to make some kind of "local alias" for remote database? Maybe I can install another instance locally and perform some kind of mirror or replication (I can only install Express Edition as I have no funds for any other version)?
I'd like to push this question as I am looking for the exact same thing. I have Microsoft Business Contact Manager installed and it only allows me to connect to local (local network) SQL Express instances... however I do have a SQL 2008 database instance available from an internet hosting service. Is there a tool/solution which would create some kind of a local node so BCM would see it as a local instance but the communcation would happen "in the background" with the remote database?

cross-server access to SQL Server FileTable share

Can you point me to any information about cross-server access to the SQL Server FileTable share? We wanted to use this to manage variable-content for our Web Applications (which are running in a load-balanced configuration). The share works great when local on the SQL Server VM, but when trying to connect to it from a Web Server VM it doesn’t work, no matter what domain account I’m running under (even a domain account with SQL Server SysAdmin).
Note that we have connectivity to SQL Server, just not the FileTable file share. That connectivity is across the private subnet. Our private AD has DNS records only for the private network of the machines within the our private domain.
When running a command prompt on the VM hosting SQL Server and using a domain account that does NOT have any database permissions, we get the expected result (access denied) when trying to access the FileTable share: <image>
When running a command prompt on the VM hosting SQL Server and using a domain account that DOES HAVE database permissions, we also get the expected result (access) when trying to access the FileTable share: <image>
When running a command prompt on one of the Web Server VMs and using a domain account that DOES HAVE database permissions, we get an UNEXPECTED result (device is not ready) when trying to access the FileTable share: <image>
From the web server we can connect to the default share on any of the disks attached to the SQL Server VM: <image>
I’ve searched extensively and looked at many articles which describe setup and using SQL Server FileTables. None of these articles describe the problem I’m seeing.
Left to my own devices, my next step would be to configure FileTables in a non-Azure environment to see if results are similar. But that’s a lot of work that I don’t have time to do. As a work-around, I might use SSIS to mirror the SQL Server FileTable share across another share on the SQL Server VM so that the applications running on the Web servers can get access to the FileTable share indirectly.
Do you have any idea what it is that I might not be thinking of? How can we connect to the SQL Server FileTable share from another machine? Can you point me to any resource that might be able to help resolve this issue?

Resources