Switch logfile

hi
all
tell me what happens when we issue alter system switch logfile after realizing no arvhive logs generated in oraarch

SQL> show parameter LOG_ARCHIVE_DEST;
NAME TYPE VALUE
log_archive_dest string /oracle/BP1/oraarch/BP1arch
log_archive_dest_1 string
log_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
NAME TYPE VALUE
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
that tis the directory for logfiles

Similar Messages

  • Oracle DataGuard  while switch logfile ora-01031 insuffcient previlage

    I have configured a simple data guard system. The physical standby database open in read only mode. when I issue the following command in the primary database it shows the following error
    SQL> alter system switch logfile;
    System altered.
    SQL> select status,error from v$archive_dest;
    STATUS ERROR
    VALID
    ERROR ORA-01031: insufficient privileges
    INACTIVE
    INACTIVE
    INACTIVE
    INACTIVE
    INACTIVE
    INACTIVE
    INACTIVE
    INACTIVE
    what may be the reasons?

    SQL> select status,error from v$archive_dest;
    STATUS ERROR
    VALID
    ERROR ORA-01031: insufficient privileges
    INACTIVE
    INACTIVEwhat above problem u got.....pl.z explain clear

  • Alter database switch logfile

    Hi friends,
    Oracle DB 9i
    I am making a standby database backup (hi-brid), and keep updating every hour on top of the hour sked it with the archive logs generated.
    I am just confused a little. If I have 3 logfiles, and if I command "alter database switch log files", does the 3 logfiles
    be converted to the backup archive logs ? or only one of them only, and I have to issue the command 3x so that I will be able to get all the latest transaction inside the 3 redo logfiles to be applied at the standby server.
    Thanks a lot,
    Ms Inday

    crystal wrote:
    oh i see :D , so at any time there is one and only one redo log group that has data? all the other 2 are empty?not empty, but already archived. When an online redo log fills, there is an automatic switch to the next group. As soon as the switch is complete, the archiver will start archiving the group that was just filled. Archiving does not wait until all redo groups are filled.
    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2010.12.17 14:54:47 =~=~=~=~=~=~=~=~=~=~=~=
    login as: oracle
    oracle@vmlnx01's password:
    Last login: Fri Dec 17 14:49:39 2010 from 192.168.160.1
    [oracle@vmlnx01 ~]$ sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.4.0 - Production on Fri Dec 17 14:55:08 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 YES INACTIVE
    2 YES INACTIVE
    3 NO  CURRENT
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 NO  CURRENT
    2 YES INACTIVE
    3 YES ACTIVE
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 YES ACTIVE
    2 NO  CURRENT
    3 YES ACTIVE
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 YES INACTIVE
    2 YES INACTIVE
    3 NO  CURRENT
    SQL>
    System altered.
    SQL> select group#, archived, status from v$log order by 1;
    alter system switch logfile;
        GROUP# ARC STATUS
    1 NO  CURRENT
    2 YES INACTIVE
    3 YES ACTIVE
    SQL>
    System altered.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@vmlnx01 ~]$ exit
    logout

  • Importance of "alter system switch logfile"

    Hi,
    How important it is to give "alter system switch logfile" while we are taking a backup using rman.?
    how important is giving the above command before the backup? and
    how important is the same just after the backup?
    is it mandatory to give the command for archive log backups?
    I am using Oracle 8.1.5 on HP-UX 32 Bit.
    Regards,
    Ankit.

    Hi,
    this command has its own meaning,when you give alter system switch logfile in archivelog mode then all the contents of online redolog file has move to archivelog file.so all data upto specific time is available in archivelog file.and if you are using noarchivelog mode then it will move to next log group.
    1.in rman no need to give this command.
    but in user manage backup mode u should use this command.
    2.No need it after the backup.
    3.Not mandatory.
    Thanks
    Kuljeet Pal Singh

  • Switch logfile hangs

    Hi
    When we repeatedly give switch logfile command, DB is hanging after some 7 or 8 successful switches.
    But if we give manual checkpoint, log is switching. Then again it is hanging after some 5 or 6 successful runs.
    Database version 9.2.0.5
    Solaris
    log_checkpoint_interval 98000000
    log_checkpoint_timeout 3600
    log_checkpoints_to_alert TRUE
    Thanks

    Do you have any iostat's for the involved devices during this period?
    How quickly are you issuing these switch commands? If you are issuing them in rapid succession, then it might just be that you have caught up to where the archiver is.
    When you issue a switch, it does have to checkpoint which, depending upon how much activity, might take a while or not. If you are rapidly executing one switch after another, then there might not be too much data to flush to disk, and the swicth happens rapidly.
    The archiver however has to copy 200M each time. If the checkpoint is moving half the data per switch, then you as show below, a time will come when the switch wants to make active a log that isn't quite or has just been archived.
    Active   Log being
    LOG     ARCH'd
    1
    2           1
    3
    4           2
    1
    2           3
    3
    4           4   <-  Wait??Chris
    Message was edited by:
    idiot.ora

  • When i fire alter system switch logfile

    i got a problem in which,when i fire alter system switch logfile.it diden't execute,but the cursur just blink..
    why this is happening???
    with regards Alok
    thanks a lot....

    Perhaps you can problems with some Data Dictionary views. Apply this query and print here the answer:
    select * from v$sgastat where name='free memory';
    Joel Pérez
    http://otn.oracle.com/experts

  • Backup Error:Could not switch logfile in 7200 seconds

    The scheduled backup of the oracle db in Unix fails after backing up all the tablespaces.
    During backup of the archived logs the error comes up:
    ERROR! Could not switch logfile in 7200 seconds!
    I have 7 log groups with 2 members each and a size of 26MB.
    I know I can increase the timeout but it shouldn't take that long anyway.

    No error code, that is the strange part.
    The last part from the log of ora_backup:
    Switching logfile (alter system switch logfile;)
    System altered.
    DONE backing up tablespaces.
    *** Sun Jan 8 21:58:14 2006
    *** Backing up archive log files:
    Archive log directory is .
    Switching from logfile myscript.sql...
    System altered.
    DONE.
    Waiting for new log file............................................................
    System altered.
    .ERROR! Could not switch logfile in 7200 seconds!
    Usually the normal behaviour is:
    Switching logfile (alter system switch logfile;)
    System altered.
    DONE backing up tablespaces.
    *** Fri Jan 6 21:56:33 2006
    *** Backing up archive log files:
    Archive log directory is /my_instance/arch/arc.
    Switching from logfile MY_INSTANCE_T0001S0000271170.arc...
    System altered.
    DONE.
    Waiting for new log file............................................................
    New log file is MY_INSATNCE_T0001S0000271172.arc.

  • SQL alter system switch logfile;

    Hi,
    RMAN after finishing backup job is waitin on alter system switch logfile;
    What might be the problem ?
    On another window on SQL I type the same SQL> alter system switch logfile but it is on wait yet.
    Many thanks for your help.
    channel t1: starting piece 1 at 24-AUG-06
    channel t1: finished piece 1 at 24-AUG-06
    piece handle=/d01/devdata/backup/df_DEV_599332470_7_1 comment=NONE
    channel t1: backup set complete, elapsed time: 00:04:05
    Finished backup at 24-AUG-06
    sql statement: alter system switch logfile

    Thank you.
    Arch directory is not full.
    This is end of alertlog :
    Beginning log switch checkpoint up to RBA [0x18f.2.10], SCN: 0x056c.dc3c881b
    Thread 1 advanced to log sequence 399
    Current log# 1 seq# 399 mem# 0: /d01/devdata/logs/log01a.dbf
    Current log# 1 seq# 399 mem# 1: /d01/devdata/logs/log01b.dbf
    Thu Aug 24 17:18:39 2006
    Completed checkpoint up to RBA [0x18f.2.10], SCN: 0x056c.dc3c881b
    Regards.

  • Alter system switch logfile

    Hi all,
    As Oracle says, this command "lets you explicitly force Oracle Database to begin writing to a new redo log file group". But, how does Oracle Database 10g choose which redo log file group will be used next?
    I faced a situation where it follows a strange pattern:
    SQL> alter system switch logfile;
    System altered.
    SQL> select f.GROUP#, f.MEMBER, l.BYTES/1024/1024 MB, l.STATUS from v$logfile f, v$log l where f.group# = l.group#;
        GROUP# MEMBER                                   MB STATUS
             1 /redologs/MYDB/redoMYDB01.log             800 INACTIVE
             2 /redologs/MYDB/redoMYDB02.log             800 INACTIVE
             3 /redologs/MYDB/redoMYDB03.log             800 INACTIVE
             4 /redologs/MYDB/redoMYDB04.log             800 ACTIVE
             5 /redologs/MYDB/redoMYDB05.log             800 ACTIVE
             6 /oradata/dbf1/MYDB/redoMYDB06.log         800 INACTIVE
             7 /oradata/dbf1/MYDB/redoMYDB07.log         800 INACTIVE
             8 /oradata/dbf1/MYDB/redoMYDB08.log         800 INACTIVE
             9 /oradata/dbf1/MYDB/redoMYDB09.log         800 INACTIVE
            10 /oradata/dbf1/MYDB/redoMYDB10.log         800 INACTIVE
            11 /oradata/dbf1/MYDB/redoMYDB11.log         800 INACTIVE
            12 /oradata/dbf1/MYDB/redoMYDB12.log         800 INACTIVE
            13 /oradata/dbf1/MYDB/redoMYDB13.log         800 INACTIVE
            14 /oradata/dbf1/MYDB/redoMYDB14.log         800 INACTIVE
            15 /oradata/dbf1/MYDB/redoMYDB15.log         800 INACTIVE
            16 /oradata/dbf1/MYDB/redoMYDB16.log         800 CURRENT
    16 rows selected.
    SQL> alter system switch logfile;
    System altered.
    SQL> select f.GROUP#, f.MEMBER, l.BYTES/1024/1024 MB, l.STATUS from v$logfile f, v$log l where f.group# = l.group#;
        GROUP# MEMBER                                   MB STATUS
             1 /redologs/MYDB/redoMYDB01.log             800 INACTIVE
             2 /redologs/MYDB/redoMYDB02.log             800 INACTIVE
             3 /redologs/MYDB/redoMYDB03.log             800 INACTIVE
             4 /redologs/MYDB/redoMYDB04.log             800 ACTIVE
             5 /redologs/MYDB/redoMYDB05.log             800 ACTIVE
             6 /oradata/dbf1/MYDB/redoMYDB06.log         800 CURRENT
             7 /oradata/dbf1/MYDB/redoMYDB07.log         800 INACTIVE
             8 /oradata/dbf1/MYDB/redoMYDB08.log         800 INACTIVE
             9 /oradata/dbf1/MYDB/redoMYDB09.log         800 INACTIVE
            10 /oradata/dbf1/MYDB/redoMYDB10.log         800 INACTIVE
            11 /oradata/dbf1/MYDB/redoMYDB11.log         800 INACTIVE
            12 /oradata/dbf1/MYDB/redoMYDB12.log         800 INACTIVE
            13 /oradata/dbf1/MYDB/redoMYDB13.log         800 INACTIVE
            14 /oradata/dbf1/MYDB/redoMYDB14.log         800 INACTIVE
            15 /oradata/dbf1/MYDB/redoMYDB15.log         800 INACTIVE
            16 /oradata/dbf1/MYDB/redoMYDB16.log         800 ACTIVE
    16 rows selected.
    Thanks!

    Oracle doesn't use the GROUP# to identify the "next" redo log.
    It switched from Group#16 to Group#6.  This would happen if, in the past, Group#6 was added to the database when Group#16 was the CURRENT redolog.  At that time, the next SWITCH from Group#16 would have caused it to switch from Group#16 to the "newest" UNUSED group -- Group#6.  Thereafter, Oracle persists with the behaviour of switching from Group#16 to Group#6.
    Hemant K Chitale

  • Switch logfile VS Archive log current

    What is the difference between this two command?
    - SQL> alter system switch logfile;
    This command switch the current log and if in ARCHIVELOG mode, it will archive it as well. Am I rite?
    SQL> alter system archive log current;
    This command DID NOT switch to another log group, remain the same log group but archive the current log? Am I rite?
    Thanks

    You're right about your first question, not for the second. Here an extract from Oracle documentation :
    CURRENT Clause
    Specify CURRENT to manually archive the current redo log file group of the specified thread, forcing a log switch. If you omit the THREAD parameter, then Oracle Database archives all redo log file groups from all enabled threads, including logs previous to current logs. You can specify CURRENT only when the database is open.
    NOSWITCH
    Specify NOSWITCH if you want to manually archive the current redo log file group without forcing a log switch. This setting is used primarily with standby databases to prevent data divergence when the primary database shuts down. Divergence implies the possibility of data loss in case of primary database failure.
    You can use the NOSWITCH clause only when your instance has the database mounted but not open. If the database is open, then this operation closes the database automatically. You must then manually shut down the database before you can reopen it.

  • Difference between switch logfile and checkpoint

    Hi All,
    what is the difference between
    Forcing log file switches:
    ALTER SYSTEM switch logfile;
    and
    ALTER SYSTEM checkpoint;
    when i should use one and not use the other
    Thanks very much

    I don't know that checkpoint will increase the scn. In a way it can be called correct but there are multitudes of SCN floating around. For example, for the matching of the datafiles and controlfles, there are two scn's which are used, stop scn and checkpoint scn. Than for the block, there can be , commit scn , transaction scn , High scn and low scn. There is one counter that is there for both checkpoint and SCN and checkpoint number is generated from SCN itself. I am sure that there is a missing link here some where but still, to some extent this is correct.
    Checkpointing is an event which happens at certain conditions and SCN is always there, just like in a clock, there is always a time.
    HTH
    Aman....

  • Number of switch logfile

    Hi,
    I have a too many batch run nightly on my database.
    I have 4 groups of logfile, the logfile size is 100M.
    The batch make too insert, update and delete, also the time between switch is very small, 15 or 20 seconds.
    I will create a standby database on a remote host, I'm afraid to see each 15 second arrive on network (40Mo/s) a file of 100Mo.
    Is this a solution to reduce (only night) the time between two switch, for example increase the size of logfile... ?
    Thnaks in advance for your help.
    Nicolas.

    The longest interval between checkpoints is set by log_checkpoint_interval. The default setting is 1800 seconds (30 minutes), so this is not likely to be the cause of your problem.
    You can reduce the frequency of switches by having larger logfiles.
    The volume of traffic to your standby database is governed by the activity on your main database, whether it goes in a large number of small files or a smaller number of larger files.

  • Can't switch standby logfiles to status=active

    Hi DBA's
    I'm trying to create logical standby on 10.2 on fedora 6 on manual http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#g88234
    I can't create proper working standby redo logs.
    ALTER DATABASE ADD STANDBY LOGFILE GROUP 4
    ('/u01/app/oracle/oradata/ORCL/onlinelog/log4a.log',
    '/u01/app/oracle/flash_recovery_area/ORCL/onlinelog/log4b.log') SIZE 50M;
    then create the rest of standby redos and switch logfile:
    ALTER SYSTEM SWITCH LOGFILE;
    when:
    SQL> SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
    GROUP# THREAD# SEQUENCE# ARC STATUS
    4 0 0 YES UNASSIGNED
    5 0 0 YES UNASSIGNED
    6 0 0 YES UNASSIGNED
    What to do?
    Edited by: val75 on Jun 21, 2009 11:08 PM

    try switch log at primay
    please try to run this Command and then open the primary database.
    alter database set standby database to maximize performance;
    alter database open;

  • Logfile switch is not causing checkpoint.

    Hi,
    Database : Oracle10g running on solaris
    Doesn't log switch cause checkpoint ?.
    SQL> select NAME,CHECKPOINT_CHANGE#,STATUS from v$datafile;
    NAME CHECKPOINT_CHANGE# STATUS
    /u02/oradata/bihyd2/system.dbf 1831405 SYSTEM
    /u02/oradata/bihyd2/undotbs1.dbf 1831405 ONLINE
    /u02/oradata/bihyd2/sysaux.dbf 1831405 ONLINE
    /u02/oradata/bihyd2/sys01.dbf 1831405 SYSTEM
    /u02/oradata/bihyd2/t1.dbf 1831405 ONLINE
    /u02/oradata/bihyd1/users01.dbf 1831405 ONLINE
    SQL> drop table t1;
    Table dropped.
    SQL> select CURRENT_SCN from v$database;
    CURRENT_SCN
    1865085
    SQL> alter system switch logfile;
    System altered.
    SQL> select NAME,CHECKPOINT_CHANGE#,STATUS from v$datafile;
    NAME CHECKPOINT_CHANGE# STATUS
    /u02/oradata/bihyd2/system.dbf 1831405 SYSTEM
    /u02/oradata/bihyd2/undotbs1.dbf 1831405 ONLINE
    /u02/oradata/bihyd2/sysaux.dbf 1831405 ONLINE
    /u02/oradata/bihyd2/sys01.dbf 1831405 SYSTEM
    /u02/oradata/bihyd2/t1.dbf 1831405 ONLINE
    /u02/oradata/bihyd1/users01.dbf 1831405 ONLINE

    Log switch imply checkpoint but checkpoint does not imply log switch, when you make a log switch it initiate a checkpoint and move to another log file for writing, when a log switch occur every contents within the redo buffer should be written to log file before its reuse though it is already written to log file when it is
    1/3 filled
    after 3 second
    but still it make sure to write alls the contents within cache to disk.Its a slow background process.
    SQL> select name,checkpoint_change#,status
      2    from v$datafile
      3  /
    NAME                              CHECKPOINT_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                     915491 SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                    915491 ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                   915491 ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                     917269 OFFLINE
    SQL> alter system switch logfile
      2  /
    System altered.
    SQL> select name,checkpoint_change#,status
      2    from v$datafile
      3  /
    NAME                              CHECKPOINT_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                     915491 SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                    915491 ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                   915491 ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                     917269 OFFLINEwhile the same is not with checkpoint , checkpoint just flush the dirty buffer data from data buffer cache to disk.
    SQL> alter system checkpoint
      2  /
    System altered.
    SQL> select name,checkpoint_change#,status
      2    from v$datafile
      3  /
    NAME                              CHECKPOINT_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                    921098 SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                    921098 ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                   921098 ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                     917269 OFFLINE
    SQL> alter system checkpoint
      2  /
    System altered.
    SQL> select name,checkpoint_change#,status
      2    from v$datafile
      3  /
    NAME                              CHECKPOINT_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                    921107 SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                    921107 ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                   921107 ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                     917269 OFFLINEIf you wait for a while you will see after flushing the redo buffer data to redo log file you will see
    SQL> alter system switch logfile
      2  /
    System altered.
    SQL> select name,checkpoint_change#,status
      2    from v$datafile
      3  /
    NAME                              CHECKPOINT_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                 921107 SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                 921107 ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                 921107 ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                      917269 OFFLINE
    SQL> /    
    NAME                              CHECKPOINT_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                 921107 SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                 921107 ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                 921107 ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                      917269 OFFLINEPause for sometime
    SQL> /
    NAME                              CHECKPOINT_CHANGE# STATUS
    /u01/app/oracle/oradata/mmi/system01.dbf                     921321 SYSTEM
    /u01/app/oracle/oradata/mmi/sysaux01.dbf                     921321 ONLINE
    /u01/app/oracle/oradata/mmi/undotbs01.dbf                    921321 ONLINE
    /u01/app/oracle/oradata/mmi/users01.dbf                      917269 OFFLINEKhurram

  • 10gR2 archivemode logfile switch hung

    Hi there,
    I just enable the database to archivemode and try to do a log switch. It just hung the over 30 minutes and still hung.
    Can anyone give you input please?
    Thanks
    SQL> archive log list;
    Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence 17
    Next log sequence to archive 17
    Current log sequence 19
    SQL> alter system switch logfile;

    I found the problem. There was no error on the alert log file. The error generated after I did a Cntrl C and it generated. The problem is NFS mount.
    Thanks your help.

Maybe you are looking for