I received an error after trying to start the SQL Server service for my 2005 default instance:
“WMI Provider Error [call to WMI Provider returned error code: 0x800742a2]”
In the event viewer, I got:
“initerrlog: Could not open error log file ‘D:\sqlserverdata\MSSQL.1\MSSQL\LOG\ERRORLOG’. Operating system error = 5(Access is denied.).”
A search of the web brought me a few different hits for solutions, one being a Microsoft KB:
Unfortunately, this wasn’t exactly my problem, but it was similar.
SQL Server 2005 Enterprise edition install (database engine only), as the default instance. I used Windows domain accounts as the various owners of the services.
Few months later, SQL Server 2008 R2 install (database engine only) as a named instance. I used the same Windows domain accounts as owners of the services for the 2005 install (bad idea apparently).
Another few months later, I needed Reporting and Analysis services. Installed those two options into the 2008 R2 named instance.
Analysis and solution:
When I attempted to start my 2005 service, I received the above errors. Looking at the ACL for the default instance folders, it showed that the domain account I had used to own the SQL Server and SQL Server agent services were no longer in the list. There were two “orphaned” (for lack of a better term) SIDs in the list. So it appears that the second error was correct; I simply added my domain account to the top level folder of the SQL Server data folder (for me it was d:\MSSQL.1), those permissions were propogated down the tree and I was able to start the service.
See http://msdn.microsoft.com/en-us/library/ms143547(v=SQL.90).aspx for information concerning the default directories.