‘The directory service is busy’ error when renaming a domain computer

This one was a new one… and a bugger to track down!  While renaming domain computers, several of the rename operations would encounter an error during the rename process of

The following error occurred attempting to rename the computer to [New Name]:
The directory service is busy.

image

Well, if you have SQLExpress or SQLServer installed, the error may be leading you down the wrong path.  In our particular case, the error was a security error related to SQLExpress / SQLServer SPNs (Service Principal Name).  Basically, the rename operation could not rename the SPNs.

How to identify a potential SPN issues

  1. Open a CMD prompt as an administrator
  2. enter the command:
    setspn –L [Computer Name]
  3. Check for *any* registered SPN which is in the format of
    MSSQLSvc/[Computer Name]:[Instance Name]

In short, if you have *any* SPN which starts with MSSQLSvc, you will not be able to rename your computer!

How to fix SPN issues

  1. For *each* identified SPN above, you must delete the SPN using the following command:
    setspn –d [SPN Name] [ComputerName]
    Important: You must use the full SPN name as identified via the setspn –L command.  These will be in the format of MSSQLSvc/Computer.domain.tld:instance

That is it!  You can now rename your computer!

11 thoughts on “‘The directory service is busy’ error when renaming a domain computer

  1. Marty

    Your suggestion did not work for me. Is there something incorrect with my syntax? Thanks.

    C:\WINDOWS\system32>setspn -d MSSQLSvc/IHBI-Z220-62682.qut.edu.au:QSRNVIVO10 IHBI-Z220-62682
    Unknown parameter MSSQLSvc/IHBI-Z220-62682.qut.edu.au:QSRNVIVO10. Please check your usage.

  2. ArmgaSys Post author

    Marty,

    At first glance, it looks like you may have a space in the SPN name (I.E. the QSRNVIVO10 IHBI-Z220-62682 looks like there is a space between the 0 and the I).
    If the name really does contain a space, put the entire name in quotes.

    setspn -d “MSSQLSvc/IHBI-Z220-62682.qut.edu.au:QSRNVIVO10 IHBI-Z220-62682”

  3. Adam

    Any idea *why* this happens and why this solution works? I have the same problem, but am having trouble finding a solution. Also, I’ve seen workstations with the SPN entry but can still be renamed. However, those particular machines had another entry that looked like “MSSQLSvc/[Computer Name]”.

  4. Fauzul

    Great tutorial! Finally found something that works concerning this issue. Now I don’t need to go and format the PC that I am working on.

Leave a Reply

Your email address will not be published. Required fields are marked *