Solved

move SQL 2005 DB to SQL 2008

Posted on 2009-04-09
4
367 Views
Last Modified: 2012-05-06
I have two SQL servers running, one 2005 the other 2008.  I am in the process of retiring the 2005 server and need to move my db's over to the 2008 server.  I tried doing a backup in 2005 and restore into 2008 but get errors when I try this.  The error is as follows:

"Restore failed for Server 'SQL'. (Microsoft.SQLServer.SmoExtended)

Additional Information:
System.Data.SqlClient.SqlError: File 'F:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data\PJIPro.MDF' is claimed by 'PJIPRO_RMHanover_Log'(2) and 'PJIPRO_RMHanover_DATA'(1). The WITH MOVE clause can be used to relocate one or more files.  (Microsoft.SqlServer.Smo)"

The db is called PJIPro.  I checked the path and the data/log files are not there.

I'm not very well versed in SQL so any help I can get would be great.  I've got a number of db's to move, none very large, if there is also a way to batch move them I'd love to know how.

Thanks for the help.
0
Comment
Question by:jer007
[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
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
reb73 earned 250 total points
ID: 24109283
Why not just detach the individual mdf/ldf files in the SQL 2005 server, copy them across and attach them to the SQL 2008 server?
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24109288
first, post the results from this statement:

restore filelistonly from disk = 'c:\pathtoyourbackupfile.bak'

I'm interested in the name field, and the field that shows the path to the files....once you post those, I'll construct your restore statement for you.
0
 
LVL 25

Expert Comment

by:reb73
ID: 24109334
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24109365
Note that when you detach/attach, you have to take the database offline...which is always risky business.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

734 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