My suggestion.

yangn (Raymond)
When you restore one database from server A to server B, the user ID in the restored database should already exist on the server B prior to the restoration, otherwise it will cause some security conflict. To solve this problem,

1. Use the sql server built in utility to generate the scripts about the login Id on server A and apply it on server B, then restore the database to server B.
But the passwords won't be transferred to server B , which means you have to add the passwords manually if you want to keep them .

2. If you don't care the difference of the security between two servers, you may use DTS to transfer the data only .

3. use system stored procedure sp_change_users_login to map the login id with the user id in the database.

2001-9-7 -04:00

回到话题: 在A电脑上backup一个SQL7数据库,将此备份文件restore到B电脑的SQL上,数据库中的login user会与B电脑SQL中建立的同名login user冲突。何解?或如何在两台电脑间备份恢复数据库?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论