Category Archives: Oracle

Linux + Oracle Apps + Sun JRE Plugin

Published by:

I recently upgraded my production instance to 11i.ATG_PF.H RUP 5 and replaced JInitiator with the Sun JRE Plugin. To be able to use Linux with the application’s applets, just perform the following steps:

  1. Install Mozilla Firefox if you don’t already have it.
  2. Download the supported JRE. In my case, it is 1.5.0_12. Because Oracle cannot keep up with new technology, I had to dig around in the Sun Java Archive to find it.
  3. Copy the JRE bin file to where you want it installed. I copied mine to /opt.
  4. Make the bin file executable:
    sudo chmod 744 jre-1_5_0_12-linux-i586.bin
  5. Install the bin file:
    sudo jre-1_5_0_12-linux-i586.bin
  6. Create a symlink to the JRE plugin:
    sudo ln -s /opt/jre1.5.0_12/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins
    UPDATE: For Firefox 3:
    sudo ln -s /opt/jre1.5.0_12/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-addons/plugins
  7. Startup Firefox, and give it a whirl.

How To Move Online Redo Logs While Database Is Running

Published by:

Issue


You have online redo log files in the wrong place and want to move them.

Solution


  1. Run the following SQL to locate the current redo log groups and their members:
  2. select l.group# group_number
    , l.status group_status
    , f.member group_member
    , f.status file_status
    from v$log l
    , v$logfile f
    where l.group# = f.group#
    order by l.group#
    , f.member;

  3. Find a location that can contain the new log files.
  4. Create the new log files using the following SQL. Note that there must be at least two logfile groups after dropping unnecessary log files.
  5. sqlplus /nolog
    SQL> connect / as sysdba
    SQL> alter database add logfile ('/path/to/new/redo_01_01.log','/path/to/new/redo_01_02.log') size 150M;
    SQL> alter database add logfile ('/path/to/new/redo_02_01.log','/path/to/new/redo_02_02.log') size 150M;

  6. Run the SQL from Step 1 to determine which logfile is CURRENT.
  7. Run the following command to switch log files. After running the SWITCH command, run the SQL from Step 1 again. Repeat the process until one of the newly created logfile groups has a CURRENT status.
  8. SQL> alter system switch logfile;

  9. After one of the newly created log files is CURRENT, run the following SQL. You should only drop logfile groups that have an INACTIVE status.
  10. SQL> alter database drop logfile group GROUP#;

  11. Repeat Step 6 for each undesired logfile group.

The dropped log files should have automatically been deleted from the file system.

References


Oracle® Database Administrator’s Guide – Managing the Redo Log