简体   繁体   中英

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.

Now I am trying to connect to it in VS and SQL Server Management Studio, but I get this error

Error : Connect to Server

Cannot connect to MyServerName.database.windows.net.

ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to 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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

The network path was not found

Before connecting to Azure SQL I have taken these steps:

  • Added machine's IP in SQL Azure firewall
  • Opened port 1433 by adding a new outbound rule in firewall on my local machine

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. 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. You can also use the Server Explorer to navigate to the right resource and open in in SQL Server Object Explorer. That will at least eliminate if it's an issue with your stored credentials.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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