Monday, October 25, 2021

Creating Database from Backup of a Terminated DB System

Once a DBCS VM DB system or a database is terminated there's no way to recover it. At least that's the officail word from Oracle and stated in bold before termianting a DB or a DB system. For DB

For DB system.

There are two options for creating a database from backup when database is up and running (before termianted). One is using the "Create database from backup" button. This gives sevearl options such as last backup or from a specified timestamp.

Other method is selecting a specific backup and then clicking the three dots at the end and choosing the create database. This only gives two options.

When a DB System is terminated it still listed in the DB system page with a terminated state.

After some time it's removed from the DB System page. During this time between being terminated and removed from DB System page it is possible to create a database from backup of the terminated database. This method is not offical. It could change in the future. But at the time of writing it is possible.
Even though database is terminated, it could traversed using the links. Most of the options and buttons are grayed out.

"Create database from backup" button is grayed out but on an individual backup the "create database" item is available. Select "Create Database" option. The backup used in this case is an automatic backup.

During the creationg is is possible to use a different ssh key and storage type (ASM could restored as LVM). However, the hostname must be different to that of the terminated DB system's node name. Using the same hostname prefix could result in confliciting node names and DB creation fails.

Restored database could have a different name. But the TDE wallet password of the terminated DB system must be specified. Withuot this the restore will fail.




A new DB system will start provisioning.

Work request shows the steps and last step is the restoring of the database.

If no issues encountered such as duplicated vm names, wrong TDE passwords the restore will complete without error.

The DB system provisioning will complete and DB system will be available for login.

Three different tests were done using this method. One had a DB system created with ASM but restored to LVM. Another had a LVM DB System restored as LVM DB System. Third was a DB System that had a standby DB at the time of the termiantion. The backup used for restore was created while it was in primary role. The restored DB system had a read/write DB.

If the terminated database is not visible on the DB system page then this method is a non starter.
This is not a supported method. If it fails no pointing in contacting Oracle support as Oracle has stated once terminated all is gone, including automatic backups.