SQL Server 2005 Instance crashes while starting

Recently I was worked on a case wherein we were unable to start the SQL Server 2005 instance as it was failing with the below error:

Faulting application sqlservr.exe, version 2005.90.5057.0, time stamp 0x4d8d381e, faulting module kernel32.dll, version 6.0.6002.18449, time stamp 0x4da47b2f, exception code 0xc06d007e, fault offset 0x00000000000170cd, process id 0xe34, application start time 0x01ccd9ea6d1b2185.

Errorlog file was not getting created and the above error was seen in the event viewer application log. Initially, it looked to be some executable or binary was corrupt. Ideal solution for these kinds of issues is to uninstall & re-install the SQL instance after taking backup of all the database files.

As no one likes the option of un-install & reinstall of SQL instance, I kept that as a last resort and decided to try out other options to resolve this issue. As a first step I tried to start from command line but it was crashing and in the event viewer I saw the same error. Then I tried starting SQL Server in a single user mode with -c -m -f but still it was crashing.

As some of the SQL Server 2005 binaries seem to have been corrupted, I decided to rebuild the SQL Server binaries files & registry.

To set correct expectations, below option may or may not resolve the issue always, so before trying the below action plan, make sure to take the backup of all you database files and keep them in a safe location.

I ran the below command to rebuilt SQL specific files and registries which completed successfully after which I was able to start SQL Server 2005 instance:

start /wait setup.exe /qb INSTANCENAME=Instance_Name REINSTALL=ALL REINSTALLMODE=omus

Rebuilding the Registry
To rebuild the SQL Server 2005 registry, you must use the Setup command with the REINSTALL=ALL and REINSTALLMODE=omus parameters. Running Setup.exe with these parameter settings rebuild, verify, and repair a SQL Server instance and rebuild the registry. This procedure is most often used to rebuild the registry for a damaged SQL Server installation.
To rebuild the registry, you must use the same package file and options that you specified during the initial installation. If you do not know this information, uninstall and then reinstall SQL Server, rather than rebuild the registry.
Your syntax must specify either the /qb or /qn option. The /qb option displays basic Setup user interface and error message dialog boxes. If the /qn option is specified, all Setup dialog boxes, including error messages, are written to Setup log files.
In order to rebuild system databases, a new sa password is REQUIRED. Do not use a blank password. Use a strong password.
To repair all files, rebuild the registry, and replace all SQL Server shortcuts from the command prompt
1. Insert the SQL Server 2005 installation media into the disk drive.
2. Run the following command from the command prompt:
For INSTANCENAME, use MSSQLSERVER for a default instance. For a named instance, specify the instance name.
The resource database (mssqlsystemresource) is restored from SQL Server 2005 distribution media. When you rebuild the resource database from distribution media, all Service Packs and QFE updates are lost, and therefore must be reapplied. Before you proceed, see the [REBUILDDATABASE] section more information.

Happy Reading,
SQLServerF1 Team


Leave a Reply

Your email address will not be published. Required fields are marked *