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
 Import/Export (DTS) and Replication (2000)
 All I have is the .bak file
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Finarfin
Starting Member

France
28 Posts

Posted - 06/01/2004 :  05:54:39  Show Profile  Reply with Quote
Thank you, it's a bit more clear now

Thank you all
Go to Top of Page

fromabove
Starting Member

3 Posts

Posted - 08/11/2004 :  14:47:06  Show Profile  Reply with Quote
quote:
Originally posted by X002548

Put he dump on the sql server box itself....



How would I do this? I have used FILELISTONLY to get logical and physical names, but even when I use the simple RESTORE, I get an error.

I am running the evaluation version of SQL Server 2003 locally on my development machine, rather than on a server, just in order to deal with a couple of .bak files.

Obviously I am not a DBA, but I am for this project.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36831 Posts

Posted - 08/11/2004 :  14:49:53  Show Profile  Visit tkizer's Homepage  Reply with Quote
SQL Server 2003 - this is not a valid version. 2000?

Do you have the .BAK file on your development machine?

Tara
Go to Top of Page

fromabove
Starting Member

3 Posts

Posted - 08/11/2004 :  15:09:33  Show Profile  Reply with Quote
quote:
Originally posted by tduggan

SQL Server 2003 - this is not a valid version. 2000?


Yes, you're correct - sorry.

quote:
Do you have the .BAK file on your development machine?


Yes, I have a copy on the C drive.

Here's the command:

RESTORE DATABASE DBName
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\DBName_db_200405061724.BAK'

which produces the following:

Server: Msg 5105, Level 16, State 2, Line 1
Device activation error. The physical file name 'd:\MSSQL7\data\DBName_Data.MDF' may be incorrect.
Server: Msg 3156, Level 16, State 1, Line 1
File 'DBName_Data' cannot be restored to 'd:\MSSQL7\data\DBName_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:\MSSQL7\data\DBName_Log.LDF' may be incorrect.
Server: Msg 3156, Level 16, State 1, Line 1
File 'DBName_Log' cannot be restored to 'd:\MSSQL7\data\DBName_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
36831 Posts

Posted - 08/11/2004 :  15:14:47  Show Profile  Visit tkizer's Homepage  Reply with Quote
You need to use the WITH MOVE option:

RESTORE DATABASE DBName
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\DBName_db_200405061724.BAK'
WITH MOVE 'DBName_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\DATA\DBName_Data.MDF',
MOVE 'DBName_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL\DATA\DBName_Log.LDF'


You will need to use FILELISTONLY to figure out what you need to pass the MOVE option.

Tara
Go to Top of Page

fromabove
Starting Member

3 Posts

Posted - 08/11/2004 :  15:41:29  Show Profile  Reply with Quote
Okay, it worked. I wasn't pointing it to move to C:.

Thanks a ton, Tara! You rule!
Go to Top of Page

st
Starting Member

3 Posts

Posted - 01/08/2006 :  04:19:59  Show Profile  Reply with Quote
How can I check whether some backup database was made with mediapassword. If that is so, how can I get this mediapassword?
Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 01/08/2006 :  05:50:27  Show Profile  Reply with Quote
I see you have started a new thread

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=59946

which is a good idea because people may not be following this old thread!

Kristen
Go to Top of Page

bvprasad
Starting Member

USA
3 Posts

Posted - 01/21/2010 :  16:41:56  Show Profile  Reply with Quote
Thanks for the instructions to restore from .bak file. My bak file is 31GB. It is asking me to show 360GB (12 times the bak file size) as free space, which I don't have. Is there a way I can reduce the free space requirement?

Thanks
Prasad
Go to Top of Page

webfred
Flowing Fount of Yak Knowledge

Germany
8764 Posts

Posted - 01/21/2010 :  16:59:57  Show Profile  Visit webfred's Homepage  Reply with Quote
Duplicate post.
It goes on here:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=138695


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 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