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


Top 5 Contributors of the Month
AndyV
webmaster
SOHINI DASGUPTA
Post New Web Links

Differential backup failed because the previous backup metadata for Database of SQL Server

Posted By:      Posted Date: November 16, 2010    Points: 0   Category :Sql Server
 

I'm developing a VSS requestor that backs up Microsoft SQL Server, among other things. Full backups and restores work just fine. A differential backup always fails though, giving an error in the event log with Event ID 8197:

"Differential backup failed because the previous backup metadata for Database <dbname> of SQL Server instance <instance> is corrupted"

and the writer is in the state "VSS_WS_FAILED_AT_POST_SNAPSHOT" with error hr=0x800423f4

When my full backup runs, the differential_base_xxx fields in sys.databases are updated and correctly reflect the time that the full backup was taken.

The documentation I have read on the SqlServerWriter says that the metadata is recorded in the VSS event BackupComplete, which is definitely being called. During backup I see the writer state move from waiting for backup complete to stable.

I'm using SQL Server 2008 R2 on Windows 2008 R2. There are no other versions of SQL Server installed on that machine.

Can anyone suggest why this is happening?

thanks

James




View Complete Post


More Related Resource Links

SQL Server Analysis Services Backup error "Errors in the metadata manager. Either the database with

  

I get the following error when this perl script tries to backup the database using ASCMD.exe 2008 command line tool

<return xmlns="urn:schemas-microsoft-com:xml-analysis"><root xmlns="urn:schemas-
microsoft-com:xml-analysis:empty"><Exception xmlns="urn:schemas-microsoft-com:xm
l-analysis:exception" /><Messages xmlns="urn:schemas-microsoft-com:xml-analysis:
exception"><Error ErrorCode="3239313412" Description="Errors in the metadata man
ager. Either the database with the ID of &#39;xyz_old&#39; does not exi
st in the server with the ID of &#39;ABCD\Sql_AS&#39;, or the user doe
s not have permissions to access the object."
Source="Microsoft SQL Server 2008
Analysis Services" HelpFile="" /></Messages></root></return>

I have tried using different account for impersonation but everything fails.

Any help would be really appreciated.

Thanks.


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 do you backup a database using sql server 2005 express???

  

I know there isn't a backup feature but I was wondering if there was a way to back up a database?

 

Thanks!!!


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 failed for Server 'MAINSERVER'

  

HI All,

I AM USING SQL EXPRESS 2008 

Whaen i Try from my local Computer to Tack Backup DataBase from Server to my locak Hardisk i found below Error

"Unhandled exception has occurred in your application. if you click the application will ignore this error and attempt to continue. if you click Quit the application will close immediately

Backup failed for Server 'MAINSERVER'

 

ITS URGENT 

 

REGARDS!


SQL Server VSS Writer -Differential Backup - Does it even work?

  
I have been trying to develop a tool to do backup/restore of MS SQL Server using SQL Server VSS Writer. I can not get the differential backup working! I am just curious as to whether anyone ever made differential backup using VSS. Here is what I have been doing,
1. Create a full backup and store files and the Backup component document associated with it.
2. Update the tables in the database.
3. Create a new backup by setting 'SetBackupState' as VSS_BT_DIFFERENTIAL
4. Now when adding the existing components to the Backup Component Document, I find the component's time stamp from the document in step 1, and then invoke it with 'SetPreviousBackupStamp'
5. Now after the snapshot is taken, I go through each of the component and invoke 'GetPartialFileCount' API. This always return the value 0. I am assuming if there is a change in an existing component, it should give a value greater than 0.

Am I missing something here? Do we need to start SQL Server VSS Writer using certain parameters or something? I tried different configurations including (Windows Server 2008/ SQL Server 2008)

Will full or differential backup break LSN chain if compatibility level = 80 in SQL Server 2005/2008

  
My understanding is that full or differential backup will not break LSN chain starting in SQL Server 2005.  However, I'm not sure whether this applies to databases with compatibility level 80 in SQL Server 2005/2008 or not.

backup database after sql server stopped

  

Is it possible to backup a database after the sql server is stopped?

Thanks.


Can we backup a sql server database (.bak) using Visual Studio?

  
I am unable to install sql server in my computer since the hardware and software are not met. So please tell me if there is any way to restore the .bak file to its' original using visual studio 2008.

How do you automate the SQL Server 2008 Database and OLAP backup ?

  
Hi All,

I have SQL Server 2008 Enterprise SP2 x64 database in my Windows Server 2008 Enterprise, my question is how to perform automated backup for both database content into shared network drive? eg. the MDF and the LDF as well as the OLAP database ?

Thanks.

/* Server Support Specialist */

How to Backup Single Server (Database on same server )Extra-net SharePoint Site MOSS 2007 SP1? and H

  

Hi,

I have to create Test Server (Single server with Database on Same Server).

What Kind of Backup should i be asking  to Hosting Company,SharePoint MOSS 2007 SP1 Extra net site Hosted by 3rd Party.

How to restore it to Test Server and Has any one documented this process and has anyone had sucess in doing similar work ?

I do not have any access to Production server.How to make sure i have same server setup & configuration as Production Server.

 

I have to customize this site and do some development work so i thought this would be best approach ?

 

Please let me know..thanks..

 

 


Restore of database backup done by script failed

  

Hi,

In my C++ application (with MFC) developed in Visual Studio 2010 the user has an option to take a backup of the current database. This is done by executing a Stored Procedure which takes the database name and backup file name as parameters:

CREATE PROCEDURE sp2_backup_database @DATABASE nvarchar(100), @FILENAME nvarchar(260)
WITH ENCRYPTION
AS
SET NOCOUNT ON
Begin
  Exec ('Backup Database [' + @DATABASE + '] TO  DISK = ''' + @FILENAME + '''
      WITH COPY_ONLY, NOFORMAT, INIT,  NAME = ''' + @DATABASE +
      '-Full Database Backup'', SKIP, NOREWIND, NOUNLOAD, STATS = 10')
   Return @@ERROR
End
GO

All this works fine, the backup is done properly by the SP.
What is bothering me is that when trying to make a restore of the database from the backup file the restore fails with a message like (freely translated from Swedish):

"Restore failed for [the SQL Server]. (Microsoft.SqlServer.SmoExtended)
Additional information:
System.Data.SqlClien.SqlError: RESTORE can not process the database [Database-name] since it's in use by this process. It's recommended to use master database during this task."

The only way I can

SMO Backup failed using Sql Server 2008 R2

  

Hello,

To do database backup with C# I am using the following code:

 Server myServer = new Server(new Microsoft.SqlServer.Management.Common.ServerConnection(lServer, lUserID, lPassword));
                Microsoft.SqlServer.Management.Smo.Backup oBackup = new Microsoft.SqlServer.Management.Smo.Backup();
                oBackup.Action = BackupActionType.Database;
                oBackup.Database = lDatabase;
                oBackup.Devices.Add(new BackupDeviceItem(mBackupFileName, DeviceType.File));
                oBackup.Initialize = true;
                oBackup.Checksum = true;
                oBackup.ContinueAfterError = true;
                oBackup.Incremental = false;
                oBackup.LogTruncation = BackupTruncateLogType.Truncate;
         &

Restoring a differential backup on a different server

  

Hi,

I have a simple backup schedule for one of our database : full backup on fridays and differential the rest of the week.  I now want to restore this backup on a different server.  I can successfully restore the full backup but I can't restore the differential, even if i checked the no-recovery option.  The message I have is "Cannot apply the backup on device...".

Here is the header of my backup set.

BackupName         BackupDescription BackupType ExpirationDate      Compressed Position DeviceType UserName     ServerName DatabaseName  DatabaseVersion DatabaseCreationDate   BackupSize       FirstLsn          LastLsn           CheckpointLsn        DifferentialBaseLsn     BackupStartDate      BackupFinishDate     SortOrder CodePage UnicodeLocaleId UnicodeComparisonStyle CompatibilityLevel SoftwareVendorId SoftwareVersionMajor SoftwareVersionMinor SoftwareVersionBuild MachineName Flags    BindingId               RecoveryForkId             Collation
--------------------------- ------------------ ---------- ------------------------ ---------- -------- ---------- ----------------- ----------- --------------- --------------- ------------------------ ---------------------- --------------------------- --------------------------- --------------------------- --------------------------- ------------------------- ------------------------

SQL Server Backup and Restore (video)

  
Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.

Metadata: Create a Database Schema Repository with Meta Data Services in SQL Server 2000

  

SQL Server 2000 Meta Data Services is a repository technology that stores and manages metadata for SQL Server. Instead of building database schemas over and over, Meta Data Services allows you to freeze an entire schema for use in other projects. You can also use these schemas for training, testing, or debugging. In this article, the authors will review the various components of Meta Data Services and show how it can be programmed using a Visual Basic client, XML, and XSLT. They will also show you how to manage and manipulate your metadata by generating a simple database schema using a SQL Server repository.

Alok Mehta and Ricardo Rodriguez

MSDN Magazine May 2003


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!
Categories: 
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