Restore database that has mirroring enabled

I apologize, as I'm the default SQL person now and my skill level is pretty much limited to running queries. SQL 2008 R2
We have a Test database that is mirrored and has severely outdated data. I'd like to copy the data in from a recent back up of our Production environment.
I understand I need to break mirroring first by going to the database > tasks > mirror > mirroring > hit "remove mirroring" button.
Then I can do a normal restore, correct? (Databases > Tasks > Restore). On the options page I should select "NORECOVERY".
Then what? I will need to restore the mirroring. Do I just go to database > tasks > mirror > mirroring and uncheck "remove mirroring"?
Any pitfalls I should be aware of?

Hi ,
According to your description, when you manually stop a database mirroring session via removing database mirroring, To continue mirroring after stopping a session, you must establish a new database mirroring session. For more information, see:http://technet.microsoft.com/en-us/library/ms180801.aspx
In addition, we need to verify which database you want to do a normal restore. After removing database mirroring, the database in Principal server will become a normal database, you can do a normal restore. The database in Mirroring server will stay in recoverying.
You  need to restore it with recovery for becoming a normal database.
Restore database <Mirroring database name> with recovery
-------------in Mirroring Server.
Thanks,
Sofiya Li
Sofiya Li
TechNet Community Support

Similar Messages

  • Is it possible to restore backup that has been deleted from the repository?

    Hi,
    with Rman 9i I do a full database backup including the current controlfile each night (with the catalog option). If the backup has been successful all backups older than 3 days are deleted (because of a lack of disk space).
    Now I have to restore a backup older than 3 days which can be written back to disk from tape.
    On disk there is a backup still available which is 2 days younger than the one I have to restore. That means in its controlfile the backup to be restored doesn't have the status DELETED yet.
    Can I restore this controlfile first, then resync my catalog and restore the old backup after the entry is back to the catalog ?
    How do I specify which controlfile and which backupset should be restored ?

    Hi ebrian,
    thank you for your quick answer.
    Just to be sure that I understand you right:
    I startup the database in nomount mode.
    Then I restore the controlfile from the backup which is 2 days younger than the one I have to restore because this controlfile contains the desired backup record with status "not deleted". Is that right ?
    Each of my backup consists of 3 backup pieces. How can I find out which of the pieces contains the controlfile ? Or can I try one after the other until it works ?
    After the controlfile is restored successfully I use the following commands to restore and recover the database:
    rman target=sys/&lt;syspw&gt;@target_db
    run {
    alter database mount;
    allocate channel c1 type disk;
    set until time '&lt;point of time a little bit prior to the point of time of the backup to be restored&gt;';
    restore database;
    recover database;
    release channel c1;
    open database resetlogs;
    exit;
    Because of the "resetlogs" I take a full backup of the database afterwards.
    For the future I intend to change the process of deleting backups as described below:
    * delete them from disk with operating system command not with the rman delete command
    * configure retention policy to recovery window of n days (n = number of days backups are preserved on tape)
    * start rman script each night: \\     allocate channel for maintenance device type disk; \\     delete obsolete; \\     release channel;
    Is it possible to restore each backup from tape if required with the procedure described ?
    One last question concerning the recovery:
    instead of the "set until time " before using the "restore database" command is it possible to specify a concrete backup to be restored (e.g. specifying the exact time it is taken or the backup piece numbers) ?
    Thanks in advance.

  • Access a database that has limited no of connections.

    Hi,
    We are having a (client) database from where the data has be fetched and displayed on a dashboard.
    To minimize the impact on this client database, the user account will have a limited number(say, 5) of connections allowed. But the no of user who access the
    dashboard will be more than 5.
    We want to make sure that we have put in place proper connection handling so things do not go "amuck".
    Can anyone please suggest what is the best way to achieve this?
    As of now we are thinking to have a TEMP tablespace and populate the client database.
    Database : Oracle 9i
    Dashboard is implemented in Java.
    Thanks,
    Hanu

    user11365763 wrote:
    Hi,
    Thank you for the help
    The data in the database will be changed on monthly basis. The total number of records in the table as of now is 6980 and it can grow maximum 10K.
    Is it a better idea to cache all the records... storing in memory or flat file on the machine(where the program runs).
    Please suggest.
    thanks
    HanuMax of 10k records? Good grief, I've got a bigger database than that running on my laptop! What empirical evidence do you have that more than 5 connections has a negative impact? In the Oracle world, a database that small, with that few connections isn't even a pimple on a flea's butt in the Oracle world.
    I once had a vendor trying to sell my company a reporting application and they said pretty much the same as you. They said we could host the live data on Oracle, but for performance reasons they recommended copying it to a SQLServer for reporting "because Oracle has trouble with more than 5 concurrent connections". Needless to say we showed them the door. Why would we want to buy software from a vendor with such abysmal ignorance?
    If you do have a performance problem, then I dare say your fundamental database and application design is in serious need of re-work.

  • Restoring Mail that has disappeared

    My friend in Texas has had an account with Earthlink for many years. At some point, her main account was not working and her mail was coming into an account with a slightly different name. She called Earthlink to try to get them to put all of the emails into her original account. She was very concerned that if she deleted the second account, all of the emails in it would disappear. Evidently Earthlink told her to delete the second account, and sure enough, they all disappeared. Sadly, no one advised her to archive them first.
    She talked at length to both Earthlink and Apple at some length. Fortunately she did have a Time Machine backup, so a good many of the emails were restored, but she is still missing the ones that came in after the TM backup.
    It's probably a lost cause, but is there any possibility of recovering any of the lost emails? I do have a copy of Data Rescue II which I have never used. The emails would be on her Unibody MacBook Pro running Leopard and also on her iMac G5 running Leopard.
    I know that by the time we go to see her in February there's a good chance that she will have already overwritten the emails on the MBP since she uses it constantly. Still, she doesn't use the iMac much, and it's currently booted to an external drive running Tiger so that she can use her scanner. The iMac drive with Leopard is not currently in use. I'm thinking if she leaves the Leopard drive disconnected, the missing emails may not get overwritten and it might be possible to recover them.
    Any help is very much appreciated. Many thanks in advance.

    Sorry, don't know the answer as I don't use iCloud. You might have more joy in the iCloud forum, here:
    https://discussions.apple.com/community/icloud

  • Connect to Database that has lost access to a partition

    Dear all
    Assume we have a partitioned table that locate in some different storage(physically). If the database lost access to one of them, what would happen? Can the database be loaded? If user can't connect to the database, what can we do to overcome the issue(because one of features of partitioning is availability)? If a user try to get some data(by query), will oracle declare that one partition is not available and thus the information may be incomplete?
    Best regards

    Shahrokh wrote:
    Sorry for giving you incomplete info. Ok I got two below errors, first when we tried to connect to database as a normal user and the last is for connecting as sys user.
    Error1:
    ORA-01033: Oracle initialization or shutdown in progress
    01033. 00000 -"Oracle initialization or shutdown in progress"
    *Cause: An attempt was made to log on while oracle is being started up or shutdown.
    *Action: Wait a few minutes. Then retry the operation.
    Vendor code 1033
    Error2:
    ORA-01219: database not open: queries allowed on fixed tables/views only
    01229-0000-"database not open: queries allowed on fixed tables/views only"
    *cause: A query was issued against an object not recognized as a fixed tables or fixed views before the database has been opened.
    *Action: Re-phrase the query to include only fixed objects, or open the database.
    vendor code 1219.do EXACTLY as shown below (line for line)
    sqlplus
    / as sysdba
    shutdown abort
    startup
    COPY the results from above then PASTE all back here

  • How to restore iPad that has been disabeled by wireless keyboard?

    My bluetooth keyboard seemed to have tried to put in the PIN to my iPad too many times and now it is completely disabeled. Restarting it does not work either. And I do not use iTunes at all. Just iCloud. Any ideas?

    Try the following:
    1. Restore:
    http://support.apple.com/kb/HT1414
    2. Recovery:
    http://support.apple.com/kb/HT1808
    Note: you have to use iTune (computer) to Restore/Recover your iPad

  • My question is about the 'Restore Backup' option on iTunes (Not 'Restore iPhone'). So, if I click on Back Up Now, then 'Restore Backup', would that go through the process of erasing everything on my phone as new then restore whatever iTunes has backed up?

    My question is about the 'Restore Backup' option on iTunes (Not 'Restore iPhone'). So, if I click on Back Up Now, then 'Restore Backup', would that go through the process of erasing everything on my phone as new then restore whatever iTunes has backed up?
    I do not want this to happen, as with previous experience iTunes doesn't restore a mirror of what the iPhone was when it was backed up as is the case with iCloud backups.
    What I am trying to do is, as I've found a method on Youtube, there is an application where I can delete all the multimedia saved in my 'iMessages' so clear up some space. As doing that manually through the phone would take a lifetime. The method is to backup on iTunes, then using the backup created, importing that into the application then deleting the messages through that then restoring the phone using that amended backup.
    So back to my question, would restoring through 'Restore Backup' just restore the backup internally or would it flush the entire phone and then restore the backup? And if it does so, what would be lost in the restore?
    Thank you all,
    Fahmid

    iCloud should overwrite your phone with the data stored in your account, preserving your newer data.  However, to be sure I would go to Settings>iCloud and turn data syncing to Off before restoring the backup.  Then, after restoring the backup, turn the data syncing back to on, and when prompted about Merging with iCloud, choose Don't Merge.  This will ensure that the data in your iCloud account overwrites the data on your phone (which is your goal).
    Also, you don't sync text messages with iCloud so you will end up losing your more recent messages when they are overwritten by the backup.

  • How to create a .mdf SQL Server database from a Data-Tier Application file that has data?

    This is a noob question, though I do use SQL Server databases all the time with Entity Framework when I code in C# using Visual Studio 2013.  The development environment is found below at [A].  I am trying to make a clone of a SQL Server 2008 R2
    database (.mdf)  that exists online.  I can read, connect and work with this database in Visual Studio 2013, but I wish to make a local copy of the database, as an .MDF file.  Somewhere in my notes I have a way of creating a local copy from
    an online database when using Visual Studio but I forgot how (it seems, reviewing my notes, that it deals with ADO.NET which is deprecated in Visual Studio 2013 these days, or so it seems).  So I'm looking for another way.  What I did was create
    (or export) a "Data-Tier Application File" from the online SQL Server database, with data, and it seems to have worked in that this Data-Tier Application file exists on my hard drive and seems to have data in it ("SQL Server Replication Snapshot"
    is the format it seems).  It contains skeleton code to create a database, but when I tried to execute it with SQL Server 2014 Management Studio, I got a bunch of errors.
    So my question is:
    1) Can I somehow create a .MDF SQL Server Database from an Data-Tier Application file that has data?  What tool do I use?  I saw this link, http://social.technet.microsoft.com/wiki/contents/articles/2639.how-to-use-data-tier-application-import-and-export-with-a-windows-azure-sql-database.aspx 
    and it relates to Azure, but is there a tool for C#Visual Studio 2013, standalone?
    2) If there's an easy way to create a .mdf SQL Server Database file from an online file, within SQL Server Management Studio?  I don't think so, since it would require Administrator permissions on the online server, which I don't have. I have permission
    to read, update, delete the online database file, but strangely not to download it (the service I use has a tool for backup, but not for download).
    3) same question as 2), but for Visual Studio 2013?  I don't think so, since I notice none of the templates even mentions ADO.NET anymore, but instead they go with Entity Framework.  Using EF I can of course do anything I want with the online database
    (CRUD), but it remains online.  Maybe there's a switch to make a local copy?  I guess I could write a short program to suck all the data out of the online database and put it into a new, duplicate database having the same tables, that I create on
    my localhost, but my question here is if there's an easier way than this, maybe a tool or command I can run from inside Visual Studio?
    Any advice on any of the above questions is appreciated.
    Thank you,
    Paul
    [A] Microsoft Visual Studio Professional 2013
    Version 12.0.21005.1 REL
    Microsoft .NET Framework
    Version 4.5.51641
    Microsoft Web Developer Tools 2013   2.0.40926.0
    SQL Server Data Tools   12.0.30919.1
    Microsoft SQL Server Data Tools
    Windows Azure Mobile Services Tools   1.0
    Windows Azure Mobile Services Tools

    Thanks but these links are too general to help.
    "2. what do you mean by online file?" - I mean the SQL Server database file is on a remote web server that I rent from, but I am not the administrator of.  I can access my database using SQL Server Authentication, but nothing more.
    Paul
    What do you mean by too general? It explains on how you can use data tier application to create and deploy databases
    May be this will help you to understand better
    http://www.databasejournal.com/features/mssql/article.php/3911041/Creating-Data-Tier-Applications--in-SQL-Server-2008-R2.htm
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Am trying to update iPod that has iOS 2.2.1 to iOS 4.2 but I am getting the following error message, the iPod could not be restored. An unknown error occured (-1).

    Hi , I am trying to update iPod that has iOS 2.2.1 to iOS 4.2 but I am getting the following error message, "the iPod could not be restored. An unknown error occured (-1)." I would appreciate if anyone could let me know what the problem is and if it is possible how to fix it? Thanks

    Error -1
    Attempt to restore your iOS device two more times. If the issue is still unresolved, the device may need service.
    The "device may need service" means a hardware problem. In that case make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • I am Having iPOD Classic 80GB.On Sync. a message tells that it is not able toread the ipod contents -restore to factory settings-on restoring it tells that it can not be restored as it has files that are used by other applications. Pl advice

    I am having iPOD classic 80GB . I Have the 10.5Latest Version of iTunes installed. When I go for Sync.It tells me to restore to factory settings as it is unable to read the contents. On restoring it tells : unable to restore as this has files that are in use by another application. I have no idea what to do now. Pl advise. Thanks

    Try disabling any and all A/V or security software you are running on your system and see if that helps.
    B-rock

  • I sold my iPhone4, and I need to restore it before shipping it. The buyer has asked that I don't install iOS6. Is this possible? Does the restore process force iOS6 onto the phone? Before I backup/restore it, it has iOS5.1.1 installed.

    I sold my iPhone4, and I need to restore it before shipping it. The buyer has asked that I don't install iOS6. Is this possible? Does the restore process force iOS6 onto the phone? Before I backup/restore it, it has iOS5.1.1 installed.
    Thanks in advance.
    jj

    Just go to Settings>General>Reset>Reset all Content and Settings

  • HT1212 how do u restore an iPod that has been disabled and has never been connected to the computer

    How do i restore an ipod that has been disabled and has never been conected to itunes

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • TS1567 it says connect to itunes and then says you need to restore your iphone, so i restore it and then it says 'preparing to restore iphone' and has said that for 8 hours then it says it cant be done, what do i do?

    it says connect to itunes and then says you need to restore your iphone, so i restore it and then it says 'preparing to restore iphone' and has said that for 8 hours then it says it cant be done, what do i do?

    -> iOS: Forgotten passcode or device disabled after entering wrong passcode

  • How can I edit the database in Lookout OPC Modbus driver OPC sever with the address that has a write attribute?

    When I use Lookout Modbus driver OPC to communicate with my instrumnets, I edited the database number such as 41202 that has a Write attribute in my instrumnet manual, the OPC explorer got bad data, and the OPC server gave the illegal address alarm, when I input the address such as 41203 that has R/W attribute, it worked very well. Is there a way to fix this problem. When I used other OPC server, there was no this kind of problem. Thanks!

    Thanks for your suggestion. I checked the Modbus manual of my instrument, the register is 16 bit. I tried to edit the data according to the Modbus data member in lookout modbus drivere server for several different member, but the OPC still gave me the illegal address. I think the problem may be produced by their attribute, for the address 1201 and 1202, they have the write attribute, for other addresses, they have W/R attribute, and they can be read or write through Lookout OPC server perfectly. when I used the demo OPC server from other company, it can work well, but it is not convinient for me to use Labview when I use that software. I prefer NI Lookout OPc server. I am using the Lookout 4.5. I am wondering whether the Lookout has some shortcoming when I
    use the Modbus driver. Please give me any suggestion, is there any newest version of Lookout OPC sever? Thanks!

  • I have a late 2006 iMac that has just started giving me a message to reboot after a black screen comes down slowly from the top top of the screen to the bottom.  I reloaded software and restored from Time Machine, it now happens frequently.  Any insight?

    I have a late 2006 iMac that has just started giving me a message to reboot after a black screen comes down slowly from the top top of the screen to the bottom.  I reloaded software and restored from Time Machine, but it keeps happening, now several tomes a day.  Any insight as to the issue or a proposed solution?

    Unplug any peripherals you have except your keyboard, reboot, and check activity monitor for apps.  Keep running apps to a minimum to find the App causing the issue.

Maybe you are looking for