Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

restore a single table Expand / Collapse
Author
Message
Posted Sunday, February 28, 2010 7:15 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, January 22, 2014 3:50 PM
Points: 43, Visits: 142
Guys how do you go about restoring a single table from a backup? As of right now I restore the backup after that I create a temporay database on the production server lets's call it temporay tables. I than export the table from the restored backup into that temporary database. I also know that I can go into the database that I will restore to rename the original table than import the one from the backup. So my question is how do you restore an SQL server table to a new name when doing the import back to the original database basically the original table is named example and I want to restore to example2.
Post #874170
Posted Sunday, February 28, 2010 8:49 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:48 PM
Points: 36,949, Visits: 31,455
I could certainly be incorrect here but I don't believe that you can restore a given table as a different name directly. I believe the only way to do this is the way you've already doing it... restoring to a separate temporary database and then going from there.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #874186
Posted Sunday, February 28, 2010 9:11 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 10:26 AM
Points: 11,194, Visits: 11,136
I don't normally post links to commercial software, but since this site is funded by redgate:

http://www.red-gate.com/products/sql_backup/row_level_restore/why_row_level_restore.htm

Paul




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #874191
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse