how do I add a user

Ceci Bylls 0 Reputation points
2026-09-13T13:28:06.26+00:00

How do I add a remote user on the same network to use the data in ms sql server

SQL Server Database Engine
0 comments No comments

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 137.4K Reputation points MVP Volunteer Moderator
    2026-09-13T13:53:59.8066667+00:00

    It would have helped if you had given more details about your network. I will briefly cover the most two common scenarios.

    If this is a user in a domain, you simply say

    CREATE LOGIN "Domain\User" FROM WINDOWS
    

    If there is no domain, but only a workgroup, it is more difficult. In a Workgroup, Window authentication only works if the same username & password exists on both machines. So you would first need to create a user in Windows on the SQL Server machine, and the other person would need to change the password to be the same as on the computer he or she is using.

    In SQL Server you would say:

    CREATE LOGIN "Machine\User" FROM Windows
    

    Note here that Machine is the computer where SQL Server is running, not the machine the other user is connecting from.

    If this not feasible, you can simply create an SQL login with a password in SQL Server, bypassing Windows entirely. In this case, you must enable SQL Server authentication. You do that from Object Explorer, by right-clicking the top server node and select Properties and go to the Security page. You need to restart SQL Server for the change to take effect.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.