How to delete archivelog with RMAN in the Primary and Standby database?

Hello,
I am working on Oracle 10gR2.
My question is :
How could I implement a automatized and secure way of:
1) Delete archivelogs on my PRIMARY server only when these logs are successfully TRANSFERED to all my standby databases?
2) Delete archivelogs on my STANDBY server only when these logs are sucessfully APPLIED to the database?
Thanks a lot for your help!

on 10G
CONFIGURE ARCHIVELOG DELETION POLICY TO [CLEAR | NONE | APPLIED ON STANDBY];
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rman.htm#CHDBEICE
Coskan Gundogar
http://coskan.wordpress.com

Similar Messages

  • Standby database(11g) was still in sync after stopping the primary and standby database listener.

    Hello !!!
    I have noticed that my standby database(11g) was still in sync after stopping the primary and standby database listener.
    If this is the case then how log is transferring from primary to standby ? it is not using listener service ? kindly clarify

    Read this Metalink Note:407040.1

  • Taking RMAN backup of primary and standby databases.

    Hi,
    I am going to setup a Standby for Primary two node RAC to single node standby.
    My doubt is, in standby both primary and standby will have the same db_name. So how can i take the RMAN backup of both primary and standby by using a single catalog.
    That is, we can register the primary DB with catalog using it's db_name. But how can we register the standby with catalog using same db_name as it is already registered.
    Thanks,
    Mahi

    Are you using a physical or logical standby?
    If its a physical standby why do you need to back up both databases? backup the standby and you are done, the backup from the standby can be recovered to either the live serever or the standby if needed, andt hen the archivelogs used to bring it up to date.
    If its a logical standby then change the database name for the standby and you can back both up to the same catalog, or alternativly cretae a new catalog for the standby, either as a new database or a new schema in your existing catalog.

  • Delete archivelogs with rman

    I have this setting on one database: 10.2.0.3 on linux x86
    CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    When a backup occurs, i issue the following at the end:
    delete noprompt obsolete device type disk;
    Which delete an old backup and old archivelogs on the server.
    Situation: It happen rarely, but still, sometimes, I have to manualy delete archivelogs to make space.
    Here is what i do: Ensure that the archivelogs which I am about to delete are backed up.
    Then I issue the following Rman command:
    crosscheck archivelog all;
    delete noprompt expired archivelog all;
    which tells Rman that the archivelogs are not on the os anymore.
    Is there a way to delete archivelogs with rman or oracle, not manually on the os?
    note: i do not want to delete a backupset will doing so.
    This is temporary solution. More disk space is comming and new backup scenario will be in place for this database.

    Exists many ways to make this, as:
    DELETE NOPROMPT FORCE COPY OF ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-1';
    or
    BACKUP ARCHIVELOG all DELETE ALL INPUT;
    or
    BACKUP ARCHIVELOG all NOT BACKED UP 2 TIMES DELETE ALL INPUT;
    ...

  • How to sync primary and standby database in 11GR2 on linux

    Hi ,
    How to sync primary and standby database in 11GR2 on linux . Both my primay and standby are 3 node cluster each.
    Can you please suggest a good link and brief steps .
    Thanks

    Are you trying to setup a new standby or sync an existing standby database?
    OK I see it
    "standby is behind the primary"
    So you have a gap.
    I would check both alert logs for a cause. You might find something like this
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.Look for ORA-00308 and ORA-27037 and ORA-16055.
    There's no sense fixing the gap unless the cause is fixed too.
    Also check out this post from a few days ago its dealing with similar issues.
    How to sync the standby database with the primary?
    If you find this helpful please mark it so.
    Edited by: mseberg on Jul 20, 2011 4:37 PM

  • How do delete cookies with ios7 on I-phone and I-pad ?

    How do you delete cookies with ios7 on I-phone and I-pad  ?

    Cheers for that but what I really meant was when you double click your home button you used to be able to keep your finger on one of the apps for 2 seconds and they all would have a cross on them and you could delete them now you can't ? , not delete the app completely just close the app  properly to save your battery

  • Rman terminating The Production and Catalog database

    Hi ,
    In 10g while Taking Rman backup for a volume of approax 600 GB , The backup worked Worked Well For 200 GB but then Terminated the Target and Catalog database ie The Alert Log shows There is a clean Shutdown on server and On Catalog Server In Alert Log Itshows the message User requested Cancel of Operation and Finally Shutting the Instances Down .
    I would Be thankful I any Solutions or possible Reason are provided , as my target is in 24X7 enviornment .
    Thanks in advance

    Hi , I could Not have the the snap shot or any material to show ,
    The backup is basically to Disk and not on a tape ,
    But Since the problem faced while taking the backup on 10g through the catalog server , compared to 9i databae 10g generates the backup file on my production server ,
    to avoid this I had actually done a NFS mount LInux feature Where I mounted a Huge enough partition of My catalog Server to production server generating the Rman backup indirectly to my catalog server instead of production server .
    But its typically OS conceptual , I dont find any thing wrong , Also I had assigned enough Large Pool Parameter value to ensure I have enough Memory to My rman backup .

  • How to re-synch primary and standby database?

    Hello everyone,
    Working on 10g R2/windows server 2003, I have configured a physical standby database but, I have an issue, and don't know how to resolve it.
    We were making an update that made some DDL and DML on our application, and for security reason we
    1. we ensure that primary and standby are in sync
    2. We made a cold backup of the primary database
    3. We Deferred the redo shipping between primary and standby
    4. We applied changes on primary database
    But the big issue is that, for any reason my colleague did the following.
    a) made above steps 1,2,3,4
    b) after the update he kept the resulted archived log files generated during to another location
    c) He restore the cold backup before the update(step 2 above)
    c) he applied again the update.
    Now the issue is
    At the first update step(2), the sequence# 553 was applied to the stand by before the update
    At the second update step(c) above another sequence# 553 was created but stored localy in the primary database, because the both servers were deverged (step 3 above).
    Technically both servers cannot be in sync again,because sequence# 553 at the first update has next_change# 80307804 and sequenc# 553 at the second update has next_change# 80461356.
    Question:
    How Can I do to rollback the the first sequence# 553 ( before the first update) on the standby database? in order to apply the sequence#553 generated at the second update and then re-sync both servers to roll forward subsequent sequence#? 554,etc...
    Thank you for your help

    Hello,
    I have just tried the FLASHBACK DATABASE TO SCN XXXXXXXX;
    but it doesn't work.
    Here are steps used from my local dev envirronnment
    From the stand by I retrieved the following information.
    SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# FIRST_TIM NEXT_TIME
    95 707168 707906 15-AUG-08 15-AUG-08
    96 707906 708653 15-AUG-08 15-AUG-08
    97 708653 709359 15-AUG-08 15-AUG-08
    100 710951 711794 15-AUG-08 15-AUG-08
    98 709359 710179 15-AUG-08 15-AUG-08
    99 710179 710951 15-AUG-08 15-AUG-08
    101 711794 712762 15-AUG-08 15-AUG-08
    102 712762 713720 15-AUG-08 15-AUG-08
    103 713720 714748 15-AUG-08 15-AUG-08
    104 714748 715920 15-AUG-08 15-AUG-08
    105 715920 739430 15-AUG-08 15-AUG-08
    106 739430 800525 15-AUG-08 16-AUG-08
    107 800525 875810 16-AUG-08 17-AUG-08
    108 875810 916527 17-AUG-08 18-AUG-08
    SQL> alter database recover managed standby database cancel;
    Database altered.
    SQL> alter database activate standby database; --> prepare to open stby in R/W mode
    Database altered.
    SQL> startup mount force;
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1250428 bytes
    Variable Size 180358020 bytes
    Database Buffers 423624704 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    SQL> alter database set standby database to maximize performance;
    Database altered.
    SQL> alter database open;
    Database altered.
    SQL> startup mount force;
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1250428 bytes
    Variable Size 180358020 bytes
    Database Buffers 423624704 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    Now I tried to mimic the flashback database as in the production, to bring it back to sequence# 105 above
    SQL> flashback database to scn 739430;
    flashback database to scn 739430
    ERROR at line 1:
    ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
    ORA-38761: redo log sequence 75 in thread 1, incarnation 2 could not be
    accessed
    I'm reverted back the physical standby to its function
    SQL> alter database convert to physical standby;
    Database altered.
    SQL> startup mount force;
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1250428 bytes
    Variable Size 180358020 bytes
    Database Buffers 423624704 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    SQL> alter database recover managed standby database using current logfile disconne
    Database altered.
    Verifying if the MRP is up and running: YES see below
    SQL> select message from v$dataguard_status;
    MESSAGE
    ARC0: Archival started
    ARC1: Archival started
    ARC2: Archival started
    ARC3: Archival started
    ARC3: Becoming the 'no FAL' ARCH
    ARC3: Becoming the 'no SRL' ARCH
    ARC1: Becoming the heartbeat ARCH
    Attempt to start background Managed Standby Recovery process
    MRP0: Background Managed Standby Recovery process started
    Managed Standby Recovery starting Real Time Apply
    Clearing online redo logfile 1 C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO11.LOG
    11 rows selected.
    SQL> archive log list;
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination C:\local_destination1_orcl
    Oldest online log sequence 110
    Next log sequence to archive 0
    Current log sequence 110
    So, how can I reslove this issue? without creating the standby from scratch?
    Thanks Again for your help

  • When can you delete archivelogs with RMAN

    My database is running in archivelog and I am using RMAN to back up the database to a SBT device (tape). The question that I have is if I do backup database plus archivelogs and this backupset is wriiten to tape can I then delete the arhivelogs from disk? On the same note when I do incremental backups can I then delete all archivelogs on disk if the backupset set is written to tape.
    Thanks All!

    user10784896 wrote:
    My database is running in archivelog and I am using RMAN to back up the database to a SBT device (tape). The question that I have is if I do backup database plus archivelogs and this backupset is wriiten to tape can I then delete the arhivelogs from disk? On the same note when I do incremental backups can I then delete all archivelogs on disk if the backupset set is written to tape.
    Thanks All!Yes, and you should let rman manage that. Go to the Fine Backup and Recovery Manual at tahiti.oracle.com and check out these options for BACKUP
    archivelog delete input
    archivelog delete all input
    archivelog delete all not backed up n times
    and several other similar options.

  • How to delete archivelogs once they are applied on Physical Standby

    We have 10.2.0.4 Primary and Physical Standby.
    According to Note, ID 331924.1, we have
    on Primary:
    RMAN> SHOW ARCHIVELOG DELETION POLICY;
    RMAN configuration parameters are:
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
    on Standby:
    RMAN> SHOW ARCHIVELOG DELETION POLICY;
    RMAN configuration parameters are:
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
    I would like to delete the archivelogs from Primary(as soon as they are applied to standby) as well as from standby and schedule a RMAN script which will run every hourly. The archivelogs are taken on flashback area.
    Please guide.

    Handle: chakra
    Status Level: Newbie
    Registered: Oct 27, 2006
    Total Posts: 107
    Total Questions:  56 (46 unresolved)
    Name Anirban
    Why so many open questions. Close the answered questions, give points and keep forum clean.
    Refer the below link
    Best Way to monitor standby, primary databases, including alert logs, etc.
    Edited by: jazz81 on 10-May-2012 16:38

  • Need help with sorting records in primary and secondary databases

    Hi,
    I would like to store data into primary and secondary db in different order. For the main primary, I want it to be ordered by login_ts instead of uuid which is the key.
    For the user secondary database, I want it to be ordered by sip_user. For the timestampe secondary db, I want it to be ordered by login_ts.
    This is what I have right now,
    this is for main
    uuid=029ae227-a188-4ba8-aea4-7cbc26783d6 sip_user=200003 login_ts=1264327630 logout_ts=
    uuid=22966f76-8c8a-4ab4-b832-b36e8f8e14d sip_user=200003 login_ts=1264327688 logout_ts=
    uuid=e1846e4a-e1f5-406d-b903-55905a2533a sip_user=200003 login_ts=1264327618 logout_ts=
    uuid=e2f9a3cb-02d1-47ff-8af8-a3a371e20b5 sip_user=200003 login_ts=1264327613 logout_ts=
    this is for user search
    uuid=029ae227-a188-4ba8-aea4-7cbc26783d6 sip_user=200003 login_ts=1264327630 logout_ts=
    uuid=22966f76-8c8a-4ab4-b832-b36e8f8e14d sip_user=200003 login_ts=1264327688 logout_ts=
    uuid=e1846e4a-e1f5-406d-b903-55905a2533a sip_user=200003 login_ts=1264327618 logout_ts=
    uuid=e2f9a3cb-02d1-47ff-8af8-a3a371e20b5 sip_user=200003 login_ts=1264327613 logout_ts=
    this is for timestamp
    uuid=029ae227-a188-4ba8-aea4-7cbc26783d6 sip_user=200003 login_ts=1264327630 logout_ts=
    uuid=22966f76-8c8a-4ab4-b832-b36e8f8e14d sip_user=200003 login_ts=1264327688 logout_ts=
    uuid=e1846e4a-e1f5-406d-b903-55905a2533a sip_user=200003 login_ts=1264327618 logout_ts=
    uuid=e2f9a3cb-02d1-47ff-8af8-a3a371e20b5 sip_user=200003 login_ts=1264327613 logout_ts=
    but what I want is :
    this is for main
    uuid=e2f9a3cb-02d1-47ff-8af8-a3a371e20b5 sip_user=200003 login_ts=1264327613 logout_ts=
    uuid=e1846e4a-e1f5-406d-b903-55905a2533a sip_user=200004 login_ts=1264327618 logout_ts=
    uuid=029ae227-a188-4ba8-aea4-7cbc26783d6 sip_user=200003 login_ts=1264327630 logout_ts=
    uuid=22966f76-8c8a-4ab4-b832-b36e8f8e14d sip_user=200005 login_ts=1264327688 logout_ts=
    this is for user search
    uuid=e2f9a3cb-02d1-47ff-8af8-a3a371e20b5 sip_user=200003 login_ts=1264327613 logout_ts=
    uuid=029ae227-a188-4ba8-aea4-7cbc26783d6 sip_user=200003 login_ts=1264327630 logout_ts=
    uuid=e1846e4a-e1f5-406d-b903-55905a2533a sip_user=200004 login_ts=1264327618 logout_ts=
    uuid=22966f76-8c8a-4ab4-b832-b36e8f8e14d sip_user=200004 login_ts=1264327688 logout_ts=
    this is for timestamp
    uuid=e2f9a3cb-02d1-47ff-8af8-a3a371e20b5 sip_user=200003 login_ts=1264327613 logout_ts=
    uuid=e1846e4a-e1f5-406d-b903-55905a2533a sip_user=200003 login_ts=1264327618 logout_ts=
    uuid=029ae227-a188-4ba8-aea4-7cbc26783d6 sip_user=200004 login_ts=1264327630 logout_ts=
    uuid=22966f76-8c8a-4ab4-b832-b36e8f8e14d sip_user=200004 login_ts=1264327688 logout_ts=
    Right now, I have:
    int compare_login_ts(dbp, a, b)
         DB *dbp;
         const DBT a, b;
         int time_a = 0;
         int time_b = 0;
         time_a = atoi ( (char *)a->data);
         time_b = atoi ( (char *)b->data);
         return time_a - time_b ;
    for the timestamp secondary, I set that compare function:
              if ((ret = (*sdb)->set_bt_compare(*sdb , compare_login_ts )) != 0){
    Does anyone know how can I make it sorted according?

    Hi,
    The DB->set_bt_compare() is used to compare keys in Btree database. In the callback function, both the DBTs are key, but not data. Please refer to http://www.oracle.com/technology/documentation/berkeley-db/db/api_reference/C/dbset_bt_compare.html.
    If you want any field in the data to be sorted, you might create a secondary index on it and define the compare function as you wish.
    Regards,
    Emily Fu, Oracle Berkeley DB

  • How to delete a Gmail email from the iphone and have it remain on the iMac?

    I use Gmail and have the email accounts set up as "imap". I would like to be able to delete emails from my iPhone 5, yet have them remain on the server. I read on the internet that it can only be done by changing the accounts from imap to pop3 accounts. However, since I also have an iMac and an iPad 3, I still want to be able to sync these so the emails can be retrieved on any of the devices.
    I supose that the only way to do this is to remain with "imap" accounts. But, there may be another problem. I was under the assumption that once the iPhone reaches a total of 200 messages, it will start to delete any above this amount. In this case, I will start to lose my messages on the server. Even if this is not the case, I don't want the mobile devices to end up with hundreds of emails that I would like saved.
    My question is this: How can I save the emails from the Gmail account to a separate set of folders that will archive these forever (if I choose)?  Can a folder be set up on the iMac with subfolders for each category that I want? If so, how is the actual move of the email done? Can it be copied to the new folder immediately so that later when it is deleted from the Gmail account, it is permanently saved in the new Mac folder?    Thanks

    Hello Kailua,
    I know that you can mirror you iPhone's display onto a Apple TV, as can you with the Mac, but I do not think you can mirror your iPhone to your iMac.
    Sincerely,
    Devin

  • Shell script to get the mail whenever the primary or standby DBs down

    Hi,
    Can any one please provide the shell script to monitor the primary and standby databases, such that whenever the primary or standby database is down we have to get the mail.
    Thanks,
    Mahi

    Hi Mahi,
    in 10g you can configure this through EM dbconsole which will be very easy.
    (i am not sure if this exists in 9i EM)

  • Delete archivelogs using RMAN

    Hi,
    I usually delete archivelogs with RMAN with command as "DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -1' if i have to clear the archivelogs to freeup space from the FRA.
    My question is if i delete the archivelogs-does this deletes the records from the catalog also(I think so) if backed up to tape.In that case the catalog doesn't have info for these archives even if they are on tapes,correct?
    So in case of recovery how can i restore them?
    Thanks
    Edited by: 822424 on May 15, 2011 7:28 PM

    The RESYNC CATALOG that may be part of your backup script or implicitly executed by a Backup would synchronise from the control file to the catalog schema (repository).
    I don't think that you can selectively decide what to not resync.
    You can query RC_ARCHIVEDLOG (the STATUS column) in the repository and in V$ARCHIVED_LOG (which is against the controlfile)
    i) before the DELETE executed by RMAN and
    ii) again after the next BACKUP which does a RESYNC to see if changes are reflected.
    Hemant K Chitale

  • How to delete an old network from the list on the iPad?

    Anyone know how to delete an old network from the listing and then add a new one? I did it when I first got my iPad and cannot remember how I did it! Hey, I'm an Apple rookie but I am trying. Take care and thanks in advance for any help.

    Setting > General > Reset > Network Reset

Maybe you are looking for