copy a database within SQL Server Express?

前端 未结 13 2581
眼角桃花
眼角桃花 2020-12-07 22:02

I would like to make a copy of a database I have but keep it on the same server as a test database. However, everything I have found is to use the copy database wizard (I am

13条回答
  •  失恋的感觉
    2020-12-07 22:59

    I just thought of a really nifty way to get around this :) So I thought I should post my idea. Note that this is 'untested' but I think it will work.

    1. Do a "Back Up..." database (theoretically this is on your production server, but it doesn't have to be)
    2. Copy the backup file (from your prod server) onto your development machine
    3. Assuming you're using SSMS Developer Edition on your development machine, you can then do a "Restore" onto your development machine, then do a "Copy Database" afterwards also on your development machine (to create a new copy of the DB)
    4. Now do a "Back Up..." on the new DB you just created, copy the backup file (to your production server) and do a "Restore" on the sql server express server :)

    Hope this helps out a few people :)

    Cheers,

    Jeff

提交回复
热议问题