gpt4 book ai didi

sql-server-2008 - Azure 模拟器和 SQLLOCALDB 的问题

转载 作者:行者123 更新时间:2023-12-04 07:20:29 27 4
gpt4 key购买 nike

当尝试启动 Azure 存储模拟器时,出现以下错误。

Caught exception while probing for SQL endpoint. A network-related orinstance-specific error occurred while establishing a connection toSQL Server. The server was not found or was not accessible. Verifythat the instance name is correct and that SQL Server is configured toallow remote connections. (provider: SQL Network Interfaces, error: 26

  • Error Locating Server/Instance Specified) Number of Sql Errors Reported: 1 Sql Error: System.Data.SqlClient.SqlError: Anetwork-related or instance-specific error occurred while establishinga connection to SQL Server. The server was not found or was notaccessible. Verify that the instance name is correct and that SQLServer is configured to allow remote connections. (provider: SQLNetwork Interfaces, error: 26 - Error Locating Server/InstanceSpecified)

所有组件均已正确安装。请帮忙谢谢

最佳答案

我设法通过删除并创建我的 LocalDb 实例来修复它。就我而言,发生这种情况是因为我安装了 Azure SDK 2.2 而不是 2.1 版。

修复它的步骤:

  • 运行 sqllocaldb i 以获取您的实例名称:
     C:\Users\myUser>sqllocaldb i     v11.0
  • 停止 LocalDB 实例:
    C:\Users\myUser>sqllocaldb p v11.0    LocalDB instance "v11.0" stopped.
  • 删除您的 LocalDB 实例:
    C:\Users\myUser>sqllocaldb d v11.0    LocalDB instance "v11.0" deleted.
  • 创建具有相同名称的 LocalDB 实例:
    C:\Users\myUser>sqllocaldb c v11.0    LocalDB instance "v11.0" created with version 11.0.
  • 删除数据库文件以允许模拟器重新创建数据库文件
   C:\Users\myUser\DevelopmentStorageDb22.mdf   C:\Users\myUser\DevelopmentStorageDb22_log.ldf

这应该可以解决您的问题。

关于sql-server-2008 - Azure 模拟器和 SQLLOCALDB 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12103410/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com