Provisioning SQL Databases — Question 5
You administer a Microsoft SQL Server 2012 instance named SQL2012. You are in the process of migrating a database from a SQL Server 2008 instance named
SQL2008 to the SQL2012 instance.
You have upgraded a database from the SQL2008 instance by using the side-by-side migration technique.
You need to migrate the SQL Server logins from the SQL2008 instance to the SQL2012 instance.
What should you do?
Answer options
- A. Back up the master database on the SQL2008 instance. Restore the master database on the SQL2012 instance
- B. Use the Transfer Logins task in a Microsoft SQL Server Integrated Services package
- C. Use sp_grantlogin
- D. Use xp_logininfo.
Correct answer: C
Explanation
The correct answer is C, as sp_grantlogin is specifically designed for granting login access to SQL Server users. Option A is incorrect because restoring the master database is not a practical way to migrate logins and can lead to issues. Option B suggests using an SSIS task, which may not be necessary for this specific action, and D is not suitable for migrating logins as xp_logininfo is used for retrieving login information, not for migrating it.