简体   繁体   English

使用SQL Server 2008仅还原数据

[英]Restore only data with SQL Server 2008

I have notice, that when i am trying to restore DB, it is restoring DATA + Stored Procedures. 我注意到,当我尝试还原数据库时,它正在还原DATA +存储过程。 I want to restore only data from my existing database in sql server 2008, how can i achieve this. 我只想从sql server 2008中的现有数据库中还原数据,我该如何实现。

Scenario is I have Production DB and Development DB, while developing i have made several changes to SPs and Table Structure. 场景是我拥有生产数据库和开发数据库,​​而在开发过程中我对SP和表结构进行了几处更改。 My file which i am using to track those changes is lost and now i want all Table Structure + SP's change in DB, and should also have latest data from production DB. 我用来跟踪这些更改的文件丢失了,现在我希望所有表结构+ SP的更改都在数据库中,并且还应该具有生产数据库中的最新数据。

How can i achieve this? 我怎样才能做到这一点?

You can't do a selective restore. 您无法执行选择性还原。

You have to restore the backup to another "work" database and then migrate the bits you want to recover into the target database. 您必须将备份还原到另一个“工作”数据库,然后将要恢复的位迁移到目标数据库。 After that, you're free to drop the work database. 之后,您可以随意删除工作数据库。

You can use the following two tools, one to sync your objects and the other one to sync your data: 您可以使用以下两种工具,一种用于同步对象,另一种用于同步数据:

ApexSQL Diff – a SQL Server database comparison and synchronization tool which detects differences between database objects and resolves them without errors. ApexSQL Diff –一种SQL Server数据库比较和同步工具,它可以检测数据库对象之间的差异并解决它们而不会出错。 It generates comprehensive reports on the found differences and can automate the synchronization process between live and versioned databases, backups, snapshots and script folders 它针对发现的差异生成全面的报告,并可以自动进行实时数据库和版本数据库,备份,快照和脚本文件夹之间的同步过程

ApexSQL Data Diff - a SQL Server data comparison and synchronization tool which detects data differences and resolves them without errors. ApexSQL Data Diff-一个SQL Server数据比较和同步工具,可检测数据差异并解决它们而不会出错。 It can compare and sync live databases and native or natively compressed database backups and generate comprehensive reports on the detected differences 它可以比较和同步实时数据库以及本机或本机压缩的数据库备份,并生成有关检测到的差异的综合报告

Disclaimer: I work as a Product Support Engineer at ApexSQL 免责声明:我是ApexSQL的产品支持工程师

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM