Solved

move SQL 2005 DB to SQL 2008

Posted on 2009-04-09
4
364 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
  • 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

770 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