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
 General SQL Server Forums
 New to SQL Server Programming
 restore database?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gongxia649
So Suave

Azores
344 Posts

Posted - 03/10/2006 :  18:14:14  Show Profile  Visit gongxia649's Homepage  Reply with Quote
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

USA
37157 Posts

Posted - 03/10/2006 :  18:31:18  Show Profile  Visit tkizer's Homepage  Reply with Quote
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

Azores
344 Posts

Posted - 09/12/2006 :  18:05:37  Show Profile  Visit gongxia649's Homepage  Reply with Quote
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

USA
37157 Posts

Posted - 09/12/2006 :  18:11:13  Show Profile  Visit tkizer's Homepage  Reply with Quote
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

Azores
344 Posts

Posted - 09/12/2006 :  18:25:09  Show Profile  Visit gongxia649's Homepage  Reply with Quote
i got it...i used EManager
Go to Top of Page

Luis Martin
Yak Posting Veteran

Argentina
54 Posts

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

tkizer
Almighty SQL Goddess

USA
37157 Posts

Posted - 09/13/2006 :  11:17:18  Show Profile  Visit tkizer's Homepage  Reply with Quote
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

Argentina
54 Posts

Posted - 09/13/2006 :  16:40:00  Show Profile  Reply with Quote
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
  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.08 seconds. Powered By: Snitz Forums 2000