| Author |
Topic  |
|
Finarfin
Starting Member
France
28 Posts |
Posted - 06/01/2004 : 05:54:39
|
Thank you, it's a bit more clear now 
Thank you all |
 |
|
|
fromabove
Starting Member
3 Posts |
Posted - 08/11/2004 : 14:47:06
|
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. |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
Posted - 08/11/2004 : 14:49:53
|
SQL Server 2003 - this is not a valid version. 2000?
Do you have the .BAK file on your development machine?
Tara |
 |
|
|
fromabove
Starting Member
3 Posts |
Posted - 08/11/2004 : 15:09:33
|
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. |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
Posted - 08/11/2004 : 15:14:47
|
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 |
 |
|
|
fromabove
Starting Member
3 Posts |
Posted - 08/11/2004 : 15:41:29
|
Okay, it worked. I wasn't pointing it to move to C:.
Thanks a ton, Tara! You rule!  |
 |
|
|
st
Starting Member
3 Posts |
Posted - 01/08/2006 : 04:19:59
|
| How can I check whether some backup database was made with mediapassword. If that is so, how can I get this mediapassword? |
 |
|
|
Kristen
Test
United Kingdom
22191 Posts |
|
|
bvprasad
Starting Member
USA
3 Posts |
Posted - 01/21/2010 : 16:41:56
|
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 |
 |
|
|
webfred
Flowing Fount of Yak Knowledge
Germany
8515 Posts |
|
Topic  |
|