sql server 2005命令行安装错误已安装ADD_LOCAL属性

时间:2022-10-05 18:34:55

I have a silent installation of SQL Server 2005 that works great when installing SQL Server on a machine that does not have it already installed. I use the following parameters when I perform the installation:

我有一个SQL Server 2005的静默安装,在没有安装SQL Server的计算机上安装SQL Server时效果很好。我执行安装时使用以下参数:

#define SQL_SILENT                    "/passive /qb"
#define SQL_USERNAME                  "username=MyUserName"
#define SQL_COMPANYNAME               "companyname=MyCompanyName"
#define SQL_ADDLOCAL                  "ADDLOCAL=SQL_Engine"
#define SQL_UPGRADE                   ""
#define SQL_DISABLENETWORKPROTOCOLS   "disablenetworkprotocols=0"
#define SQL_INSTANCENAME              "instancename=MYSQLINSTANCE"
#define SQL_SQLAUTOSTART              "SQLAUTOSTART=1"
#define SQL_SECURITYMODE              "SECURITYMODE=SQL"
#define SQL_SAPWD                     "SAPWD=StrongPassword"
#define SQL_SQLACCOUNT                "SQLACCOUNT="""""
#define SQL_SQLPASSWORD               "SQLPASSWORD="""""

It installs the instance of SQL Server Express without a problem. However, when I attempt to install SQL Server on a machine that already has another instance with components I get the following error:

它安装SQL Server Express的实例没有问题。但是,当我尝试在已经有另一个组件实例的计算机上安装SQL Server时,我收到以下错误:

"A component that you have specified in the ADD_LOCAL property is already installed. To upgrade the existing component, refer to the template.ini and set the UPGRADE property to the name of the component."

“已经安装了在ADD_LOCAL属性中指定的组件。要升级现有组件,请参阅template.ini并将UPGRADE属性设置为组件的名称。”

I have also tried using the UPGRADE method as per the error message

我也尝试使用UPGRADE方法根据错误消息

#define SQL_UPGRADE       "UPGRADE=SQL_Engine INSTANCENAME=MYSQLINSTANCE"

but get the following error:

但得到以下错误:

"SQL Server Setup cannot perform the upgrade because the component is not installed on the computer. To proceed, verify the component to be upgraded in currently installed, and that the component to be upgraded is specified in the ADDLOCAL property."

“SQL Server安装程序无法执行升级,因为计算机上未安装该组件。要继续,请在当前安装的位置验证要升级的组件,并在ADDLOCAL属性中指定要升级的组件。”

Does anyone have any suggestions?

有没有人有什么建议?

4 个解决方案

#1


Are you sure the server name / instance name are correct? What do you see in the registry, specifically

您确定服务器名称/实例名称是否正确?具体来说,您在注册表中看到了什么?

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL

and

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Machines

#2


I define the Instance Name in a single place and re-use it to avoid mis-typing it elsewhere.

我在一个地方定义了实例名称并重新使用它以避免在别处错误地键入它。

#3


You manually remove the workstation components from Add/Remove programs and install it

您从“添加/删除程序”中手动删除工作站组件并进行安装

#4


I had a similar issue when I tried to install Management Studio on top of an existing SQL 2005 installation. The cause of this problem for me was that I had the SQL Express tools installed. Since they did not show up under Add/Remomve Programs, I uninstalled them using a Microsoft tool I downloaded called "Windows Install Clean Up". After doing this, I was able to install the SQL 2005 client tools (Management Studio, etc.) by running SqlRun_Tools.msi directly from the CD.

当我尝试在现有SQL 2005安装之上安装Management Studio时,我遇到了类似的问题。这个问题的原因是我安装了SQL Express工具。由于它们没有显示在Add / Remomve程序下,我使用我下载的名为“Windows Install Clean Up”的Microsoft工具卸载了它们。执行此操作后,我可以通过直接从CD运行SqlRun_Tools.msi来安装SQL 2005客户端工具(Management Studio等)。

#1


Are you sure the server name / instance name are correct? What do you see in the registry, specifically

您确定服务器名称/实例名称是否正确?具体来说,您在注册表中看到了什么?

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL

and

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Machines

#2


I define the Instance Name in a single place and re-use it to avoid mis-typing it elsewhere.

我在一个地方定义了实例名称并重新使用它以避免在别处错误地键入它。

#3


You manually remove the workstation components from Add/Remove programs and install it

您从“添加/删除程序”中手动删除工作站组件并进行安装

#4


I had a similar issue when I tried to install Management Studio on top of an existing SQL 2005 installation. The cause of this problem for me was that I had the SQL Express tools installed. Since they did not show up under Add/Remomve Programs, I uninstalled them using a Microsoft tool I downloaded called "Windows Install Clean Up". After doing this, I was able to install the SQL 2005 client tools (Management Studio, etc.) by running SqlRun_Tools.msi directly from the CD.

当我尝试在现有SQL 2005安装之上安装Management Studio时,我遇到了类似的问题。这个问题的原因是我安装了SQL Express工具。由于它们没有显示在Add / Remomve程序下,我使用我下载的名为“Windows Install Clean Up”的Microsoft工具卸载了它们。执行此操作后,我可以通过直接从CD运行SqlRun_Tools.msi来安装SQL 2005客户端工具(Management Studio等)。