SP2 failed only on the Database engine and now won't restart

I have a clean SQL 2005 Ent. x64 SP1 clean with no user db's.....applied SP2 and everything showed "Success" except the Database Services (Error 29534)......

Time: 02/22/2007 08:29:50.134
KB Number: KB921896
Machine: TORCA8
OS Version: Microsoft Windows Server 2003 family, Enterprise Edition Service Pack 1 (Build 3790)
Package Language: 1033 (ENU)
Package Platform: x64
Package SP Level: 2
Package Version: 3042
Command-line parameters specified:
Cluster Installation: No

**********************************************************************************
Prerequisites Check & Status
SQLSupport: Passed

**********************************************************************************
Products Detected Language Level Patch Level Platform Edition
Setup Support Files ENU 9.1.2047 x64
Database Services (MSSQLSERVER) ENU SP1 2005.090.2047.00 x64 ENTERPRISE
Analysis Services (MSSQLSERVER) ENU SP1 2005.090.2047.00 x64 ENTERPRISE
Reporting Services (MSSQLSERVER) ENU SP1 9.00.2047.00 x64 ENTERPRISE
Notification Services ENU SP1 9.00.2047.00 x64 ENTERPRISE
Integration Services ENU SP1 9.00.2047.00 x64 ENTERPRISE
SQL Server Native Client ENU 9.00.2047.00 x64
Client Components ENU SP1 9.1.2047 x64 ENTERPRISE
MSXML 6.0 Parser ENU 6.00.3890.0 x64
SQLXML4 ENU 9.00.2047.00 x64
Backward Compatibility ENU 8.05.1704 x64
Microsoft SQL Server VSS Writer ENU 9.00.2047.00 x64

**********************************************************************************
Products Disqualified & Reason
Product Reason

**********************************************************************************
Processes Locking Files
Process Name Feature Type User Name PID

**********************************************************************************
Product Installation Status
Product : Setup Support Files
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB921896_SqlSupport.msi.log
Error Number : 0
Error Description :
-
Product : Database Services (MSSQLSERVER)
Product Version (Previous): 2047
Product Version (Final) :
Status : Failure
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number : 29534
Error Description : MSP Error: 29534 Service 'MSSQLSERVER' could not be started. Verify that you have sufficient privileges to start system services. The error code is (1067) The process terminated unexpectedly.

-
Product : Analysis Services (MSSQLSERVER)
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\OLAP9_Hotfix_KB921896_sqlrun_as.msp.log
Error Number : 0
Error Description :
-
Product : Reporting Services (MSSQLSERVER)
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\RS9_Hotfix_KB921896_sqlrun_rs.msp.log
Error Number : 0
Error Description :
-
Product : Notification Services
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\NS9_Hotfix_KB921896_sqlrun_ns.msp.log
Error Number : 0
Error Description :
-
Product : Integration Services
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\DTS9_Hotfix_KB921896_sqlrun_dts.msp.log
Error Number : 0
Error Description :
-
Product : SQL Server Native Client
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB921896_sqlncli.msi.log
Error Number : 0
Error Description :
-
Product : Client Components
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQLTools9_Hotfix_KB921896_sqlrun_tools.msp.log
Error Number : 0
Error Description :
-
Product : MSXML 6.0 Parser
Product Version (Previous): 3890
Product Version (Final) : 6.10.1129.0
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB921896_msxml6.msi.log
Error Number : 0
Error Description :
-
Product : SQLXML4
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB921896_sqlxml4.msi.log
Error Number : 0
Error Description :
-
Product : Backward Compatibility
Product Version (Previous): 1704
Product Version (Final) : 2004
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB921896_SQLServer2005_BC.msi.log
Error Number : 0
Error Description :
-
Product : Microsoft SQL Server VSS Writer
Product Version (Previous): 2047
Product Version (Final) : 3042
Status : Success
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Redist9_Hotfix_KB921896_SqlWriter.msi.log
Error Number : 0
Error Description :
-

**********************************************************************************
Summary
One or more products failed to install, see above for details
Exit Code Returned: 29534

Now SQL Server service won't restart.....

2007-02-22 10:16:31.28 Server Microsoft SQL Server 2005 - 9.00.3042.00 (X64)
Feb 10 2007 00:59:02
Copyright (c) 1988-2005 Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

2007-02-22 10:16:31.28 Server (c) 2005 Microsoft Corporation.
2007-02-22 10:16:31.28 Server All rights reserved.
2007-02-22 10:16:31.28 Server Server process ID is 2056.
2007-02-22 10:16:31.28 Server Authentication mode is MIXED.
2007-02-22 10:16:31.28 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2007-02-22 10:16:31.28 Server This instance of SQL Server last reported using a process ID of 576 at 2/22/2007 10:16:15 AM (local) 2/22/2007 3:16:15 PM (UTC). This is an informational message only; no user action is required.
2007-02-22 10:16:31.28 Server Registry startup parameters:
2007-02-22 10:16:31.28 Server -d E:\SQLData\master.mdf
2007-02-22 10:16:31.28 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2007-02-22 10:16:31.28 Server -l F:\SQLLogs\mastlog.ldf
2007-02-22 10:16:31.28 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2007-02-22 10:16:31.28 Server Detected 4 CPUs. This is an informational message; no user action is required.
2007-02-22 10:16:31.28 Server Cannot use Large Page Extensions: lock memory privilege was not granted.
2007-02-22 10:16:31.40 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2007-02-22 10:16:31.42 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-02-22 10:16:31.50 spid1s A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 36200, committed (KB): 104760, memory utilization: 34%.
2007-02-22 10:16:33.45 Server Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-02-22 10:16:33.45 Server Database mirroring has been enabled on this instance of SQL Server.
2007-02-22 10:16:33.47 spid5s Starting up database 'master'.
2007-02-22 10:16:33.47 spid5s SQL Trace ID 1 was started by login "sa".
2007-02-22 10:16:33.48 spid5s Starting up database 'mssqlsystemresource'.
2007-02-22 10:16:33.48 spid5s The resource database build version is 9.00.3042. This is an informational message only. No user action is required.
2007-02-22 10:16:33.48 spid5s Error: 5173, Severity: 16, State: 1.
2007-02-22 10:16:33.48 spid5s One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.
2007-02-22 10:16:33.48 spid5s Error: 5173, Severity: 16, State: 1.
2007-02-22 10:16:33.48 spid5s One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.
2007-02-22 10:16:33.48 spid5s Log file 'F:\SQLLogs\mssqlsystemresource.ldf' does not match the primary file. It may be from a different database or the log may have been rebuilt previously.
2007-02-22 10:16:33.48 spid5s The log cannot be rebuilt when the primary file is read-only.
2007-02-22 10:16:33.48 spid5s Error: 945, Severity: 14, State: 2.
2007-02-22 10:16:33.48 spid5s Database 'mssqlsystemresource' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
2007-02-22 10:16:33.48 spid5s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

Tried reinstalling SP 2 in quiet mode using sapwd parameter.....now everything is showing the correct SP2 version but SQL Server Service won't start.......anyone?

[10532 byte] By [Stonemeel] at [2008-1-2]
# 1
2007-02-22 10:16:31.42 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-02-22 10:16:31.50 spid1s A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 36200, committed (KB): 104760, memory utilization: 34%.
2007-02-22 10:16:33.45 Server Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-02-22 10:16:33.45 Server Database mirroring has been enabled on this instance of SQL Server.
2007-02-22 10:16:33.47 spid5s Starting up database 'master'.
2007-02-22 10:16:33.47 spid5s SQL Trace ID 1 was started by login "sa".
2007-02-22 10:16:33.48 spid5s Starting up database 'mssqlsystemresource'.
2007-02-22 10:16:33.48 spid5s The resource database build version is 9.00.3042. This is an informational message only. No user action is required.
2007-02-22 10:16:33.48 spid5s Error: 5173, Severity: 16, State: 1.
2007-02-22 10:16:33.48 spid5s One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.
2007-02-22 10:16:33.48 spid5s Error: 5173, Severity: 16, State: 1.
2007-02-22 10:16:33.48 spid5s One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.
2007-02-22 10:16:33.48 spid5s Log file 'F:\SQLLogs\mssqlsystemresource.ldf' does not match the primary file. It may be from a different database or the log may have been rebuilt previously.
2007-02-22 10:16:33.48 spid5s The log cannot be rebuilt when the primary file is read-only.
2007-02-22 10:16:33.48 spid5s Error: 945, Severity: 14, State: 2.
2007-02-22 10:16:33.48 spid5s Database 'mssqlsystemresource' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
2007-02-22 10:16:33.48 spid5s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

Tried reinstalling SP 2 in quiet mode using sapwd parameter.....now everything is showing the correct SP2 version but SQL Server Service won't start.......anyone?

--

Have you checked the memory usage and free disk space on your machine? It seems that Some SQL Server Engine data file content is paged out.

JiongxiongChen at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 2

I had similar issue. I believe my issue was one of the following - that I didn't have my admin account as SA or with me moving my system log files to a different directory the SP2 couldn't find them. My solution was to uninstall all and reinstall, add service account as SA to server and then upgrade to SP2. I'm going to try to move my system files now.

MikeAatATG at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 3

I have 16 GB RAM (15 free)

I did setup the system db's on their own arrays......

SQL Server app is on the C drive (14 GB free)

Data Files on the E drive (186 GB free)

Log Files on the F drive (32 GB free)

No user db's setup yet.....everything is brand new and I moved the sys db's according to the MSDN instructions........

The tricky part is the install wizard wants to test the Windows Security or SQL Security logon and if it can't start the SQL Server to test, it won't allow you past that step........but the quiet mode seems to think the database is already patched to SP2 so it doesn't seem to do anything.......is there a "re-apply the whole thing" parameter for quiet mode? Kinda hoping I don't have to start from scratch if there is a quick fix for this......thx for the input so far......

Stonemeel at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 4
Also, I am a bit leary of uninstalling/reinstalling the whole thing.......right now it's not that big of a deal since it's just a clean server build with the sys db's moved to their optimum drive arrays......but when SP3 comes out and I have all my production db's running, I don't want to run into this issue again if it's a problem with the SP installer package not handling this properly.
Stonemeel at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 5

We ran into the exact same issue with SP2 64-bit Enterprise. Our problem appears to be that although the Windows Domain account that runs the services, is local & domain admin, AND was a member of sysadmins in SQL, was listed as a "Vista" user at the end during the vista stuff (not... it's AD in Windows 2003 R2). (Is something happening during setup that is changing the Domain accounts?)

SQL Server Database Engine won't start, getting mssqlsystemresource db shows same error that you received. We're off to attempt an uninstall/reinstall back to sp1, restored 2TB worth of databases, and try it all over again.

If you get an answer from the gurus at MS, please let us know what the real fix is without having to uninstall/reinstall.

Thanks!

hgarrett at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 6

Found our problem. BUG, I think. If you have moved any of the other system databases to other locations other than where they were first installed, Service Pack 2 installs all the *.mdf & *.ldf files for the distmdl and mssqlsystemresource databases back in the original install directory. Thus... when SQL Server tries to start, it cannot locate the necessary files to start up the hidden database. The same would happen for the distribution database as well. We simply moved the new version of the files (LDF, in our case), to the proper location. SQL Server started successfully.

hgarrett at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 7
hgarrett wrote:

Found our problem. BUG, I think. If you have moved any of the other system databases to other locations other than where they were first installed, Service Pack 2 installs all the *.mdf & *.ldf files for the distmdl and mssqlsystemresource databases back in the original install directory. Thus... when SQL Server tries to start, it cannot locate the necessary files to start up the hidden database. The same would happen for the distribution database as well. We simply moved the new version of the files (LDF, in our case), to the proper location. SQL Server started successfully.

I am having the same issue on a production machine, however SP2 didn't install distmdl and mssqlsystemresource into the original location in the SQL Server folder under program files!

Adam2342342341 at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 8

Sorry, by "original install directory", I meant the original location for our data folder, not the location of the binaries (...\MSSQLServer\MSSQL.1\MSSQL\Data). After the original setup of SQL2005 (pre-SP1), we moved the log files for all system databases to another location, so our LDF files were no longer in the original Data folder. We had no problems when we upgraded to SP1. However, SP2 created two new LDF files back in the original Data folder. It appears that the location of the hidden database isn't verified by SP2, it just assumes that it's in the original Data folder.

Maybe you should search your drives for the hidden system database files on all drives. You might find that you have more than one mdf or one ldf. If so, compare the dates of the files. The new mssqlsystemresource ldf file had a 2/10/2007 date on it, our old one was from 5/8/2006. We renamed the old one to *.ldf_save, then moved the new from from the Data folder back to where it should be. Everything came up fine after that.

Good luck!

hgarrett at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 9
Hi hgarrett

Thanks very much for your advice.

I managed to resolve it with your assistance.

When I installed SQL 2005 I immediately pointed the data directory to D:\Data and the logs directory to D:\Log. I then moved all existing databases including the system databases using instructions from MSDN to the new locations.

What it appears to have done is SP2 created the mssqlsystemresource.ldf in the Data directory instead of the Log directory, so SQL was trying to load the old log on startup.

Strangely this only occurred on my x64 server - I didn't run into this problem on our 32-bit servers.

Adam

Adam2342342341 at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 10

We had the exact same issue here on our x64 server. The issue didn't show up on our 32 server. It's got to be a bug in the x64 service pack install. By renaming the old mssqlsystemresource.ldf file and copying the new one to the proper directory the services started right up.

Thanks so much! This no doubt saved me from being up all night resolving this.

Erin

PCDoper at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 11
This issue happened on my 32-bit server. Thanks for all the previous postings. SP2 had placed mssqlsystemresource.ldf in the same directory as the .mdf file (not the original install location.) SP2 was file version 9.0.3042.1 (x86)
ZipTX at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 12

I am encountering the exact same issue as well. I had a clean SQL Server 2005 installation that I patched with SP2, next I moved all the system and user databases. Next thing I did was patch it with the post-SP2 cumulative hotfix package when the problems started. As I see it this is caused because a lot of the 'old' paths are persisted in the registry. So when you move the databases and transaction log files, you not only need to change the default file locations and startup properties of the services, but you also need to look in the registry for the old paths and replace them with the new paths.

GabrielLozano-Moran at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 13

I've just had this on a 32-bit server, same process to resolve it though

bobbins at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...
# 14
Just experienced this on SQL 2005 Standard x64 after applying SP2. I had relocated the system databases to other RAID arrays for performance.

After reading this thread, I was able to copy the misplaced database and log files to their correct locations, and the problem was solved.
philmeeks at 2008-2-18 > top of Msdn Tech,SQL Server,SQL Server Setup & Upgrade...

SQL Server

Site Classified