SQL Server 2005 Express setup failure with error – An error occurred during encryption.

Recently I have worked on one of the case where SQL Server Express Edition was failing with Error

The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually

This is generic error and can be caused by many reasons. We need to look at SQL Error Logs / Event Logs and find out actual reason. From Event Log error was “The process terminated unexpectedly”. Not very useful in this case.

Next, we looked into SQL Error Log

2009-11-16 15:47:17.26 spid5s      Error: 15209, Severity: 16, State: 1.
2009-11-16 15:47:17.26 spid5s      An error occurred during encryption.

Above was the cause of SQL Startup failure. Basically there was an unhandled exception raise by SQLServr.exe process and terminated. If you search on support.microsoft.com for this error, this is the KB Error message when you try to install SQL Server Express or SQL Server. If you are using NTFS then first check KB before processing further.

In our case KB was not applicable because it was FAT file system and there is no option to set security as mentioned in KB. To troubleshoot further we have taken crash dump of SQL Server process using DebugDiag. You can refer to documentation to see how to take crash dump but I would show you what we got from the dump.


In layman terms, we were trying to create self generated certificate using Crypto API provided by windows. When we looked further, we found exception as 0xc000003a. This means STATUS_OBJECT_PATH_NOT_FOUND.

We took procmon (available at http://technet.microsoft.com/hi-in/sysinternals/default(en-us).aspx) and found interesting stuff

3:47:17.2609980 PM    lsass.exe    CreateFile    C:\WINDOWS\system32\Microsoft\Protect\S-1-5-18\User\Preferred    PATH NOT FOUND   
3:47:17.2612661 PM    lsass.exe    CreateFile    C:\WINDOWS\system32\Microsoft   
3:47:17.2615210 PM    lsass.exe    CreateFile    C:\WINDOWS\system32\Microsoft\Protect    PATH NOT FOUND
3:47:17.2617194 PM    lsass.exe    CreateFile    C:\WINDOWS\system32\Microsoft\Protect\S-1-5-18    PATH NOT FOUND
3:47:17.2619209 PM    lsass.exe    CreateFile    C:\WINDOWS\system32\Microsoft\Protect\S-1-5-18\User    PATH NOT FOUND

So I can see PATH NOT FOUND, above this I can see NAME COLLISION. This essentially means that there is a object already existing. When we looked at customer’s machine, we found a file called “Microsoft” (Ideally, this should be a folder) which was causing SQLSetup to not to create a folder and hence failing. Lsass.exe is responsible for many things (refer documentation in KB308356)

To resolve the issue, we have renamed Microsoft file to Microsoft_1 and then as expected, sqlservr.exe was able to start and setup worked like a charm.

If you have any such issue, ProcMon is the first thing to look at along with Event Logs and SQL Error Logs.

Hope this helps someone on the earth (and beyond)!!!

- Balmukund

Comments (8)
  1. edgebux says:

    Hi blakhani,

    Thanks for this.

    It helped me alot

    Thanks for this stuff


  2. Balmukund says:

    Thanks Edgebux!

    I guess this is the first time I have seen use of a blog within 1 hour of posting a blog. World is really very small.


  3. anninha says:

    I didn´t understand much of all the explanations above, BUT I changed the microsoft thing and IT WORKED!!!

    Thanks a lot!!

  4. Feroz says:

    Hi Balu,

    I had the same issue when i installed SQL Server 2005 Developer on a Vista machine. At the time when the installer threw the error i tried starting the SQL Server from command prompt as a console app and it started successfully. Then i shut down the console app and hit the retry button in the error and the installation completed successfully. Can you please check on this behaviour?



  5. Novembre says:

    I had similiar problem with XP fat installation. It was not the file but rather missing registry key.

    HKEY_USERSS-1-5-20SoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell FoldersAppData was missing, what I did is create Appdata key and copy existing Local AppData string into it. It worked like a charm. Thank you procmon 🙂

  6. Gagandeep Singh says:

    I have changed the folder name but

    It is Not working on window 8….

  7. RISHI RANA says:

    how to view sql server 2005 log files and starting sql server manually retry sql eer

  8. Kiran says:

    To solve this problem :

    1. Update/Install .Net 2.0 framework. Recommend downloading Windows Installer 3.1 available on MS website
    2. Follow the steps mentioned on the below from the Symantec Website :


    This should help.



Comments are closed.

Skip to main content