Monday, March 19, 2012

Copy Database or Database Restore

Hi,

I am restoring one of my database from test box to production box. I don't have all the logins defined(users for copied database) in production box, What happen if user tries to access the database. I guess they will not be able as user is defined but there is no matching logins.

Will Copy Database wizard creates all logins as Restore Database does not?

Thanks

No. When you copy the database as well as when you restore the database, you only get the database. The logins have to be copied over separately. This can be done with a copy logins tasks in SSIS. Then once the logins are moved, you can remap the users to teh logins using sp_change_userslogin.

No comments:

Post a Comment