.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Restore 2005 database on 2008 R2 Trial

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :Sql Server
I've downloaded SQL Server 2008 R2 Trial and installed it on Windows Server 2008 trial running under Virtual PC on XP. I've made backups of databases on my SQL Server 2005 and tried to restore them using a) the wizard - results in a messagebox saying "Specified cast is not valid" and no backup sets are available in the Restore Database window. b) using T-SQL - results in Msg 3183, Level 16, State 2, Line 1 RESTORE detected an error on page (0:0) in database "dp" as read from the backup set. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. Using the wizard and RESTORE on 2005 for the same database backup works fine. c) Detach on 2005 and Attach on 2008 results in: SQL Server detected a logical consistency-based I/O error: incorrect pageid... Detach and Attach worked fine on 2005 and DBCC CHECKDB revealed no errors. Thanks for any info...

View Complete Post

More Related Resource Links

how to restore msdb database on sql 2008 from sql 2005 backup?

Currently, I am unable to do it. It gives me the error than I cannot be restored because it was created by a different version of the server. What is the work-around? I hate scripting all my maintenance plans and alerts, there are tonns of themJulieShop

restore SQL server 2005 database on new SQL server 2008 not working

please any one advice me ,i have Great Plain database on SQL server 2005 when i tried to install new SQL server 2008 and restore my Database the GreatPlain not working well as well the Data Base

restore 2005 database into 2008 error 3154


I am trying to restore a 2005 database to a 2008 database.  This is the code that was generated by Management studio:




restore 2005 database into 2008 error 3154


I am trying to restore a 2005 database to a 2008 database.  This is the code that was generated by Management studio:




Can't restore database backup file in my database ? using sql server 2005. please help

VERY IMPORTANT i am trying to restore database.bak in sql server 2005 (i know the database.bak was also generated in sql 2005 server) i am trying to restore back up database .bak into the new database i just created in sql server 2005 i have saved my database .bak into c drive and when i select database .bak "From Device", it doesn't get populated in the list below and i see nothing and it keeps on prompting a message "You must select a restore source" Here's the screen shot:   PLEASE HELP..it's really important (i tried restoring database in sql server 2008 and it was sucessful but i am facing this problem in sql server 2005 only)  

Can SSAS 2005 run with Sql Server 2008 database engine?

Are there any known issues of running SSAS 2005 with SQL Server 2008 database engine?

Error when running an SQL script to restore a database on SQL Server 2008 R2 Express

Hi, At work, I use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. At home, I also use SQL Server 2008 Express running on Windows XP Professional Service Pack 3. Whenever I do work on the database at work, I usually restore the database at home (or vice versa) I have been using the following SQL scripts to back up the database and to restore the same database (at work or at home). BackupRealEstate.sql USE Master BACKUP DATABASE [RealEstate] TO DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH NOFORMAT, INIT, NAME = N'RealEstate-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO RestoreRealEstate.sql USE Master RESTORE DATABASE [RealEstate] FROM DISK = N'F:\My Documents\My Database\RealEstate.bak' WITH  FILE = 1, NOUNLOAD, REPLACE, STATS = 10 GO Everything worked fine until I replaced my 8yo home computer with a newer and faster one. My new home computer is running Windows 7 Home Premium and I use the latest SQL Server 2008 R2 Express. When I tried to run the above restore SQL script, I got the following error message: Msg 3101, Level 16, State 1, Line 2 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 2 RESTORE DATABASE is terminating abnormally. There was no other application/process using this database. Can someone please help me? Regards,

preemptive_os_writefilegather during restore from 2005 to 2008

I'm restoring a database that was backed up via SQL2005 x64 (windows server 2003 x64), onto a SQL2008 x64 (windows server 2008 x64).In activity monitor, it has two processes, one says Async_io_completion, the other just sits on preemptive_os_writefilegather, and the only thing that changes is the Wait Time. The CPU and Physical IO never change.The database backup file is only 98gb, and the server I'm restoring to is brand new, not under any heavy use, and has significant resources. It's been going for an hour, with no update to the GUI. It just sits there saying 0%.I remember from restoring databases, that percentage is supposed to change. Has SQL2008 really changed that much from SQL2005??I read an article saying that that wait type is due to reading through the transaction log, in order to prevent the transaction log from being created as a large file. But this database, when it was backed up, was in Simple recovery mode. Shouldn't that commit all transactions to the database at the time of the backup?I'm having issues with reporting services too, but I have a separate forum question for that one.*update*The restore finished in 2hours and 11 minutes. Is there any reason for this taking this long, when the actual backup only took 22 minutes?

SQL Server 2008 Database Restore(Database Mirroring)

HI,I tried to impliment Database mirrorin in SQL Server 2008.I have 3 Sqlserver 2008 Eneterprise Edition in 3 diiferent computers with same domain.Pricnicipal server =TCP://SPHDev.sphinet.com.sg:5022.Mirror=TCP://SPHPrimary.sphinet.com.sg:5022 and witness =TCP://wsc211.sphinet.com.sg:5022.But when i click start mirroring button i got an error TITLE: Database Properties------------------------------ An error occurred while starting mirroring. ------------------------------ADDITIONAL INFORMATION: Alter failed for Database 'SPH_MSCRM'.  (Microsoft.SqlServer.Smo) ------------------------------ An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The server network address "TCP://SPHPRIMARY.sphinet.com.sg:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418).This is the error message i got from Error Log"2009-06-03 17:01:08.89 spid27s     Database mirroring connection error 2 'DNS lookup failed with error: '11001(No such host is known.)'.' for 'TCP://SPHPRIMARY.sphinet.com.sg:5022"I restored Principal server DB  by using RESTORE WITH NORECOVERY and now this  database in mirror server is now look like as DBName(Restoring....).How i can identify

Do I need free space when doing full database restore in SQL Server 2005?


I have a drive 'F' with 40G free space. I try to restore a database whose data + log file size is 60G.

The restore fails. Is it because a full restore needs  free disk space of 60G in this case?


cannot restore sql 2000 database in sql server 2005 in windows 7


cannot restore the databse made in sql server 2000 in sql server 2005 in windows 7 with thw following error message

TITLE: Microsoft SQL Server Management Studio Express

Restore failed for Server 'KHURANA\SQLEXPRESS'.  (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476


System.Data.SqlClient.SqlError: The media set has 2 media families but only 1 are provided. All members must be provided. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&LinkId=20476



plz help me out

SQL Server 2005/2008 COPY Database Through Wizard



Let's start a very intresting thread here:

As you all know moving the database from one server(2000, 2005, 2008) to (2000, 20005, 20008) is not a big deal and can be done in many ways  like backup-restore, attcah-detach, and most easy (some time very complex:-)).

Here i wanna discuss an issue which i have faced.

I have two instances of SQL server 2008, i have created a new database Test in one instance, created few logins and mapped to  Test database with some permissions for this Test database.

Now i used copy database wizard to copy this test database to other instance, i sucessfully went through the wizard and selected SQL server object method to copy the Test database in other instance then i followed the remaing wizard, i selected the logins which i have created for the Test database and finnaly i reached the finish button i clicked finished and the copy of database completed sucessfully. I verified that Test dabase was there in other instance with the logins which i have created. So easy i was happy:-)

Problem: Some other day i wanted to copy AdventureWork database to the other instance of SQl server i was happy that its a very easy task i followed the same steps above(to copy the Test database ) and every thing went in the same way and i clicked finish to complete the wizard it took some time

Backup and Restore SQL Express 2008 database


Hi All,

How can backup and restore SQL Express 2008 database using c#.net

Thank you


Possible to create a sql 2005 database using vs 2008?


Is it possible to create a MS SQL 2005 database using Visual Studio 2008?

How about using Visual Web Developer 2008 Express Edition?

Restore an SQL 2008 full backup to SQL Serveer 2005



Dear All,


I have been working on a database on my laptop that has SQL Server 2008 Ktma installed.

The database was restored from a full backup that I had taken from the production SQL 2005 server.


Now that I have finished my job I want to restore it back to the production Server (SQL 2005). I took the backup with "No compression" on a disk file through the SQL 2008 Management studio.


However when trying to restore the SQL 2008 backup onto the SQL server 2005 I get an error:


The media family on device xxxx is incorreclty formed ....


Can someone help me on this. Is it possible that sql 2008 backups are not compatible to the sql 2005 structure?

Is there anyway to have my database restored back on the sql server 2005?


Thank you in advance,


S. Menegos


PS: It is not an issue of malformed file since I did the process several times (taking the backup, coping to the sql server 2005 machine).



Restore Problem with 2005 ..But working in 2008


Hi all,

 I am getting problem while restoring the backup file and getting "SQL Server cannot process this media family " error on SQL Server 2005. but It SUCCESSFULLY restored on SQL Server 2008. But the customer is telling this is 2005 backup and should be restored on SQL Server 2005. I executed RESTORE VERIFYONLY FROM DISK on both 2005 and 2008. In 2005 it gave media related error ...and 2008 it didn't though error. Please suggest what would be the problem..

-- Reddy Balaji C. ##Mark as answer if it solves the issue

SQL 2008 Fails to restore a database



I have a Windows 2008 R2 Server running SQL2008 (not R2).

I havew been trying to restore a database using the Restore Database Tool in Enterprise Manager. That is Right click the database, select Tasks ->Restore ->Database.

On the General page I have selected my source as a Database Backup and selected the file location. I have selected the only backup set in the file.

On the General Tab I have selected the 'Overwrite the existing Database (with Replace)'

When I click the OK button to action my selections I receive the following Error message:

Restore failed for Server 'WIN2008SQL'.  (Microsoft.SqlServer.SmoExtended)
System.Data.SqlClient.SqlError: File 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MAESTRODB.ndf' is claimed by 'MAESTRO_INDEX_DATFILE'(4) and 'MAESTRO_DATFILE'(3). The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo)

I have not been able t ofind a solution to this...


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend