将一个数据库的内容导入另一个具有异常的数据库 [英] Getting contents of one database into another database with exceptions?

查看:59
本文介绍了将一个数据库的内容导入另一个具有异常的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我们有两个数据库,即生产和开发。我们需要将生产数据库的内容克隆到开发数据库中,以便能够在实际案例中测试内容。

we have two databases, productive and development. We need to clone the contents of the productive database into the development database to be able to test stuff on actual cases.

我们要做的是基本清除开发数据库中的所有内容,但保持结构完整,然后用生产数据库的内容填充它。所以它改变内容而不改变表格和内容。表
在两个数据库中都是相同的,但只有一个 - 开发数据库有一个附加表。此表及其内容不得更改。

What we want to do is to basically clear all content from the development database, but leave the structure intact, and then fill it with the content of the productive database. So it is changing content without changing the tables and stuff. The tables are the same in both database, but one - the development database has an additional table. This table and its content must not be changed.

问题是,如果我现在清空开发中的所有表(但例外),我可以使用管理工作室的备份和恢复功能用生产数据库表的内容填充开发数据库的表?如果没有,是否有
另一种方法可以不费力地做到这一点?

Question is, if I now empty all tables in development (but the exception), can I use the backup and restore function of the management studio to fill the development database's tables with the content of the productive database's table? If not, is there another way to do this without too much effort?

推荐答案


我可以使用管理工作室的备份和恢复功能,用生产数据库表的内容填充开发数据库的表吗?

can I use the backup and restore function of the management studio to fill the development database's tables with the content of the productive database's table?

不,不可能。

将您的附加开发表移动到一个单独的数据库中,然后您可以使用prod的备份更新dev。

Move your additional development table into a separate database, then you can update dev with backup from prod.


这篇关于将一个数据库的内容导入另一个具有异常的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆