Solved

On MS SQL 2005, I want to restore a backup file that was created from different server

Posted on 2008-06-13
5
169 Views
Last Modified: 2010-03-19
I am using MS SQL Server 2005 and I need to restore a backup file which was created on different server.
So I this was what I did:

1. Created a New Database on  my  SQL server
2. Right click the database
3. Tasks > Restore > Database
4. On "Source for restore" section, Selected "From Device"
5. Browse the file and selected the backup file and clicked "Ok"

After doing all of the above, I should see at least one list, but there is nothing to select.
Is it because the backup file is created from different server?
What should I do?
Thank you.
0
Comment
Question by:erin027
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 21783088
Yes...you could try to type in the exact UNC path to the file in the box:

\\servername\d$\filename.bak

OR...you could just type in the TSQL to restore it:

restore database yourdbname
from disk = 'UNCpathtofile'
with move
'logicaldatafilename' to 'C:\whereyouwanttostorethedatafile.mdf'
move
'logicallogfilename' to 'C:\whereyouwanttostorethelogfile.mdf', recovery
0
 

Author Comment

by:erin027
ID: 21783156
I have located the file and added, but after I added the backup file, it took me to the first step and on the bottom of that section, I should see the file that I have added, but I do not see any list there.
What should I do?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 21783161
Try to use the TSQL instead....
0
 

Author Comment

by:erin027
ID: 21783295
Thank you.
I am new to SQL and I am not familiar with the TSQL.
What is 'UNCpathtofile' and 'logicallogfilename'?
Also, it seems like I need to have log file as well, but I only have .bak file that was create in different server.
Where do I get log files from?
Thanks
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 500 total points
ID: 21783549
>>What is 'UNCpathtofile' and 'logicallogfilename'?
UNC path is the UNC path to the file...in the format of \\servername\driveletter$\filename.bak

logicallogfilename is the name that SQL server uses for the file.  To get this information, you need to use the RESTORE FILELISTONLY command....look it up in Google.

Also, the .bak file contains the data file and the log file....think of it as a big zipped file that contains all necessary information to get your db back up and running.
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get row count of current SQL query 8 64
SQL Express connecting form remote error 26 7 56
tempdb log keep growing 7 45
Stored Procedure needs owner to execute 5 45
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question