我在SQL Server 2008中有一个数据库,我想将其复制到另一台计算机上。
I have a database in SQL Server 2008, which I want to copy to another computer.
如何进行这样的复制?
一旦完成,我应该在另一台计算机上从我的副本再次构建数据库吗?
Once this is done, what should I do at the other computer to build the database once again from my copy?
推荐答案简单答案:将其备份,然后在另一台计算机上还原。
Simple Answer: Back it up, then restore it on the other computer.
在此处查看: technet.microsoft/en-us/library/cc966495.aspx
那里有很多东西,但是从本质上来说,右键单击数据库的任务>备份。填写选项以执行到某处的完整备份。
There's a lot of stuff there, but essentially, right click on the database, Tasks > Backup. Fill in the options to perform a full backup to somewhere.
一旦它在第二台计算机上创建了备份(一个大文件,按照惯例带有BAK扩展名)。 ,右键单击数据库文件夹,单击还原数据库,然后按照提示进行操作。
Once it has created the backup (one big file, by convention with a BAK extension), on the second computer, right click the Databases folder, Restore Database and follow the prompts.
如果愿意,您也可以在SQL中执行此操作:
You can do it as well in SQL if you wish:
- 备份: http:/ /msdn.microsoft/zh-CN/library/ms186865.aspx
- 还原: msdn.microsoft/zh-CN/library/ms186858.aspx
- Backup: msdn.microsoft/en-us/library/ms186865.aspx
- Restore: msdn.microsoft/en-us/library/ms186858.aspx
有时可能最好分离和移动,但是这种方法总会感觉更安全!
There might be times when it's better to detach and move, but this approach always feels a bit safer!
这将复制结构和数据库中的数据。
This will copy both structure and the data in the database.
更多推荐
如何将数据库从一台计算机复制到另一台计算机?
发布评论