Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

Restore a SQL Table

We have some software running on a client's server that uses a SQL database.

They are getting the following error:
Spooler error - 0x8c040005 (MSP_WEB_ADMIN Table not Initialized)
To resolve this - Restore the record in the MSP_WEB_ADMIN table.

My question is, how do you restore a single SQL table?
0
bax2000
Asked:
bax2000
1 Solution
 
YveauCommented:
You cant't ... at least not with the default restore command.
You can restore the complete database to another database and then write a simple script to copy the table from the restored database to the original one, after you cleaned it. If it is not a huge table something like this will do:

insert into Original.dbo.Table (col1, col2, col3, ...)
select  col1, col2, col3, ...
from Restored.dbo.Table R

Hope this helps ...
0
 
tmcguire47Commented:
I am pretty sure you restore the whole DB to a new DB, call it "Restore_Sandbox_DB" or something different from your normal one.  Then you can import/export the table.

There is a strategy called online piecemeal restore, that involves making your filegroups and backups super granular so that restores of parts of the DB are quick and easy:
http://blogs.msdn.com/sqlcat/archive/2005/10/27/485580.aspx
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
<<My question is, how do you restore a single SQL table?>>
Unless the table is placed in a specific filegroup that you can restore separately, you can't...

Hope this helps..
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now