Environment:
Windows 2008 R2 x64
SQL Server 2008 R2 x64
Installation Process:
1. Install Windows 2008
2. Install SQL Server 2008 (default installation path under drive C, default Instance name: MSSQLServer, mixed login Mode)
3. Install ad
Error: the default instance of SQL Server (MSSQLServer) cannot be started. ErrorCode17058
Log error message:
Initerrlog: cocould not open Error Log File 'C: \ Program Files \ Microsoft SQL
Server \ mssql.1 \ MSSQL \ log \ errorlog '. Operating System Error = 5 (access is
Denied .).
The event ID in the application log is 17058.
Also the following error message appears in the System Log
The SQL Server (MSSQLServer) Service terminated with service-specific error
17058 (0x42a2 ).
Cause Analysis: After the ad is installed, the system logs on to the system by using a domain user. The "Local User" information set during SQL installation has been modified. The current (domain) you are not authorized to access the MSSQLServer instance folder or the entire SQL folder.
Solution:
1. Open "service", find the SQL Server (MSSQLServer) Service (or set the service corresponding to the instance), view the properties, and select "Local SYSTEM account" in the "login" tab ".
2. For the sake of security, perform this step: Open SQL Server Configuration Manager, and go to SQL Server Service) find the corresponding instance (the name is the same as the name in "service ). In the "login" tab, select "built-in account" and select "local system" (all others, such as network service, can also be selected, but ensure that you have the permission ).
3. Start the SQL Server (MSSQLServer) service.
4. if an error persists (for example, 126 error), go to the SQL Server installation directory and assign the network service and the permissions of the currently logged-on user to the entire installation directory, especially the directory where the instance is located, and database file directories, assign write permissions. Start the service again.
Result: The SQL Server (MSSQLServer) service is successfully started.