Administering a SQL Database Infrastructure — Question 48

You are migrating a database named Orders to a new server that runs Microsoft SQL Server 2016.
You attempt to add the [Corpnet\User1] login to the database.
However, you receive the following error message:
"User already exists in current database."
You need to configure the [Corpnet\User1] login to be able to access the Orders database and retain the original permissions.
You need to achieve this goal by using the minimum required permissions.
Which Transact-SQL statement should you use?

Answer options

Correct answer: C

Explanation

The correct answer is C, as it directly associates the existing user [Corpnet/User1] with the respective login without needing to drop and recreate the user. Options A and D require additional steps that are unnecessary since the user already exists, and option B grants too many permissions by adding the user to the sysadmin role, which is not needed for this task.