Solved

move SQL 2005 DB to SQL 2008

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

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.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now