Sql-server – CREATE Windows User in database for not existing domain

downgradeSecuritysql serveruserswindows-authentication

Is it possible to create a Windows User in the database when the domain is not accessible?

I am preparing database at my dev environment outside of the targeted domain.
Created user is not expected to work at my dev of course.

I am trying:

CREATE USER [NOTEXISTINGDOMAIN\User1] WITHOUT LOGIN;

But getting an error:

Windows NT user or group 'NOTEXISTINGDOMAIN\User1' not found. Check the name again.

I have searched for help and it seems there is no way…which I don't believe much cause this seems to me like relevant scenario.

ADDITION:
Let me explain my scenario. My task is to downgrade database to older MS SQL Server (SQL 2017 to SQL 2016 to be precise). I cannot do this in customers environment (and domain, DC) cause obviosly there is no both MS SQL versions available. So I amd doing the downgrade in my dev. And I want to prepare the database for my customer with all objects in it, including users of all types, including Windows Users – so when my customer restores the database everything is ready and the same as in original database.

Obviosly I'll have to create users later after restoring the database in the customers environment.

Best Answer

No, it isn't possible. SQL needs to contact the DC to collect the user/group SID and needs to save it inside the sys.server_principals table in master database.