Restore primary database using physical standby

hi,
i am taking rman backup on production database,we have physical standby.coming month i have to take backup from standby instead of prod db.pls advise me, is it possible to restore and recover production database using standby database backup.if production crashed.pls advise me .i am new to dba.if possible pls provide proper steps.
Regards
Faruk

Faruk.m wrote:
hi,
i have to take backup on standby instead of production.failover i can do.but i need to know the recovery procedures from standby.and thank u for reply.i want, is it possible to restore my production controlfile with controlfile backup from standby.
i tested with my local database ,that below:
1.backup with controlfile from standby (rman>backup current controlfile)
2.manual deleted my test db controlfile,tried to restore from backup taken from standby(rman>restore controlfile from '*****************';)
3.rman>restore database
3.but it shows error (datafile already exists) ,controlfile tried to create datafiles on standby location.
my conclusion:above my cmds used to create datafiles on standby becoz i restored with standby controlfile.
my question:what is wrong with my steps? and how to restore my (prod) controlfile from standby.and bring backup my prod db.
regards
farukHi Faruk,
Sorry my late.
I can share with you my test.
It is my standby  database, I connecting with RMAN
SQL> select database_role, db_unique_name, name from  v$database;
DATABASE_ROLE      DB_UNIQUE_NAME           NAME
PHYSICAL STANDBY       stldb                    ADMDB
[oracle@oel62-x64 oradata]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 23 12:23:00 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ADMDB (DBID=4063877183, not open)
RMAN> backup current controlfile;
Starting backup at 23-APR-13
Starting implicit crosscheck backup at 23-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=29 device type=DISK
Finished implicit crosscheck backup at 23-APR-13
Starting implicit crosscheck copy at 23-APR-13
using channel ORA_DISK_1
Finished implicit crosscheck copy at 23-APR-13
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 23-APR-13
channel ORA_DISK_1: finished piece 1 at 23-APR-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_04_23/o1_mf_ncnnf_TAG20130423T122310_8qdfq19x_.bkp tag=TAG20130423T122310 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-APR-13
RMAN> exit
Recovery Manager complete.
[oracle@oel62-x64 oradata]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 23 12:23:26 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shut immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area  551165952 bytes
Fixed Size              2230232 bytes
Variable Size            167774248 bytes
Database Buffers       377487360 bytes
Redo Buffers              3674112 bytes
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oel62-x64 oradata]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 23 12:34:58 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ADMDB (not mounted)
RMAN> restore controlfile  from '/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_04_23/o1_mf_ncnnf_TAG20130423T122310_8qdfq19x_.bkp';
Starting restore at 23-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/stldb/control01.ctl
Finished restore at 23-APR-13
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> exit
Recovery Manager complete.
[oracle@oel62-x64 oradata]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 23 12:35:31 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select database_role, db_unique_name, name from  v$database;
DATABASE_ROLE      DB_UNIQUE_NAME           NAME
PRIMARY       stldb                    ADMDB
As show here, you can backup standby control file, and restore as primary .
Regars
Mahir M. Quluzade
http://www.mahir-quluzade.com

Similar Messages

  • RAW primary database and ASM standby database

    Hi,
    I would like to know if it is possible to have a ASM standby database for a primary database which is on RAW files.Is there any changes in procedure for a switchover to DR site.

    Sekar_BLUE4EVER wrote:
    Hi,
    I would like to know if it is possible to have a ASM standby database for a primary database which is on RAW files.Is there any changes in procedure for a switchover to DR site.Yes, you can. and there is no change in procedure for switchover.
    for creation of standby DB, consider these parameters: db_create_file_dest,db_recovery_file_dest,control_files
    see an example here: http://pythianpang.wordpress.com/2010/02/18/data-guard-non-asm-primary-to-asm-physical-standby/
    HTH
    Tobi
    Edited by: teits on Nov 20, 2012 12:13 PM

  • Can i convert logical standby database to physical standby database

    Dear All,
    Can i convert a logical standby database to physical standby database?
    If yes, what are the steps to follow?
    Thanks
    Mahipal

    I never needed or tested something like this, but below maybe usefull -
    Transient Logical Standby
    Users can convert a physical standby to a transient logical standby database to effect a rolling database upgrade, and then revert the standby to its original state as a physical standby database once the upgrade is complete - using the KEEP IDENTITY clause. This benefits physical standby users who wish to execute a rolling database upgrade without investing in redundant storage otherwise needed to create a logical standby database.
    http://www.oracle.com/technology/deploy/availability/htdocs/DataGuardOverview.html
    But opposite is documented - http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm#BEIGJCAC
    best regards.

  • How to convert logical standby database to Physical Standby Database

    Hi,
    Does anyone know how to convert logical standby database(10.2.0.3) to Physical Standby Database(10.2.0.3)? Is this possible? If so,please give me steps for it.
    Thanks.
    Regards,
    RJ.

    I don't believe this to be possible. One of the steps invloved in the creation of a logical standby is the following:
    ALTER DATABASE OPEN RESETLOGS;
    This makes the logical standby a different incarnation of the db from the primary.
    A physical standby is a binary copy of a primary db, a logical standby is a completely seperate db that just happens to get sql statements applied to it that are generated from a primary db, but is open read/write.
    One avenue, though would be if you had flashback database enabled and you flashed back all the way to when the db was a physical standby and then rolled forward with the archived redo logs.
    It's somewhat unlikely you are in that situation, but that is a possibility.
    Indeed the 11g snapshot standby does this sort of thing:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/manage_ps.htm#sthref740
    jason.
    http://jarneil.wordpress.com

  • Can we patch Applications(ADPATCH) with no downtime using physical standby

    Hi ,
    As I know I can user Physical standby database for upgrade database with minimal downtime . Can I use the same with patching Oracle application using adpatch.
    In other words can we patch Application (using Adpatch) with no downtime using physical standby .
    Thanks in advance .
    Best Regards,

    In other words can we patch Application (using Adpatch) with no downtime using physical standby . No.
    Business Continuity for Oracle Applications Release 11i, Database Releases 9i and 10g [ID 216212.1] -- Section 4: Applying an Applications Patch
    Business Continuity for Oracle Applications Release 12 on Database Release 10gR2 - Single Instance and RAC [ID 452056.1] -- Procedure 4.4 - E-Business Suite Patch Application
    Business Continuity for Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database [ID 1070033.1] -- Section 7: Oracle E-Business Suite Maintenance with Standby Database
    Thanks,
    Hussein

  • Logical standby database to physical standby database

    I already start my logical standby database and I want to return it again to physical standby database. So what should I do?

    >
    The "may be" is because I have tested flashback of a physical standby to before resetlogs, but not a logical standby.
    >
    A physical standby keeps the DBID of the primary - a logical standby does not. That is exactly the problem that restricts the reconversion into physical from logical, and you did not encounter that problem.
    >
    I haven't used "keep identity" but from what I read it relates to "convert to physical" not "flashback database".
    >
    Exactly. And that is what the OP wants to do: convert to physical (from logical).
    You mentioned that this might be possible with flashback.
    Problem: During the conversion from physical to logical, the DBID gets changed unless you specify (in 11g) KEEP IDENTITY. This would make it possible to reconvert into phyiscal from logical.
    In short: If there is no solution for the changed DBID of the logical standby in order to flashback it into physical as you suggested, then it is not possible .
    When I saw your first answer, I thought that you might have a solution in mind in order to solve that obvious problem. Sorry for having bothered you.
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • Upgrading from 10.2 to 11.2 using Physical Standby

    Hi
    We have a 10GR2 EE database in a RAC cluster and we want to upgrade the 10GR2 database to 11GR2 non-RAC on a different server.
    We'd prefer to do this using a Physical Standby to avoid down time as much as possible.
    Any suggestions as to the best way to do this?
    Thanks

    I was sent the following which applies (page 156 on)
    https://apex.oracle.com/pls/apex/f?p=202202:2:0:APPLICATION_PROCESS=downloadFile:::F20225_ID:1301

  • View to Find Primary database name from Standby

    Is there any way(view) we can find the primary standby database name and it's host from the standy database.
    Thanks,

    V$DATABASE holds the Database Name and this would be the same on the Standby as on the Primary -- at least would be the same for a Physical Standby, I haven't done or verified a Logical Standby with a different DB_NAME.
    However, the Host name is not a property of the database but of the instance -- an RAC database can have instances running on multiple hosts. Therefore, the HOSTNAME is always in V$INSTANCE only -- and that, of course, is different on the Standby then on the Primary.

  • Using physical standby to upgrade to the next major release

    Hi
    Can one use a physical standby to upgrade from 9i to 10g or from 10g to 11g ?
    We cannot use logical standby due to datatype problems
    Thanks
    Orna

    You can use logical standby to perform a rolling upgrade, if you are above 10.1.0.3 - see http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_RollingUpgradeBestPractices.pdf
    Also see http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_TransientLogicalRollingUpgrade.pdf
    HTH
    Srini

  • Error on restore a database using sqlcmd

    Hi
    I wrote a command to to restore a database (from SQL server backup tool) , it works for a few restore files but faild with a specific bak file.
    The error:
    sqlcmd  -U sa -P password -Q "RESTORE DATABASE TfsWorkItemTracking FROM DISK='x:\tfs\TfsWorkItemTracking.bak' WITH  FILE = 1,
     MOVE N'TfsWorkItemTracking' TO N'D:\SQL_Data\Data\TfsWorkItemTracking.mdf',  MOVE N'TfsWorkItemTracking_log' TO N'L:\SQL_Data\Log\TfsWorkIt
    emTracking_log.ldf',  NOUNLOAD,  REPLACE,  STATS = 100"
    Msg 3634, Level 16, State 1, Server SRVRND-TFSDB10, Line 1
    The operating system returned the error '3(failed to retrieve text for this error. Reason: 15105)' while attempting 'CreateFile' on 'C:\Prog
    ram Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\TeamFoundationServer10FullTextCatalog\SQL.HDR'.
    Msg 3013, Level 16, State 1, Server SRVRND-TFSDB10, Line 1
    RESTORE DATABASE is terminating abnormally.
    I understood from the error that it is an access error - BUT the path the process try to create the file is not exist at all.
    One more issue - when I use the SQL Management consle to restore the database it works propery.
    Any idea ?
    CM Consultant

    Hello Jason, OP and future readers,
    The issue here is not what Jason suggested, but was caused by the fact that this database (TfsWorkItemTracking) is a part of Team Foundation Server, and has embedded in it a third item (for Full Text Search queries) that also needs its own MOVE TO clause.
    Here is a suitable SQLCMD query that will do what the OP needed:
    sqlcmd -U sa -P password -Q "RESTORE DATABASE [TfsWorkItemTracking] FROM  DISK = ’x:\tfs\TfsWorkItemTracking.bak’ WITH  FILE = 1, 
    MOVE N’TfsWorkItemTracking’ TO N’D:\SQL_Data\Data\TfsWorkItemTracking.mdf’, 
    MOVE N’TfsWorkItemTracking_log’ TO ’L:\SQL_Data\Log\TfsWorkItemTracking.LDF’, 
    MOVE N’sysft_TeamFoundationServer10FullTextCatalog’ TO N’D:\SQL_Data\Data\TfsWorkItemTracking.TeamFoundationServer10FullTextCatalog’, 
    NOUNLOAD,  STATS = 100"
    The original poster was missing that third "MOVE TO" clause, and SQL Server didn't know what to do with the Full Text metadata in this backup.  Note that this object is referenced in the error message, and note that it is attempting
    to create this file on the C:, which is the original location of the file when the backup was made, hence leading to the solution.
    It is a certainty that the OP ran into this while attempting to migrate from Team Foundation Server 2008 to new hardware and a newer version of SQL and TFS, as this is a common hiccough in the process that isn't well documented.  (The majority of the
    instructions just say "back up the databases, then restore them to the new SQL server...)
    Jeff Woods
    STI Computer Services, Inc.
    Eagleville, PA

  • Restore sql database using c# code

    i need to restore ms sql database by selecting backup file in windows application...how to do it...?  thanx

    Hello,
    You can find a simple C#/VB.NET example to backup / restore a database in MSDN:
    Restore.SqlRestoreMethod
    And other example at CodeProject:
    Backup and Restore Databases using SMO
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Implent streams on primary database having one standby database

    hi
    we have two databases one is primary amd second one is standby database.
    i.e.,we implemented dataguard.
    Now we are planing to implement stream of primary data to different database not the standby database.
    Does any one suggest that streams can be implement along with dataguard.
    I f yes please suggest to me how to implement streams in 10g release2.
    Regards,
    JAY

    Hi Jay
    I'm facing the same problem.
    Did you or anyone else manage to put both working?
    My problem is that I cannot get rid of the log_archive_config parameter. He demands me to include the streaming destination database on it. When I putted , he says that's not a dataguard database (off course is not) .... so , I'm in a deadlock trying to configure a dataware house model with streams under dataguard environment
    Any help?
    Thank you

  • One primary and two Physical standby

    Hi everyone,
    I want configure two separate Physical standby one work in Redo apply and one in log apply mode.
    is it posible?

    user011232 wrote:
    Hi everyone,
    I want configure two separate Physical standby one work in Redo apply and one in log apply mode.
    is it posible?Yes it can possible very much. You have to configure as below in remote destinations.
    Example_:-
    Log_archive_dest_2='service= stby1 lgwr async ';
    Log_archive_dest_3='service= stby2 arch async ';
    What is the plan behind that? just for testing purpose? Even me too not tested but you can try configuring as above. :)
    Edited by: CKPT on Feb 14, 2012 5:46 PM

  • One primary and two physical standby database creation

    hi
    i want to create two standby (physical) and one primary dataguard.
    so please tell me what is sequence for db_file_name_convert and db_file_name_convert.
    i mean how i will give database name or path in this parameter.

    Hello;
    One option is Data Guard Cascading Standby.
    Here are my complete test notes if it help :
    http://www.visi.com/~mseberg/Data_Guard_Cascading_Standby_Setup_and_Test.pdf
    Best Regards
    mseberg

  • Should standby and primary database use the same release version?

    Then If I do upgrade, I'll have to stop the two database
    and then upgrade?

    Hi,
    Look at the requirements it is specified there. And as far as I can recollect they must match. Because standby feature differ beween the versions.
    Best,
    EA

Maybe you are looking for

  • XLS Files created by SSRS will not open in Numbers on the iPad

    The company I work for creates business intelligence reports which are used in an education environment and are created daily and e-mailed out to staff.  These reports contain fairly simple tables with pupil data. One customer uses iPads extensively

  • NPE when edit a business rule

    I got this error message when try to create a rule for a new ruleset in a newly created Business Rule. This Business Rule has no input/outout, it gave another NPE when Create Business Rules with input/output. oracle.tip.tools.ide.rules.sdkmodel.SDKMo

  • Using Max Earliness

    I have a situation where we are planning both the Finished Good and the WIP associated with the FG.  The Wip needs to be manufactured the day prior to the packout of the finished good.  We have set a GR Time on the WIP at 1day.  There is also a Max E

  • Premier Pro CS3 crashes with Canon 7D HD files

    I am just putting together a promo for a client, shot in HD on my Canon 7D. Everything went fine until 3 minutes into the project when Premier Pro CS3 refuses to render more than 1:30 minutes. (I already changed preferences to "Optimize rendering for

  • How do I get my Favorites from IE9 to Firefox

    I just downloaded Firefox because my son does not like IE which I have used since I had a computer. I checked the places when I downloaded but I did not get my favorites from IE Please help me. They are important.