SQLTeam.com | Weblogs | Forums

How to Determine Instance is SQL Server on Azure VM?

I'm told that SQL Server on Azure VM has been installed. But it doesn't look like an Azure instance to me.
Is there a query I can run, or what can I look at to verify the instance is an Azure VM?

Thanks.

What does SELECT @@VERSION return?

If you're on a VM, it should indicate the actual operating system (Windows, Linux) and include "Hypervisor". I assume you don't have access to the Azure Portal?

1 Like

robert_volk Select @@VERSION returns
Microsoft SQL Server 2019 (RTM-CU12) (KB5004524) - 15.0.4153.1 (X64) Jul 19 2021 15:37:34 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Datacenter 10.0 (Build 17763: ) (Hypervisor)
Could this be on Azure, they say it is but.......

It looks like it. It's not Azure SQL DB, and isn't a managed instance.

Do you connect to it from your own computer directly? Or do you use remote sessions into a machine and then connect from there? If you're connecting via IP address (don't post that here BTW) then you can reverse DNS it and get the provider allocation, probably will say Azure or Microsoft.

If it's a long, fully qualified server name, and includes a domain, then "azure" will appear in that domain name somewhere, unless you've configured Azure Active directory and provisioned the VM to use AAD with a custom domain name. Only way to be sure is to ask whoever set it up.