Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 运行Enable SqlAlwaysOn时设置SQL HA getting找不到路径错误_Sql Server - Fatal编程技术网

Sql server 运行Enable SqlAlwaysOn时设置SQL HA getting找不到路径错误

Sql server 运行Enable SqlAlwaysOn时设置SQL HA getting找不到路径错误,sql-server,Sql Server,我已经成功运行了一个新集群,现在我正处于需要运行以下命令的阶段,但是出现了这个错误。我尝试了故障排除并在谷歌上进行了研究,但没能解决这个问题。我安装了sqlserver模块,并且get-psDrive显示SQLSERVVER PS C:\Windows\system32> Enable-SqlAlwaysOn -Path "SQLSERVER:\sql\computer\mssqlserver" Enable-SqlAlwaysOn : Cannot find path 'SQLSERVE

我已经成功运行了一个
新集群
,现在我正处于需要运行以下命令的阶段,但是出现了这个错误。我尝试了故障排除并在谷歌上进行了研究,但没能解决这个问题。我安装了
sqlserver
模块,并且
get-psDrive
显示
SQLSERVVER

PS C:\Windows\system32> Enable-SqlAlwaysOn -Path "SQLSERVER:\sql\computer\mssqlserver"
Enable-SqlAlwaysOn : Cannot find path 'SQLSERVER:\sql\computer\mssqlserver' because it does not exist.
At line:1 char:1
+ Enable-SqlAlwaysOn -Path "SQLSERVER:\sql\computer\mssqlserver"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (SQLSERVER:\sql\computer\mssqlserver:String) [Enable-SqlAlwaysOn], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.SqlServer.Management.PowerShell.Hadr.EnableSqlHADRServiceCommand
任何线索都将不胜感激

更新:

PS C:\Users\test> cd SQLSERVER:\Sql\computer
PS SQLSERVER:\Sql\computer> dir

Instance Name
-------------
DEFAULT


PS C:\Users\test> Enable-SqlAlwaysOn -Path "SQLSERVER:\Sql\computer\default"

Enable AlwaysOn
To complete this action, we must restart the SQL Server service for server instance 'computer'. Do you want to continue?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

看起来我可以使用默认名称而不是默认名称mssqlserver name运行Enable SqlAlwaysOn

看起来我可以使用默认名称mssqlserver name运行Enable SqlAlwaysOn,但不能使用默认名称

PS C:\Users\test>cd SQLSERVER:\Sql\computer PS SQLSERVER:\Sql\computer>dir

实例名 违约

PS C:\Users\test>Enable SqlAlwaysOn-Path“SQLSERVER:\Sql\computer\default”

启用AlwaysOn 要完成此操作,必须重新启动服务器实例“计算机”的SQL Server服务。你想继续吗?
[Y] 是[N]否[S]挂起[?]帮助(默认值为“Y”):

正确。它有点不直观,但默认值是正确的实例名,MSSQLSERVER在许多地方都会替换它。看起来你已经把它整理好了