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

前端 未结 4 1271
夕颜
夕颜 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: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

提交回复
热议问题