views:

70

answers:

2

I have a SQl Server 2005 database backup that I want to transfer to SQL Server 2008 on my server. I spent 3 days transferring the .bak file from my own machine to my server. I then tried to restore the bak file and I got an error. I then read online a completely different method for adding a SQL server 2005 Database to SQL server 2008 which was the detach and attach method which means I need to detach the database in SQL Server 2005 and then transfer the MDF file from it via ftp to my server and then attach it in SQL Server 2008. Well I already used a lot of bandwidth transferring the .bak file to my server. is there a way to convert my .bak file which is already on my server to an MDF file and attach it in SQL server 2008?

Here is the error:

==================================

Restore failed for Server 'SERVER'. (Microsoft.SqlServer.SmoExtended)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476


Program Location:

at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv) at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseOptions.RunRestore()

===================================

System.Data.SqlClient.SqlError: RESTORE detected an error on page (61823:-268517280) in database "testing" as read from the backup set. (Microsoft.SqlServer.Smo)


For help, click:


Program Location:

at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMessage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, Boolean errorsAsMessages) at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries) at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)

A: 

Short answer: no.

What error did you run into when attempting to restore the 2005 db onto the 2008 server?

UPDATE:
That sounds like a data corruption issue that most likely occurred during the transfer. Given the amount of time you said it took, it's completely reasonable.

The only solution I know of is to create a new backup, and start ftp'ing it again, while praying that it doesn't happen again.

Chris Lively
shit, alright thanks. Should I this time try transferring the mdf file instead? and do detach and attach
Brandon
detach and reattach has it's own problems. It *usually* works, but there's no guarantee. I'd say about 90% of the time I've used that method I haven't had an issue; however, that leaves the other 10%...
Chris Lively
That said, you might try asking this over in serverfault.com to see if they have any better ideas.
Chris Lively
Also try something along the lines of RESTORE VERIFYONLY FROM DISK='The Backup Path' to see if you get better information.
Chris Lively
A: 

If you want to turn the .BAK file into a .MDF file without using more bandwidth, you could uninstall SQL 2008, install 2005, restore into 2005. Then you could do the detach, uninstall 2005, reinstall 2008, attach into 2008... but that sounds like hell.

Jaymz
I've added the error to the my post
Brandon