.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

Unable to restore database backup.

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :


I am trying to restore a SQL Server 2005 database backup file.The size of the database backup is 5.51 GB. I specify the  source as a device and then provide the path of the .bak file and press OK i get the error as follows





TITLE: Microsoft SQL Server Management Studio

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


The media family on device 'G:\ITWeb DB Bkup\DB Bkup\New Bkup\WSS_Content_ITWEB.bak' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476



View Complete Post

More Related Resource Links

SQL2008 - Cannot Restore a new database from a full backup of a different one, database in use

I am trying to restore a brand new database from a copy of another one and am encountering an error message stating: System.Data.SqlClient.SqlError: The file <Backup source database file location> cannot be overwritten.  It is being used by database <Backup Source Database>. (Microsoft.SqlServer.Smo) I am running the Restore procedure with the REPLACE option and am wondering why it is stating that the source database is the database in use when I am trying to restore and overwrite a completely different database. This issue happens when running the replace both in C# using SMO and when manually restoring with SqlServer Management Studio Interesting note is, the original source database is created / deployed using a database project within VisualStudios 2010 and then deployed to SqlServer through VisualStudios. Any thoughts on why this is happening? Thanks in advance for any help!

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)  

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

"The backup set holds a backup of a database other than existing database. Restore Database is term

I have a problem when i restore my .DAT_BAK file.  I am getting error like "The backup set holds a backup of a database other than existing database.  Restore Database is terminating abnormally".   I tried by using   RESTORE DATABASE <DATABASENAME> FROM DISK = 'D:\DATA\MYTEST.DAT_BAK' WITH MOVE 'VZAI_DATA' TO D:\PROGRAM FILES\..\MSSQL\TEST.MDF', MOVE 'VZAI_LOG' TO D:\PROGRAM FILES\..\MSSQL\TEST.LDF', REPLACE   And also i tried like   RESTORE DATABASE <DATABASENAME> FROM DISK = 'D:\DATA\MYTEST.DAT_BAK' WITH REPLACE   When i use like this,   RESTORE FILELISTONLY FROM DISK = 'D:\DATA\MYTEST.DAT_BAK'. I am able to get the output as LogicalName, PhysicalName, Type, FileGroupName, Size, etc.   Can i anyone please help me out?   Thanks in Advance, Anand Rajagopal

Restore Database Backup using SQL Script


I need to backup a database using query.Please help me.

sharepoint 3.0 service, database backup restore


I am using stsadm to run daily backup of the server, but would like to run hourly database backup, not sure if it works to restore database and log for sharepoint service 3.0, the db is on sql 2005 embedded edition. does any one know or has any suggestions to backup WSS3.0 hourly?

I tried the backup restore feature in the admin site, didn't get it work when last time the server crashes, so right now only use stsadm backup / restore.

Backup and restore of mdf database



I've got a following problem: I have a VB 2005 application that uses SQL Server 2005 Express as DB engine. This application has it's own database stored in mdf file, e.g. invoices.mdf with corresponding log file.

I'd like to give users opportunity to backup and restore this DB file from this application (there won't be a system administrator, only end-users). Unfortunatelly after I connect to this database (using user instance of SQL Server), I'm unable to read or copy it, despite the fact, that I close all connections. And I'm sure that all connections are closed.

Database files become accessible for reading after I close the whole application.

I've tried to detach this database using sp_detach_db prcedure, but it can't be done with database I'm connected to.

I will be grateful for any help.


Database deployment with Backup and Restore vs. Generate and Publish Scripts Wiz.


Could you please explain when is it better to deploy (publish) a database with Backup and Restore and when with the Generate and Publish Scripts Wizard?

As far as I understand Data-tier Applications in SQL Server 2008 R2 is a third option, isn't it? Are there more?

Thank you!

Unable to restore master database


I'm trying to develop a backup/restore strategy for my merge replication setup. The system has already been deployed (over 20 subscribers) so this is quite a matter of urgency

The msdn/technet merge replication backup/restore strategies page (ms152497) recommends backing up the publication, master and msdb database, and I have done this through SQL Server Management Studio (SQL Server 2005).

I have tested restoring just the publication database, and it seems to work ok, with a test client still being able to synchronise properly.

However given that the master and msdb databases are also backed up, it makes sense to restore these as well; however when I try to restore the master database (right-click master, tasks, restore, database), it won't let me select the master database in the "To database:" drop-down field!

Alternatively, if I right-click master, tasks, restore, files and filegroups, then it allows me to select the master db as the "To database:" but I have never used the files/filegroups options before.

What is the proper way to restore the master and msdb datab

few sites are missing after taking backup and restore the content database


Hi All,

We have taken the backup of content database and restored it in the new server, after that attached the content database on sharepoint central admin, but few sites are missing after this. when checked the database server Number of records are matching in both the servers content database and also the data is matching, but still we are missing few sites. Do we need to do any specific change in sharepoint or database?

How to Specify Content Database for a Site Collection Restore from Backup


I have prepared code that first creates a new Content Database within a specified Web Application, then restores a Site Collection backup to that same Web Application.  Unfortunately, the Restore doesn't provide an option to select the Content Database that was just created.  So, is there something that I might do to ensure that the Site Collection gets restored to the Content Database of my choice, programmatically?  If not, is there something I can do to change the Content Database for the newly restored Site Collection?  All ideas would be appreciated.

Thank you,


SQL server2008, CRM4.0, unable to read sql backup file when trying to restore



For a client of ours we have two CRM4.0 environments, both on a seperate domain. Domain A and Domain B.
Domain A is used for testing and developing pursoses, Domain B is the production environment.

The client has requested that we match the Domain A environment with the Domain B environment so that the testing and production evironments are the same before they continue with testing/development.

For this purpose I wanted to just copy the Domain A SQL database to the Domain B environment.

Unfortunately I am getting the following error when trying to restore the CRM4.0 SQL database of Domain A on the CRM4.0 SQL database server of Domain B.

System.Data.SqlClient.SqlError: Read on "C:\Users\Cen-Admin\Desktop\VWPCRM_MSCRM.bak" failed: 38(failed to retrieve text for this error. Reason: 15105) (Microsoft.SqlServer.Smo)

I have tried to follow these instructions but have been unable to complete them because of the fact that i cannot initiate the restore action:


The link that the error provides in the detailed desciption field provides no qlue to a solution:

Restore database backup with Copy_Only option failed ?


When we failed to restore a backup from a BAK file for SQL Server 2008.


Then we find that the backup is created by using BACKUP xxxx COPY_ONLY parameter.  When we attempt  to restore from Management Studio (with the database changed to single user mode), we get the error message "There is NOTHING in the "Select the backup sets to restore".


We would like to seek your advice on

1) Whether we can restore the database from Management Studio GUI ?

2) If not, can you suggest a SQL Script for the backup ?


Thanking you in anticipation.

Backup and Restore SQL Express 2008 database


Hi All,

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

Thank you


BACKUP WITH CHECKSUM against an encrypted database - restore fails


I have five databases sitting on a new SQL 2008 R2 server.  The databases originated on SQL Server 7, went through both a SQL 2000 and a SQL 2005 upgrade, and last month were migrated to this new SQL 2008 server.  All five databases are in SQL 2005 compatibility mode.  All five databases are using SQL 2008's full database encryption.

Over the weekend, I changed the page verification of these databases from "torn page" to "checksum".  Nightly full backups were completed on Sunday night, and successfully restored to our reporting and hot-standby servers.  Yesterday, I added the WITH CHECKSUM keyword to the backup jobs.  Nightly full backups ran last night, completed successfully.  The restores of those same backups to reporting and standby FAILED, with several assertion failure messages.

Today, I created a brand new database, in SQL 2008 compatibility mode and "checksum" page verification.  BACKUP WITH CHECKSUM produces a restorable backup.  I then enabled encryption on that database, and did the same BACKUP WITH CHECKSUM operation.  The resulting backup cannot be restored, NOT EVEN on the same server.  The restore appears to complete, giving the normal output stating how many pages it processed, but the "recovery" portion of the restore throws an exception.

SharePoint 2010 backup is failing - Error - "Unable to read full interval from database - Operation



I am having a problem backing up a site collection, when trying to backup the collection I get the following error "Unable to read full interval from database" and "operation is not valid due to the current state of the object".

The backup does run and manages to backup 182MB of the site collection and then the backup fails, it fails at the same point what ever backup method I use e.g. STSADM, Powershell or Central Admin.

I'm getting the same error whether I use CA "granular backup" or "Farm backup", and using either STSAMD or Powershell. I can backup CA or the mysite collection but not the Home Portal site collection. I even tried installing the commuvaults 2010 agents and running a commuvault backup but this is also failing. i have included the log file entry below.

Does anyone have any suggestions on what i can do to either fix the problem or an alternative way to backup the collection or farm, I am currently taking a full SQL backup but am not sure how reliable this is as I haven't tried to restore the sites. 

P.S. I am not using the "UseSQLSnapshot" parameter.

11/30/2010 09:34:25.23  OWSTIMER.EXE (0x17E8)                 

Unable to restore from backup file when UNC path is used


I have a Visual Basic application built using Visual Studio 2008.  I connect to a SQL Server 2008 server using ODBC.  I connect to the master database and try to run the following statement:

RESTORE DATABASE [Village of Pleasant Prairie] FROM DISK = '\\\public\MyAppData\Village of Pleasant Prairie\MySQLServerData.backup' WITH REPLACE

When I do this, I get the following error:

Cannot open backup device '\\\public\MyAppData\Village of Pleasant Prairie\MySQLServerData.backup'. Operating system error 5(Access is denied.).

It may be important to note that (the address of the file server) is the same as the address of the SQL Server (both servers on running on the same physical box.  This server is also a domain controller (don't know if that is important, but it may be).

I tried changing the SQL command to:

RESTORE DATABASE [Village of Pleasant Prairie] FROM DISK = 'c:\public\MyAppData\Village of Pleasant

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