Restoration of Differential Backup

Hi,
I am running Microsoft SQL server 2008 in our environment. I have created one new database and configured Full and differential Backups.Full backup on every week and differential backup on every day.Now the database went to recovery mode accidentally.
I have not yet taken Full backup for that particular database.I have only the Differential backup.
While i am trying to restore that differential backup its showing an error.Its not allowing me to restore.
Please help me to solve this problem.
Vinodh Selvaraj

Hi,
I am running Microsoft SQL server 2008 in our environment. I have created one new database and configured Full and differential Backups.Full backup on every week and differential backup on every day.Now the database went to recovery mode accidentally.
I have not yet taken Full backup for that particular database.I have only the Differential backup.
While i am trying to restore that differential backup its showing an error.Its not allowing me to restore.
Please help me to solve this problem.
Regards,
vinodh selvaraj.
Vinodh Selvaraj
Hello,
You cannot take differential backup without taking full backup.You have to first restore full backup with no recovery and then latest differential backup taken after full backup with recovery.
What is the error which you are facing?
Duplicate post
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/91c2ac7e-b122-426a-8a52-62ad452551c0/restoration-of-differential-backup?forum=sqldatabaseengine
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

Similar Messages

  • Restoring the Differential backup file after the full back up restore

    Hi All,
    This is my full back up restore script
    RESTORE DATABASE VSO 
    FROM DISK = 'C:\DBbackup\\\VSO.bak' WITH 
    MOVE N'VSO' TO N'C:\PrestageRestoreTest\DATA_LOG\\VSO_Primary.mdf',
    MOVE N'VSO_log' TO N'C:\PrestageRestoreTest\DATA_LOG\\VSO_Primary.ldf', 
     NOUNLOAD,  REPLACE,  STATS = 10;
    After that i want restore Differential back up file on top of that , what   is the script?
    Thiru

    So below will workout, Am I correct?
    RESTORE DATABASE VSO 
    FROM DISK = 'C:\DBbackup\\\VSO.bak' WITH 
    MOVE N'VSO' TO N'C:\PrestageRestoreTest\DATA_LOG\\VSO_Primary.mdf',
    MOVE N'VSO_log' TO N'C:\PrestageRestoreTest\DATA_LOG\\VSO_Primary.ldf', 
     REPLACE,  STATS = 10,NORECOVERY;
    RESTORE DATABASE VSO 
    FROM DISK = 'C:\DBbackup\\\VSO_Diff.bak' WITH 
    MOVE N'VSO' TO N'C:\PrestageRestoreTest\DATA_LOG\\VSO_Primary.mdf',
    MOVE N'VSO_log' TO N'C:\PrestageRestoreTest\DATA_LOG\\VSO_Primary.ldf', 
     REPLACE,  STATS = 10,RECOVERY;
    Thiru

  • Restore Differential Backup

    Hi Balmukund,
    We are  using Sql server 2005 in production server.we are maintaining  two servers.. one for current day & another for Archive data .For the past few months we taking the full backup & restoring the same in the Archive sever.Now the volume
    got increased & it takes too much time to restore the full backup.So i am planning to restore the differential backup on the daily basis.I am planning as mentioned below,
    Weekly once (say Sunday)- Full backup
    Daily backup say Monday  to Saturday) - Differential backup.
    So i can restore the full backup on day 1 morning.
    and can restore differential backup on day 2 morning.
    From day 3 to day 6 onwards,how can i restore the same.
    Kindly send the script for the same or give me any other idea for the same.

    Hi... Balmukund
    Restored the full backup on day 1 morning.
    and restored differential backup on day 2 morning
    From day 3 onwards restored the latest differential backup and
    changed the database to Standby / No recovery mode
    for some reasons, I changed the database mode using the following script.
    ALTER DATABASE [DatabaseName] SET READ_WRITE WITH NO_WAIT
    Now my question is ,
    Kindly  confirm Is it possible to restore differential backup in that database
    What was the output of your alter database command? Also, if your db is still in restoring mode, you can restore additional diff backups on it. You can check the status of your db with the below query. If the status = online and is_in_standy = 0 then
    you have recovered the db and cannot restore additional backups. Will need to restart from full and lates diff again. HTH
    select
    name,
    state_desc,is_in_standby
    from sys.databases
    HTH...

  • Procedure restore Differential backup and to restore windows 2003 server

    Hello All,
      i am sticking at some of the points
    1. As per company policy they want to take full SAP offline + Redo log files backup once every two week and twice a week the differential backup. I suggested them the differential backup twice a week but now i have a question in mind since i never done it practically Do i need to have anything else like Log file to restore the Differential backup apart from full SAP backup or i can restore data with only Full SAP backup and differential backup.
    2. I am not much familiar with Windows 2003 server backup, If i take full Widows 2003 server backup will i be able to restore windows server along with installed SAP and all other software in case something happen to my server.
    if the answer is yes what are the pre-requisite if there be any to do the same. from the pre-requisite i mean do i need to be on same hardware as my previous server was or i can restore it on any other system too?
    i will appreciate any reply on the same.
    Mani

    Hi Mandy,
          I am not sure weather you are treating  Windows 2003 and SAP Backup i.e SQL Backup as two seperate things.
       SQL Backup : If you take MS SQL Backup ( directly from MSSQL or Schdule it from SAP DB13) and take full backup once a week or twice a week eg: Sunday full backup followed by monday, tuesday differential(Midnight) backups and Wednesday full backup again followed by Thursday and Friday differential(midnight).
         Should the database need to be restored to thursday @ 4:30 AM, you will restore Wednesday full backup + Thursday diffential + any log files backup taken there after.
    Windows 2003 Backup:
                Regarding this, You do not have to take Full Windows backup every day. You may take backup of few files / network drives, which can be restored directly while you are logged in to Server. It is sright forward.
               Sienario: When whole C drives of Windows crashed. To prepare for this sicenaro, you should take Windows system backup when ever you make chnages to kernal, SQL upgrade or before and after Windows patching.
             If the server crashes due to hardware failure, you should restore the server from backup .. ( for this there are different methods, like boot from boot disk and attach tape drive and restore or boot from disk and attach to NAS device and restore, you have to refer Windows 2003 restoration methods or consult your Windows specilist) which will bring back OS, kernal and SQL to normal state. and followed by SQL restore.
           Hope this helps.
    Krishna

  • Restore log and differential backups on a Publication database.

    Hi, i have the following issue, i have to restore a log backup and a differential backup in a publication database, the problem is that i want to keep the publications and the subscriptions without recreate the subscriptions.
    So how can i perform this goal :/ is somebody know how can i do that please let me know :D !!! thanks in advance.
    In my case is a merge replication....

    For merge replication you do not need to worry about the log reader agent - in fact there should not be one. Ensure that you use the keep_replication switch when doing the restore.
    Note that for merge replication the subscriber will backfill the publisher with changes in the publisher which are not in the subscriber. After this is done you might want to do a tablediff, but it should not be necessary, depending on how recent your full
    and differential backups were done.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • Differential backup and tlog backup

    Hi,
    What is the advantage of doing a differential backup along with transactional log backup? For instance, if I'm planning on doing a weekly full backup and daily transactional log backups what does doing an differential backup get me? Does it make restoring
    faster? Is it better to have that differential in case one of the transactional log backups are corrupt? 
    Please advise.
    Thanks,
    Phil

    What is the advantage of doing a differential backup along with transactional log backup? For instance, if I'm planning on doing a weekly full backup and daily transactional log backups what does doing an differential backup get me? Does it make restoring
    faster
    Phil,
    The best use of Differential backup is to reduce the RTO. It does not have any much special meaning. There is no disadvantage as such apart from disk getting filled with too many diff backups.
    It makes restoring faster in sense that you have to restore fewer numbers of backup and this decreases time to bring DB online when disaster strikes.
     Is it better to have that differential in case one of the transactional log backups are corrupt?
    If transaction log is corrupt there are chances that differential backup could also be corrupt. Your question does not have actual meaning. I guess you wanted to ask can we skip transaction log backup and restore latest Diff backup. Well you can as long
    as it is not corrupt.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Veritas MS SQL differential backup interrupt MS SQL Native differential backup

    I have MS SQL 2005 Enterprise edition and I am taking weekly(Every Sunday) full backup and daily differential backup using Veritas backup tool.
    Now I got request from application team to take SQL native full backup on Tuseday  and daily differential backup till next 2 days(i.e., till Thursday.) and keep intact current veritas backup strategy of daily differential and weekly full backup
    Now my question is will My MS SQL differential native backup will hamper by daily Veritas SQL differential backup or vice versa.
    Thanks in Advance!!!!!

    Hi,
    You should ask Veritas about this question whether Veritas backup would affect SQL Server backup or not I guess it will do.
    Now a solution here can be
    copy only backup. But unfortunately there is no meaning of differential copy only backup but you can take copy only log backup. What copy only backup does is it does not affect the current backup sequence which is occurring neither effects the restore.
    Now since you already have full and diff backup in place why cant you use Veritas backup.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • Differential backup files are almost the same size as full backups.

    Hello All,
    I have done a little research on this topic and feel like we are not doing anything to cause this issue. Any assistance is greatly appreciated. 
    The details: Microsoft SQL Server 2008 R2 (SP2) - 10.50.4297.0 (X64)   Nov 22 2013 17:24:14   Copyright (c) Microsoft Corporation  Web Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor).  The
    database I am working with it 23GB. The full backup files are 23GB, differentials are 16GB (and growing) and transaction logs bounce between 700KB to 20MB. The backup schedules with T-SQL follow:
    T-Log: daily every four hours
    BACKUP LOG [my_dabase] TO  DISK = N'F:\Backup\TLog\my_dabase_backup_2015_03_23_163444_2725556.trn' WITH NOFORMAT, NOINIT,  NAME = N'my_dabase_backup_2015_03_23_163444_2725556', SKIP, REWIND, NOUNLOAD,  STATS = 10
    GO
    Diff: once daily
    BACKUP DATABASE [my_database] TO  DISK = N'F:\Backup\Diff\my_database_backup_2015_03_23_163657_1825556.dif' WITH  DIFFERENTIAL , NOFORMAT, NOINIT,  NAME = N'my_database_backup_2015_03_23_163657_1825556', SKIP, REWIND, NOUNLOAD,  STATS =
    10
    GO
    declare @backupSetId as int
    select @backupSetId = position from msdb..backupset where database_name=N'my_database' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'my_database' )
    if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''my_database'' not found.', 16, 1) end
    RESTORE VERIFYONLY FROM  DISK = N'F:\Backup\Diff\my_database_backup_2015_03_23_163657_1825556.dif' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND
    GO
    Full: once weekly
    BACKUP DATABASE [my_database] TO  DISK = N'F:\Backup\Full\my_database_backup_2015_03_23_164248_7765556.bak' WITH NOFORMAT, NOINIT,  NAME = N'my_database_backup_2015_03_23_164248_7765556', SKIP, REWIND, NOUNLOAD,  STATS = 10
    GO
    declare @backupSetId as int
    select @backupSetId = position from msdb..backupset where database_name=N'my_database' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'my_database' )
    if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''my_database'' not found.', 16, 1) end
    RESTORE VERIFYONLY FROM  DISK = N'F:\Backup\Full\my_database_backup_2015_03_23_164248_7765556.bak' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND
    GO
    As you can probably tell we are not doing anything special in the backups, they are simply built out in MSSQL Management Studio. All databases are set to full recovery mode. We do not rebuild indexes but do reorganize indexes once weekly and also update
    statistics weekly.
    Reorganize Indexes T-SQL (there are 255 indexes on this database)
    USE [my_database]
    GO
    ALTER INDEX [IDX_index_name_0] ON [dbo].[table_name] REORGANIZE WITH ( LOB_COMPACTION = ON )
    GO
    Update Statistics T-SQL (there are 80 tables updated)
    use [my_database]
    GO
    UPDATE STATISTICS [dbo].[table_name]
    WITH FULLSCAN
    GO
    In a different post I saw a request to run the following query:
    use msdb
    go
    select top 10 bf.physical_device_name, bs.database_creation_date,bs.type
    from  dbo.backupset bs
    inner join dbo.backupmediafamily bf on bf.media_set_id=bs.media_set_id
    where   bs.database_name='my_database'
    order by bs.database_creation_date
    Results of query:
    physical_device_name database_creation_date type
    F:\Backup\Full\my_database_backup_2015_03_07_000006_2780149.bak 2014-02-08 21:14:36.000 D
    F:\Backup\Diff\Pre_Upgrade_OE.dif 2014-02-08 21:14:36.000 I
    F:\Backup\Diff\my_database_backup_2015_03_11_160430_7481022.dif 2015-03-07 02:58:26.000 I
    F:\Backup\Full\my_database_backup_2015_03_11_160923_9651022.bak 2015-03-07 02:58:26.000 D
    F:\Backup\Diff\my_database_backup_2015_03_11_162343_7071022.dif 2015-03-07 02:58:26.000 I
    F:\Backup\TLog\my_database_backup_2015_03_11_162707_4781022.trn 2015-03-07 02:58:26.000 L
    F:\Backup\TLog\my_database_backup_2015_03_11_164411_5825904.trn 2015-03-07 02:58:26.000 L
    F:\Backup\TLog\my_database_backup_2015_03_11_200004_1011022.trn 2015-03-07 02:58:26.000 L
    F:\Backup\TLog\my_database_backup_2015_03_12_000005_4201022.trn 2015-03-07 02:58:26.000 L
    F:\Backup\Diff\my_database_backup_2015_03_12_000005_4441022.dif 2015-03-07 02:58:26.000 I
    Is your field ready?

    INIT basically intializes the backup file, in other words, it will overwrite the contents of the existing backup file with the new backup information. 
    basically, what  you have now is you are appending all you backup files  (differentials) one after the other (like chain).
    you do not necessarily have to do it.  these differential backups can exist as different files.
    Infact, I would prefer them to separate, as it gives quick insight on the file, instead doing a  "restore filelist" command to read the contents of the backup file.
    The point Shanky, was mentioning is that : he wants to make sure that you are not getting confused between the actual differential backup file size to the physicial file size(since you are appending the backups) example : if you differential backup is 2
    gb, and over the next five you take a differential backup and append to a single file,like you are doing now,  the differential backup file size is 2gb but you physicial file size is 10Gb.  he is trying to make sure you are confused between these
    two.
    Anyways, did you get a chance to run the below query and also did you refer to the link I posted above. It talks a case when differential backups can be bigger than full backups and ' inex reorganize' or 'dbcc shrinks' can cause this. 
    --backup size in GB
    select database_name,backup_size/1024/1024/1024,Case WHEN type='D' then 'FULL'
    WHEN type='L' then 'Log'
    When type='I' then 'Differential' End as [BackupType],backup_start_date,backup_finish_date, datediff(minute,backup_start_date,backup_finish_date) as [BackupTime]
    from msdb.dbo.backupset where database_name='mydatabase' and type in ('D','I')
    order by backup_set_id desc
    Hope it Helps!!

  • Snapshots interfering with differential backups

    1- Setup full backs to happen Saturday nights.
    2- Setup differential backups to happen every night, execpt Saturdays
    3- This is on a VM machine, and we take a snapshot of it every Wednesday night.
    4- SQL Server records the snapshot as a valid, full backup, although it is marked as is_snapshot = 1.
    5- All differential backups after the snapshot are rendered useless. They are done based on the snapshot backup, not on the actual valid full backup done on Saturday.
    After research I found KB article 951288 (http://support.microsoft.com/kb/951288). Apparently this is a Microsoft issue.
    So, how do we tell SQL server to ignore the snapshot backup when doing the differential backups? And no, we do not want to stop doing our snapshots on Wednesdays. Is there a solution or a work around to this?
    This is really annoying and dangerous that SQL Server would consider these snapshots as valid, viable full backups on which to base its differential backups.
    Help much appreciated,
    Raphael
    rferreira

    Hi Raphael,
    According to the following document, virtualization Snapshots for Hyper-V or for any virtualization vendor are not supported to use with SQL Server in a virtual machine. I want to confirm whether there is any other important application running on the VM
    machine. If not, we can turn off VM Snapshot, if the VM machine failed, we just need to restore the database backup. For more detail information, please refer to the following link:
    Support policy for Microsoft SQL Server products that are running in a hardware virtualization environment
    http://support.microsoft.com/?id=956893
    Allen Li
    TechNet Community Support

  • How to restore a TM backup after HDD replacement?

    Hi everybody,
    The HDD in my Macbook pro failed, and I am replacing it
    MBP July 2011; HDD 500GB 7200 rpm; Mountain Lion.
    I have recent Time Machine backups. Now what´s the proper way to restore the backup.
    Should I boot up with the not yet formatted new HD and with the TM disk connected
    using some key combo?
    Or should I boot from the Mountain Lion Install CD and then be able to
    format and select the backup drive?
    Thanks for reading!
    Rob

    Thanks Eric,
    After inserting the original DVD I installed OSX and after reboot I had a working computer.
    There was no opportunity to restore the TM backup. however when I rebooted from the
    DVD again I saw that possibility from a menu of the install utility.
    I ran through the restore over night (8 hours) and when I woke up, I had my computer back!
    Thanks for helping me out.
    Cheers, Rob

  • Restore Time Machine backup after hard drive crash

    My hard drive on the mac book crashed, so I replaced it.  Now I need to get my time machine back up on the new drive.  I've already started using the computer and reinstalled lion, so I'm not getting the original "backup" screen.  How do I find my old time machine backups?

    Your best bet is to do a full restore from your backups.  See #14 in Time Machine - Frequently Asked Questions.

  • A june 2012 icloud backup shows up on my icloud storage manage list, but does not show up when i try to restore from icloud backup. what to do?

    Question repeated: A june 2012 icloud backup shows up on my icloud storage manage list, but does not show up when i try to restore from icloud backup. what to do?
    I want to restore from my june 2012 backup because it contains pictures that i lost when my phone broke in september. if anyone could help that would be awesome. thanks

    Did you tap "Show older backups" on the Choose Backup screen (see image below)?

  • How to Restore Full Offiline Backup using BRTOOLS from a Tape

    Dear all,
    I want to recover PRD Full Offline Backup using BRTOOLS from a tape in a new machine.
    I have Install SAP in the new machine.
    Now I want to restore the PRD Full Offiline Backup taken through BRTOOLs in tape in the new machine.
    1. I have shutdown the SAP.
    2. I have shutdown the database Oracle 10g.
    3. I have inserted the backup tape
    4. Through user ORASID I have executed BRTOOLS
    I got the following options: -
    BRTools main menu
    1 = Instance management
    2 - Space management
    3 - Segment management
    4 - Backup and database copy
    5 - Restore and recovery
    6 - Check and verification
    7 - Database statistics
    8 - Additional functions
    9 - Exit program
    I selected Option 5 Restore and recovery
    And got the Following Options
    Restore and recovery
    1 = Complete database recovery
    2 - Database point-in-time recovery
    3 - Tablespace point-in-time recovery
    4 - Whole database reset
    5 - Restore of individual backup files
    6 - Restore and application of archivelog files
    7 - Disaster recovery
    8 - Reset program status
    1. Now which option do I need to select and then what all other options do I need to select.
    2. Whether the database should be a mount state or shutdown ?
    Kindly help.

    Dear Mark,
    Thanks.
    As suggested I tried both the options however face some difficulties please suggest
                                       brrestore -u / -c -b <backup_log.ext> -p init<SID>.sap -m full
    hinrnddev:oradev 1> brrestore -u / -c -b bedflluv.fft -p initDEV.sap -m full
    BR0401I BRRESTORE 7.00 (32)
    BR0405I Start of file restore: redhafeh.rsb 2010-05-22 11.55.55
    BR0484I BRRESTORE log file: /oracle/DEV/sapbackup/redhafeh.rsb
    BR0252E Function fopen() failed for '/oracle/DEV/sapbackup/bedflluv.fft' at location BrbLogRead-1
    BR0253E errno 2: No such file or directory
    BR0121E Processing of log file /oracle/DEV/sapbackup/bedflluv.fft failed
    BR0406I End of file restore: redhafeh.rsb 2010-05-22 11.55.55
    BR0280I BRRESTORE time stamp: 2010-05-22 11.55.55
    BR0404I BRRESTORE terminated with errors
    When I used the brrestore command I got the above error message.
    Then I tried the next option Complete database recover
    BRRECOVER options for restore and recovery
    1 * Recovery type (type) ............. [complete]
    2 - BRRECOVER profile (profile) ...... [initDEV.sap]
    3 ~ BACKINT/Mount profile (parfile) .. []
    4 - Database user/password (user) .... [/]
    5 - Recovery interval (interval) ..... [30]
    6 - Confirmation mode (confirm) ...... [yes]
    7 - Scrolling line count (scroll) .... [20]
    8 - Message language (language) ...... [E]
    9 - BRRECOVER command line (command) . [-p initDEV.sap -t complete -i 30 -s 20 -l E]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    C
    Complete database recovery main menu
    1 = Check the status of database files
    2 * Select database backup
    3 * Restore data files
    4 * Restore and apply incremental backup
    5 * Restore and apply archivelog files
    6 * Open database and post-processing
    7 * Exit program
    8 - Reset program status
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    C
    Complete database recovery main menu
    1 + Check the status of database files
    2 # Select database backup
    3 # Restore data files
    4 # Restore and apply incremental backup
    5 # Restore and apply archivelog files
    6 + Open database and post-processing
    7 = Exit program
    8 - Reset program status
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    the + sign got changed to +
    and the * got changed to #
    then it is getting in loop please suggest what do I do now.

  • Why cant I download apps after restoring from a backup? How to fix?

    After I restored my ipod from a backup a month ago, my ipod wont let me download apps. It says "Unable to download app at this time". The thing is I can download when connected to my computer, and when new apps are downloaded on my other devices, they auto-download onto my ipod (Like they did before the restore from the backup) How can I download apps again without connectig to my computer or downloading them on other devices?

    Have you tried when connect to another network?
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    .- Reset network settings: Settings>General>Reset>Reset Network Settings

  • My ipod won't sync and it keeps coming up with an error message saying "internal error" or it tries to get me to restore from a backup. All of my music and movies have been wiped from my ipod and the apps don't work. The backups don't work either. help.

    I plugged my ipod touch into my computer to sync it and it came up with an error message saying that it encoutered an internal error and it refused to sync.
    I then unplugged it and plugged it back in and this time it told me that I needed to restore from a backup or set it up as a new ipod. I tried to restore from a backup but it came up with the error message "Backup session failed" every time. I then looked on my ipod and all of my music and movies are gone though it still says that they are on the ipod in itunes. I decided to use the restore function and let that finish. After restoring it still doesn't allow me to sync or back up and The music and movies can still not be seen. I am currently attempting to copy the music and movies to my ipod though this did not work with my apps as they transfered but when I attempted to open them they just crash... If someone could please help me it would be great. It is driving me crazy.

    If you get an error that says can't backup, try moving the existing backup file to a safe location and thry again. again. You can find the location of the backup file here:
    iPhone and iPod touch: About backups

Maybe you are looking for