Tuesday, October 30, 2007

The power of having source code

I was doing a postmortem on a SQL Server installation failure yesterday, and found the error occurs with the following message logged:

MSI (s) (2C!48) [14:59:30:978]: PROPERTY CHANGE: Adding
ServiceNameSQL.EAD22282_F1AF_4119_B1F9_C9F1DCBC62FF property. Its
value is 'MSSQL$SQL2005'.
Using PrevRegRootPath: Software\Microsoft\Microsoft SQL Server\MSSQL.1
GetServiceUserGroup failed for SQL2005, 5
Error Code: 0x80070534 (1332)
Windows Error Text: No mapping between account names and security IDs was done.
Source File Name: sqlca\sqlcax.cpp
Compiler Timestamp: Wed Sep 21 01:10:12 2005
Function Name: SetInstanceProperty
Source Line Number: 1196

Error Code: 1332
MSI (s) (2C!48) [14:59:31:009]: Product: Microsoft SQL Server 2005 --
Error 29528. The setup has encountered an unexpected error while
Setting Internal Properties. The error is: Fatal error during
installation.

It's a little obscure and obviously targeted at a developer. It even has a source file and line number. The root of the issue is essentially that it cannot determine the SID associated with one of the SQL Server service users or groups. But which one did it fail on? If this were Linux or some other open source project, I could look at the code and see exactly what account it failed on. It would take me about a minute. But it's not, my only alternatives are:

  1. Try to backtrack and look at all the groups and users (if they even still exist on the system in question).
  2. Call Microsoft tech support, pay $250 for a support incident, and get somebody to tell me what that line of code does
  3. Spend a couple of hours and disassemble the binary with Ida Pro

All that work just to see what the function was was immediately prior to the logging of an error message. It's no wonder automation is so hard.

When I talk about open source, people sometimes argue with me that "it's not like you're ever going to change a database engine, so who cares about the source?" And they're half right - I'm never going to personally have the need to modify the product. However, if I were able to see the source code right now, a task that would have taken a couple of minutes is now going to take a few hours this afternoon. That sort of thing adds up over time...