Showing posts with label product. Show all posts
Showing posts with label product. Show all posts

Wednesday, March 28, 2012

More installation woes

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

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

|||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?

|||Yep, Set Local System to be the Service account for SQL Server. This seems to do the trick.|||

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.)

|||

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

|||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.|||

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

|||

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.

|||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.

More installation woes

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

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

|||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?

|||Yep, Set Local System to be the Service account for SQL Server. This seems to do the trick.|||

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.)

|||

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

|||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.|||

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

|||

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.

|||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.

More installation woes

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

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

|||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?

|||Yep, Set Local System to be the Service account for SQL Server. This seems to do the trick.|||

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.)

|||

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

|||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.|||

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

|||

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.

|||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.

More installation woes

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

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

|||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?

|||Yep, Set Local System to be the Service account for SQL Server. This seems to do the trick.|||

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.)

|||

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

|||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.|||

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

|||

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.

|||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.

Monday, February 20, 2012

money format ..need some help..please

Hi everybody.
Here's my Product table

ID int,
Title nvarchar(50),
Price money

How can I get value from price field like this
IF PRICE is 12,000.00 it will display 12,000
IF PRICE is 12,234.34 it will display 12,234.34

Thanks very much...I am a beginner. Sorry for foolish question

Formatting is generally applied at the page where the data is going to be displayed as opposed to altering the datasource itself.

If you were going to databind your sql data to something such as a GridView, then you can alter the data's format by specifying a DataFormatString.

for currency you can use: {0:c}
for numeric data with 2 digits after the decimal you can use: {0:n2}

For example:

 
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundField DataField="Price" DataFormatString="{0:c}" HtmlEncode=False HeaderText="With Currency Symbol" /> <asp:BoundField DataField="Price" DataFormatString="{0:n2}" HtmlEncode=False HeaderText="Without Currency Symbol" /> </Columns></asp:GridView>
If you are actually looking to alter the data in sql server, please let us know.
|||

Thanksmbanavige very much for your answer. I use DataList to display my items and I want to display1 pricein my page. I try to use this code

<%If((Eval("Price") *100) mod 100 >0) { %>

<%#Eval("Price","{0:N2}")%>

<% } else {

%> <%#Eval("Price","{0:c}") %>

<% } %> . But it seem wrong. How can I do something like that ?

|||

I'm not sure i follow what you're trying to do with that code. If you want one price, then choose only one of the sample formats i provided

use this: <%#Eval("Price","{0:c}") %>

or this: <%#Eval("Price","{0:N2}")%>

but not both at the same time.

Unless you're dealing with unpredictalbe currencies, i'd probably just go with: <%#Eval("Price","{0:c}") %>

|||

mbanavige:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="Price" DataFormatString="{0:c}"
HtmlEncode=False HeaderText="With Currency Symbol" />
</Columns>
</asp:GridView>

Hi Mike,

What would cause a page with say ten colums, all formated in the same manner, to only have five colums display currency correctly and the remainder to just be numbers?

I have this weird scenario going on and it is not a syntax error, as I have checked in dozens of times.

|||

Did you set HtmlEncode to False for all the columns?

|||

Yes I did. I just did a character by character study of two similar pages. The first page is for one State the next page for a different State. Every single character is identical. Therefore I have no option to conclude that there must be some fundamental change in the SQL database tables themselves. each State has it's own table. I will go in and make sure that each field is set to exactly the same data type.

If there is any other possibility that you can think of, please let me know. I am certain that this is not a code issue, the code is working, the reason I am not getting the formatting to work is probably because what is expected in the DB table, is something else. I'll drop you a line after I have checked the tables.

|||

Oaky, I was correct, the problem was in the database. The fields in question on the working table were 'money' and the same fields in the non-working table were 'float'. The instant I changed over to 'money', the web pages formatted perfectly.

There is an interesting sideline to this. In the beginning all state tables were identical, and the database itself was hosted on remote servers in Dallas, Texas in the USA. The database is now hosted on remote servers in Sydney, Australia and when the databse was transferred it somehow mysteriously changed. The technique of restoring a backup on the new server, then attaching it, was how we did the transfer, but it was not 100% flawless. We could not then nor now figure out why some very minor changes occured, perhaps there may have been some slight version differences on server software.

At any rate it's all fixed now, so the moral to the tale is this, don't always assume your code is incorrect, sometimes, it might be other things, as in this case, an issue with the database.

Best wishes.