SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 restroing a table to another folder
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pelegk2
Aged Yak Warrior

Israel
723 Posts

Posted - 03/21/2007 :  03:33:57  Show Profile  Visit pelegk2's Homepage  Send pelegk2 an ICQ Message  Reply with Quote
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

United Kingdom
12543 Posts

Posted - 03/21/2007 :  06:48:24  Show Profile  Visit nr's Homepage  Reply with Quote
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

Israel
723 Posts

Posted - 03/21/2007 :  07:04:35  Show Profile  Visit pelegk2's Homepage  Send pelegk2 an ICQ Message  Reply with Quote
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

United Kingdom
12543 Posts

Posted - 03/21/2007 :  12:54:21  Show Profile  Visit nr's Homepage  Reply with Quote
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.

Edited by - nr on 03/21/2007 12:55:09
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000