Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 restroing a table to another folder

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-03-21 : 03:33:57
i have a table that was saved to a separate file.
the table was backed up and now i want to restore it in another SERVER.
when i try to do that i see that the physicla file name point to
Y:\Program Files\Microsoft SQL Server\MSSQL\Data\January2007_Data.NDF
(a location that exist on the old server)
but on the new server i want it to be saved to drive D:
even when i change the drive manually to D it dosent work an i get the error :
error 42000 : the back up set file .... was created by BACKUP DATABASE ...
file=<name> and canot be used for this restore operation..

what can i do?
thanks
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

nr
SQLTeam MVY

12543 Posts

Posted - 2007-03-21 : 06:48:24
How did yo do the backup?

Are you doing the restore with move?
Sounds like this might be a filegroup rather than full backup or part of the backup set.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-03-21 : 07:04:35
yes i think it should be a filegroup but not sure
i tried this code :

RESTORE DATABASE Bill2007
FILEGROUP = 'january2007'
FROM DISK='D:\DOWNLOAD\Bill_012007.bak'
WITH FILE=1,NORECOVERY,PARTIAL

and the error i recive :
quote:

Server: Msg 3135, Level 16, State 2, Line 1
The backup set in file 'D:\DOWNLOAD\Bill_012007.bak'
was created by BACKUP DATABASE...FILE=<name> and cannot be used for this restore operation.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.



Thanks in advance
peleg


Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-03-21 : 12:54:21
Think you need to already have the database then you can restore the file over the file that is already there.

If it's a database file then think you would need all the files to do an attach.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -