If a Windows Server machine hosting SQL Server 2008 R2 is changed to another domain, what steps definitely and might need to be done for SQL Server before and after the new domain is joined?
2 Answers
Be sure to have a sysadmin or securityadmin that is not bound by any domain, eg. SA, and that they are allowed to logon:
SELECT l.name, l.denylogin, l.isntname, l.isntgroup, l.isntuser
FROM master.sys.syslogins l
WHERE l.sysadmin = 1 OR l.securityadmin = 1
ORDER BY l.isntgroup, l.isntname, l.isntuser
If you want to document all non sql local users in all databases you could use:
exec sp_MSforeachdb 'select ''?'' as DB_name,name from ?.sys.sysusers where isntname=1'
Look at who is starting your sql services:
select servicename,service_account,startup_type_desc as StartupType from sys.dm_server_services
Check where the db files are, then check who can access them:
select db_name(database_id), name,physical_name from sys.master_files
I was looking for a pretty extensive list. See this answer to this question: https://dba.stackexchange.com/questions/37583/moving-sql-server-to-different-domain/39000#39000
sa
after joining Domain B. This was about a year ago and I still find the occasional issue where I find another reference to an old Domain A user account.