Monday, May 01, 2006

Downgrading from Enterprise Edition to Standard Edition

The business decided that one of the databases that I support, that there was no requirement to run Enterprise Edition. So today and tomorrow morning early we (Junior DBA and I) are going to through the process of downgrading to Standard Edition.
Here are the steps Oracle recommends:
  1. Export the whole database to file using exp or expdb, depending on the version.
  2. Deinstall the Enterprise Edition using Oracle installer.
  3. Reinstall the Standard Edition software using Oracle software.
  4. Create a new database and import the data from export file.
What we did instead to minimize downtime to just the export and import process.

  1. Install Standard Edition in a different Oracle home and different Oracle home path eg. $ORACLE_HOME becomes /oracle/product/920
  2. Create a new database using dbca or from scripts. Applying all necessary patches.
  3. Export the whole database from old database.
  4. Shutdown old database.
  5. Import into new database.
  6. Switch listener to point at new database.
This has reduced the actual downtime from at least 2 hours to 20 minutes which is just the export/import process (the db is small and the box fast).

A couple of gotchas when using dbca to create the database.
  1. LOG_ARCHIVE_DEST_n doesn't work for Standard Edition. This parameter was set by the dbca in its standard init.ora file. This parameter setting returns the error ORA-439 feature not enabled: Managed Standby. Use LOG_ARCHIVE_DEST instead for Standard Edition.
  2. When using ssh -X hostname you can't use su or sudo to change to oracle. Tunneling X through ssh (the -X option) requires ssh -X oracle@hostname to get the right DISPLAY set.
Have Fun