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)
 help - got error when restore using file and group

Author  Topic 

neubie
Starting Member

21 Posts

Posted - 2008-11-26 : 22:38:09
hi there,
I'm new in this forum, and also new in sql

ok, think go to the point

I create new database (name is NEW), and I want to restore from another backup (name is OLD). Somehow there is an error, and the message is:
Microsoft SQL-DMO (ODBC SQLState: 42000)
---------------------------
Device activation error. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL\data\NEW.mdf' may be incorrect.
File 'OLD_Data' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\NEW.mdf'. Use WITH MOVE to identify a valid location for the file.
Device activation error. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL\data\NEW_log.ldf' may be incorrect.
File 'OLD_Log' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\NEW_log.ldf'. Use WITH MOVE to identify a valid location for the file.
RESTORE DATABASE is terminating abnormally.
---------------------------

please help me. thanks

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-26 : 23:03:31
Restore database with Move option. See booksonline for details.
Go to Top of Page

neubie
Starting Member

21 Posts

Posted - 2008-11-27 : 00:35:44
for sodeep
did you mean help in sql server for booksonline?
sorry for this question, I really new in sql server

anyway, can "move option" restore database use current log file (not from restore file, but database which want to be restored)?
thanks
Go to Top of Page

neubie
Starting Member

21 Posts

Posted - 2008-11-27 : 03:10:56
hi, I'd tried move option, and this is the result:
Server: Msg 3206, Level 16, State 1, Line 1
No entry in sysdevices for backup device 'OLD'. Update sysdevices and rerun statement.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE FILELIST is terminating abnormally.
Server: Msg 3206, Level 16, State 1, Line 2
No entry in sysdevices for backup device 'OLD'. Update sysdevices and rerun statement.
Server: Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.

any advice?
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-11-27 : 03:56:13
What was the syntax that you used?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-27 : 08:35:17
quote:
Originally posted by neubie

for sodeep
did you mean help in sql server for booksonline?
sorry for this question, I really new in sql server

anyway, can "move option" restore database use current log file (not from restore file, but database which want to be restored)?
thanks



No,it gets from restore file unless you are attaching only Mdf file.

Show us your code for restore if you need help.
Go to Top of Page

neubie
Starting Member

21 Posts

Posted - 2008-11-27 : 23:12:40
ok here the syntax:
use master
go
restore filelistonly from OLD
restore database new from old with recovery,
move 'old_data' to 'c:\program files\mssql\data\new_data.mdf',
mofe 'old_log' to 'c:\program files\mssql\datat\new_log.ldf'
go

--> I'm not sure whether my code right or false, I just copied from help. please your advice. thanks
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-11-28 : 03:01:07
What is OLD? What are you trying to do? restore from a backup on disk?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

neubie
Starting Member

21 Posts

Posted - 2008-12-03 : 19:50:02
hi, sorry, got network problem.

anyway, OLD is name of database that want to be grabbed its data.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-12-04 : 03:40:17
You can't restore a database from an existing database, you can only restore a database from a database backup.

Take a backup of the database Old, then restore that backup as the new database and use the move to specify new locations for the files.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -