- Database Installation Guide
- Removing Oracle Database Software
- Downgrading Oracle Restart
Downgrading Oracle Restart
Use this procedure to deconfigure and downgrade Oracle Restart, or to troubleshoot Oracle Restart installation errors.
- As the
oracle
user, create a backup of the SPFILE to a PFILE from 21c Oracle home to 19c Oracle home.$ CREATE PFILE='/u01/app/oracle/product/19.0.0/dbhome_1/dbs/SIDinit.ora' FROM SPFILE
You can use this PFILE during the database downgrade process. - List all Oracle Databases on the server with their version, unique name of the
database, and Oracle home information.
$ srvctl config database -home
- Downgrade Oracle Database. Refer to Oracle Database Upgrade Guide
for more information about required pre-downgrade tasks, downgrade tasks,
post-downgrade tasks, and compatibility information.
Note:
Downgrade Oracle Database only if the Oracle Database version is higher than the Oracle Restart version to which you are downgrading Oracle Restart. - As the
oracle
user, downgrade the Oracle Restart resources corresponding to the Oracle Database, only if you have downgraded your Oracle Database.$ srvctl downgrade database -d db_unique_name -oraclehome $ORACLE_HOME -t to_version
- Inspect the Oracle Restart configuration of each database, service, and
listener.
$ srvctl config database -db db_unique_name $ srvctl config service -db db_unique_name $ srvctl config listener -listener listener_name
Make a note of the configuration information and use this information when adding the components back to Oracle Restart. - Stop all databases and listeners that are running before you downgrade Oracle
Restart.
$ srvctl stop database -db db_unique_name $ srvctl stop listener [-listener listener_name]
- Deinstall Oracle Restart while retaining the existing Oracle Automatic Storage
Management (Oracle ASM) disk group.
$ cd /u01/app/oracle/product/21.0.0/dbhome_1/deinstall $ ./deinstall If you want to retain the existing diskgroups and associated ASM filter driver labels or if any of the information detected is incorrect, you can modify by entering 'y'. Do you want to modify above information (y|n) [n]: y Specify the ASM Diagnostic Destination [ASM_diagnostic_destination]: Specify the diskstring [AFD_diskstring]: Specify the diskgroups that are managed by this ASM instance [+DATA]: De-configuring ASM will drop the diskgroups and clear the AFD labels at cleanup time. Do you want deconfig tool to drop the diskgroups and all AFD labels (y|n) [y]: n
- As the
grid
user, download the Oracle Grid Infrastructure 19c image files and extract the files to the Grid home.$ mkdir -p /u01/app/grid/product/19.0.0/grid $ chown grid:oinstall /u01/app/grid/product/19.0.0/grid $ cd /u01/app/grid/product/19.0.0/grid $ unzip -q download_location/grid_home.zip
download_location/grid_home.zip
is the path of the downloaded Oracle Grid Infrastructure image file.Note:
You must extract the image software into the directory where you want your new Grid home to be located. - Start the Oracle Grid Infrastructure installation wizard.
$ /u01/app/grid/product/19.0.0/grid/gridSetup.sh
- Select the Configuration Option as Set Up Software Only and select the installation options as prompted.
- As the
grid
user, update the Oracle central inventory (oraInventory
).$ /u01/app/oracle/product/19.0.0/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=downgraded_Grid_home -defaultHomeName CRS=TRUE
- As the
root
user, runroothas.sh
to configure Oracle Restart without Oracle ASM.# /u01/app/oracle/product/19.0.0/grid/crs/install/roothas.sh
- As the
grid
user, start Oracle ASM Configuration Assistant (Oracle ASMCA).$ /u01/app/oracle/product/19.0.0/bin/asmca
- Create a new temporary Oracle ASM disk group.
Note:
Configure Oracle ASM to use the new disk group and provide/.../.*
as the disk string so that Oracle ASM can discover the new disk. - Mount the existing Oracle ASM disk group and click Exit to close Oracle ASMCA.
- Move the password file from the temporary disk group to the existing disk
group.
$ /u01/app/oracle/product/19.0.0/bin/asmcmd ASMCMD> pwmove --asm new_diskgroup/orapwasm existing_diskgroup/orapwasm -f
- Remove the SPFILE from the existing Oracle ASM disk group.
ASMCMD> rm existing_diskgroup/ASM/ASMPARAMETERFILE/REGISTRY.253.1075263285
- Copy the SPFILE from the new Oracle ASM disk group to the existing disk
group.
ASMCMD> spcopy -u +new_diskgroup/asm/ASMPARAMETERFILE/registry.253.722601213 +existing_diskgroup/spfile ASMCMD> exit
- Restart the high availability stack to verify that Oracle ASM starts with SPFILE from the existing disk group.
- Start Oracle ASMCA and delete the new temporary disk group.
- As the
oracle
user, add the components back to Oracle Restart with the same attributes that you noted in earlier steps.- Add Oracle Database to the Oracle Restart configuration.
$ srvctl add database -db db_unique_name -oraclehome Oracle_home -spfile spfile_name
For the-spfile
parameter, provide the SPFILE that you noted in Step 5. - Add the listener to the Oracle Restart configuration.
$ srvctl add listener -listener listener_name -oraclehome Oracle_home
For the-oraclehome
parameter, provide the Oracle home from where the listener was running before the downgrade. - Add each service to the database using the
srvctl add service
command.$ srvctl add service -db db_unique_name -service service_name_list
- Add Oracle Database to the Oracle Restart configuration.
- Start the components that you have added back to Oracle Restart.
- Start the Oracle database.
$ srvctl start database -db db_unique_name
- Start the listener.
$ srvctl start listener -listener listener_name
- Start each service using the
srvctl start service
command.
- Start the Oracle database.
- Connect to Oracle Database and start the pluggable database (PDB).
$ sqlplus / as sysdba SQL> ALTER PLUGGABLE DATABASE pdb_name OPEN; SQL> exit
- Verify that the Oracle Restart resources are running after the downgrade.
$ /u01/app/oracle/product/19.0.0/bin/crsctl stat res -t
Related Topics
Parent topic: Removing Oracle Database Software