# Database Discussions > Microsoft SQL Server 2005 >  attach dataase with all  users

## baburc

hai

    How can i preserve all users while moving an mdf,ldf file from one system to another.
when i tried to attach just by copying mdf and ldf file from on system to another ,all users created is lost.
so please tell me how to preserve the existing users.


thanks.

----------


## Steve R Jones

You did a "restore" vs. coping didn't you?

Are the same users already created on the new system? Either way - odds are you'll have to re-attach them.

----------


## rmiao

You can copy sql logins along with pwd and sid using sp_help_revlogin, get sp here: http://support.microsoft.com/kb/918992.

----------

