在 Visual Studio 中找不到 Azure SQL 数据库

问题描述 投票:0回答:1

enter image description here

我已在 Azure 上创建了一个 SQL 数据库。当我在 Visual Studios 中发布数据库时,我收到消息“没有可显示的连接”

azure 上的数据库表示其在线且可用。我已经能够将我的网络应用程序发布到 azure,但这未被识别。

sql azure visual-studio azure-sql-database
1个回答
0
投票

按照以下方法在 Visual Studio 中发布 Azure SQL 数据库:

  • 在解决方案资源管理器中右键单击数据库项目,然后单击

    Import
    并选择
    Database
    ,如下所示: enter image description here enter image description here

  • 单击

    Select Connection
    并向我提供连接数据库所需的详细信息: enter image description here enter image description here

  • 点击

    Start
    即可成功连接数据库。 enter image description here

以下是连接 Azure SQL 数据库的另一种方法:

  • 在 Visual Studio 中单击

    View
    ,然后选择
    Server Explorer
    enter image description here

  • 单击服务器资源管理器下的

    Connect to Database
    并填写所需的详细信息以测试连接。 enter image description here

  • 它成功连接到Azure SQL数据库,如下面的输出所示 enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.