Before I ask my question, let me mention that my SQL Server is installed on a member server of a domain (it belongs to the domain but is not an AD server).
I am having trouble adding a network user in SQL Server Management Studio.
First I tried adding a user by right-clicking security and clicking new -> login
. I wanted to add a network user, so I clicked locations. But only the name of the local server was showing. I was unable to browse my domain users (at that time I was logged in through a network user on my SQL Server machine).
So I tried another approach. I tried to add a network user through Transact-SQL as follows:
create login [domain\user] from windows;
But I got an error message saying - Windows NT user or group not found
- even though the user existed on my domain server.
What am I doing wrong?
-
2Could you please let us know your version of SQL Server and other software you are working with to make it easier to answer your question? =)Kassandry– Kassandry2015年12月23日 06:43:55 +00:00Commented Dec 23, 2015 at 6:43
-
Are you sure that the server is joined to that domain from where you are trying to add the user from?Viggos– Viggos2015年12月23日 07:13:51 +00:00Commented Dec 23, 2015 at 7:13
1 Answer 1
For me it worked to generate a script with SSMS.
USE [master]
GO
CREATE LOGIN [domain\user] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
ALTER SERVER ROLE [role] ADD MEMBER [domian\user]
GO