我目前正在尝试执行该命令
add-sqlsnappin
给我错误信息
SQL Server Provider for Windows PowerShell is not installed.
At C:\deploy\SIF.Sitecore.Commerce.1.1.4\Modules\DeployCommerceDatabase\DeployCommerceDatabase.psm1:215 char:9
+ throw "SQL Server Provider for Windows PowerShell is not inst ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (SQL Server Prov... not installed.:String) [], RuntimeException
+ FullyQualifiedErrorId : SQL Server Provider for Windows PowerShell is not installed.
自
以来不可能是真的if (Get-Module -ListAvailable -Name SqlServer) {
>> Write-Host "Module exists"
>> } else {
>> Write-Host "Module does not exist"
>> }
Module exists
那为什么我不能添加-sqlsnapin?
答案 0 :(得分:0)
sqlserver
模块和SQL Server管理单元不是一回事。因此,现有模块并不意味着按顺序注册了管理单元以供您加载。在MSDN上查看Running SQL Server PowerShell。如果需要SqlServer模块,请尝试以下操作:
Import-Module sqlserver