Uninstalling SQL Server 2005 after a domain name change

I have installed a new Windows Server 2008 server (domain controller) with SQL Server 2005. Then I had to change the domain name and ran into problems with SQL Server. It would not start easily and it could not be uninstalled.