我想删除一个 SQL Server 2008 实例(只是实例,而不是服务器)。我知道如何在 SQL Server 2005 中做到这一点,它的
"C:\Program Files\Microsoft SQL Server\90\SetupBootstrap\setup.exe" /QUIET /qb REMOVE=SQL_Engine,Client_Components INSTANCENAME=<INSTANCENAME>
Run Code Online (Sandbox Code Playgroud)
但我不能在 2008 年做同样的事情。我试过:
"C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\setup.exe" /QS /Action=Uninstall /FEATURES=SQLEngine /INSTANCENAME=SQLEXPRESSAMEX
Run Code Online (Sandbox Code Playgroud)
但它抛出:
错误结果:-2068643838
结果设施代码:1203
结果错误代码:2
使用这个摘要.txt:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068643838
Exit facility code: 1203
Exit error code: 2
Exit message: No feature were uninstalled during the setup execution. The requested features may not be installed. Please review the summary.txt logs for further details.
Start time: 2013-04-17 12:08:18
End time: 2013-04-17 12:08:53
Requested action: Uninstall
Machine Properties:
Machine name: VPC01
Machine processor count: 1
OS version: Windows XP
OS service pack: Service Pack 3
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS Database Engine Services 1033 Express Edition 10.50.1600.1 No
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS SQL Server Replication 1033 Express Edition 10.50.1600.1 No
Sql Server 2008 SQLEXPRESSAMEX MSSQL10.SQLEXPRESSAMEX Database Engine Services 1033 Express Edition 10.1.2531.0 No
Sql Server 2008 SQLEXPRESSAMEX MSSQL10.SQLEXPRESSAMEX SQL Server Replication 1033 Express Edition 10.1.2531.0 No
Sql Server 2008 Management Tools - Basic 1033 Express Edition 10.0.1600.22 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
SPLevel: 0
Installation edition: EVAL
User Input Settings:
ACTION: Uninstall
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130417_120805\ConfigurationFile.ini
ENU: True
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FEATURES:
HELP: False
IACCEPTSQLSERVERLICENSETERMS: False
INDICATEPROGRESS: False
INSTANCEID: <empty>
INSTANCENAME: SQLEXPRESSAMEX
PASSPHRASE: *****
QUIET: False
QUIETSIMPLE: True
UIMODE: Normal
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130417_120805\ConfigurationFile.ini
Detailed results:
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20130417_120805\SystemConfigurationCheck_Report.htm
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException
Message:
No feature were uninstalled during the setup execution. The requested features may not be installed. Please review the summary.txt logs for further details.
Run Code Online (Sandbox Code Playgroud)
我想我只是缺少一个选项或类似的选项,但我不知道是什么:P。
谢谢!
从 Jeremy 的评论中记录答案:
找到了:
"C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\setup.exe" /Action=Uninstall /INSTANCENAME=SQLEXPRESS /FEATURES=SQL,RS /QUIET
Run Code Online (Sandbox Code Playgroud)
参数的顺序很重要。如果你先放 /QUIET 它会破坏它。此外,您不能只使用 SQLEngine 作为要删除的顶级功能。您需要指定 SQL & RS。