Dropping log file in standby database

Please,
I need a help for the following issue:
I'm making a technical documentation on various event that occur on dataguard configuraation, right now I drop a redo log group file on primary database, and when I try to drop the equivalent log group file on standby database I got the following error:
SQL> alter database drop logfile group 3;
alter database drop logfile group 3
ERROR at line 1:
ORA-01156: recovery in progress may need access to files
this is the current state of the redolog file on standby database.
SQL> select group#,members,status from v$log;
GROUP# MEMBERS STATUS
1 3 CLEARING_CURRENT
3 3 CLEARING
2 3 CLEARING
Eventhough I do the following command on standby I also get an error.
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 3;
ALTER DATABASE CLEAR LOGFILE GROUP 3
ERROR at line 1:
ORA-01156: recovery in progress may need access to files
Can someone tell me how to drop on dataguard configuration the redolog file on primary database and their corresponding on standby database
I'm working on 10 release 2, on Windows
Thanks you

Oracle Dataguard Concept and administration release 2,ref b14239: is my source but it doesn't work when trying to drop stanby group or logile member.
For example, if the primary database has 10 online redo log files and the standby
database has 2, and then you switch over to the standby database so that it functions
as the new primary database, the new primary database is forced to archive more
frequently than the original primary database.
Consequently, when you add or drop an online redo log file at the primary site, it is
important that you synchronize the changes in the standby database by following
these steps:
1. If Redo Apply is running, you must cancel Redo Apply before you can change the
log files.
2. If the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO,
change the value to MANUAL.
3. Add or drop an online redo log file:
■ To add an online redo log file, use a SQL statement such as this:
SQL> ALTER DATABASE ADD LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log'
SIZE 100M;
■ To drop an online redo log file, use a SQL statement such as this:
SQL> ALTER DATABASE DROP LOGFILE '/disk1/oracle/oradata/payroll/prmy3.log';
4. Repeat the statement you used in Step 3 on each standby database.
5. Restore the STANDBY_FILE_MANAGEMENT initialization parameter and the Redo Apply options to their original states.
Thank

Similar Messages

  • BRARCHIVE backup for high volume offline redo log files on Standby Database

    Hi All,
    We are through with all of Standby database activity, also started applying the offline redo log files on the Standby site.
    The throughput is not utilizing the actual available bandwith.
    So we are not able to copy the offline redo files on time, as the offline redo files are piling up on the Production side.
    My query is how we can parallely copy the offline redo log files on the DR site (ie. 4-5 redo files at a time).
    Kindly guide for the same.
    Regards,
    Shaibaz

    hi,
    I have one doubt.
    On other server (r3qas) the Umask settings are as followed
    User     UMASK value
    <sid>adm          077              
    ora<SID>           077
    root                   077
    Running SAP System :   SAP R3 4.6C
    Running DBMS          :  Oracle 9.0
    Operating System      :- HP_UX
    On this system The new offline redo log files are created with 600 permissions. There is not a problem here, while taking the backup. I checked last "r3qas-archive" backups. There, i have not found any single error related to permissions, or any others (something like, Cannot open /oracle/RQ1/../.........dbf).
    If everything is working fine, with this umask setting on this server, then, what's going wrong with the BW Quality server, which have the same umask settings (also others) for all the concerned users, as mentioned above.
    Regards,
    Bhavik Shroff

  • Increase current redo log size in standby database in mount stage

    We have oracle 10g standby database. The standby database is always running in mount stage while apply logs manually not data guard is used.
    We have increase size or online redo log in primary . Now want to inrease in standby database also.
    how to increase the size of current online redo log in standby database while it in mount stage .
    in mount stage we cant run alter system switch logfile

    user11965804 wrote:
    We have oracle 10g standby database. The standby database is always running in mount stage while apply logs manually not data guard is used.
    We have increase size or online redo log in primary . Now want to inrease in standby database also.
    how to increase the size of current online redo log in standby database while it in mount stage .
    in mount stage we cant run alter system switch logfilein 10g Standby will be always in Mount status when MRP is running.
    When you increase size of online redo log files in primary, You should increase in standby also..
    Standby redo log file size should be equal or higher than primary. You no need to switch log files on Standby.
    You will have only standby redo log files in standby not ORL(online redo log files)
    You can use this below script to add standby redo log files.
    http://www.pythian.com/news/581/oracle-standby-redo-logs/

  • How to delete archivelog file at standby database

    Hi All,
    I'm running Physical Standby Database on ASM. At standby database, I can see all logs using asmcmd:
    ASMCMD> ls
    thread_1_seq_14.330.625772527
    thread_1_seq_15.346.625772527
    thread_1_seq_16.329.625772527
    thread_1_seq_17.327.625772559
    thread_1_seq_18.324.625772599
    thread_1_seq_19.341.625772367
    thread_1_seq_2.325.625772329
    But when I run RMAN to delete all these archivelogs, its give me error:
    oradr:/u01/app/oracle$rman rcvcat rman/rman@rman target /
    Recovery Manager: Release 10.2.0.3.0 - Production on Thu Jun 28 13:50:41 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: AIXDB (DBID=2438430915, not open)
    connected to recovery catalog database
    RMAN> delete archivelog all;
    Starting implicit crosscheck backup at 28-JUN-07:01:50:56
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of delete command at 06/28/2007 13:50:56
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
    RMAN> register database;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of register command at 06/28/2007 13:51:06
    RMAN-08040: full resync skipped, control file is not current or backup
    Even it is not registering it. So how to delete archivelog file at standby database.
    Thanks in Advance
    Rakesh

    This appears related to Bug 3298797 that was supposed to be fixed in 10.2.0.1. The workaround is to switch over to the standby, register the standby and then switch back.

  • Cannot remove 2nd log file on AlwaysOn database

    Hi all,
    I have a database, member of an availability group. This database has 2 log file, I want to remove the unsed secondary log file, I try to run this command to empty the second lofg file:
    USE [TEST-AG]
    GO
    DBCC SHRINKFILE (N'TEST-AG_log_2' , EMPTYFILE)
    GO
    the command completes successfully, the I run the command to remove the file:
    USE [TEST-AG]
    GO
    ALTER DATABASE [TEST-AG]  REMOVE FILE [TEST-AG_log_2]
    GO
    But this command fails with the following message:
    Error 5042: The
    file 'TEST-AG_log_2' cannot
    be removed because it is not empty.
    If I remove the database from availability group the command to remove the 2nd file works, so I can't remove a secondary log file on a database member
    of an alwayson availability grup?

    Hi all,
    I have a database, member of an availability group. This database has 2 log file, I want to remove the unsed secondary log file, I try to run this command to empty the second lofg file:
    USE [TEST-AG]
    GO
    DBCC SHRINKFILE (N'TEST-AG_log_2' , EMPTYFILE)
    GO
    the command completes successfully, the I run the command to remove the file:
    USE [TEST-AG]
    GO
    ALTER DATABASE [TEST-AG]  REMOVE FILE [TEST-AG_log_2]
    GO
    But this command fails with the following message:
    Error 5042: The file 'TEST-AG_log_2' cannot
    be removed because it is not empty.
    If I remove the database from availability group the command to remove the 2nd file works, so I can't remove a secondary log file on a database member of an alwayson
    availability grup?
    Remove the database from availability group, then remove 2nd file.  You have been successfully. Then add back database to the availability group, then create regular backup jobs of the database.

  • Apply missing log on physical standby database

    How to apply the missing log on physical standby database?
    I already registered the missing log and started the recovery process.
    Still...having log on standby that has status ..not applied.
    SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
    SEQUENCE# APP
    16018 YES
    16019 YES
    16020 NO ---------------------> Not applied.
    16021 YES
    Thanks

    Not much experience doing this, but according to the 9i doc (http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96653/log_apply.htm#1017352), all you need is properly-configured FAL_CLIENT and FAL_SERVER initialization parameters, and things should take care of themselves automatically. Let us know if that doesn't work for you, we might be able to think of something else.
    Daniel

  • Use of standby redo log files in primary database

    Hi All,
    What is the exact use of setting up standby redo log files in the primary database on a data guard setup?
    any good documents?

    A standby redo log is required for the maximum protection and maximum availability modes and the LGWR ASYNC transport mode is recommended for all databases. Data Guard can recover and apply more redo data from a standby redo log than from archived redo log files alone.
    You should plan the standby redo log configuration and create all required log groups and group members when you create the standby database. For increased availability, consider multiplexing the standby redo log files, similar to the way that online redo log files are multiplexed.
    refer the link,and Perform the following steps to configure the standby redo log.:-
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#i1225703
    If the real-time apply feature is enabled, log apply services can apply redo data as it is received, without waiting for the current standby redo log file to be archived. This results in faster switchover and failover times because the standby redo log files have been applied already to the standby database by the time the failover or switchover begins.
    refer the link
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/log_apply.htm#i1023371

  • Archived log missed in standby database

    Hi,
    OS; Windows 2003 server
    Oracle: 10.2.0.4
    Data Guard: Max Performance
    Dataguard missed some of the archivelog files and but latest log files are applying. standby database is not in sync with primary.
    SELECT LOCAL.THREAD#, LOCAL.SEQUENCE# FROM (SELECT THREAD#, SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=1) LOCAL WHERE LOCAL.SEQUENCE# NOT IN (SELECT SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND THREAD# = LOCAL.THREAD#);
    I queried above command and I found some files are missed in standby.
    select status, type, database_mode, recovery_mode,protection_mode, srl, synchronization_status,synchronized from V$ARCHIVE_DEST_STATUS where dest_id=2;
    STATUS TYPE DATABASE_MODE RECOVERY_MODE PROTECTION_MODE SRL SYNCHRONIZATION_STATUS SYN
    VALID PHYSICAL MOUNTED-STANDBY MANAGED MAXIMUM PERFORMANCE NO CHECK CONFIGURATION NO
    Anyone can tell me how to apply those missed archive log files.
    Thanks in advacne

    Deccan Charger wrote:
    I got below error.
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
    ERROR at line 1:
    ORA-01153: an incompatible media recovery is activeYou need to essentially do the following.
    1) Stop managed recovery on the standby.
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;2) Resolve the archive log gap - if you have configured FAL_SERVER and FAL_CLIENT Oracle should do this when you follow step 3 below, as you've manually copied the missed logs you should be OK
    3) restart managed recovery using the command shown above.
    You can monitor archive log catchup using the alert.log or your original query.
    Niall Litchfield
    http://www.orawin.info/
    Edited by: Niall Litchfield on May 4, 2010 2:29 PM
    missed tag

  • Alert log file of the database is too big

    Dear Experts?
    Let me update you that we are in process of doing an R12.1 upgrade ? And Our Current Instance is running on the 11.5.10 with 9.2.0.6 ?
    We have the below challenges before going for an database upgrade ?
    We have observed that the customer database alert_SID.log (9.2.0.6) size is 2.5GB ? how to purge this file ? Please advise
    Please also note that our Instance is running on the Oracle Enterprise Linux 4 update 8
    Regards
    Mohammed.

    user977334 wrote:
    Dear Experts?
    Let me update you that we are in process of doing an R12.1 upgrade ? And Our Current Instance is running on the 11.5.10 with 9.2.0.6 ?
    We have the below challenges before going for an database upgrade ?
    We have observed that the customer database alert_SID.log (9.2.0.6) size is 2.5GB ? how to purge this file ? Please advise
    Please also note that our Instance is running on the Oracle Enterprise Linux 4 update 8
    Regards
    Mohammed.Rename the alert logfile. once you rename the logfile another alert log file will create and being populated with time, and later you can delete it old alert log file . it doesnot harm your database.
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Check actual apply log time on standby database after synchronization

    Hi All,
    I want to check the date and time stamp of applied archived logs on stanby database. How should I check that??
    My dataguard link was broken for sometime and meanwhile lot of transactions happened on primary database. Now When the link came up the synchronisation happened within few hours and ultimatly transport and appliy lag became 0. But now I want to check actual time taken for tranporting the logs and applying them on standby database. Is there any way I could do that easily..
    Thanks

    This script written by Yousef Rifai I found here http://www.dba-village.com/village/dvp_forum.OpenThread?ThreadIdA=34772&DestinationA=RSS might be just what you need (run on standby database):
    set ver off
    alter session set nls_date_format='dd-mon-yy hh24:mi:ss'
    select app_thread, seq_app, tm_applied,
    nvl(seq_rcvd,seq_app) seq_rcvd, nvl(tm_rcvd,tm_applied) tm_rcvd
    from
    (select sequence# seq_app, FIRST_TIME tm_applied, thread# app_thread
    from v$archived_log where applied = 'YES'
    and (first_time, thread#) in (
    select max(FIRST_TIME ), thread#
    from v$archived_log where applied = 'YES'
    group by thread# )
    (select sequence# seq_rcvd, FIRST_TIME tm_rcvd, thread# rcvd_thread
    from v$archived_log where applied = 'NO'
    and (first_time, thread#) in (
    select max(FIRST_TIME ), thread#
    from v$archived_log where applied = 'NO'
    group by thread# )
    where rcvd_thread(+)= app_thread
    Best regards,
    Robert
    http://robertvsoracle.blogspot.com

  • Auditing going to log file rather than database

    Post Author: guytang
    CA Forum: Administration
    I have set up Auditing within Business Objects XI R2 with Auditor.  I have some of my elements that are being audited going to the database and other elements are going to log files.  How do I change this to make sure that all the elements that are audited are going to the database?
    Thank you for your assistance,
    Guy

    ILikewindows wrote:
    ... I didn't know I could delete it through iTunes.
    Now that you know, try deleting through iTunes.  If that does not remove the image file, then place the app you mistakenly deleted back in the file folder from your latest backup and try deleting through iTunes again.

  • How to delete archive logs on the standby database....in 9i

    Hello,
    We are planning to setup a data guard (Maximum performance configuration ) between two Oracle 9i databases on two different servers.
    The archive logs on the primary servers are deleted via a RMAN job bases on a policy , just wondering how I should delete the archive logs that are shipped to the standby.
    Is putting a cron job on the standby to delete archive logs that are say 2 days old the proper approach or is there a built in data guard option that would some how allow archive logs that are no longer needed or are two days old deleted automatically.
    thanks,
    C.

    We are planning to setup a data guard (Maximum performance configuration ) between two Oracle 9i databases on two different servers.
    The archive logs on the primary servers are deleted via a RMAN job bases on a policy , just wondering how I should delete the archive logs that are shipped to the standby.
    Is putting a cron job on the standby to delete archive logs that are say 2 days old the proper approach or is there a built in data guard option that would some how allow archive logs that are no longer needed or are two days old deleted automatically.From 10g there is option to purge on deletion policy when archives were applied. Check this note.
    *Configure RMAN to purge archivelogs after applied on standby [ID 728053.1]*
    Still it is on 9i, So you need to schedule RMAN job or Shell script file to delete archives.
    Before deleting archives
    1) you need to check is all the archives are applied or not
    2) then you can remove all the archives completed before 'sysdate-2';
    RMAN> delete archvielog all completed before 'sysdate-2';
    As per your requirement.

  • LDB files or log files in ORACLE database ?

    Hi Experts,
    Like LDB files in MIcrosoft Access do we have any sort of files in ORACLE which records the transactions and updates done in a particular database.
    Pls help me if you have any idea on this.
    Thanks in advance.

    If you are comparing Access with Oracle, then you are in for many shocks and surprises. In Oracle we have a database, in which there are logiical things called as tablespaces which have data files, a physical file at operating system level, which store data, and then transactions are also protected by the redo logs and for the old image we have undo tablespaces and so on...
    regards

  • Log File Growth after Database ReIndexing

    Hi,
    After doing Biztalk MsgBox and DTADb re-indexing by executing bts_RebuildIndexes and dtasp_RebuildIndexe sps respectively, it has been observed that the transaction log size for both the DBs went high and also Biztalk jobs (like, DTAPurge) were
    not completing.
    I am using BTS2006 and SQL2005.
    Because of the growth, we had to introduce extra storage. But it seems that the size is under control now.
    Kindly help me to understand what went wrong or why it happened?
    Thanks,
    Sugata

    Ideally while running the stored proc for rebuilding indexes, there shouldn't be any processing happening.
    So it's suggested to stop all the host instances, SQL Agent and IIS App pool if you have any SOAP/WCF receive location.
    You can run MBV report from below and check if it reports any issues. 
    Message Box Viewer -  http://blogs.technet.com/b/jpierauc/archive/2007/12/18/msgboxviewer.aspx
    Later use Terminator tool to address the concerns it reports. You may have to repair references.
    http://www.microsoft.com/en-in/download/details.aspx?id=2846
    Also, run the below query for all the databases and check if the output doesn't have any error(red color outcome) in the output.
    Use <DatabaseName>
    dbcc checkdb
    Let us know if you are still facing any issue.
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • Dataguard Solution for standby redo log file groups

    Respected Experts,
    My database version is 10.2.0.1.0 and Red Hat 5 os.I want to create a standby database using RMAN.
    Can any one help me with the full steps.And i'm also confuse about number of standby redo log file members
    need to be created.
    Thanks and Regards
    Monoj Das

    My database version is 10.2.0.1.0 and Red Hat 5 os.I want to create a standby database using RMAN.To configure standby either you can use duplicate target database for standby
    or
    1) restore standby controlfile
    2) mount standby database
    3) restore database
    and configure standby paraemter then start MRP, will do.
    http://docs.oracle.com/cd/B19306_01/server.102/b14239/create_ps.htm
    Can any one help me with the full steps.And i'm also confuse about number of standby redo log file members
    need to be created.It depends which parameter you want to use, if you mention log_archive_dest_2='service ARCH ' then no need to create any standby redo log file groups,
    If you use log_archive_dest_2='service LGWR ' here transport will be in terms of redo and you need standby redo log files on standby database. Which is realtime.
    When you use LGWR, data lost will be less if in case of any online redo log file lost. which is recommended.
    HTH.

Maybe you are looking for