【问题标题】:How do I remove a SQL Server 2008 instance from command prompt w/o removing the server?如何在不删除服务器的情况下从命令提示符删除 SQL Server 2008 实例?
【发布时间】:2015-10-22 10:25:11
【问题描述】:

我想删除一个 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>

但我不能在 2008 年做同样的事情。我试过了:

"C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\setup.exe" /QS /Action=Uninstall /FEATURES=SQLEngine /INSTANCENAME=SQLEXPRESSAMEX

但它会抛出:

错误结果:-2068643838
结果设施代码:1203
结果错误代码:2

带有这个summary.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.

我想我只是缺少一个选项或类似的选项,但我不知道是什么:P。

谢谢!

【问题讨论】:

  • 为什么您认为“服务器”和“实例”在这种情况下不同
  • 您的 eval 版本的安装日期是什么时候?如果它已过期,那么您将面临一段艰难的时期。您可能想查看this。为了清理它,您可能希望彻底清除所有 SQL Server 组件并在没有 eval 的情况下重新安装(因为某些组件(如 Management Studio)也会过期,即使在您删除实例后也是如此)。
  • 当我从添加/删除程序中卸载时,我会提取“数据库引擎服务”和“SQL Server 复制”功能。这样做会留下一堆安装的 SQL 2008 位,我会尽快离开。你是对的,实例和服务器在这里真的是一样的。也许我应该说“命名实例”,但我不确定。
  • 对不起,使用 SQL Express(求大神帮助)。应该没有过期。 :P 这是我正在编写的应用程序的一部分。
  • Summary.txt 另有说明 (Installation edition: EVAL)。

标签: sql-server-2008


【解决方案1】:

记录 Jeremy 的 cmets 的答案:

找到了:

"C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\setup.exe" /Action=Uninstall /INSTANCENAME=SQLEXPRESS /FEATURES=SQL,RS /QUIET

参数的顺序很重要。如果你把 /QUIET 放在第一位,它会破坏它。此外,您不能只使用 SQLEngine 作为顶级功能来删除。您需要指定 SQL 和 RS。

【讨论】:

    猜你喜欢
    • 2016-11-11
    • 1970-01-01
    • 2011-04-17
    • 1970-01-01
    • 1970-01-01
    • 2021-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多