locked
Moving DB to new PC RRS feed

  • Question

  • I've got a SQL 2008 express database and engine currently running on a domain machine.  I need to move it to a different PC on a workgroup.  If I just move the PC to the workgroup I lose access to the database when I don't log in using the original domain user.  How do I migrate the database to the new user?

    Thanks for your advice.

    dpm

     

    Monday, August 22, 2011 7:40 PM

Answers

  • Moving it onto a different PC would be easiest by backing the database up and restoring to your express instance in your workgroup. You can assign your new workgroup user as a login to the instance and give it db user access.


    Regards,
    Mark Broadbent.

    Contact me through (twitter|blog)

    Please click "Propose As Answer" if a post solves your problem
    or "Vote As Helpful" if a post has been useful to you
    • Marked as answer by dpm1 Tuesday, August 23, 2011 12:41 PM
    Monday, August 22, 2011 7:53 PM

All replies

  • Moving it onto a different PC would be easiest by backing the database up and restoring to your express instance in your workgroup. You can assign your new workgroup user as a login to the instance and give it db user access.


    Regards,
    Mark Broadbent.

    Contact me through (twitter|blog)

    Please click "Propose As Answer" if a post solves your problem
    or "Vote As Helpful" if a post has been useful to you
    • Marked as answer by dpm1 Tuesday, August 23, 2011 12:41 PM
    Monday, August 22, 2011 7:53 PM
  • Use BACKUP/RESTORE to copy the database. Then change the owner of the database to be user you use in the workgroup.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Monday, August 22, 2011 10:07 PM
  • Mark,

    Thanks for your advice - I was able to migrate the database as you suggested.  The key for me was to log in as the old user and create the new credentials with appropriate permissions BEFORE moving the DB.  Then all I needed to do was log in as the new user and everything worked.

    Thanks,

    dpm

     

    Tuesday, August 23, 2011 12:41 PM
  • Databases can be moved to new environment using following ways.

    1. Attatch and Detatch database files

    2.Backup and Restore.

    Please remember to move logins,jobs,maintenance plans and so on.....


    velmurugan.s
    Thursday, August 25, 2011 8:56 AM