简体   繁体   English

Azure VM上的SQL Server:我的应用程序如何连接?

[英]SQL Server on Azure VM: How can my application connect?

I have an application written in VB, which used to connect with a Microsoft SQL Server, which is placed on a VM in the domain, using Windows Authentication(Local Domain). 我有一个用VB编写的应用程序,用于使用Windows身份验证(本地域)与Microsoft SQL Server连接,该应用程序位于域中的VM上。

But, I have moved my DB to a SQL Server which is placed on an Azure VM. 但是,我已将数据库移到放置在Azure VM上的SQL Server。

My problem is that i don't know how i can use Windows Authentication(or somehow to "ask" the Active Directory about the user who tries to connect). 我的问题是我不知道如何使用Windows身份验证(或以某种方式向尝试连接的用户“询问” Active Directory)。

I have seen the modes of SQL Server: 我已经看到了SQL Server的模式:

  • Active Directory - Password Active Directory-密码
  • Active Directory - Integrated Active Directory-集成

but i can't understand how i can use them. 但我不明白如何使用它们。 Should i have to do trust relation between 2 domain(Local, Azure)? 我是否必须在2个域(本地,Azure)之间建立信任关系?

Can someone help? 有人可以帮忙吗?

I have moved my DB to a SQL Server which is placed on an Azure VM. 我已将数据库移到放置在Azure VM上的SQL Server。

SQL on an Azure VM is the same product you might run on-premises, and supports SQL Auth and Windows Integrated Auth. Azure VM上的SQL与您可能在本地运行的产品相同,并且支持SQL身份验证和Windows集成身份验证。 The Azure Active Directory authentication methods supported by Azure SQL Database and Azure SQL Data Warehouse are not applicable to SQL Server running in an Azure VM. Azure SQL数据库和Azure SQL数据仓库支持的Azure Active Directory身份验证方法不适用于在Azure VM中运行的SQL Server。 See: 看到:

Azure Active Directory authentication is a mechanism of connecting to Azure SQL Database and SQL Data Warehouse by using identities in Azure Active Directory (Azure AD). Azure Active Directory身份验证是一种通过使用Azure Active Directory(Azure AD)中的身份连接到Azure SQL数据库和SQL数据仓库的机制。

See Use Azure Active Directory Authentication for authentication with SQL Database, Managed Instance, or SQL Data Warehouse 请参阅将Azure Active Directory身份验证用于SQL数据库,托管实例或SQL数据仓库的身份验证

For SQL Server running in an Azure VM you use either SQL Authentication or Windows Authenticationl, as outlined here Authentication in SQL Server 对于在Azure VM中运行的SQL Server,您可以使用SQL身份验证或Windows身份验证1,如此处所述SQL Server中的身份验证

You can use Windows Auth in your VM with either local accounts (created on the VM), or you can deploy a Domain Controller on a separate VM into your VMs VNET and use identities from the Domain. 您可以通过本地帐户(在VM上创建)在VM中使用Windows Auth,也可以将单独VM上的域控制器部署到VM VNET中并使用域中的身份。 The Domain Controller you deploy into your Azure VNET can be an isolated Domain, or it can be a replica for your on-premises domain. 部署到Azure VNET中的域控制器可以是隔离的域,也可以是内部部署域的副本。 If you want to deploy a replica of your on-premises domain into an Azure VNET you also will need to use a site-to-site VPN or ExpressRoute, as explained here Guidelines for Deploying Windows Server Active Directory on Azure Virtual Machines 如果要将本地域的副本部署到Azure VNET中,则还需要使用站点到站点VPN或ExpressRoute,如此处所述,在Azure虚拟机上部署Windows Server Active Directory的指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM