简体   繁体   English

在Visual Studio或SQL Server Management Studio中连接到Azure SQL数据库的哪些必要步骤?

[英]Which are necessary steps to connect to an Azure SQL database in Visual Studio or SQL Server Management Studio?

I am using Visual Studio 2013 with update 5. I created a SQL database on Azure. 我将Visual Studio 2013与更新5配合使用。我在Azure上创建了一个SQL数据库。

Now I am trying to connect to it in VS and SQL Server Management Studio, but I get this error 现在,我正在尝试在VS和SQL Server Management Studio中连接到它,但出现此错误

Error : Connect to Server 错误:连接到服务器

Cannot connect to MyServerName.database.windows.net. 无法连接到MyServerName.database.windows.net。

ADDITIONAL INFORMATION: 附加信息:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. 建立与SQL Server的连接时发生与网络相关或特定于实例的错误。 The server was not found or was not accessible. 服务器未找到或无法访问。 Verify that the instance name is correct and that SQL Server is configured to allow remote connections. 验证实例名称正确,并且已将SQL Server配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53) (提供者:命名管道提供程序,错误:40-无法打开与SQL Server的连接)(Microsoft SQL Server,错误:53)

The network path was not found 找不到网络路径

Before connecting to Azure SQL I have taken these steps: 在连接到Azure SQL之前,我已经执行了以下步骤:

  • Added machine's IP in SQL Azure firewall 在SQL Azure防火墙中添加了计算机的IP
  • Opened port 1433 by adding a new outbound rule in firewall on my local machine 通过在本地计算机上的防火墙中添加新的出站规则来打开端口1433

I want know which step I missing in whole process. 我想知道我在整个过程中缺少哪一步。

Well. 好。 This is hapenning because tha address you're using isn't ok to access. 这很麻烦,因为您无法使用该地址访问。 Try to connect through the IP, and make sure you're using the PUBLIC IP/DNS. 尝试通过IP进行连接,并确保您正在使用PUBLIC IP / DNS。 Try to open the firewall on both sides. 尝试在两侧打开防火墙。 That's all that I could help you with the information error reported for you. 这就是我为您报告的信息错误所能提供的全部帮助。 The conection string that you're using is not ok or not accessible. 您使用的连接字符串不正确或无法访问。

VS2013 and above has a decent cloud explorer screen, I'd recommend navigating to the resource through that first. VS2013及更高版本具有不错的云资源管理器屏幕,我建议您首先通过导航到该资源。 You can also use the Server Explorer to navigate to the right resource and open in in SQL Server Object Explorer. 您还可以使用服务器资源管理器导航到正确的资源并在SQL Server对象资源管理器中打开。 That will at least eliminate if it's an issue with your stored credentials. 如果存储的凭证有问题,至少可以消除这种情况。

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

相关问题 如何在SQL Server Management Studio中使用Visual Studio创建连接数据库? - How connect database created in SQL Server Management Studio with Visual Studio? 部署在本地SQL Server Management Studio中的Azure数据库的数据库备份 - Database backup of azure database deployed in local sql server management studio 为什么我的visual studio 2015 SQL Server无法与Azure SQL数据库连接? - Why my visual studio 2015 SQL Server doesn't connect with Azure SQL Database? SQL Server Management Studio无法连接 - SQL Server Management Studio can not connect 无法将Visual Studio连接到SQL Server数据库 - Can't connect Visual Studio to SQL Server database 使用C#连接到SQL Server 2012数据库(Visual Studio 2012) - Connect to SQL Server 2012 Database with C# (Visual Studio 2012) 在SQL Server Management Studio中找不到数据库 - Unable to find database in SQL Server Management Studio 在Visual Studio中更改SQL Server数据库的最大大小以在Azure中上载 - Changing SQL Server database maximum size in Visual Studio for uploading in Azure 通过SQL Server Management Studio 2008连接数据库,但不通过Visual Studio 2012连接数据库 - connecting database through sql server management studio 2008 but not through visual studio 2012 Visual Studio 未从 Microsoft SQL Server Management Studio 加载数据 - Visual studio not loading data from Microsoft SQL Server Management Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM