Backup whole instance, restore to a new server, with all the logins and permissions intact

  • Dear all,

    This simple questions may have been asked by someone, but I've been looking through this forum for half an hour but still no clue.

    The job is just as the title. there is an instance in a SQL server 2005, SQL01. We are going to migrate this whole instance to another SQL Server SQL02, while ensuring all the Logins and the linking to the database users and all the permissions are kept intact.

    Please enlighten me

    Thank you

    Andrew

  • Hi,

    Script the logins from Master DB; Script the Jobs from MSDB;

    Move the databases using either Detach\Attach or Backup\Restore to the new instance

    Run the login script on Master

    Create the jobs back using the script

    If sny SSIS packages stored in MSDB, you may have to import them back.

    Thank you

    [font="Verdana"]Renuka__[/font]

  • You can backup & restore msdb between servers. Assuming the drives are the same, your Agent jobs should be ok. If the drives & whatnot are different, you'll need to go the scripting route in order to adjust the necessary scripts.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Hi

    We've just done this exact process, ie move all our DB's from 1 2005 box to another and I found a login script that worked very well. Not only does it create all the logins but it keeps the passwords too and it also sets the db access correctly.

    I won't paste it on this forum as not sure what the protocols are? Are we allowed to do that?

    The other replies are what we did too ie.

    Stop the SQL service on old server

    Detach DB's

    Move the mdf and ldf files to new server

    Attach DB's

    Run login script

    Create the jobs running in SQL Agent on the new server

    Create new backup and maintenance plans and schedule them. Don't leave this for a week like we did before someone thought about it....

    Go to the pub (this one is optional)

  • Rather than post the script I've found the link - see below.

    http://support.microsoft.com/kb/246133/

    Hope it helps

  • Grant Fritchey (5/12/2010)


    You can backup & restore msdb between servers. Assuming the drives are the same, your Agent jobs should be ok. If the drives & whatnot are different, you'll need to go the scripting route in order to adjust the necessary scripts.

    system database collations can be an issue here, ensure they match (I.e. Master, model, msdb). It's almost certain you will still end up amending some jobs.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 6 posts - 1 through 5 (of 5 total)

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