如何从 SQL Server 2005 备份中恢复单个表?

发布于 2024-07-08 21:03:09 字数 64 浏览 7 评论 0原文

我已经使用常规 SQL Server 2005 备份命令进行了备份。 有没有办法只恢复单个表,而不是整个数据库?

I've got a backup made using the regular SQL Server 2005 backup command. Is there a way to restore just a single table, not the whole DB?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

怀中猫帐中妖 2024-07-15 21:03:09

将整个数据库恢复到另一台机器(或临时数据库),然后复制表对我来说似乎是最简单的。

Restore the whole database to another machine (or temporary database), then copy the table seems like the easiest to me.

疯了 2024-07-15 21:03:09

SSMS 本身不支持此功能,但可以使用第三方工具。

除了 Red Gate(顺便说一句,很棒的工具)之外,您还可以尝试 SQL Diff (恢复对象)和 来自 ApexSQL 的 SQL 数据差异(恢复数据)。

免责声明:我不隶属于 ApexSQL,但我们是他们的客户并使用他们的工具

This is not natively supported in SSMS but it’s possible using third party tools.

Apart from Red Gate (great tools btw) you can try SQL Diff (restore object) and SQL Data Diff (restore data) from ApexSQL.

Disclaimer: I’m not affiliated with ApexSQL but we are their customers and use their tools

心欲静而疯不止 2024-07-15 21:03:09

SQL Server 中备份和恢复的单位是数据库(它是参照完整性的外边界)。

Red Gate 有一些非常好的工具用于行级恢复( SQL 数据比较和 SQL 备份),但它们是有代价的。

The unit of backup and recovery in SQL Server is the database (it is the outer boundary of referential integrity).

Red Gate has some pretty good tools for row-level restore (SQL Data Compare and SQL Backup), but they come at a price.

拥有 2024-07-15 21:03:09

分离当前数据库,然后将数据库与您需要的表的日期恢复到新位置(创建一个子文件夹),将其与生产数据库分开,然后将数据库恢复到该子文件夹,完成后查找您需要的表并将其编写为创建脚本文件,保存到文件中,完成数据库删除,然后重新附加原始数据库,现在向下滚动到要恢复的表,并将其编写为创建文件(这是仅备份)现在删除表,确保选择了您的数据库,并且活动数据库接下来加载您刚刚在查询分析器中使用其他数据库创建的脚本文件并运行它,它应该报告成功,现在检查一下您的数据库是否成功tbl已被替换。 你完成了

Detach the current database then restore the database with the date of the tbl you need to a new location (make a sub folder) to put it in keep it separate from your production databases, then restore the database to that sub folder, when completed find the tbl you need and script it to a create script file save to a file, your done with the database delete it then reattached the original one, now scroll down to the tbl you want to restore and script it to a create file (this is a backup only) now delete the tbl, make sure your database is selected and the active one next load the the scripted file you just created with the other database in the query analyzer and run it, it should report successful now check to see if your tbl has been replaced. your done

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文