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
 General SQL Server Forums
 New to SQL Server Programming
 restore database?

Author  Topic 

gongxia649
So Suave

344 Posts

Posted - 2006-03-10 : 18:14:14
i delete my database from enterprise manager. I backup a copy before deleting it. i tried right click server group/databases/all tasks/restore. to browse for the .bak file. This file exist.
is this the way how to restore the database?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-03-10 : 18:31:18
Yes. Alternatively, you could use the RESTORE DATABASE command in Query Analyzer:

RESTORE DATABASE DbNameGoesHere
FROM DISK = 'C:\SomePath\SomeBackupFile.BAK'
WITH REPLACE, RECOVERY

Tara Kizer
aka tduggan
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-09-12 : 18:05:37
i got the bak file from my company. Want to restore it in my laptop.

i got this porblem

Server: Msg 5105, Level 16, State 2, Line 1
Device activation error. The physical file name 'E:\Program Files\Microsoft SQL Server\MSSQL\Data\SS_DCDE_Data.MDF' may be incorrect.
Server: Msg 3156, Level 16, State 1, Line 1
File 'SS_DCDE_Data' cannot be restored to 'E:\Program Files\Microsoft SQL Server\MSSQL\Data\SS_DCDE_Data.MDF'. Use WITH MOVE to identify a valid location for the file.
Server: Msg 5105, Level 16, State 1, Line 1
Device activation error. The physical file name 'D:\Program Files\Microsoft SQL Server\MSSQL\Data\SS_DCDE_Log.LDF' may be incorrect.
Server: Msg 3156, Level 16, State 1, Line 1
File 'SS_DCDE_Log' cannot be restored to 'D:\Program Files\Microsoft SQL Server\MSSQL\Data\SS_DCDE_Log.LDF'. Use WITH MOVE to identify a valid location for the file.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-12 : 18:11:13
Just like the error says, you need to use the WITH MOVE option of the RESTORE DATABASE command.

Tara Kizer
Go to Top of Page

gongxia649
So Suave

344 Posts

Posted - 2006-09-12 : 18:25:09
i got it...i used EManager
Go to Top of Page

Luis Martin
Yak Posting Veteran

54 Posts

Posted - 2006-09-12 : 20:30:02
or Query Analyzer, REstore with move option.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-13 : 11:17:18
quote:
Originally posted by Luis Martin

or Query Analyzer, REstore with move option.




Isn't that what I said in my last post?

Tara Kizer
Go to Top of Page

Luis Martin
Yak Posting Veteran

54 Posts

Posted - 2006-09-13 : 16:40:00
quote:
Originally posted by tkizer

quote:
Originally posted by Luis Martin

or Query Analyzer, REstore with move option.




Isn't that what I said in my last post?

Tara Kizer



I did not read what you wrote.
With 18 post at all, I'm not looking for a record.
Go to Top of Page
   

- Advertisement -