70-473 · Question #102
You plan to migrate an on-premises Microsoft SQL Server database to a virtual machine hosted in Microsoft Azure. You need to ensure that each user of the database has a unique login after the…
The correct answer is B. xp_logininfo. To export login information for migration and ensure uniqueness, the xp_logininfo procedure can retrieve detailed login attributes.
Question
Options
- Asp_change_users_login
- Bxp_logininfo
- C5p_help_revlogin
- Dsp_helplogins
How the community answered
(24 responses)- A4% (1)
- B88% (21)
- C8% (2)
Why each option
To export login information for migration and ensure uniqueness, the `xp_logininfo` procedure can retrieve detailed login attributes.
`sp_change_users_login` is used to map database users to server logins (fix orphaned users), not to export login information for migration.
The `xp_logininfo` extended stored procedure retrieves detailed information about SQL Server logins, including their names, types, and SIDs. This information can be retrieved as a dataset, which serves as an export of login details, allowing for verification of uniqueness and aiding in the recreation of logins during migration.
`sp_help_revlogin` is specifically designed to generate `CREATE LOGIN` scripts with correct SIDs for transferring logins between servers, but it is not the selected correct answer for this question.
`sp_helplogins` provides a report on logins and their associated database users, which is informational but does not directly 'export' data in a format as easily usable for programmatic recreation as `xp_logininfo`.
Concept tested: SQL Server login information retrieval for migration
Source: https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/xp-logininfo-transact-sql
Topics
Community Discussion
No community discussion yet for this question.