Recover from currnet log file corruption in archive mode

Hi,
I am using oracle 10.2.0 on windows xp. my database is in archivelog mode. I am learning recovery. I take backup of database using
RMAN> backup database;
Starting backup at 03-SEP-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
input datafile fno=00001 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
input datafile fno=00003 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
input datafile fno=00002 name=D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
channel ORA_DISK_1: starting piece 1 at 03-SEP-09which completed.
my current logfile and current sequence no is
SQL> select * from v$log;
    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
         1          1         88   52428800          1 NO  CURRENT
      4475270 01-SEP-09
         2          1         86   52428800          1 YES INACTIVE
      4426127 31-AUG-09
         3          1         87   52428800          1 YES INACTIVEThen i delete my only one redolog file in my current group. my instance crashes i want to recover now first i try
SQL> startup
ORACLE instance started.
Total System Global Area  289406976 bytes
Fixed Size                  1248576 bytes
Variable Size              92275392 bytes
Database Buffers          188743680 bytes
Redo Buffers                7139328 bytes
Database mounted.
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1:
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
SQL> select open_mode from v$database;
OPEN_MODE
MOUNTED
SQL> recover database until cancel;
ORA-00279: change 4500421 generated at 09/03/2009 10:49:48 needed for thread 1
ORA-00289: suggestion : D:\1\ARC00088_0693601900.001
ORA-00280: change 4500421 for thread 1 is in sequence #88
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'
ORA-01112: media recovery not startedit doesn't work then i do
RMAN> restore database
2> ;
Starting restore at 03-SEP-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: reading from backup piece D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03
KP
channel ORA_DISK_1: restored backup piece 1
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_5
channel ORA_DISK_1: restore complete, elapsed time: 00:02:16
Finished restore at 03-SEP-09
RMAN>
RMAN> recover database until sequence 87;
Starting recover at 03-SEP-09
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/03/2009 11:06:06
RMAN-06556: datafile 1 must be restored from backup older than scn 4444743It means i need an older backup but i have new backup how to restore or get my database up.
Thanks
umesh

Thanks for reply
i have this in my hand
RMAN> list backupset;
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
1       Full    1.38G      DISK        00:02:21     03-SEP-09
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20090903T104947
        Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_59YNHNSK_.BKP
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  1       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
  2       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
  3       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
  4       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
2       Full    6.80M      DISK        00:00:03     03-SEP-09
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20090903T104947
        Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NCSNF_TAG20090903T104947_59YNN8J9_.BKP
  Control File Included: Ckp SCN: 4500486      Ckp time: 03-SEP-09
  SPFILE Included: Modification time: 03-SEP-09
RMAN> restore database preview;
Starting restore at 03-SEP-09
using channel ORA_DISK_1
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
1       Full    1.38G      DISK        00:02:21     03-SEP-09
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20090903T104947
        Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_59YNHNSK_.BKP
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  1       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
  2       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
  3       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
  4       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
archive logs generated after SCN 4500421 not found in repository
Media recovery start SCN is 4500421
Recovery must be done beyond SCN 4500421 to clear data files fuzziness
Finished restore at 03-SEP-09
RMAN> backup archivelog all ;
Starting backup at 03-SEP-09
using channel ORA_DISK_1
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=60 recid=3 stamp=694522772
input archive log thread=1 sequence=61 recid=4 stamp=694543115
input archive log thread=1 sequence=62 recid=5 stamp=694693173
input archive log thread=1 sequence=63 recid=6 stamp=694707783
input archive log thread=1 sequence=64 recid=7 stamp=694785054
input archive log thread=1 sequence=65 recid=8 stamp=694787797
input archive log thread=1 sequence=66 recid=9 stamp=694794198
input archive log thread=1 sequence=67 recid=10 stamp=694799765
input archive log thread=1 sequence=68 recid=11 stamp=694806827
input archive log thread=1 sequence=69 recid=12 stamp=694809124
input archive log thread=1 sequence=70 recid=13 stamp=694868744
input archive log thread=1 sequence=71 recid=14 stamp=695132728
input archive log thread=1 sequence=72 recid=15 stamp=695210729
input archive log thread=1 sequence=73 recid=16 stamp=695330401
input archive log thread=1 sequence=74 recid=17 stamp=695399695
input archive log thread=1 sequence=75 recid=18 stamp=695412690
input archive log thread=1 sequence=76 recid=19 stamp=695511043
input archive log thread=1 sequence=77 recid=20 stamp=695557945
input archive log thread=1 sequence=78 recid=21 stamp=695597432
input archive log thread=1 sequence=79 recid=22 stamp=695728451
input archive log thread=1 sequence=80 recid=23 stamp=695729334
input archive log thread=1 sequence=81 recid=24 stamp=695729976
input archive log thread=1 sequence=82 recid=25 stamp=695835471
input archive log thread=1 sequence=83 recid=26 stamp=695988878
input archive log thread=1 sequence=84 recid=27 stamp=696160938
input archive log thread=1 sequence=85 recid=28 stamp=696333853
input archive log thread=1 sequence=86 recid=29 stamp=696360658
input archive log thread=1 sequence=87 recid=30 stamp=696454218
channel ORA_DISK_1: starting piece 1 at 03-SEP-09
channel ORA_DISK_1: finished piece 1 at 03-SEP-09
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_ANNNN_TAG20090903T115246_59YR5VRV_.BKP tag=TAG20090903T1
=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:08
Finished backup at 03-SEP-09
RMAN> restore database preview;
Starting restore at 03-SEP-09
using channel ORA_DISK_1
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
1       Full    1.38G      DISK        00:02:21     03-SEP-09
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20090903T104947
        Piece Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2009_09_03\O1_MF_NNNDF_TAG20090903T104947_59YNHNSK_.BKP
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  1       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
  2       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
  3       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
  4       Full 4500421    03-SEP-09 D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
archive logs generated after SCN 4500421 not found in repository
Media recovery start SCN is 4500421
Recovery must be done beyond SCN 4500421 to clear data files fuzziness
Finished restore at 03-SEP-09now i have two backup one is full database backup which will not work another is backup of all archivelog upto sequence 87 i think it should work.
but rman is choosing full database backup for restore.
so i need to force rman to choose archivelog backups for restore but don't know how to do it. please suggest.
Thanks
umesh

Similar Messages

  • Recovering data when log files corrupt

    I am interested to understand if you can easily salvage the data files if the log files corrupt for some reason. Thus far I cannot see how this can be easilly achieved as db_backup requires a working environment, and since the log files may have vanished, the LSN of the data files will be greater than of the last log - and therefore refuse to create the environment.
    Ideally I guess, I am looking for a tool that can reset the LSN in place. It would be better to have access to your 100's of GB of data and accept a small amount of inconsistency or data loss than have nothing.
    Thanks

    Hi,
    Resetting LSNs can be done using db_load -r lsn or using the lsn_reset() method, and it is done in place.
    If your log files are corrupted, you would need to verify the database files (you can use the db_verify BDB utility or the verify() method). The actions you will further take depend on the result of verifying the database files:
    - if they verify correctly then you just need to reset the LSNs and the file IDs in the databases and start with a fresh environment,
    - if they do not verify correctly, you could restore the data from the most recent backup, or you can perform a salvage dump of the data in the database files using db_dump -r or db_dump -R and than reload the data using db_load; see the Dumping and Reloading Databases doc section in the Berkeley DB Programmer's Reference Guide.
    Regards,
    Andrei

  • How to recover from deleting log file?

    Hi,
    In a case on Mondayitis I accidentally deleted C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_1_35N72N5G_.LOG'
    and now can't start my database. (see error below)
    Tue Jun 12 12:40:29 2007
    Errors in file c:\oraclexe\app\oracle\admin\xe\bdump\xe_lgwr_3544.trc:
    ORA-00313: open failed for members of log group 1 of thread 1
    ORA-00312: online log 1 thread 1: 'C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ONLINELOG\O1_MF_1_35N72N5G_.LOG'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    Tue Jun 12 12:40:30 2007
    ORA-313 signalled during: ALTER DATABASE OPEN...
    Can someone guide me on how I can create a new log file and get my database up and running.
    Thanks
    Anthony

    After a bit more research I fixed the problem.
    But just in case anyone else does the same stupid thing - here is how I fixed it.
    connect / as sysdba
    RECOVER DATABASE UNTIL CANCEL;
    ALTER DATABASE OPEN RESETLOGS;
    And database is up and running.
    Regards
    Anthony

  • Transaction log shipping restore with standby failed: log file corrupted

    Restore transaction log failed and I get this error: for only 04 no of database in same SQL server, renaming are working fine.
    Date                     
    9/10/2014 6:09:27 AM
    Log                        
    Job History (LSRestore_DATA_TPSSYS)
    Step ID                
    1
    Server                  
    DATADR
    Job Name                           
    LSRestore_DATA_TPSSYS
    Step Name                        
    Log shipping restore log job step.
    Duration                             
    00:00:03
    Sql Severity        0
    Sql Message ID 0
    Operator Emailed           
    Operator Net sent          
    Operator Paged               
    Retries Attempted         
    0
    Message
    2014-09-10 06:09:30.37  *** Error: Could not apply log backup file '\\10.227.32.27\LsSecondery\TPSSYS\TPSSYS_20140910003724.trn' to secondary database 'TPSSYS'.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: An error occurred while processing the log for database 'TPSSYS'. 
    If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
    An error occurred during recovery, preventing the database 'TPSSYS' (13:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
    RESTORE LOG is terminating abnormally.
    Processed 0 pages for database 'TPSSYS', file 'TPSSYS' on file 1.
    Processed 1 pages for database 'TPSSYS', file 'TPSSYS_log' on file 1.(.Net SqlClient Data Provider) ***
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  Skipping log backup file '\\10.227.32.27\LsSecondery\TPSSYS\TPSSYS_20140910003724.trn' for secondary database 'TPSSYS' because the file could not be verified.
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: An error occurred restoring the database access mode.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: An error occurred restoring the database access mode.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteScalar requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  Deleting old log backup files. Primary Database: 'TPSSYS'
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  The restore operation completed with errors. Secondary ID: 'dd25135a-24dd-4642-83d2-424f29e9e04c'
    2014-09-10 06:09:30.37  *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.37  *** Error: Could not cleanup history.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-10 06:09:30.37  *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-09-10 06:09:30.38  ----- END OF TRANSACTION LOG RESTORE    
    Exit Status: 1 (Error)

    I Have restore the database to new server and check with new log shipping but its give this same error again, If it is network issue i believe issue need to occur on every database in  that server with log shipping configuration
    error :
    Message
    2014-09-12 10:50:03.18    *** Error: Could not apply log backup file 'E:\LsSecondery\EAPDAT\EAPDAT_20140912051511.trn' to secondary database 'EAPDAT'.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-09-12 10:50:03.18    *** Error: An error occurred while processing the log for database 'EAPDAT'.  If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
    An error occurred during recovery, preventing the database 'EAPDAT' (8:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.
    RESTORE LOG is terminating abnormally.
    can this happened due to data base or log file corruption, if so how can i check on that to verify the issue
    Its not necessary if the issue is with network it would happen every day IMO it basically happens when load on network is high and you transfer log file which is big in size.
    As per message database engine was not able to restore log backup and said that you must rebuild log because it did not find out log to be consistent. From here it seems log corruption.
    Is it the same log file you restored ? if that is the case since log file was corrupt it would ofcourse give error on wehatever server you restore.
    Can you try creating logshipping on new server by taking fresh full and log backup and see if you get issue there as well. I would also say you to raise case with Microsoft and let them tell what is root cause to this problem
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • Log file corrupt and can't open the database.

    I use Replication Manager to manage my Replication; and there is only one site currently in my application.
    I killed the App process with signal -9. (ie. $ kill -9 appID).
    Then I try to restart the App, but the event_callback function got a PANIC event when to open the envirment.
    The open flag is:
    flags = DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |
    DB_INIT_REP | DB_INIT_TXN | DB_RECOVER | DB_THREAD;
    ret = dbenv->open(dbenv, path, flags | DB_SYSTEM_MEM, 0);
    What's the reason cause this problem?
    How can recover it ?
    The logs list as below:
    [D 11/19 09:44] dbpf using shm key: 977431433
    [E 11/19 09:44] [src/io/dbpf-mgmt.c, 400]
    [E 11/19 09:44] yuga: DB_LOGC->get: LSN 1/9776: invalid log record header
    [E 11/19 09:44] yuga: Log file corrupt at LSN: [1][9906]
    [E 11/19 09:44] yuga: PANIC: Invalid argument
    [E 11/19 09:44] [src/io/dbpf-mgmt.c] Rep EventGot a panic: Invalid argument (22)
    Edited by: dbnicker on Nov 18, 2010 6:08 PM

    First, what version of Berkeley DB are you running and on what system?
    The error indicates something amiss in the log. The LSN values are quite
    small. Can you run 'db_printlog -N -h <env path>' and post the log
    contents?
    If you are using BDB 5.0 or later, can you also post the contents of
    the __db.rep.diag00 file in the environment home directory? Thanks.
    Sue LoVerso
    Oracle

  • Help on Reading and Reporting From A log File

    Hi there
    I need any assistance on developing a class that is able to read from a log file and then be filtered and put into a report. I need to be able to search on the log files per criteria.

    Chainsaw:
    http://logging.apache.org/log4j/docs/chainsaw.html

  • Read data from a log file to flex textarea while deploying

    Hi,
    I am new to flex. I am able to read data from a log file that placed in C drive and able to write that data into flex textarea, but I am unable to read the same file while it is deployed into weblogic sever.
    Could anyone please tell me how to solve this problem.
    Thanks,
    Sri.

    Do you have it trying to read that same file on your C drive or is the file actually deployed somewhere on the server?

  • How to recover from corrupt redo log file in non-archived 10g db

    Hello Friends,
    I don't know much about recovering databases. I have a 10.2.0.2 database with corrupt redo file and I am getting following error on startup. (db is non archived and no backup) Thanks very much for any help.
    Database mounted.
    ORA-00368: checksum error in redo log block
    ORA-00353: log corruption near block 6464 change 9979452011066 time 06/27/2009
    15:46:47
    ORA-00312: online log 1 thread 1: '/dbfiles/data_files/log3.dbf'
    ====
    SQL> select Group#,members,status from v$log;
    GROUP# MEMBERS STATUS
    1 1 CURRENT
    3 1 UNUSED
    2 1 INACTIVE
    ==
    I have tried this so far but no luck
    I have tried following commands but no help.
    SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3;
    Database altered.
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01139: RESETLOGS option only valid after an incomplete database recovery
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-00368: checksum error in redo log block
    ORA-00353: log corruption near block 6464 change 9979452011066 time 06/27/2009
    15:46:47
    ORA-00312: online log 1 thread 1: '/dbfiles/data_files/log3.dbf'

    user652965 wrote:
    Thanks very much for your help guys. I appreciate it. unfortunately none of these commands worked for me. I kept getting error on clearing logs that redo log is needed to perform recovery so it can't be cleared. So I ended up restoring from earlier snapshot of my db volume. Database is now open.
    Thanks again for your input.And now, as a follow-up, at a minimum you should make sure that all redo log groups have at least 3 members. Then, if you lose a single redo log file, all you have to do is shutdown the db and copy one of the good members (of the same group as the lost member) over the lost member.
    And as an additional follow-up, if you value your data you will run in archivelog mode and take regular backups of the database and archivelogs. If you fail to do this you are saying that your data is not worth saving.

  • Display string from a log file on a Dashboard?

    Hello everyone,
    I need a little guidance on how to solve this problem in SCOM 2012 R2.
    I need SCOM to do this:
    Read a log file on a specific application server (say its hostname is server21)
    Look for the text: Total number of users: 15
    Display the text “Users on Server21 =
     15” on a SCOM dashboard (or something to that effect)
    Sounds simple enough? Well, I am stumped :-(
    I have read and followed tutorials on internet, telling me how to create a rule and alerts. However I don’t want alerts. I want this data to be simply shown on a dashboard.
    How can I do that?
    PS: I hear that I may have to create my own management pack with only server21 in it. Is that right?
    -Rajeev rajdude.com

    Thanks for the tip. The powershell grid widget is pretty powerful. However it will take me quite some time and effort to write a PS script which can extract the exact info I need from that application's log file. I was hoping SCOM's own log parsing
    capabilities would do it.
    By the way, yes, we can create a MP and have only one server in it. We can use the (free) 
    MPAuthor to make a MP with only one server in it. Here is a video showing how to do it...
    http://www.silect.com/static/mpauthor/MP_Author_Creating_a_New_Single_Server_Application_MP.mp4
    I tried doing what I want using MPAuthor, but it again boiled down to me writing a PS script which can extract the exact info I need
    from that application's log file.
    -Rajeev rajdude.com

  • How to recover the data from a  dropped table in production/archive mode

    How to recover the data/change on a table that was dropped by accident.
    The database is on archive mode.

    Oracle Version. ? If 10g.
    Try this Way
    SQL> create table taj as select * from all_objects where rownum <= 100;
    Table created.
    SQL> drop table taj ;
    Table dropped.
    SQL> show recyclebin
    ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
    TAJ              BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE        2006-09-10:16:02:58
    SQL> flashback table taj to before drop;
    Flashback complete.
    SQL> show recyclebin;
    SQL> desc taj;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL>M.S.Taj

  • Job number from alert log file to information

    Hello!
    I have a question about job numbers in alert log file. Today one of our Oracle 10g R2 [10.2.0.4] RAC nodes crashed. After examining alert log file for one of the nodes I saw a lot of messages like:
    Tue Jul 26 11:52:43 2011
    Errors in file /u01/app/oracle/admin/zeme/bdump/zeme2_j002_28952.trc:
    ORA-12012: error on auto execute of job *20627358*
    ORA-12705: Cannot access NLS data files or invalid environment specified
    Tue Jul 26 11:52:43 2011
    Errors in file /u01/app/oracle/admin/zeme/bdump/zeme2_j001_11018.trc:
    ORA-12012: error on auto execute of job *20627357*
    ORA-12705: Cannot access NLS data files or invalid environment specified
    Tue Jul 26 11:52:43 2011
    Errors in file /u01/app/oracle/admin/zeme/bdump/zeme2_j000_9684.trc:
    ORA-12012: error on auto execute of job *20627342*
    ORA-12705: Cannot access NLS data files or invalid environment specified
    After examining trc files I have found no further information about error except session ids.
    My question is: how to find what job caused these messages to appear in alert log file.
    How do I map number in alert log file to some "real" information (owner, statement executed, schedule)?
    Marx.

    Sorry for the delay
    Try this to find the job :
    select job, what from dba_jobs ;
    How do I find NLS_LANG version?SQL> show parameter NLS_LANG
    Do you mean ALTER SESSION inside a job?I meant anywhere, but your question is better.
    ORA-12705 - Common Reasons and How to Resolve Them [ID 158654.1]
    If OS is Windows lookout for NLS_LANG=NA in the registry
    Is it possible you are doing this somewhere ?
    ALTER SESSION SET NLS_DATE_FORMAT = 'RRRR-MM-DD\"T\"HH24:MI:SS';NLS database settings are superseded by NLS instance settings
    SELECT * from NLS_SESSION_PARAMETERS;
    These are the settings used for the current SQL session.
    NLS_LANG could be set in a profile for example.
    NLS_LANG=_AMERICA.WE8ISO8859P1     ( correct )
    NLS_LANG=AMERICA.WE8ISO8859P1 ( Incorrect )
    you need to set the "_" as separator.
    Windows
    set NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
    Unix
    export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
    mseberg
    Edited by: mseberg on Jul 28, 2011 3:51 PM
    Edited by: mseberg on Jul 29, 2011 4:05 AM

  • SELECT top two longest running steps from a log file

    Simplified example.
    Our jobs write records to our own internal log file. I want to write a query that will pull log records for a specific job, between specific dates. This will help determine if the job is running slower than usual and to find the steps within the job that
    are the longest running.
    Jobs are identified by the Type field. Type=1 is a specific job name.
    Each job writes a DESC=START record to the log at the beginning of the job. the Desc=START record will be updated at the end of the job with the ENDDT.
    I want to pull the top two longest running steps (ENDDT-BEGINDT) for each job (Type) where the step startdr and enddt falls between the START startDT and end dt.
    I also want to always pull key step names, like DESC=START and DESC=xya for each job.
    LOG RECORDS
    DESC,TYPE,BEGINDT,ENDDT
    START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
    aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
    bbb,1,2014-10-22 08:57:56.000,2014-10-22 09:01:56.000
    ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
    aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
    bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
    ccc,1,2014-10-22 02:56:56.000,2014-10-22 02:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    Desired result set.
    If pulling job type 1 records for last 2 days, would end up with this result set. START and xya are always pulled and then the top 2 longest running steps for each of the START records.
    DESC,TYPE,BEGINDT,ENDDT,Duration
    START,1,2014-10-22 07:56:56.000,2014-10-22 09:56:56.000
    aaa,1,2014-10-22 07:57:56.000,2014-10-22 08:57:56.000
    ccc,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    xya,1,2014-10-22 09:01:56.000,2014-10-22 09:56:56.000
    START,1,2014-10-21 11:56:56.000,2014-10-22 02:56:56.000
    aaa,1,2014-10-21 11:57:56.000,2014-10-22 01:57:56.000
    bbb,1,2014-10-22 01:57:56.000,2014-10-22 02:56:56.000
    xya,1,2014-10-22 09:55:56.000,2014-10-22 09:56:56.000
    I am asking for help in how to create this query. Thanks

    Hi TheBrenda,
    According to your description, I have written a sample query and tested it in my local environment.
    The following sample query is for your reference:
    --create table log_records
    CREATE TABLE log_records ([DESC] varchar(10),[TYPE] int,BEGINDT datetime,ENDDT datetime)
    --insert values to table log_records
    INSERT INTO log_records VALUES
    ('START',1,'2014-10-22 07:56:56.000','2014-10-22 09:56:56.000'),
    ('aaa',1,'2014-10-22 07:57:56.000','2014-10-22 08:57:56.000'),
    ('bbb',1,'2014-10-22 08:57:56.000','2014-10-22 09:01:56.000'),
    ('ccc',1,'2014-10-22 09:01:56.000','2014-10-22 09:56:56.000'),
    ('xya',1,'2014-10-22 09:55:56.000','2014-10-22 09:56:56.000'),
    ('START',1,'2014-10-21 11:56:56.000','2014-10-22 02:56:56.000'),
    ('aaa',1,'2014-10-21 11:57:56.000','2014-10-22 01:57:56.000'),
    ('bbb',1,'2014-10-22 01:57:56.000','2014-10-22 02:56:56.000'),
    ('ccc',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000'),
    ('xya',1,'2014-10-22 02:56:56.000','2014-10-22 02:56:56.000')
    --run the following main query to get top two longest running steps
    WITH A AS
    (SELECT BEGINDT,ENDDT FROM log_records WHERE [DESC]='START'),
    B AS
    SELECT LR.[DESC], LR.TYPE, LR.BEGINDT BEGINDT1, LR.ENDDT ENDDT1, A.BEGINDT BEGINDT2, A.ENDDT ENDDT2,DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) AS timediff,ROW_NUMBER() OVER(PARTITION BY A.BEGINDT ORDER BY DATEDIFF(SECOND,LR.BEGINDT,LR.ENDDT) DESC ) AS rn FROM log_records LR JOIN A
    ON LR.BEGINDT >= A.BEGINDT AND LR.ENDDT<=A.ENDDT
    SELECT [DESC],[TYPE],BEGINDT1 BEGINDT,ENDDT1 ENDDT FROM B WHERE rn<4 or [DESC]='xya' ORDER BY BEGINDT2,rn
    The result of the main query is:
    DESC      TYPE     
    BEGINDT                                             
    ENDDT
    START   1              2014-10-21 11:56:56.000                2014-10-22 02:56:56.000
    aaa         1              2014-10-21 11:57:56.000                2014-10-22
    01:57:56.000
    bbb        1              2014-10-22 01:57:56.000                2014-10-22 02:56:56.000
    xya         1              2014-10-22 02:56:56.000                2014-10-22
    02:56:56.000
    START   1              2014-10-22 07:56:56.000                2014-10-22 09:56:56.000
    aaa         1              2014-10-22 07:57:56.000                2014-10-22
    08:57:56.000
    ccc          1              2014-10-22 09:01:56.000                2014-10-22
    09:56:56.000
    xya         1              2014-10-22 09:55:56.000                2014-10-22
    09:56:56.000
    If you have any question, please feel free to let me know.
    Regards,
    Jerry Li

  • Version Cue Log Files Corrupted.

    Address:
    Version Cue CS2 > config > configuration.
    I'm trying to create a back up of my hard drive, as a precaution whilst running an Adobe Clean script but the back up software is finding corrupt Version Cue log files.
    Are these files critical?
    Is it okay for me to delete one or two if they have become corrupted?

    This is why I don't use Version Cue.
    But you will get much better help in the Version Cue Forum http://www.adobeforums.com/webx/.2ccdf13f/

  • Apply exakt steps from History log file to another image?

    Alright. If you edit an image and the history log option is turned on, you can look at the exakt steps you've made with all the settings for the individual tools and effects used. Also steps you make can be recorded with the actions tool.
    My question is, are there any way to "play" the steps listed in the history log file, as if it were an action?
    I need to apply alot of steps to several images but I never recorded the steps I've made with the actions tool. However they are "recorded" in the history log file and I could go in and look and recreate all those steps manually, but that would take too much time...
    Are there any plug-ins or are there any other way to do what I need to get done?
    Cheers
    Martin

    1. you can set your preferences to record the history to a txt file or the files metadata.
    I assumed that is what the OP already did as indicated in
    If you edit an image and the history log option is turned on,
    wonder why there are no feature in Photoshop to replay all one have done, to any image?
    As you know there is, it’s Actions (as with Scripting not all functionality records; Edit: and not all functionality is applicable to all files because of Color Mode and Bit Depth for example). But it is up to you to employ the necessary foresight to know what to record beforehand.
    Also a non-destructive workflow can help make many effects/compositions/etc. easily transfer-/recreateable. 

  • Best way to extract lines from a log file in Linux

    My query is that I have a log file which is around 7 GB and I want to extract lines between a certain time range which should total up to half of the size to 3.5 GB. The lines start with a time range like                        “2014-03-11 17:35:00”. I want to extract the lines between “2014-03-11 17:35:00” to “2014-03-11 18:05:00”. What should be the best way as there may be a grep command or a sed command to do it.
    I hope, my question is clear.
    Please revert with the reply to my query.
    Regards

    How about the following:
    awk '/2014-03-11 17:35:00/, /2014-03-11 18:05:00/' infile > outfile

Maybe you are looking for

  • My password to icloud is not accepted, how can I get a new icloud password

    I have moved out of US and want to use my 4S. ATT has given me the device unlock #'s but before I can use them I have to turn off "Find my phone" When I try it asks for icloud password.  I am trying to use the Apple itunes password, because I do not

  • Selection screen in type m program

    How can we define Selection screen in type m program? Moderator message - please search the forum before asking. Thread locked. Edited by: Rob Burbank on Sep 20, 2009 2:19 PM

  • Unwanted spacing in words in pdf document.

    When selecting TouchUp Text, making corrections, and then saving the file a lot of the words become jumbled in the pdf document. Words w ill sta rt   lo  king like this thr ough out the doc ume nt. What would be causing this? Thanks!

  • Changing number of columns on master page, does not affect pages?

    I create a master page. say three columns per spread. I go to actual pages, flow my type in with the loaded cursor and holding the shift key... it works like a charm... text flows in the three colums, adding pages until the end of the manuscript... N

  • BPM Collect Pattern Scenario :Container is empty for the loop at run time

    Hi Friends, I am working on BPM Collect Pattern Scenario after looking into the example delivered by SAP in namespace http://sap.com/xi/XI/System/Patterns and IP name as BpmPatternCollectPayload. After configuring the same and when it is run, I see s