Rebuild Standby  in  9i

Oracle 9i
Sun Solaris
Hi
I need to rebuild one physical standby database from primary. Actually the primary itself was rebuilt using standby database. But instead of opening in NORESETLOGS it was opened in RESETLOGS.
So primary and standby were again out of sync.
I am presently copying datafiles from primary location to standby location.
Is the following procedure correct ?
(1) Put all tablespaces in primary in BEGIN BEACKUP.
(2) Copy all datafiles to standby location . Both standby and primary datafiles are in the identically named locations. So no need to change any db_file_name_convert parameter etc.
(3) After copying is done, create a standby controlfile from primary and move to standby location and edit init file to indicate this new location and new name of controlfile
(4) Startup standby database using this new init file.
(5) Start recovery. ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION.
Is this the correct procedure ? Or Am I making any mistakes regarding standby log files and online log files.

I recreated the standby database now. But the following is happening. sequence 1 is not applied but all the rest of sequence from 2 to 10 are applied. How is this possible ?
Shouldn't the sequences be applied one after the other ?
Does this mean standby is in sync with primary or not ?
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# APP
1 NO
2 YES
3 YES
4 YES
5 YES
6 YES
7 YES
8 YES
9 YES
10 YES
11 NO
12 NO
And managed recovery process is active ...
SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
RFS RECEIVING 0 0 0 0
MRP0 APPLYING_LOG 1 11 1064765 2097148

Similar Messages

  • Rebuild standby database

    Good morning,
    I am stuck with my rebuild standby now. I am not sure what is wrong with what I am doing. My production database is 2 nodes RAC database and the db version is 10.2.0.4 using ASM (10.2.0.4) on Sun servers SunOS 5.10. The standby is in SunOS 5.10 and single node database. In this server we also have 3 other databases so all 4 databases share the same ASM in this server. Recently we upgraded the ASM home and other databases home from 10.2.0.4 to 10.2.0.5. Only this standby home stays in 10.2.0.4. We also use OMF and all database files are in ASM and archive logs are in ASM as well. The backups are in files system. After I upgrade the ASM I forgot bring up the standby instance/listener so it falls behind on the archive logs applying process. I am now trying to rebuild this standby. The first two times failed due to diskgroup space exhausted. So I deleted old standby data files from ASM. Then I got ORA-15055: unable to connect to ASM instance & ORA-00020: maximum number of processes () exceeded. I increased the processes parameter for ASM from 40 to 85. The last time refresh I got the following errors and I googled these errors online but have not got any useful info yet. Have anybody experienced this before?
    RMAN-00571: ===========================================================
    RMAN-10035: exception raised in RPC:
    RMAN-10031: RPC Error: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE
    RMAN-10035: exception raised in RPC:
    RMAN-10031: RPC Error: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE
    RMAN-10035: exception raised in RPC:
    RMAN-10031: RPC Error: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE
    RMAN-03002: failure of Duplicate Db command at 11/01/2010 15:25:30
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-10038: database session for channel ORA_AUX_DISK_1 terminated unexpectedly
    The rman script for dup is:
    run {
    Duplicate target database for standby dorecover;
    Thanks a lot in advance for your help!
    Shirley

    I do believe the version could be causing your issue. I have always used the exact same version without issue.
    I setup my standby for dup as follows:
    Same directory structure including the flash area.
    I copy the primary password file to the same directory on the standby.
    I defer the primary :
    alter system set log_archive_dest_state_2=defer;
    I create a temp int file for the standby with these set (I'm using Oracle 11)
    db_name
    control_files
    db_recovery_file_dest
    db_recovery_file_dest_size
    compatible
    db_block_size
    undo_tablespace
    undo_management
    undo_retention
    I backup the primary using
    RUN {
    allocate channel d1 type disk;
    backup format '/u01/backups/PRIMARY/df_t%t_s%s_p%p' database;
    sql 'alter system archive log current';
    backup format '/u01/backups/PRIMARY/al_t%t_s%s_p%p' archivelog all;
    backup current controlfile for standby format '/u01/backups/PRIMARY/sb_t%t_s%s_p%p';
    release channel d1;
    I move the current days archive and this backup to the standby
    I start the standby use the temp init
    startup nomount pfile='/u01/app/oracle/admin/PRIMARY/pfile/init.ora';
    And I dupicate as follows:
    rman target sys/password@PRIMARY auxiliary /
    run {
    allocate channel C1 device type disk;
    allocate auxiliary channel C2 device type disk;
    duplicate target database for standby nofilenamecheck;
    Assuming this flys I copy a pfile version of the primary init over and change it for standby and then create a new spfile if needed.
    Finally I enable
    alter system set log_archive_dest_state_2=enable;
    And start redo apply on the standby and test

  • Rebuild standby question

    Good morning,
    I am puzzled by this in rebuilding standby process. I remember see this:
    Before run “rman dup for standby …” you do “ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=defer..” in primary db.
    After finish RMAN dup and start MRP process you do “ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=enable..” in primary db.
    So during this RMAN dup time period (it can take several hours) we don’t ship any archive logs to standby and when RMAN finishes it inevitably has a lot of logs not in standby side. Does this mean that we definitely are going to have log gap after the RMAN dup? Do we need to manually copy those archive logs from primary to standby in order for MRP to apply them? What is the main reason we disable the log ship during rman dup period?
    Thanks a lot in advance for sharing your insight!!
    Shirley

    The main reason to disable shipping during the dup is nothing exists to apply them to. If you are using RMAN to dup a standby you probably will move the RMAN backup and the current logs over before you issue the dup command which is something like this:
    RMAN> run {
    allocate channel C1 device type disk;
    allocate auxiliary channel C2 device type disk;
    duplicate target database for standby nofilenamecheck;
    Once you have the new Standby you can "enable" shipping again. I generally do a log switch on the primary and used the v$ view v$archived_log to check the results. v$archived_log will show logs on both primary and standby, use the DEST_ID to check just one side and order by sequence#.
    The alert log on both sides are a great source of information.
    Does this answer your question?
    Thoiught about this more. You could also try:
    duplicate target database for standby from active database;
    I have never tested this myself.
    Edited by: mseberg on Nov 17, 2010 5:40 AM

  • Rebuild standby

    Hi,
    How to decide to rebuild the standby in oracle 11.2.
    We tried to sync both primary and standby.But no use.
    Log are shipping to standby,but not applied in standby.
    Br,
    Raj

    Hi,
    Thanks for your reply.
    Due to archive gap,it shown WAIT_FOR_LOG.
    PROCESS                              STATUS      SEQUENCE#     BLOCK#
    ARCH                                 CLOSING          1877       6144
    ARCH                                 CLOSING            28          1
    ARCH                                 CLOSING            27          1
    ARCH                                 CONNECTED           0          0
    ARCH                                 CLOSING            25          1
    ARCH                                 CLOSING          1878          1
    RFS                                  IDLE                0          0
    RFS                                  IDLE             1879     119994
    RFS                                  IDLE                0          0
    MRP0                                 APPLYING_L         29      30785
                                         OG
    PROCESS                              STATUS      SEQUENCE#     BLOCK#
    RFS                                  IDLE                0          0
    RFS                                  IDLE               29      30786
    RFS                                  IDLE                0          0
    Now it works.
    Br,
    Raj

  • Rebuilding Standby - fails looking for current ORL

    Environment:
    Oracle 11.2.0.3 EE on Solaris
    I am trying to rebuild a physical standby database on the standby server.
    I have copied all RMAN files from the most recent Level 0 and Level 1 backups as well as all archived logs.
    I have created and copied a new standby control file and located the copies in the documented places based on my pfile and spfile.
    I have left the parameter 'standby_file_management' equal to 'auto'.
    I have created an RMAN parameter file that looks like this:
    startup nomount
    sql 'alter database mount standby database';
    run{
           allocate channel c1 type disk;
           allocate channel c2 type disk;
           allocate channel c3 type disk;
           allocate channel c4 type disk;
           allocate channel c5 type disk;
           restore database;
    recover database;
    When I run this it restores pretty much everything, but fails looking for what turns out to be the 'CURRENT' online redo log file from the Production database.
    I verified this by running:
    select * from v$log;
    Why would the recovery process be looking for the currently active redo log file from the Production database?
    What do I need to do to make it recover the data I've given it and then let me turn on MRP to pick up anything outstanding?
    Any help is greatly appreciated!!
    -gary

    Thanks for the quick response!!
    Since I have run the 'recover database' command and it has been successful up to the point where it's looking for the latest OLR, can I just start the MRP on the standby as it exists right now?
    I'm not sure what the status of my standby is at this moment.
    When I re-run the above script and look at the log file, I always see several lines of other data files it's recovering.
    Have those been recovered successfully and it's just waiting on me to cancel the recovery?
    Thanks again for your help!!!
    -gary

  • Manually apply archived log to standby database.

    Hi all,
    I am working on oracle 10g EE(10.2.0.4).I am having a very difficult database switchover case in my hand.
    1.> There are two database .one primary(prim) and another standby(standby).
    2.> Initially both of them was configured as oracle data guard, where prim was primary and standby was standby using rman .(RMAN>duplicate target database for
    standby dorecover).
    3.>But the rate of generation of archivelog is very high( 20 archivelog per hour with 200mb each).
    4.> So automatic shipping of archivelog has been disabled from primary.(log_archive_dest_state_2=defer and nullifying the value of log_archive_dest_2).
    5> Now after a period of time archived logs are shipped to dr site manually and applied manually.(alter database recover automatic standby database;)
    6.> Now there is a hardware problem occured at primary..it will take 72 hours to come up.
    How can i use standby database as primary for that 72 hour.As archive log apply is manually done and parameters are being changed,can i switch over these two?
    Is it possible to switchover and switch back these two database with such a configuration?

    How can i use standby database as primary for that 72 hour.As archive log apply is manually done and parameters are being changed,can i switch over these two?
    Is it possible to switchover and switch back these two database with such a configuration?
    As of now you can perform failover your standby to primary database. you should have flashaback enabled, so you have to create a restore point.
    Then it can be opened in read & write mode, So once you finished again you can go back to that point.
    http://docs.oracle.com/cd/B19306_01/server.102/b14239/manage_ps.htm#i1017111
    The above case applicable if you ready to loose, But it doesnt make sense. But in your case this doesnt work. Because once you start use of Standby as primary, there would be live/production data, which you need very much.
    So there is lot of work to do.
    You have to rebuild standby database and then switchover back to same location. So its a little trip work.
    Have you enabled Dataguard Broker ?
    Edited by: CKPT on Mar 13, 2012 1:43 PM

  • Standby Database not syncronized with primary.

    DB: 10.2.0.4.0
    OS RedHat Linux
    My standby Database not syncronized with primary, because of space issue mrp process was stopped.
    During that we added 4 datafile in primary database in that case how we can sync standby database?
    There are no unamed files on standby database.
    SQL> select name from v$datafile where name like '%UNNAME%';
    no rows selected

    Prath wrote:
    When i trying to recover database getting below error:
    Starting recover at 11-DEC-10
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 12/11/2010 12:00:23
    RMAN-06094: datafile 73 must be restored
    Note: Datafile 73 not available on standby database.Execute select name from v$datafile statement from standby and post there.
    (Of course you can rebuild standby database again ,create standby controlfile and copy all datafiles)

  • Is there a way to apply archive logs, standby DB is opened with 'resetlogs'

    Hi All,
    I have setup a standby database (Oracle 10g SE). I applied hot backup and archive logs to the standby database till yesterday. I have opened the standby database using 'alter database open resetlogs;" and validated the application functionality using the standby database.
    Now I want to regularly apply logs from the Primary database to the standby database, but today I have opened the standby database using 'alter database open resetlogs;"
    Need assistance to know the way to apply archive logs, once the standby database is opened with 'resetlogs' option to keep it in sync with the Primary database.
    Thanks
    Kunal

    Welcome to OTN,
    I have setup a standby database (Oracle 10g SE). I applied hot backup and archive logs to the standby database till yesterday. I have opened the standby database using 'alter database open resetlogs;" and validated the application functionality using the standby database.Standby opened with *resetlogs* ? What you did? have you performed failover of standby database?
    Now I want to regularly apply logs from the Primary database to the standby database, but today I have opened the standby database using 'alter database open resetlogs;"
    Need assistance to know the way to apply archive logs, once the standby database is opened with 'resetlogs' option to keep it in sync with the Primary database.Have you enabled Flashback & created Restore point? If so you can do it.. If not rebuild standby again.
    Check this scenario How To Open Physical Standby For Read Write Testing and Flashback [ID 805438.1]

  • ORA-01111 name for data file 10 is unknown

    Hi,
    I created two new tablespaces (11 and 12) with 1 datafile in each of them in my primary database,
    I forgot to set the parameter in standby server standby_file_management=AUTO,
    the standby server auto create the tablespace 11 with datafile in D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00010,
    although there is no such file 'UNNAMED00010' in D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\.
    in the v$tablespace and v$datafile, I can see that the entry had been created in control file in standby server.
    Below is the listing of datafile in my standby server,
    TS# name
    0 G:\OFSDB\OFS4\ORADATA\OFS4\SYSTEM01.DBF
    1 G:\OFSDB\OFS4\ORADATA\OFS4\UNDOTBS01.DBF
    2 G:\OFSDB\OFS4\ORADATA\OFS4\SYSAUX01.DBF
    4 G:\OFSDB\OFS4\ORADATA\OFS4\USERS01.DBF
    6 G:\OFSDB\OFS4\ORADATA\OFS4\DATA_SE.ORA
    7 G:\OFSDB\OFS4\ORADATA\OFS4\INDEX_SE
    8 G:\OFSDB\OFS4\ORADATA\OFS4\FLOW_1.DBF
    9 G:\OFSDB\OFS4\ORADATA\OFS4\CJHIT01.DBF
    10 G:\OFSDB\OFS4\ORADATA\OFS4\DBMON_TS.DBF
    11 D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00010
    Anyone know how to correct this problem?
    Thanks

    You could rebuild standby from Primary. I would probably set standby_file_management=AUTO first.
    If you do backups on the Primary then RMAN dup is fairly easy, and if you use the same directory structure on the standby it is really easy.
    Step 1.
    On the primary
    alter system set log_archive_dest_state_2=defer;
    Step 2
    Create a temp init file for the standby
    Set the following:
    db_name, control_files, db_recovery_file_dest, db_recovery_file_dest_size, compatible,
    db_block_size, undo_tablespace, undo_management, undo_retention
    Step 3
    Backup Primary
    RMAN RUN {
    allocate channel d1 type disk;
    backup format '/u01/backups/PRIMARY/df_t%t_s%s_p%p' database;
    sql 'alter system archive log current';
    backup format '/u01/backups/PRIMARY/al_t%t_s%s_p%p' archivelog all;
    backup current controlfile for standby format '/u01/backups/PRIMARY/sb_t%t_s%s_p%p';
    release channel d1;
    Step 4 Copy backup to standby
    Consider any cleanup of old files on the standby now since they probably are worthless
    Step 5 Move current archive
    Move the current archive (todays) log backups to the target server.
    A list backup may show only the ones you need.
    RMAN> list backup;
    Step 6 Startup the standby
    SQL> startup nomount pfile='/u01/app/oracle/admin/PRIMARY/pfile/init.ora'
    (With the INIT file you created in Step 2)
    Start as your Primary DB NAME
    Step 7 Issue Duplicate command
    rman target sys/password@PRIMARY auxiliary /
    RMAN> run {
    allocate channel C1 device type disk;
    allocate auxiliary channel C2 device type disk;
    duplicate target database for standby nofilenamecheck;
    When this completes
    Make sure you shutdown the database and then switch the ORACLE_SID=STANDBY
    Step 8 Copy init.ora from primary host
    (Or if you have a good PFILE version on the standby correct and make a new spfile)
    Step 9 Start redo apply
    On the Primary
    SQL> alter system set log_archive_dest_state_2=enable;
    Start Redo apply
    On the standby database, to start redo apply:
    SQL>startup mount
    SQL> alter database recover managed standby database disconnect from session;
    Database altered.

  • Flashback database in Dataguard environment

    On primary if i flashback database to a restore point, do I need to rebuild standby environment. Is there any other option. Can I flashback standby to restore point also. Can you please detail me the steps.
    These I think are the steps.
    1) Create Flashback database Guarantee restore point on Standby.
    2) Create Flashback database Guarantee restore point on primary.
    Backout
    1) Flashback Database to restore point on primary.
    2) Flashback Database to restore point on standby
    Is it possible if we follow the above steps we dont need to rebuild the standby after flashing back the primary database.

    If I flashback database to a restore point, do I need to rebuild standby environment?
    No, since the standby database should be synchronized to the primary (assumes no delay) it should come along for the ride.
    Can I flashback standby to restore point also?
    Yes, but the retention period must be greater or equal than the Primary database retention period.
    There are very few cases where you would want to do this on the standby.
    For example you might use it if a RESETLOGS was used on the Primary.
    Setup
    Guaranteed restore points provide a complementary capability to Flashback Database.
    You might set them up during an upgrade.
    Ex.
    CREATE RESTORE POINT before_upgrade GUARANTEE FLASHBACK DATABASE;
    FLASHBACK DATABASE TO RESTORE POINT before_upgrade;
    Section 5 of B14192-03 has some good information on this.
    This is worth a look too:
    www.oracle.com/us/solutions/sap/wp-ora4sap-flashback11g-1-303814.pdf
    Queries
    SELECT
      NAME,
      SCN,
      TIME,
      DATABASE_INCARNATION#,
      GUARANTEE_FLASHBACK_DATABASE,
      STORAGE_SIZE
    FROM
      V$RESTORE_POINT;
    SELECT
      NAME,
      SCN,
      STORAGE_SIZE
    FROM
      V$RESTORE_POINT
    WHERE
      GUARANTEE_FLASHBACK_DATABASE = 'YES';Best Regards
    mseberg

  • Is the only way to import large amount of data and database objects into a primary database is to shutdown the standby, turn off archive log mode, do the import, then rebuild the standby?

    I have a primary database that need to import large amount of data and database objects. 1.) Do I shutdown the standby? 2.) Turn off archive log mode? 3.) Perform the import? 4.) Rebuild the standby? or is there a better way or best practice?

    Instead of rebuilding the (whole) standby, you take an incremental (from SCN) backup from the Primary and restore it on the Standby.  That way, if, for example
    a. Only two out of 12 tablespaces are affected by the import, the incremental backup would effectively be only the blocks changed in those two tablespaces (and some other changes in system and undo) {provided that there are no other changes in the other ten tablespaces}
    b. if the size of the import is only 15% of the database, the incremental backup to restore to the standby is small
    Hemant K Chitale

  • RAC Standby Database rebuild

    Hi
    Current 10.2.0.4 Setup is with Dataguard Broker (Unix/No OEM Setup):
    Rac Primary 2node cluster
    Rac Standby 2node cluster
    The rac Standby Database are going to be opened read/write.
    Then will require a rebuild of standby ie delete db files and duplicate db using rman
    1) My questions is how do I rebuild of a rac standby database with an existing enabled dg broker?
    2) Are there any documentation on the steps to follow.
    3) Should the dg broker config be dropped or just disabled and if so at which stage?
    Config on Rac primary should be kept to a minimum as its being used so no outage expected here.
    Regards
    Me

    Have you given any thought to using flashback (depending on how long your standby will be open for read/write)? You could (before you open read/write) copy your dr*.dat files (broker config files), stop the broker and create a guarenteed restore point. After you have finished and ready to convert back to standby you would flashback your database to the restore point, convert back to a physical standby, restart the broker and shutdown. Restore the dr*.dat files to their location and then startup the standby. From there it should fetch the logs from the time the broker was down and catch back up.
    If you would rather rebuild, again you would need to take the broker out of the equation and use RMAN to create a clone for standby and then once in place you would reconfigure the broker (may be able to just restore the dr*.dat files from before the open operation but unsure.

  • Rebuild RAC phsical standby with RMAN

    Hi all,
    Can anyone give any advice as to rebuilding an ACTIVATED RAC physical standby using RMAN? We have been able to revert the db with flashback but I need to know the rebuild method.
    Is there any extra steps with the OCR?
    I am guessing the steps might be:
    1. Use DBCA to delete the newly activated standby.
    (The DBCA will clean up the OCR components)
    2. Use RMAN to duplicate a physical standby database.
    3. Register the instances and services with the OCR.
    Can any comment on this and suggest a decent task list from oracle as to the method.
    Thanks in advance,
    jd
    Edited by: jonnyd on 30-May-2010 13:42

    ...anyone...?

  • Rebuild RAC standby

    Hi all,
    Can anyone give any insight into the steps to rebuild a RAC standby?
    My guess is as follows:
    The following is all on standby side
    1. activate standby r/w
    2. Test failover
    3. use dbca to delete the database (dbca unregisters instances and services from OCR)
    4. use RMAN to recreate the duplicate standby
    --creation of logs needs to be done..
    5. re-register the instances and services with the OCR
    Does seem about right?
    Can anyone recommend a document detailing the instructions for re-building a RAC standby after activation?
    Thanks in advance.
    john

    I need a high level view... like task list..
    Its a rebuild of an 11gR2 physical RAC standby on Linux RH4.
    My guess is I can use dbca to delete the activated standby and then use RMAN to recreate the standby and then manually register the instances and services to the OCR.
    My query is the steps with the RMAN creation of the new standby, do I do it in single instance mode and then add standby logs then modify the spfile to reflect cluster_database = true and then register the services and instances and put it in managed standby mode etc..
    The bottom line is I need to some offical documentation for the steps involved in recreating an activated RAC standby.
    I will contact oracle support.
    Edited by: user9179270 on 25-May-2010 04:33
    Edited by: user9179270 on 25-May-2010 04:36

  • Standby rebuilding

    Hello!
    I have previously created a standby environment with one primary and one standby with oracle 11g and realtime apply.
    After some times we noticed that archives were not being aplpied on standby even though they were shipped, so we decided to rescreate the standby.
    we made a cold backup of all data files, archive logs, redo logs ant trasfered them to the standby server. As a standby contorl file we used the one we had generated when we first configured the standby(about 4 weeks ago).
    The standby does mount but when we try to open read only it shows an error:
    alter database open read only
    ERROR at line 1:
    ORA-10458: standby database requires recovery
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '...../system_01.dbf'

    Hello;
    "As a standby contorl file we used the one we had generated when we first configured the standby"
    This is probably your issue. You need to recreate the standby control file.
    ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/u01/app/oracle/yourstandbycontrolfilename.ctl' REUSE;Best Regards
    mseberg

Maybe you are looking for