SQL Server 2005 (Express) - User login vs

I am brand new to Microsoft SQL Server. I have some experience with MySQL, and there you have a user with privileges, if I understand things correctly; these privileges determine which databases you have access to on the MySQL server.

However, now I am in a situation where I need to restore a database on my SQL Server 2005 Express, and this database has its own users and user password. Therefore, if I want these users to be accessible externally (so that they can connect to my server), how would I do this?

To illustrate clearer; let's say there are two accounts on the database server "Mike" and "John", and in the database "Animals" there are two users; Chris and Jeff.

I need Jeff to be able to log in to access the database. Is there a good way to do this without creating new users / logins? And if not, what is the best / most common solution?

I would really appreciate a helpful contribution to this!

+4
source share
2 answers

One server-level object (login) is mapped to several database-level objects (users).

A login cannot be mapped to multiple users in a database, but can be mapped to no more than one user in each database.

Therefore, you need to create new logins for these users, but map them to existing users. This is done using the ALTER USER command. Or, if you are unable to use your Mike and John accounts, in addition to matching them with these existing users, you can also do this.

+7
source

Any user who needs access to the database must either have his own login, or you can create a login for the Windows security group and provide this access to the entire set of users. Then, if you need to provide access to more users in the future, you can simply add them to the Windows security group.

+2
source

Source: https://habr.com/ru/post/1301839/


All Articles