Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Tuesday, October 30, 2007

catdwgrd.sql DataBase downgrade from the current release to original release

$ORACLE_HOME/rdbms/admin/catdwgrd.sql is a script used for downgrading your database from the current release you have installed to the release from which you upgraded. If we open this file and go through its contents:

For 11g (11.1.0.6):

BEGIN
-- Get the previous version of the CATPROC component
SELECT prv_version INTO p_prv_version
FROM registry$ WHERE cid='CATPROC';

IF p_prv_version IS NULL THEN
RAISE_APPLICATION_ERROR(-20000,
'Downgrade not supported - database has not been upgraded');
END IF;

IF substr(p_prv_version, 1, 6) NOT IN ('10.1.0', '10.2.0','11.1.0') THEN
RAISE_APPLICATION_ERROR(-20000,
'Downgrade not supported to version ' || p_prv_version );
END IF;


For 10g (10.2.0.3):

BEGIN
-- Get the previous version of the CATPROC component
SELECT prv_version INTO p_prv_version
FROM registry$ WHERE cid='CATPROC';

IF substr(p_prv_version, 1, 5) = '9.2.0' THEN
RETURN '0902000';
ELSIF substr(p_prv_version, 1, 6) = '10.1.0' THEN
RETURN '1001000';
ELSIF substr(p_prv_version, 1, 6) = '10.2.0' THEN
RETURN '1002000';
ELSE
RAISE_APPLICATION_ERROR(-20000,
'Downgrade not supported to version ' || p_prv_version );
END IF;
END version_script;
/

So you can:

Downgrade from 11.1.0.x to 10.2.0 or 10.1.0 or 11.1.0.x
Downgrade from 10.2.0.x to 9.2.0 or 10.1.0 or 10.2.0.x

This file doesn't exist in 9.2.0.x ORACLE_HOME.

No comments: