如何在没有安装管理工作室的情况下找出安装的版本?我有一台服务器,作为另一个软件的许可证管理器.在调查高RAM使用率警报后,我发现sqlservr.exe进程占用了近2 GB的RAM.
@H_403_2@我查看了程序菜单,发现安装了配置管理器,否则,它是相当简单的.我点击了EXE文件的属性,找到了10.50.1600.1,但是我发现没有地方说明是Express,Dev,STN,ENT等.
@H_403_2@如果我不得不猜测,这是一个快速版本,但我想知道是否有明显的告示标志.
@H_403_2@更新:
@Bob – 该文件告诉我我所知道的,而不是版本. @H_403_2@@valo – 当我运行该命令时,我收到以下错误,并且我确实启用了命名管道:
@Bob – 该文件告诉我我所知道的,而不是版本. @H_403_2@@valo – 当我运行该命令时,我收到以下错误,并且我确实启用了命名管道:
@H_403_2@HResult 0x35,Level 16,State 1@H_403_2@@thomas – 在我问这个问题之前我注意到了股票保持单位名称,但这似乎太容易了,我想我最初的怀疑是正确的.
Named Pipes Provider: Could not open a connection to sql Server [53].
sqlcmd: Error: Microsoft sql Server Native Client 10.0 : A network-related or instance->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 if 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.
解决方法
这可以通过WMI完成(在下面的示例中通过Power
Shell访问).我正在做的就是通过sqlServiceAdvancedProperty类查看sql Server服务的属性(“SKUNAME”).注意,有一些特定于环境的变量需要在代码顶部相应地设置.
$ComputerName = "YourComputerName" $ServiceName = 'YourEngineServiceName' $PropertyName = "SKUNAME" # retrieve the most current version of the ComputerManagement namespace # $ComputerManagementNamespace = (Get-WmiObject -ComputerName $ComputerName -Namespace "root\microsoft\sqlserver" -Class "__NAMESPACE" | Where-Object {$_.Name -like "ComputerManagement*"} | Select-Object Name | Sort-Object Name -Descending | Select-Object -First 1).Name if ($ComputerManagementNamespace -eq $null) { Write-Error "ComputerManagement namespace not found" } else { $ComputerManagementNamespace = "root\microsoft\sqlserver\" + $ComputerManagementNamespace } # get the property and its value # Get-WmiObject -ComputerName $ComputerName -Namespace $ComputerManagementNamespace -Class "sqlServiceAdvancedProperty" | Where-Object { $_.ServiceName -eq $ServiceName -and $_.PropertyName -eq $PropertyName } | Select-Object @{Name = "ComputerName"; Expression = { $ComputerName }},ServiceName,@{Name = "PropertyValue"; Expression = { if ($_.PropertyValueType -eq 0) { $_.PropertyStrValue } else { $_.PropertyNumValue } }}@H_403_2@同样,可以在sql Server配置管理器工具中直接找到相同的信息.打开它后,右键单击sql Server服务并进入“属性”.然后单击“高级”选项卡,查看“库存保持单元名称”键.你会找到你正在使用的版本.