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.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 help - got error when restore using file and group
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

neubie
Starting Member

21 Posts

Posted - 11/26/2008 :  22:38:09  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
7174 Posts

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

neubie
Starting Member

21 Posts

Posted - 11/27/2008 :  00:35:44  Show Profile  Reply with Quote
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 - 11/27/2008 :  03:10:56  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 11/27/2008 :  03:56:13  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
What was the syntax that you used?

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

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 11/27/2008 :  08:35:17  Show Profile  Reply with Quote
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 - 11/27/2008 :  23:12:40  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 11/28/2008 :  03:01:07  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
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 - 12/03/2008 :  19:50:02  Show Profile  Reply with Quote
hi, sorry, got network problem.

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

GilaMonster
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 12/04/2008 :  03:40:17  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000