Scenario: Created a VPC using Oracle VM VirtualBox. Installed SQL Server 2008 using local user accounts. While installing AX 2012, it fails because VPC machine is not in domain. So I ran dcpromo to install domain controller, and created a domain. With this installation and configuration, restarted the machine and then logged on as domain administrator. Noticed that SQL Services (MSSQLServer) is stopped. SQL Server Agent is stopped. Surely because earlier these were installed using local service account user. And now since those users are now part of CORP domain so authentication permission is invalid. I changed the logon permission but still it was not starting. Consistently getting this error in the event log.
Error: initerrlog: Could not open error log file ”. Operating system error = 3(The system cannot find the path specified.).
Troubleshooting and Solution:
Looked to the error again with special attention, it is saying “Could not open error log file ”. ” Well… where is the error file, how will I know.
1. Start SQL Server Configuration manager.
2. Click to select ‘SQL Server Services’ from the left menu options.
3. On the right panel, right click on ‘SQL Server (MSSQLSERVER)’ and click ‘Properties’.
4. Click ‘Advanced’ tab.
5. Scroll down and copy the value stored for ‘Startup Parameters’. Paste these on notepate. It will be something like this (as I installed SQL Server on D: drive):
-dD:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf;-eD:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\ERRORLOG;-lD:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
6. Notice the highlighted section. Browse to the location “D:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log“.
7. Right click to open ‘Log’ Properties and then to visit to ‘Security’ tab. Now there are couple of user and group names in the top panel. For example, CREATED OWNER, SYSTEM, SQLServerMSSQLUsers$<Machine>$<SQLInstance>(<Domain>\SQLServerMSSQLUsers$<Machine>$<SQLInstance>) and so on.
This SQLServerMSSQLUsers$<Machine>$<SQLInstance> has permission on the folder. And we need to make sure that our service account which is CORP\svcsqluser is part of this group.
8. Click Start -> Administrative Tools -> Active Directory Users and Computers.
9. Search and open group SQLServerMSSQLUsers$<Machine>$<SQLInstance>. Browse to ‘Members’ tab, and add ‘CORP\svcsqluser’ account in there.
10. Go back to SQL Server Configuration Properties window, and right click and start the service. It will work.
Additionally, there are other SQLServer groups too, for example, SQLServerReportServerUser, SQLServerSQLAgentUser, SQLServerMSASUser and so on… add corresponding service account to each of these groups under ‘Member’ tab.
This solution is specific to the scenario I have given. It may or may not be right solution for other scenarios.