none
More installation woes

    Question

  • We have releases a shrink wrapped winforms application that uses SQL Express as its backend. The product has a fairly large take up, and consequently it is being installed on a large numbre of different machines and configurations. We seem to be having quite a common problem with the installation of SQL Express, we launch the installation from our own installation package with the following command line

     

    SQLEXPR.EXE /qb ADDLOCAL=ALL SQLAUTOSTART=1 INSTANCENAME="OURInstanceName" SQLCOLLATION="Latin1_General_BIN"

    We are seeing time after time that the install fails with the message "The SQL Server service failed to start."

    Summary.txt points to

    SQLSetupNNNN_COMPUTERNAME_SQL.log

    and this in turn looks like this

    <snipped>

    PerfTime Start: Do_sqlScript : Mon Apr 10 14:06:07 2006
    Service MSSQL$OURINSTANCENAME with parameters '-m SqlSetup -Q -qLatin1_General_BIN -T4022 -T3659 -T3610 -T4010' is being started at Mon Apr 10 14:06:07 2006
    Service failed unexpectedly (1067)
            Error Code: 0x8007042b (1067)
    Windows Error Text: The process terminated unexpectedly.
      Source File Name: sqlsetuplib\service.cpp
    Compiler Timestamp: Fri Sep 16 13:20:12 2005
         Function Name: sqls::Service::Start
    Source Line Number: 301


    </snipped>

     

    The ERRORLOG looks something like this

     

    2006-04-10 13:55:47.07 Server      Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
     Oct 14 2005 00:33:37
     Copyright (c) 1988-2005 Microsoft Corporation
     Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

    2006-04-10 13:55:47.07 Server      (c) 2005 Microsoft Corporation.
    2006-04-10 13:55:47.07 Server      All rights reserved.
    2006-04-10 13:55:47.07 Server      Server process ID is 1732.
    2006-04-10 13:55:47.07 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
    2006-04-10 13:55:47.07 Server      Registry startup parameters:
    2006-04-10 13:55:47.07 Server        -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
    2006-04-10 13:55:47.07 Server        -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
    2006-04-10 13:55:47.07 Server        -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
    2006-04-10 13:55:47.07 Server      Command Line Startup Parameters:
    2006-04-10 13:55:47.07 Server        -m SqlSetup
    2006-04-10 13:55:47.07 Server        SqlSetup
    2006-04-10 13:55:47.07 Server        -Q
    2006-04-10 13:55:47.07 Server        -q Latin1_General_BIN
    2006-04-10 13:55:47.07 Server        -T 4022
    2006-04-10 13:55:47.07 Server        -T 3659
    2006-04-10 13:55:47.07 Server        -T 3610
    2006-04-10 13:55:47.07 Server        -T 4010
    2006-04-10 13:55:47.08 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2006-04-10 13:55:47.08 Server      Detected 2 CPUs. This is an informational message; no user action is required.
    2006-04-10 13:55:47.24 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.
    2006-04-10 13:55:47.26 Server      Database Mirroring Transport is disabled in the endpoint configuration.
    2006-04-10 13:55:47.27 spid5s      Warning ******************
    2006-04-10 13:55:47.27 spid5s      SQL Server started in single-user mode. This an informational message only. No user action is required.
    2006-04-10 13:55:47.27 spid5s      Starting up database 'master'.
    2006-04-10 13:55:47.36 spid5s      Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
    2006-04-10 13:55:47.49 spid5s      SQL Trace ID 1 was started by login "sa".
    2006-04-10 13:55:47.54 spid5s      Starting up database 'mssqlsystemresource'.
    2006-04-10 13:55:47.76 spid5s      Error: 15209, Severity: 16, State: 1.
    2006-04-10 13:55:47.76 spid5s      An error occurred during encryption.
    2006-04-10 13:55:47.76 spid5s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

     

    I can't quite understand what the problem is, has anybody got an idea?

     

    Thanks

    Wednesday, April 19, 2006 4:48 AM

Answers

  • We've seen some cases of this.  Here's the workaround:

    The solution in those cases seemed to be to grant the Network Service FULL CONTROL on C:\Documents and Settings\NetworkService\Application Data\Microsoft\Protect

    Hope this helps.

    -Jeffrey

    Wednesday, April 19, 2006 8:12 PM

All replies

  • We've seen some cases of this.  Here's the workaround:

    The solution in those cases seemed to be to grant the Network Service FULL CONTROL on C:\Documents and Settings\NetworkService\Application Data\Microsoft\Protect

    Hope this helps.

    -Jeffrey

    Wednesday, April 19, 2006 8:12 PM
  • I am having the same problem installing SQL Server Express.

    Here's the error message:
    --------------------------------------------------------------------------------
    Machine         : ANSEL
    Product         : SQL Server Database Services
    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."
    --------------------------------------------------------------------------------
    Machine         : ANSEL
    Product         : Microsoft SQL Server 2005 Express Edition
    Product Version : 9.1.2047.00
    Install         : Failed
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0008_ANSEL_SQL.log
    Last Action     : InstallFinalize
    Error String    : 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."
    The error is  (1067) The process terminated unexpectedly.
    Error Number    : 29503
    --------------------------------------------------------------------------------


    And the ERRORLOG:

    2006-05-11 10:58:59.14 Server      Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
        Apr 14 2006 01:12:25
        Copyright (c) 1988-2005 Microsoft Corporation
        Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

    2006-05-11 10:58:59.14 Server      (c) 2005 Microsoft Corporation.
    2006-05-11 10:58:59.14 Server      All rights reserved.
    2006-05-11 10:58:59.14 Server      Server process ID is 736.
    2006-05-11 10:58:59.14 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
    2006-05-11 10:58:59.14 Server      Registry startup parameters:
    2006-05-11 10:58:59.14 Server           -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
    2006-05-11 10:58:59.14 Server           -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
    2006-05-11 10:58:59.14 Server           -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
    2006-05-11 10:58:59.14 Server      Command Line Startup Parameters:
    2006-05-11 10:58:59.14 Server           -m SqlSetup
    2006-05-11 10:58:59.14 Server           SqlSetup
    2006-05-11 10:58:59.14 Server           -Q
    2006-05-11 10:58:59.14 Server           -q SQL_Latin1_General_CP1_CI_AS
    2006-05-11 10:58:59.14 Server           -T 4022
    2006-05-11 10:58:59.14 Server           -T 3659
    2006-05-11 10:58:59.14 Server           -T 3610
    2006-05-11 10:58:59.14 Server           -T 4010
    2006-05-11 10:58:59.31 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2006-05-11 10:58:59.31 Server      Detected 1 CPUs. This is an informational message; no user action is required.
    2006-05-11 10:59:00.14 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.
    2006-05-11 10:59:00.18 Server      Database Mirroring Transport is disabled in the endpoint configuration.
    2006-05-11 10:59:00.18 spid5s      Warning ******************
    2006-05-11 10:59:00.18 spid5s      SQL Server started in single-user mode. This an informational message only. No user action is required.
    2006-05-11 10:59:00.18 spid5s      Starting up database 'master'.
    2006-05-11 10:59:00.49 spid5s      Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
    2006-05-11 10:59:00.68 spid5s      SQL Trace ID 1 was started by login "sa".
    2006-05-11 10:59:00.73 spid5s      Starting up database 'mssqlsystemresource'.
    2006-05-11 10:59:00.74 spid5s      The resource database build version is 9.00.2047. This is an informational message only. No user action is required.
    2006-05-11 10:59:01.01 spid5s      Error: 15209, Severity: 16, State: 1.
    2006-05-11 10:59:01.01 spid5s      An error occurred during encryption.
    2006-05-11 10:59:01.01 spid5s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

    I do not have the directory C:\Documents and Settings\NetworkService\Application Data\Microsoft\Protect on my machine.  I do have C:\Documents and Settings\[my username]Application Data\Microsoft\Protect so I set the permissions on that as indicated, but it didn't help. 

    Any other suggestions?



    Thursday, May 11, 2006 3:14 PM
  • Yep, Set Local System to be the Service account for SQL Server. This seems to do the trick.
    Friday, May 19, 2006 12:22 AM
  • Grant Full rights to "NETWORK SERVICE" on the "C:\Documents and Settings\NetworkService" folder.  Let the system take care of the rest.

    (Running the "SQL Server (SQLEXPRESS)" service under the "Local System" account also works, but don't do this!  The "Local System" account has virtually unlimited access to everything on your computer.  "Network Service" has just enough rights to get the job done, without opening a security hole the size of the Grand Canyon.)

    Thursday, June 08, 2006 6:32 PM
  • Hi,

    Sorry if this is a naive question, but what's wrong with using Local System?

    We've been having problems with the reliability of the Network Service account when installing SSEE on user's machines. Sometimes the account doesn't exist, or modifying the "C:\Documents and Settings\NetworkService" just isn't enough.

    So we had hoped that by using Local System the installation issues will be resolved.

    Do you strongly recommend against this idea?

    Thanks

    Sam

    Wednesday, June 14, 2006 8:48 AM
  • Hi Sam_S, the post by T Hunsaker is correct (although perhaps exaggerated a little), Local System does have more privileges than Network Service. However, if you are running SSEE with no network connectivity, and/or using "user instances" to connect to your databases, this will isolate you from most of the potential security threats out there, and yes I have still seen issues with the suggested fix of granting NetworkService full rights on C:\Documents and Settings\NetworkService.
    Wednesday, June 14, 2006 1:18 PM
  • Hello Jalperin,

    I am having exactly the same problem (also no directory C:\Documents and Settings\NetworkService\Application Data\Microsoft\Protect); did you find an ultimate solution?

    Peter

    Thursday, July 27, 2006 10:37 AM
  • I am having the same issue "C:\Documents and Settings\NetworkService" has the correct permissions (prior to the various install attempts) and I do not have a ".../protect" folder.

    ...

    2006-08-07 15:52:12.71 spid5s      Starting up database 'mssqlsystemresource'.
    2006-08-07 15:52:12.75 spid5s      The resource database build version is 9.00.2047. This is an informational message only. No user action is required.
    2006-08-07 15:52:13.41 spid5s      Error: 15209, Severity: 16, State: 1.
    2006-08-07 15:52:13.41 spid5s      An error occurred during encryption.
    2006-08-07 15:52:13.49 spid5s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

    Monday, August 07, 2006 8:51 PM
  • I am having the same issue, and I do not have a network service folder.  i am running XP.  I have given the network service group full privelages to my local system administrator account.  Please advise.
    Thursday, August 10, 2006 2:15 PM
  • (sorry to dig up such an old thread, but this one seemed just as good a candidate as any of the other threads I found on the subject)

    I got the exact same problem as the other posters here, getting the "Starting up database 'mssqlsystemresource' / Error: 15209, Severity: 16, State: 1 / An error occurred during encryption" error message when installing MSSQL2005Express on XP Professional SP2 (not part of a Domain).

    Leaving the "Retry or cancel" dialog up, I started up Process Monitor (by SysInternals, now part of Microsoft) and had it watch what the sqlservr.exe process did when I clicked "Retry". I discovered that one of the last things that happen just before the error is logged and the sqlservr.exe process shuts down, is a registry access to the key

    HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\"AppData"

    ..which fails with a NAME NOT FOUND result!


    Using Registry Editor, I created that key (as a REG_EXPAND_SZ string) with the value "%USERPROFILE%\Application Data" (as found in my own user's AppData key), and then went back to the "Retry or Cancel" dialog and clicked "Retry".

    Now it works. Smile

    The workaround mentioned by Jeffrey, above, could also be required after adding the registry key. I wouldn't know for sure, as I tried that workaround first, before playing around with ProcMon. Either way, error "Error: 15209, Severity: 16, State: 1" still seems to mean that sqlservr.exe is unable to access whatever it is looking for in the "Application Data" folder - in my case because the location of the folder was unknown.

    Hopefully, this discovery will save others a bit of headache as well. Smile

    -- MagnusH

    EDIT: btw, the "HKEY_USERS\S-1-5-20" registry belongs to the Network Service user. If you get this problem when installing the services to run as a different user, look up that user's registry keys instead.

    -- MagnusH
    Thursday, January 10, 2008 11:05 PM
  • For my environment (XP, SP2), the registry fix allowed the service to start and the installation to complete.

     

    Perhaps it has something to do with Documents & Settings residing on my D: drive on this machine.

     

    >>>Using Registry Editor, I created that key (as a REG_EXPAND_SZ string) with the value "%USERPROFILE%\Application Data" (as found in my own user's AppData key), and then went back to the "Retry or Cancel" dialog and clicked "Retry".

    Thursday, March 27, 2008 1:19 PM
  • Adding the registry string value AppData=%USERPROFILE%\Application Data at key HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\ worked for me.

     

    I also have my Documents and Settings on my D: drive.

    Friday, March 28, 2008 2:52 AM
  • The fix for me that worked was simply to log on as the account that I'd created to run SQL Server 2008.  After logging on once and logging off the SQL service started just fine.
    Thursday, June 04, 2009 7:12 AM