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.

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • 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 system trigger - substitution

    Hello.
    By the documentation, there is restriction for trigger on alter command: "The trigger will not be fired by an ALTER DATABASE statement".
    I'm trying to use BEFORE SHUTDOWN and AFTER STARTUP triggers to database and I'd need also cover situations:
    - alter system quiesce restricted
    - alter system suspend
    - alter system enable restricted session
    - alter system unquiesce
    - alter system disable restricted session
    - alter system resume
    I'm using ALTER SYSTEM command (not ALTER DATABASE), but trigger isn't fired too. Is there any way how to catch and do some PL/SQL pre/post processing events described above?
    Thanks.

    Oracle Version ?
    if ur on 10.x.x.x.x
    Check
    sql> select space_limit/1024/1024 "Limit MB",round(space_used/1024/1024) "Used MB"
    2* from v$recovery_file_dest
    SQL> /
    Limit MB Used MB
    2048 1681
    If limit and used field equal then increase db_recovery_file_dest_size parameter size
    SQL> show parameter db_recovery_file_dest_size
    NAME TYPE VALUE
    db_recovery_file_dest_size big integer 2G
    SQL> alter system set db_recovery_file_dest_size = 3g;
    System altered.
    Also check below link.
    >>>Re: Switch logfile hangs
    [b]>>>SQL> alter system switch logfile;

  • Alter System command

    Hi all,
    I am just bit confused in the following two commands
    SQL> ALTER SYSTEM SWITCH LOGFILE;
    SQL> ALTER SYSTEM CHECKPOINT;
    So what is the main difference between the first and second cmds?
    Why seniors/books suggest to use first command instead of the second one ?

    372211, if you run manual hot backups then at the conclusion of copying the files for the last tablespace in your hot backup and issueing the "end backup" command you generally issue the ALTER SYSTEM SWITCH LOGFILE command to force all redo necessary to bring the backups to a consistent point in time during forward recovery.
    The archived redo logs and backup copies just made can be duplicated for sending off-site and provide a consistet image in the event of a diaster that results in the loss of archieved redo logs made after the backup.
    Also, to add to what was said about checkpoints - The header blocks for the database files must also be updated with the checkpoint information.
    HTH -- Mark D Powell --

  • 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.

  • ALTER SYSTEM  ARCHIVELOG CURRENT

    Greeting to all ;
    I am trying to froce log switch but i am getting error.
    My db version is 10.2.0.4 on Oracle Linux 5.5.
    SQL> select GROUP# , ARCHIVED , MEMBERS , STATUS , FIRST_CHANGE# from v$LOG;
        GROUP# ARC    MEMBERS STATUS          FIRST_CHANGE#
             1 YES          1 INACTIVE              1499347
             2 NO           1 CURRENT               1499349
             3 YES          1 INACTIVE              1499344
    SQL> ALTER SYSTEM ARCHIVELOG CURRENT;
    ALTER SYSTEM ARCHIVELOG CURRENT
    ERROR at line 1:
    ORA-02065: illegal option for ALTER SYSTEM
    SOURCE_LINK :  ALTER SYSTEM SWITCH LOGFILE vs ALTER SYSTEM ARCHIVELOG CURRENT
    Question 2 :
    Each online or archived redo log file is uniquely identified by its log sequence number
    Online redo log  file LSN  and  archived redo log  LSN -  should be  same or  may different ?
    For ex : 
    Suppose , online redo logfile  have  bunch of redo entries , - >  when log switch occurs , LSN is created.
    When those entries reaching archive destination    - > does oracle change LSN ?
    Thanks ..

    replace yours sequence 16604 with my sequence 46
    RMAN> backup validate archivelog from sequence 46 until sequence 46
    2> ;
    Starting backup at 27-FEB-09
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=143 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=46 recid=42 stamp=679883682
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    Finished backup at 27-FEB-09After doing it i opened the archivelog of sequence 46 at editor and deleted some binary info from that and then saved that file.
    RMAN> backup validate archivelog from sequence 46 until sequence 46
    2> ;
    Starting backup at 27-FEB-09
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 02/27/2009 03:05:58
    RMAN-06059: expected archived log not found, lost of archived log compromises re
    coverability
    ORA-19625: error identifying file F:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\P
    ROD\ARCHIVELOG\2009_02_27\O1_MF_1_46_4TH9F0OH_.ARC
    ORA-27046: file size is not a multiple of logical block size
    OSD-04012: file size mismatch (OS 10622798)Khurram

  • 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.

  • 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

  • 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....

  • Question about ALTER SYSTEM ARCHIVE LOG START

    Good morning,
    I'm trying (unsuccessfully) to get my database to be in archive log mode.
    These are the steps I followed:
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area  535662592 bytes
    Fixed Size                  1375792 bytes
    Variable Size             377487824 bytes
    Database Buffers          150994944 bytes
    Redo Buffers                5804032 bytes
    Database mounted.
    SQL> select log_mode from v$database;
    LOG_MODE
    ARCHIVELOG
    SQL> show parameter log_archive_start;
    NAME                                 TYPE        VALUE
    log_archive_start                    boolean     FALSE
    SQL> alter system archive log start;
    System altered.
    SQL> show parameter log_archive_start;
    NAME                                 TYPE        VALUE
    log_archive_start                    boolean     FALSE
    SQL>I've gone thru that process twice but, I don't seem to be able to get the ARCH process to start. (newbie mistake I'm sure...)
    Thank you for your help (again!),
    John.

    The parameter log_archive_start is no more needed John (as suggested already) and the best way to check the archive options is through the archive log list command.
    [oracle@edhdr2p0-orcl oui]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 10 10:51:57 2010
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    SQL> archive log list
    Database log mode              No Archive Mode
    Automatic archival             Disabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     11
    Current log sequence           13
    SQL> shut immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area  418484224 bytes
    Fixed Size                  1336932 bytes
    Variable Size             318769564 bytes
    Database Buffers           92274688 bytes
    Redo Buffers                6103040 bytes
    Database mounted.
    SQL> select process,status from V$archive_processes;
       PROCESS STATUS
             0 STOPPED
             1 STOPPED
             2 STOPPED
             3 STOPPED
             4 STOPPED
             5 STOPPED
             6 STOPPED
             7 STOPPED
             8 STOPPED
             9 STOPPED
            10 STOPPED
       PROCESS STATUS
            11 STOPPED
            12 STOPPED
            13 STOPPED
            14 STOPPED
            15 STOPPED
            16 STOPPED
            17 STOPPED
            18 STOPPED
            19 STOPPED
            20 STOPPED
            21 STOPPED
       PROCESS STATUS
            22 STOPPED
            23 STOPPED
            24 STOPPED
            25 STOPPED
            26 STOPPED
            27 STOPPED
            28 STOPPED
            29 STOPPED
    30 rows selected.
    SQL>
    SQL> alter database archivelog;
    Database altered.
    SQL> alter database open;
    archive log list;
    Database altered.
    SQL> Database log mode         Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     11
    Next log sequence to archive   13
    Current log sequence           13
    SQL>
    SQL> select * from V$archive_processes where status <> 'STOPPED';
       PROCESS STATUS     LOG_SEQUENCE STAT
             0 ACTIVE                0 IDLE
             1 ACTIVE                0 IDLE
             2 ACTIVE                0 IDLE
             3 ACTIVE                0 IDLEHTH
    Aman....

  • Alter system set events Question

    Version 10202 on AIX
    sql> alter system set events '4030 trace name heapdump level 536870917; name errorstack level 3';
    Questions about this statement..
    what this command is doing, i guess creating tracefile for event 4030...& the location of trace file would be the current direcotry?
    & how to setup same kind of event trace for other events, any tips....& what to check in tracefile for problem?

    The values for level I have record are 1, 2, 3, 8, and 32 so I am guessing the number shown is the address of a specific heap to be dumped. The address of a heap would potentially change with a change in the shared pool storage parameters. Where did you get the address value?
    The dump should go to the user background dump destination and not the current directory.
    PS - if you have metalink look at document: #218105.1 Introduction to ORACLE Diagnostic EVENTS
    HTH -- Mark D Powell --
    Message was edited by: MDP add PS to Metalink Doc
    mpowel01

Maybe you are looking for