gpt4 book ai didi

sql-server - 无法打开与 sql server 的连接

转载 作者:行者123 更新时间:2023-12-03 03:09:51 26 4
gpt4 key购买 nike

我正在命令行中运行它:

sqlcmd -s .\SQLexpress

我得到的输出是:

HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2]. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in stance-specific error has occurred while establishing a connection to SQL Server . Server is not found or not accessible. Check if instance name is correct and i f SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.. Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

当我运行这个时:

c:\Program Files (x86)\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn\sqlservr.exe" -sSQLEXPRESS

我得到:服务器错误 17058 严重性 16,状态 1,无法打开错误日志文件

但是这有效:

osql -S .\SQLExpress -E

最佳答案

转到“开始”->“运行”,键入“C:\Windows\System32\mmc.exe/32 "C:\Windows\system32\SQLServerManager.msc”,然后转到“SQL Native Client 配置”、“客户端协议(protocol)”并检查共享内存、tcp/ip 和命名管道已启用。

关于sql-server - 无法打开与 sql server 的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2357109/

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