简体   繁体   中英

Take users with SQL Server database backup and restore them at another server

如何使用户拥有SQL Server数据库备份并在另一台服务器上还原他们?

After restoring the database, you can list the users and the corresponding security identifiers (SID) in the restored (current) database that are not linked to any login in the new server.

run the following script:

 EXEC sp_change_users_login 'Report'

You can fix the login by executing the following script for every login reported in the above script:

EXEC sp_change_users_login 'AUTO_FIX', '<reported user name>', NULL, '<password>'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM