Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | Questions | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Databases > Oracle     

Dropping online redo logs


If you want to move redo logs to another filesystem without shutting down the database you can
create new groups on the new filesystem and drop the old groups.

1. Create new online redo log groups

SQL> ALTER DATABASE ADD LOGFILE ('/path2redo/redo4a.log') SIZE 100M;
SQL> ALTER DATABASE ADD LOGFILE ('/path2redo/redo5a.log') SIZE 100M;
SQL> ALTER DATABASE ADD LOGFILE ('/path2redo/redo6a.log') SIZE 100M;

2. Switch log file as many times as needed for the new group to become the current one

SQL> alter system switch logfile;

3. Do checkpoint

SQL> alter system checkpoint;

4. Confirm that the old groups are inactive

SQL> select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS           FIRST_CHANGE#
FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- -------------
---------
         1          1          7  104857600          1 NO  INACTIVE                262831
13-JUN-08
         2          1          8  104857600          1 NO  INACTIVE                271668
13-JUN-08
         3          1          9  104857600          1 NO  CURRENT                 276366
13-JUN-08
...


5. Drop the old groups

SQL> ALTER DATABASE DROP LOGFILE GROUP 1;

6. If not using ASM files have to be removed manually; remove the files for redo log groups
that have been dropped

rm /path2oldredo/redo1a.log


  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

       Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #193
views : 244
Added on : 06/13/08
Submited by : h8dk97
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (163)
 
 
Next >>
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Operating Systems > Unix : How to kill Unix user session  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Databases > Oracle : Kill user session  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Office Software | TipLib FAQ
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com