【问题标题】:Connecting to SQL Azure via Management Studio通过 Management Studio 连接到 SQL Azure
【发布时间】:2013-03-02 23:35:04
【问题描述】:

我有一个 SQL Azure 数据库。我可以通过 Azure 管理门户成功连接到数据库。此外,我可以使用实体框架从我的应用程序成功连接到数据库。不幸的是,我无法通过 SQL Server Management Studio 连接到数据库。

我的想法是 SQL Server Management Studio 无法连接到“主”数据库。因此,它会失败。因此,我尝试通过“连接属性”选项卡上的“连接到数据库”字段添加数据库名称。然而,我得到了同样的错误。错误如下所示:

TITLE: Connect to Server
------------------------------

Cannot connect to tcp:{serverName}.database.windows.net,1433.

------------------------------
ADDITIONAL INFORMATION:

Login failed for user '{username}'.
This session has been assigned a tracing ID of '{id}'.  Provide this tracing ID to customer support when you need assistance. (Microsoft SQL Server, Error: 18456)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

我在这里做错了什么?这个“服务器”上有 2 个我想通过管理工作室访问的 SQL Azure 数据库。如何添加用户以便我可以登录并管理这两个数据库?有没有办法甚至管理 SQL Azure 数据库上的用户?我好像搞不懂。

感谢您的帮助。

【问题讨论】:

    标签: azure-sql-database ssms


    【解决方案1】:

    您使用的是什么版本的 SQL Enterprise Management Studio?您至少需要 SQL Enterprise Management Studio 2008 R2 或更高版本。 (不妨获取最新:http://www.microsoft.com/en-us/download/details.aspx?id=29062

    假设你已经知道了,你会在“连接到服务器”对话框中输入它:

    Server type:  Database Engine
    Server name:  tcp:servername.database.windows.net
    Authentication:  SQL Server
    Login: username@servername
    Password: password
    

    应该这样做——要检查的另一件事是防火墙限制。您会看到不同的错误(“不允许访问客户端 IP 地址”),但无论如何最好验证一下。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-07
      • 1970-01-01
      相关资源
      最近更新 更多