Results 1 to 6 of 6
  1. #1
    Join Date
    May 2010
    Posts
    2

    Unanswered: Accidently deleted redo log files on production system - help

    I'm half cooked stupid DBA who has accidentaly deleted redo log files under one directory.

    DB Version: 7.3

    The redo log files are 2 members in each group. I deleted one member from each group accidently as they were under one directory.

    I was able to bring up the database and it is running alright. But I think this means that now we have have single point of failure. I want to clean this mess because if something happens or finds out, my credibility will get f--ked-up.

    I've tried to 'alter database add logfile member '/u01/.../redonna.log' to group n;
    but that fails because the member already exists in the database only the file is deleted.

    If I query v$log, it shows one set of members as INVALID and i think becuase the files are deleted.

    Please advice if there is a safe options.

    Thanks in advance.
    Bobby

  2. #2
    Join Date
    Feb 2006
    Posts
    173
    Provided Answers: 1
    Just create a new flat file with that name: /u01/.../redonna.log

    If OS is unix, logon as user who originally owned the file and just use 'touch' to create an empty file: touch /u01/.../redonna.log

    hth

  3. #3
    Join Date
    May 2006
    Posts
    132
    Unfortunately, you will not be able to simply touch the file and have everything back to normal.

    What you should do is drop the logfile member and re-add it:

    Code:
    SQL> alter database drop logfile member '/u01/.../redonna.log';
    SQL> alter database add logfile member '/u01/.../redonna.log' to group n;
    Prior to dropping the logfile member, you'll have to make sure the group is NOT the CURRENT group.

  4. #4
    Join Date
    Mar 2010
    Location
    Vienna, Austria
    Posts
    149
    bobbycool,

    relax, nothing really bad has happened yet.

    I'd be worried much more about being responsible for a production environment on an Oracle version, that was desupported some 10 years ago

    Anyway, the cleanest (and formerly by Oracle supported) way is, to simply create 3 new redo groups.

    Then check for the current logfile (that's the one with STATUS='CURRENT' in v$log) with
    Code:
    select * from v$log;
    If necessary, execute
    Code:
    alter system switch logfile;
    until one of the new groups, you generated is "CURRENT"

    Then drop the old redolog groups.
    "There is always an easy solution to every problem - neat, plausible, and wrong."
    -- H.L. Mencken

  5. #5
    Join Date
    May 2006
    Posts
    132
    Quote Originally Posted by magicwand View Post
    create 3 new redo groups.

    ... Then drop the old redolog groups.
    Going around the barn unnecessarily!

    Why on earth would the OP want to blow away ALL the redo logs to simply recreate the members ?

  6. #6
    Join Date
    May 2010
    Posts
    2

    Thanks you all

    Thanks you all for your suggestions.
    I was able to create a new group and then switched log file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •