Backup Mirroring Database or Recovering database

Hi All,
First, I apologize for posting this in two different palces. I have posted here but no response and I think this is a better place to post.
SQL Server 2012 - Windows 2008 R2.
Can you backup a mirroring database (Not the primary database but the one in mirroring partner) when it is in "suspend mirroring" state or "Disconnected" state or any other state ?. The idea is to backup the database on mirroring partner
before DR (Disaster Recovery) test (before putting the database online) then have the test be done than restore the database from the previous backup to continue with the mirroring without copying the primary database Full-Differential-TRN log backups again
from primary and establishing the mirroring again. Thanks for any input.

Can't use Availabilty groups due to the network setup. I am looking for a solution wher I don't have to copy large backup files (Full + Diff + TRN) after the DR test to re-establish the mirroring again.
Why would you have to take full and log backup again. No need to take diff backup at all. If mirroring fails when you try to configure it fist time try to find out reason why it failed you don't require to restore full backup again.
Hope I can understand what you are saying
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

Similar Messages

  • Backup of mirrored database is not possible?

    Hi Please correct me,
    backup of mirror database is not possible right?
    Thanks
    Shashikala
    Shashikala

    Hi Shashikala,
    While a database mirroring session is active, the mirror database is in a recovering state and it is not accessible. Thus as Ashwin’s post, backup and restore of the mirror database is not allowed. In addition, you need to note the following things:
    •Backup of the principal database is allowed, but BACKUP LOG WITH NORECOVERY is not allowed.
    •Restoring the principal database is not allowed.
    For more information, you can review this article:
    Database Mirroring and Backup and Restore.
    Thanks,
    Lydia Zhang

  • How to backup a database in noarchivelog

    My database is in NOARCHIVELOG.
    I can open rman
    which command can i use to backup my database in this mode.
    is there anything i need to configure before it backups in this mode.

    why you dont need to turn on the archivelog?
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1
    how many days back you are responsible to revert back the database?Someday It may be asked to you restore the some days before dataabase backup, before that raising the question ,raise the question to mangment personnel how many days back will i be responsible to restore the database,if they give you 7 days then make sure yours disk space can accomodate 7 days backup if not then ask them to arrange space for disk if they give alternate tape cartrdige then tell them that x hours will take to restore the database in disaster recovery scenario cause tape cartridge data restoration takes time.
    No archive mode is yours decision then before doing it aware managment personnel that i can only restored the last good backup data,good backup does not mean last backup,last backup may be corrupt ,last good backup is the backup which you can restore then you will be able to restore only till last good backup,with archived enabled you will have chance to recover till before crash but with no archivelog there is only one option recovery till last good backup.
    Khurram

  • Backup Oracle Database whilst online

    Guys looking for some help, I have an Oracle database that must run 24hours a day but I need to be able to back this database up daily, from what I understand I have to make the database run in archive log mode to be able to perform a hot backup.
    I have found out that currently my database is in noarchive log mode
    Can someone help me with the commands to put the database is achivelog mode
    Then can you help me with the command to backup the database using RMAN I have read some documentation do I need to just issue the backup database command or do I need to backup the archive logs files as well ?

    Do you want to teach me lesson ? I'm working with Oracle database since 1988, and I'm using RMAN since version 8.0 (15 years ago, or so).
    And please read the link I posted above.
    1) ... At lease two redo logs destination is recommended so that one redolog destination is keep working while other is filled up or vice versa.
    And you think I don't know that ? And that's not multiplexing.
    2) Catalog database is optional but it is recommended.
    It's absolutely not needed, and I consider it just and overhead (another database to manage and to synchronize).
    3) You need to setup archivelog retention policy so that it cleans up from LOG destination after certain period of time.
    You use DELETE INPUT option in your script, but it looks like you don't know what it means.
    Please follow oracle documentation for best practice .
    Again, are you teaching me lesson ? Oracle documentation is my bible.
    Backup is very important for a DBA so you need to set up precisely so that you can recover the database during disaster
    Backup is very important for a DBA ? What a news !! About disaster recovery, at your #1 you said "redo logs are very important to restore database" : or we mean something different for "disaster recovery", or you are totally wrong.

  • Is backup full database , is backuing up controlfile ?

    Hi
    i am on 8174
    is that enough to cold backup the database?
    shutdown immediate;
    startup mount;
    run {
    allocate channel t1 type 'SBT_TAPE';
    send 'NB_ORA_POLICY=....';
    backup full format 'bk_%U_%t' (database);
    or do i need
    backup current controlfile; ?
    i can see here http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76990/rmanconc.htm#436070
    this statment "A full backup is different from a whole database backup, which is a backup of all datafiles and the current control file."
    is that means
    backup full database , is backuing up controlfile ?(i think yes) and is restoring from it requires any archivelogs?(i think no)
    Thanks very much
    Edited by: user9145417 on 25-Aug-2010 16:42

    The reason to have the current controlfile is that it keeps all the information of the database. If you lose the entire machine, it will be much more difficult to recover to another machine without that controlfile. That is one reason that control files are multiplexed, so that you do not lose all of them.
    With 8174 I don't believe there was a method to always included it automatically like with 10g. So yes...always backup your control file with an exact statement.
    Will you need archive logs? If you want to do a complete recovery you will need all the archivelogs that occur after the start of the backup untill the time the database crashes.
    Do you need to backup the archivelogs within this script? Well that depends if you can think of any circumstance that would require you to recover to a point in time using the backup taken before this one.
    Regards
    Tim

  • How to Increase database / log size of mirrored database

    Hi All,
    I have been asked to increase the default database and log size of two databases, both of which are mirrored.
    I have been trying to find out what else I need to do in this case other than the standard resizing.
    Are there extra steps I need to perform as these dbs are mirrored (SQL Mirroring)?
    Farren

    Hi Farren,
    Based on my test, if you choose to expand the mirrored database by increasing the size of an existing data or log file, you can directly execute the ALTER DATABASE statement on the Principal server as Uri’s post, but before that please make sure the mirroring
    status is synchronized. You can check the mirroring configuration and partner status with the following query.
    SELECT DB_NAME(DATABASE_ID) 'DBNAME',mirroring_state,
    mirroring_state_desc,mirroring_role,mirroring_role_desc,
    mirroring_partner_name,mirroring_partner_instance
    FROM sys.database_mirroring
    WHERE mirroring_guid IS NOT NULL
    However, if you choose to expand the mirrored database by adding a new file to the database, you need to perform extra steps as follows.
       1. Check the mirroring configuration and partner status with above query.
       2. Run the below command on the principal server to break the mirror.  
    ALTER DATABASE DatabaseName SET PARTNER OFF
       3. Create your database file on the principal server.
       4. Run a log backup on the principal server.
       5. Restore this log backup on the mirrored server using the NORECOVERY and MOVE options.
       6. Re-establish mirroring between the servers for this database.
    Reference:
    Increase the Size of a Database
    How to add a database file to a mirrored SQL Server database
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • How backup iCal Database

    Hi folks,
    we have an ical server running on OSX 10.9.5. So the Data for ical is on a postgres Database.
    I want to backup these Database but i did not found any hint or Solution.
    So my Question - how can i backup the ical database ? 

    Hi Linc,
    thx for your answer, but in case of a disk crash i wanna now where is the location of these dump files, and how to recover in this case, which files i have to backup ?
    Regards

  • DAG - Backup failing on 1 DB only with error - The Microsoft Exchange Replication service VSS Writer instance ID failed with error code 80070020 when preparing for a backup of database 'DB012'

    Hi Board,
    i´ve search across the board, technet and symantec sites but did not found a hint about my problem.
    we drive a 2 node DAG (Location1-Ex1-mb1 
    Location2-exc1-mb1), on SP2 RU4 patchlevel with 40 Databases.
    Since some time the backup of one - and only one DB - is failing with these events, logged on the Mailboxserver on which the passive DB is hosted.
    Log Name:      Application
    Source:        MSExchangeRepl
    Date:          28.09.2012 00:37:17
    Event ID:      2112
    Task Category: Exchange VSS Writer
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      Location1-Exc1-MB1
    Description: The Microsoft Exchange Replication service VSS Writer instance 1ab7d204-609a-4aea-b0a7-70afb0db38de failed with error code 80070020 when preparing for a backup of database 'DB012'.
    Followed by
    Log Name:      Application
    Source:        MSExchangeRepl
    Date:         
    01.10.2012 03:33:06
    Event ID:      2024
    Task Category: Exchange VSS Writer
    Level:         Error
    Keywords:      Classic
    User:         
    N/A
    Computer:      Location1-Exc1-MB1
    Description:
    The Microsoft Exchange Replication service VSS Writer (Instance 42916d80-36c1-4f73-86d0-596d30226349) failed with error 80070020 when preparing for a backup.
    The backup Application - Symantec Backup Exec 2010 R3 – states, this error
    Snapshot provider error (0xE000FED1): A failure occurred querying the Writer status.
    Check the Windows Event Viewer for details.
    Writer Name: Exchange Server, Writer ID: {76FE1AC4-15F7-4BCD-987E-8E1ACB462FB7}, Last error: The VSS Writer failed, but the operation can be retried (0x800423f3), State: Stable (1).
    Symatec suggests within http://www.symantec.com/business/support/index?page=content&id=TECH184095
    to restart the MS Exchange Replication Service – BUT the mentioned eventID
    8229 isn´t present on any of the both Mailboxservers.
    The affected Database is active on Location2-Exc1-Mb1 Server and in an overall healthy state. I found during my research, that below Location2-Exc1-Mb1 Server, there are not removed shadow copies present!
    This confuses me, since all Backups are normally taken from the passive copy of a Database.
    So my questions to the board are:
    * Does anyone is facing similar issues?
    * Can someone explain why snapshots are present on the Mailboxserver hosting the Active Database, whilst the errors are logged on the passive one?
    -          * Does someone know the conditions, why shadows copies remain and
    aren´t removed in a proper manner?
    What can cause the circumstance, that only 1 DB is facing such issues?
    Any suggestion is welcome!
    BR
    Markus

    Hi Lenora,
    I´ve encreases VSS / Exchange Backup Log levels to expert, before starting
    those things i´ve all tried now:
    - Backup from passive DB (forced within Symantec Backup Exec)
    - Backup from active DB (forced within Symantec Backup Exec)
    - Backup from passive DB without GRT enabled (forced within Symantec Backup Exec)
    - Backup from active DB without GRT enabled(forced within Symantec Backup Exec)
    All those attempts failed.
    But brought some more details - the backup against the active DB states, that there is still a backup in progress and therefore this backup is cancelled by VSS.
    The Solution was, that i´ve needed to restart the Exchange Replication Service on the Mailbox Server hosting the passive DB.
    Backups are working again on all DBs!
    THX for your replys.
    Best regards
    Markus

  • How to take backup of database on external hard disk

    Hi Team,
    We have a server with three instances SOX,GRC and SM2. We have attached
    a external hard disk to take backup of database. While taking backup of
    any database it gives error as attached. We can take backup of
    transaction log on server's disk but not on external disk. Kindly have
    a look on attached error and advice us.We are taking backup at sql
    server level.
    version: SQL SERVER 2005 64 bit
    Regards,
    Digambar

    Hi Markus,
    >You can´t backup a 210 GB database on a 200 GB disk...
    We learn a lot every day on these Expert Forums !  
    In fact, it could even be possible if it's the database enveloppe which is 210 GB and the actual data is less than 200 GB !
    I dare to hope that it's not a production system which is backed up with an external disk...
    Regards,
    Olivier

  • Query regarding backup of database

    Dear Developers,
    Greetings Of The Day !!!
    On button click from my swing application I want to take backup of database. How I can proceed with java.
    Any help would be appreciated
    Regards

    As far as I know databases have command line utilities for backing up data. You might call them using Runtime.exec()
    Not sure if that's the best way to do...
    ***Annie***

  • How to backup DPM database

    How to backup DPM database for restore DPM server (2012 R2).
    I try: http://technet.microsoft.com/en-us/library/hh758162.aspx
    To back up the DPM database
    On the computer where your DPM database is located, do one of the following:
    If the DPM database is on the DPM server                
    On the DPM server, open an elevated command prompt window, go to cd <system drive>:\Program Files\Microsoft DPM\DPM\bin, and run
    DPMBackup.exe -db
    and this not working:
    C:\Program Files\Microsoft System Center 2012 R2\DPM\DPM\bin>DpmBackup.exe -db
    DpmBackup 1.0 - Data Protection Manager backup command-line tool
    Copyright (c) 2013 Microsoft Corporation. All rights reserved.
    Error: Invalid command -db.
    Description:
             DpmBackup backs up the DPM database, and creates shadow copies that can
    be used for backing up replicas.
             To back up the DPM database, run DpmBackup.exe -db locally on the compu
    ter running DPM.
    Usage:
             DpmBackup.exe [-db [-sqlServerName <name>] [-instanceName <name>] [-dpm
    dbName <name>] [-targetLocation <location>]] [-replicas] [-certificates]
    ... deleted
    where is problem ?

     Add "instanceName" and "dpmdbname" parameters, like this: DpmBackup.exe -db -instanceName "<SQLInstanceName>" -dpmdbname <DPMDB_NAME>
    Use "(Local)" as <SQLInstanceName> if you use default SQL instance (MSSQLSERVER). Also, please make sure that account, under which SQL server runs, have permissions to write into %DPMInstallLocation%\Volumes\ShadowCopy\Database Backups\ folder.
    http://kf.lj.ru

  • How to backup MSSQL  database in ECC6

    Hi guys, i am doing patching for our internal ECC6 server. So i need to backup the database before run the patches. I have onliy done database backup in Oracle using Brtools. So i am not familiar with Ms Sql Server backup. Can anyone tell me step by step to do this backup and send me link or screen shot or any type of documents or guidence which help me to resolve this issue. I really appreciate a prompt reply from you guys. Would like to thank you in advance.

    Hello,
    you have to ensure that the SQL Server service (which is performing the backup) can access the share. To ensure this, start the SQL Server with an account that has enough rights on the share (domain user with write rights). You then should be able to create a backup device for the network share with
    use master
    exec sp_addumpdevice 'DISK','MyNetworkShare', '
    server\sharename\path\filename.bak'
    Then you should be able to perform a backup via DB13 to this device or directly with TSQL running
    backup database <SID> to MyNetworkShare
    Best regards
      Clas

  • Mirror Database shows Recovery state in Database mirroring in sql 2012

    Hi I am working on DBmirroring and have encountered problem of mirror database showing recovery state.
    I tried to resolve issue by removing database mirroring from principal ,removing endpoints from both the nodes and
    finally firing alter database db1 set partner off statement also.But when reconfigure dbmirroring on principal it does not allow
    start dbmirroring and mirror database db1 comes in to recovery state from restoring stage.
    srm_2010

    ok in that case why it is not allowing me to configure db mirroring when I am trying from SSMS.It gives an error.tell me????
    srm_2010
    And what is the error ? If while configuring mirroring it fails for some reason you have to make sure the mirror database which has gone in recovery state needs to be brought in restoring state.
    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

  • Maximum Number of Mirrored Databases Decreases as Number of Available Cores Increases?

    Hi,
    I wonder if you can help me. We're planning a large in-house mirroring deployment and are concerned we may (at some point) run into the limits described in the following KB article:
    http://support.microsoft.com/kb/2001270/en-gb.
    Based on the formulas contained within the above article, I knocked up a quick spreadsheet to see how increasing the number of cores might allow us to increase the number of mirrored databases. However, to my surprise, my calculations imply that as you increase
    the number of cores, the number of databases you can potentially mirror decreases?
    No. of Logical Cores
    Max Worker Threads
    Threads Required per Mirrored Database
    Max. No. of Databases that can be Mirrored
    4
    512
    3
    170.6666667
    8
    576
    4
    144
    12
    640
    5
    128
    16
    704
    6
    117.3333333
    20
    768
    7
    109.7142857
    24
    832
    8
    104
    28
    896
    9
    99.55555556
    32
    960
    10
    96
    64
    1472
    18
    81.77777778
    Am I missing something here? Have a miscalculated somewhere? This seems counterintuitive.
    Regards
    Andy

    Hi  rushandy,
    As the KB post, we need to calculate the max worker threads, which is default no. of worker thread SQL Server will spawn. about database mirroring requirements for worker threads, we need to calculate the number of threads required per mirrored database.
    At end,
    maximum number of databases that can be mirrored = the max worker threads/ the number of threads required per mirrored database.
    As your post, for 64 bit architectures, if the number of logical CPU cores is 16 on the mirror server, after calculating , maximum number of databases that can be mirrored is 117. However, in actual scenario, the mirroring databases is less than 117, or
    else, it will cause some errors, such as error 17884 and so on.
    Usually, not all worker threads would be available to perform mirroring activities as some threads are assigned to core database activity on the server. For more information, see:http://sqlknowledgeshare.blogspot.com/2012/02/do-you-know-maximum-number-of-databases.html
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Powershell SMO SQL Server Mirror Databases

    Hello,
    I am almost done writing a script to help my team manage mirrored database during planned outages.  I would like to do determine the role of the database (principal or mirror). If I query atheDMV sys.database_mirroring, I am able to determine the
    role of the database by looking at the mirror_role and mirror_role_desc columns.
    http://technet.microsoft.com/en-us/library/ms178655(v=sql.110).aspx
    Since I am using SMO objects I looked for their equivalents, but I could not find any.
    http://msdn.microsoft.com/en-us/library/Microsoft.SqlServer.Management.Smo.Database_properties.aspx
    Does anyone have any idea where I could find/determine this information using SMO?
    Thank you

    If you must you can use this.
    http://stackoverflow.com/questions/10091613/powershell-to-find-the-principal-mirror-in-sql-servers
    ¯\_(ツ)_/¯

Maybe you are looking for