如何将数据库从一台计算机复制到另一台计算机?

编程入门 行业动态 更新时间:2024-10-28 06:25:50
本文介绍了如何将数据库从一台计算机复制到另一台计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在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.

更多推荐

如何将数据库从一台计算机复制到另一台计算机?

本文发布于:2023-11-09 13:49:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572521.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:计算机   一台   如何将   另一台   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!