[英]How To Connect A Azure Sql Server 2012 Database From Localmachine
I want to connect my SQL server management studio which is running locally with a Azure SQL Server 2012 database 我想连接在本地运行的SQL Server Management Studio与Azure SQL Server 2012数据库
Now i have enable the sa account on the SQL server side and i also check the server name by running this query -- 现在,我已经在SQL Server端启用了sa帐户,并且我还通过运行此查询来检查服务器名称-
SELECT @@SERVERNAME
I got the output 我得到了输出
MSRV01\SQLSERVER
Now from my local machine when i am trying to loginto that Azure SQL server like this -- 现在从本地计算机上尝试登录到该Azure SQL服务器时-
It retun this error 重新调解此错误
Do any one have any idea what i am doing wrong here ! 有人知道我在这里做错了吗!
Unless your local machine is on the same domain (or even subnet) as the azure VM then accessing via machine hostname will never work. 除非您的本地计算机与azure VM位于同一域(甚至子网),否则通过计算机主机名进行的访问将永远无法进行。
If you are using an Azure hosted database (ie not a VM) then in your Management Portal , navigate to the database settings panel. 如果使用的是Azure托管数据库(即不是VM),则在管理门户中 ,导航到“数据库设置”面板。 At the top will be listed the
Server name
with a URL like xxxxxxxx.database.windows.net
. 在顶部将列出
Server name
并带有xxxxxxxx.database.windows.net
类的URL。 Use this to connect to your database in SSMS. 使用此连接到SSMS中的数据库。
Further reading: https://azure.microsoft.com/en-gb/documentation/articles/sql-database-connect-query-ssms/ 进一步阅读: https : //azure.microsoft.com/en-gb/documentation/articles/sql-database-connect-query-ssms/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.