问题描述
==========
SQL server 2005升级SP4报错
故障排查
==========
1.根据安装日志,我进行了相关的故障排查,在summary.txt中存在以下错误信息:
----------------------------------------------------------------------------------
Product : Database Services (MSSQLSERVER)
Product Version (Previous): 3042
Product Version (Final) :
Status : Failure
Log File : C:/Program Files/Microsoft SQL Server/90/Setup Bootstrap/LOG/Hotfix/SQL9_Hotfix_KB2463332_sqlrun_sql.msp.log
Error Number : 1642
Error Description : Unable to install Windows Installer MSP file
在SQL9_Hotfix_KB2463332_sqlrun_sql.msp.log存在以下错误信息:
MSI (s) (F4:F8) [17:46:25:877]: SOFTWARE RESTRICTION POLICY: f:/cd3702384366d0afb0be21e613a8/HotFixSQL/Files/sqlrun_sql.msp is not digitally signed
MSI (s) (F4:F8) [17:46:25:877]: SOFTWARE RESTRICTION POLICY: f:/cd3702384366d0afb0be21e613a8/HotFixSQL/Files/sqlrun_sql.msp is permitted to run at the 'unrestricted' authorization level.
MSI (s) (F4:F8) [17:46:25:877]: SequencePatches starts. Product code: {79F1B65E-8FC0-4D03-954D-F9E71C85AEC7}, Product version: 9.2.3042.00, Upgrade code: {12EEFC9F-91FB-490B-B00B-7164C31C1650}, Product language 1033
MSI (s) (F4:F8) [17:46:25:877]: PATCH SEQUENCER WARNING: f:/cd3702384366d0afb0be21e613a8/HotFixSQL/Files/sqlrun_sql.msp patch will not be sequenced because it does not contain any transform that may apply to product!
MSI (s) (F4:F8) [17:46:25:877]: SequencePatches returns success.
MSI (s) (F4:F8) [17:46:25:877]: Final Patch Application Order:
MSI (s) (F4:F8) [17:46:25:877]: Other Patches:
MSI (s) (F4:F8) [17:46:25:877]: Unknown/Absent: {E98B7CF3-C498-4819-A310-4D102DF8E778} - f:/cd3702384366d0afb0be21e613a8/HotFixSQL/Files/sqlrun_sql.msp
MSI (s) (F4:F8) [17:46:25:877]: Product: Microsoft SQL Server 2005 (64-bit) - Update '{E98B7CF3-C498-4819-A310-4D102DF8E778}' could not be installed. Error code 1642. Additional information is available in the log file C:/Program Files/Microsoft SQL Server/90/Setup Bootstrap/LOG/Hotfix/SQL9_Hotfix_KB2463332_sqlrun_sql.msp.log.
MSI (s) (F4:F8) [17:46:25:877]: Note: 1: 1708
MSI (s) (F4:F8) [17:46:25:877]: Note: 1: 2729
MSI (s) (F4:F8) [17:46:25:877]: Note: 1: 2729
MSI (s) (F4:F8) [17:46:25:877]: Product: Microsoft SQL Server 2005 (64-bit) -- Installation failed.
MSI (s) (F4:F8) [17:46:25:893]: Attempting to delete file C:/WINDOWS/Installer/d05197.msp
MSI (s) (F4:F8) [17:46:25:893]: MainEngineThread is returning 1642
The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer an
d that you have the correct upgrade patch.
C:/WINDOWS/Installer/38685e.msi
MSI (c) (E0:04) [17:46:25:893]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (E0:04) [17:46:25:893]: MainEngineThread is returning 1642
2.查找对应的注册表信息:
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Installer/UserData/S-1-5-18/Products/E56B1F970CF830D459D49F7EC158EA7C/Patches]
"AllPatches"=""
经检查,发现注册表中存放SQL Server的patch的信息为空,可能是由于在SQL Server 2005安装后,直接就是SP2的版本。
根据我们之前的case,确实有些微软的partner会推出将SQL Server 2005和补丁包绑定的安装源,点击安装之后会直接到SQL Server 2005的高版本,但是我们有官方文档明确表明我们是不支持这种情况的,并且在这样的版本上是无法安装后续的SQL 2005 补丁的,详情请见下面的连接:
Slipstream of Service Packs on SQL Server 2005
http://blogs.technet.com/b/beatrice/archive/2007/03/19/slipstream-of-service-packs-on-sql-server-2005.aspx
解决办法
==========
我们建议,请您重新安装SQL Server 2005的RTM (9.00.1399) 实例然后升级到SP4版本。
您可以根据以下办法,来查看其他服务器安装的SQL Server是否也是这种整合版本:
检查办法
========
1.找到安装日志中的log,并找到当前安装的SQL Server的product ID
如:在SQL9_Hotfix_KB2463332_sqlrun_sql.msp_2.log中找到了如下的product ID:
MSI (c) (B8:74) [17:21:04:323]: ******* RunEngine:
******* Product: {79F1B65E-8FC0-4D03-954D-F9E71C85AEC7}
2.根据这个product ID将生成一个GUID,这个GUID是根据每一段位的字符倒排得到的。
如:根据上面的product ID得到的GUID就是E56B1F97-0CF8-30D4-59D4-9F7EC158EA7C
所以GUID就是E56B1F970CF830D459D49F7EC158EA7C
3.在注册表中找到HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Installer/UserData/S-1-5-18/Products/GUID/Patches
查看是否有信息。
如:问题服务器中的注册表中对应的patches项中的键值是空的,说明存在问题。
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Installer/UserData/S-1-5-18/Products/E56B1F970CF830D459D49F7EC158EA7C/Patches]
"AllPatches"=""