nerdexam
Microsoft

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.

Design and implement data storage

Question

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 migration is complete. Which stored procedure should you use to export the logins?

Options

  • Asp_change_users_login
  • Bxp_logininfo
  • C5p_help_revlogin
  • Dsp_helplogins

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    88% (21)
  • C
    8% (2)

Why each option

To export login information for migration and ensure uniqueness, the `xp_logininfo` procedure can retrieve detailed login attributes.

Asp_change_users_login

`sp_change_users_login` is used to map database users to server logins (fix orphaned users), not to export login information for migration.

Bxp_logininfoCorrect

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.

C5p_help_revlogin

`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.

Dsp_helplogins

`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

#SQL Server migration#logins#user management#sp_help_revlogin

Community Discussion

No community discussion yet for this question.

Full 70-473 Practice