How do I restore a single table from a SQL Server 2005 backup?

前端 未结 4 1259
夕颜
夕颜 2021-02-13 03:35

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?

相关标签:
4条回答
  • 2021-02-13 04:10

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

    0 讨论(0)
  • 2021-02-13 04:12

    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

    0 讨论(0)
  • 2021-02-13 04:24

    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

    0 讨论(0)
  • 2021-02-13 04:26

    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.

    0 讨论(0)
提交回复
热议问题