Wednesday, March 7, 2012

Restore a single table

I wanna restore a single table (example material) that I created on a
filegroup (example, sales). I have four filegroups.
I did a filegroup backup, but I don't want restore all filegroups, I want
restore only sales filegroup because it has my table.
I used :
CREATE TABLE material (id int) ON sales
BACKUP DATABASE Teste
FILE = 'TesteData1',
FILEGROUP = 'x',
FILE = 'TesteData2',
FILEGROUP = 'sales'
...
TO Teste1F
with init
GO
backup log Teste to Teste1L with noinit
GO
could I use this command :
restore DATABASE Teste
FILE = 'TesteData2',
FILEGROUP = 'Sales'
from Teste1F
with norecovery
GO
restore LOG teste from Teste1L
WITH recovery, file=1
But I used but this is not good for me.. the table disappear
thanks a lotPartial Database Restore Operation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_71f7.asp
AMB
"Mônica" wrote:
> I wanna restore a single table (example material) that I created on a
> filegroup (example, sales). I have four filegroups.
> I did a filegroup backup, but I don't want restore all filegroups, I want
> restore only sales filegroup because it has my table.
> I used :
> CREATE TABLE material (id int) ON sales
> BACKUP DATABASE Teste
> FILE = 'TesteData1',
> FILEGROUP = 'x',
> FILE = 'TesteData2',
> FILEGROUP = 'sales'
> ...
> TO Teste1F
> with init
> GO
> backup log Teste to Teste1L with noinit
> GO
> could I use this command :
> restore DATABASE Teste
> FILE = 'TesteData2',
> FILEGROUP = 'Sales'
> from Teste1F
> with norecovery
> GO
> restore LOG teste from Teste1L
> WITH recovery, file=1
> But I used but this is not good for me.. the table disappear
> thanks a lot

No comments:

Post a Comment