Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Let me preface this by stating that I am more of a UNIX guy and this is making me pull my hair out. I have a Windows 2003 server that is running SQL Server 2005 for VMware's Virtual Infrastructure system. The theory was to make this system an Active Directory controller but we have decided to hold off on that for now. I demoted the server out of Active Directory land (no longer a controller or a member of any Active Directory). Unfortunately when I do that, the SQL Server service will no longer start.

When I go into the SQL Server Configuration Manager and try to change the Log On to the Administrator account or one of the built in accounts I get the error "No mapping between account names and security IDs was done".

How can I fix SQL Server so that it's not thinking about Active Directory permissions and account IDs?

share|improve this question
    
I have the same problem: serverfault.com/questions/24484/… - decided to leave it an AD for now. :D Watching this to see what the solution ends up being –  Matt Rogish Jul 15 '09 at 2:46

2 Answers 2

Kind of a brute approach, but have you tried uninstalling and re-installing SQL Server? If it won't let you, you might try these steps.

As another option, you could try these steps to fix the local account SID issue, but it looks like kind of a pain.

share|improve this answer
    
From my Googling today that is the best answer I could find online, but no I haven't tried it yet. I can do that but I need to figure out how to reinstall it without doing anything to the database itself. It seems like there should be a more elegant way to fix it in place though...guess I need to read the SQL Server manual. –  Michael Ridley Jul 14 '09 at 22:37
    
Reinstalling SQL Server won't delete the databases. If you want to be super sure, though, back up the .mdf and .ldf files for your databases. –  Adam Brand Jul 14 '09 at 22:39
    
Updated my answer with something you could try Michael, but I think uninstalling and reinstalling would be faster. –  Adam Brand Jul 14 '09 at 22:39

I haven't spun up a test instance to reproduce this on my own box, but it looks like there are three registry values stored at the key below that refer to SIDs of groups created by the SQL Server 2005 install:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.x\Setup

The values are AGTGROUP, FTSGROUP, and SQLGROUP. The groups that had the SIDs used to populate these values were (substituting in your server computer's name and SQL instance name):

SQLServer2005MSSQLUser$SERVER-NAME$INSTANCE-NAME
SQLServer2005MSFTEUsers$SERVER-NAME$INSTANCE-NAME
SQLServer2005SQLAgentUsers$SERVER-NAME$INSTANCE-NAME

From what I can see (again, w/o repro'ing this myself), you need to create these groups for this server, then obtain the SIDs for the new groups and put them into the registry. It looks like a "repair" of the SQL Server install would do this. Have a look at this article from Microsoft Connect: http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=202561

Search that article for the phrase "One or more SQL security groups were somehow deleted" and read thru the workaround there. It looks like clearing out the old groups and running setup in repair mode will do what you want. I'd trust that better than trying to re-create them by hand like some blog posts and forum posts I've found suggest.

Having said all that, backup, at minimum, that portion of the registry and your databases before you start changing things. Having good backups makes things "just work"... <smile>

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.