How to take Database Users/logins Backup and restore them in SQL Server 2005

  • Hi,

    How to take backup of database users/logins in SQL Server 2005 and what is the procedure of restoring them on different server.

    If I take full backup of Master database along with other user database then I restore user database backups along with master database then should I have all logins/users available?

    Please clarify.

    Thanks

  • read this article.

    http://www.sqlservercentral.com/articles/Administration/migratingloginstoanotherserver/1140/

    this will give you an overview of what you need to do.

    look at for reference

    sp_help_revlogin

    sp_change_users_login

    there are scripts on this site which will automate this for you. But read the article so you have an understanding of what you are trying to achieve

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • vaseem (8/26/2009)


    Hi,

    If I take full backup of Master database along with other user database then I restore user database backups along with master database then should I have all logins/users available?

    Please clarify.

    Thanks

    I dont think this approach works properly when you are restoring on another server. What if the windows user logins on the other server are different. Master database contains server wide and database wide configurations. These could be different on the server where you are going to restore.

    The best way would be to script the logins and run the script on the new server.

    "Keep Trying"

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply