Introduction

Modern Oracle Database Appliances still support 11gR2, but there are several drawbacks using this old version:

  • if you want/need support for your databases, you should pay for Market Driven Support (11gR2 is even no more under extended support – it ended at the end of 2020)
  • some ODA features will not work with 11gR2 (odacli Data Guard feature for example)
  • the use of ACFS filesystems is mandatory

As I already told you, it’s more than time to migrate to 19c. Once done, you could get back to Premier Support and benefit for all ODA features dedicated to most recent versions. But what about ACFS filesystems?

ACFS is supported for all versions

ACFS is supported for all database versions, and migrating from 11gR2 to 19c will keep ACFS filesystems without any problem. Some of your databases can be using ASM, and other ACFS, both can live together.

Should I migrate to ASM?

If you are using ASM for your newest databases, it could be nice to keep only ASM and get rid of ACFS. ASM is fine as you don’t need to split your disks in numerous filesystems, so you optimize the disk usage (as disks on ODA are expensive).

How do I migrate from ACFS to ASM?

There are multiple methods to do this migration.

One of these methods is to use RMAN to move the datafiles with a BACKUP AS COPY DATABASE FORMAT ‘+DATA’ and then do a ‘SWITCHOVER DATABASE TO COPY’. It’s easy but it will only move datafiles, other files will need a manual move (redologs, controlfiles, archivelogs). Furthermore, your database will keep its ACFS volumes, and you should remove them manually. There is no way to detach ACFS volume from a database with odacli, unfortunately (for now).

Another way to achieve this goal is to use odacli backup and restore features. Because odacli will pack everything to keep your ODA registry clean. And that’s everyone’s wish. A clean ODA repository is highly recommended.

Where do I would put the temporary backup?

For sure, you can backup your database to an external volume, but as it’s for restoring on the same ODA, you’d better do the backup locally, it means in the FRA. It will minimize the time needed for the operation (NVMe disk to NVMe disk).

How to do the database migration from 11gR2 to 19c?

Let’s first create an 11gR2 database. Remember that you do not give the version of the database in the create-database command, you just provide the Database Home associated to 11gR2 binaries (-dh):

odacli create-database -dh e5db1546-2a78-416c-a70b-ea6a1ff022cd -u DEMO_767P -n DEMO -r ACFS -cs WE8ISO8859P15 -no-c -no-co -s odb2

Once database is created, let’s upgrade it to 19c, the -to is the target Database Home, the one running 19c:

odacli upgrade-database -i 371f1b1e-f1fe-4910-be10-e395d2c4ef67 -to fe4c4883-d8f6-4dad-97e8-ce04870fd9db

It will submit a job and would last from minutes to hours.

At the end of the migration, I’m used to change the compatible version:

sqlplus / as sysdba
alter system set compatible='19.0.0.0' scope=spfile;
shutdown immediate;
startup;
exit;

Create a backup configuration and link it to the database

To be able to restore with odacli, a backup needs to be made by odacli. It supposes to create a backupconfig first:

odacli create-backupconfig -n Local -w 1 -d Disk

Now let’s associate this backupconfig to the database:

odacli modify-database -in DEMO -bin Local

Create the backup and save the report to a json file

Now let’s take a first backup:

odacli create-backup --backupType Regular-L0 -in DEMO -ka

List the backupreports to identify the backup task, and then describe the backupreport to a json file:

odacli list-backupreports 
odacli describe-backupreport -i 0bc90ed3-1fe0-472e-8191-a587c0b44de0 > /tmp/br_DEMO_`date +"%Y%m%d_%H%M%S"`.json

Delete the source database

This is only mandatory if you want to keep the database name, and I would like to in this DEMO:

odacli list-databases

ID                                       DB Name    DB Type  DB Version           CDB        Class    Shape    Storage    Status        DbHomeID
---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------- ------------ ----------------------------------------
8ad09a72-fbcf-410f-854b-cd8c945fb3de     DBTEST     Si       19.9.0.0.201020      false      Oltp     Odb1s    Asm        Configured   fe4c4883-d8f6-4dad-97e8-ce04870fd9db
72723b58-bc91-4a04-9122-3b1e214bede9     MIG        Si       19.9.0.0.201020      false      Oltp     Odb2     Acfs       Configured   fe4c4883-d8f6-4dad-97e8-ce04870fd9db
13b24dc6-f773-403b-a6e7-5b78d6b4c8b2     DBASM      Si       19.9.0.0.201020      false      Oltp     Odb2     Asm        Configured   fe4c4883-d8f6-4dad-97e8-ce04870fd9db
371f1b1e-f1fe-4910-be10-e395d2c4ef67     DEMO       Si       19.9.0.0.201020      false      Oltp     Odb2     Acfs       Configured   fe4c4883-d8f6-4dad-97e8-ce04870fd9db

odacli delete-database -i 371f1b1e-f1fe-4910-be10-e395d2c4ef67

Restore the database

odacli is able to restore a database to a different filesystem, ASM for example:

odacli irestore-database -dh fe4c4883-d8f6-4dad-97e8-ce04870fd9db -r /tmp/br_DEMO_20201126_112503.json -dr ASM -bl /u03/app/oracle/fast_recovery_area/DEMO_767P/backupset/2020_11_26/

Describe the job with odacli to have a status of the task:

Job details
----------------------------------------------------------------
                     ID:  5456a45a-ee7f-49eb-a6ae-3d4ffc9b5b42
            Description:  Database service recovery with db name: DEMO
                 Status:  Success
                Created:  November 26, 2020 11:30:56 AM CET
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Check if cluster ware is running         November 26, 2020 11:30:56 AM CET   November 26, 2020 11:30:56 AM CET   Success
Creating DbStorage for DbRestore         November 26, 2020 11:30:56 AM CET   November 26, 2020 11:30:57 AM CET   Success
Validating DiskSpace for DATA            November 26, 2020 11:30:56 AM CET   November 26, 2020 11:30:57 AM CET   Success
Generating SSH key                       November 26, 2020 11:30:57 AM CET   November 26, 2020 11:30:57 AM CET   Success
SSH key                                  November 26, 2020 11:30:57 AM CET   November 26, 2020 11:30:57 AM CET   Success
SSH key scan                             November 26, 2020 11:30:57 AM CET   November 26, 2020 11:30:57 AM CET   Success
Create TDE And Audit Dir Locations       November 26, 2020 11:30:57 AM CET   November 26, 2020 11:30:57 AM CET   Success
Create pfile for Auxiliary Instance      November 26, 2020 11:30:57 AM CET   November 26, 2020 11:30:57 AM CET   Success
Deleting FRA                             November 26, 2020 11:30:57 AM CET   November 26, 2020 11:30:58 AM CET   Success
Rman duplicate                           November 26, 2020 11:30:58 AM CET   November 26, 2020 11:35:24 AM CET   Success
Delete RECO FileGroup DEMO_767P          November 26, 2020 11:35:24 AM CET   November 26, 2020 11:35:25 AM CET   Success
Create RECO FileGroup DEMO_767P          November 26, 2020 11:35:25 AM CET   November 26, 2020 11:35:25 AM CET   Success
Delete RECO FileGroup DEMO_767P_9999     November 26, 2020 11:35:25 AM CET   November 26, 2020 11:35:25 AM CET   Success
Creating pfile from spfile               November 26, 2020 11:35:25 AM CET   November 26, 2020 11:35:25 AM CET   Success
Set PFile Ownership                      November 26, 2020 11:35:25 AM CET   November 26, 2020 11:35:26 AM CET   Success
Customize Db Parameters                  November 26, 2020 11:35:26 AM CET   November 26, 2020 11:35:27 AM CET   Success
Shutdown And Start database              November 26, 2020 11:35:27 AM CET   November 26, 2020 11:36:49 AM CET   Success
Create spfile for restore db             November 26, 2020 11:36:49 AM CET   November 26, 2020 11:36:49 AM CET   Success
Set PFile Ownership                      November 26, 2020 11:36:49 AM CET   November 26, 2020 11:36:49 AM CET   Success
Shutdown And Mount database              November 26, 2020 11:36:49 AM CET   November 26, 2020 11:37:32 AM CET   Success
Re-Create control file                   November 26, 2020 11:37:32 AM CET   November 26, 2020 11:38:12 AM CET   Success
Removing Disabled Redo Threads           November 26, 2020 11:38:12 AM CET   November 26, 2020 11:38:13 AM CET   Success
Updating DB attributes                   November 26, 2020 11:38:13 AM CET   November 26, 2020 11:38:13 AM CET   Success
Enable block change tracking             November 26, 2020 11:38:13 AM CET   November 26, 2020 11:38:16 AM CET   Success
Register Database taskflow               November 26, 2020 11:38:17 AM CET   November 26, 2020 11:42:38 AM CET   Success
Create SPFile in shared loc              November 26, 2020 11:38:17 AM CET   November 26, 2020 11:38:21 AM CET   Success
Delete Local Spfile                      November 26, 2020 11:38:21 AM CET   November 26, 2020 11:38:21 AM CET   Success
Register DB with clusterware             November 26, 2020 11:38:21 AM CET   November 26, 2020 11:39:40 AM CET   Success
Add Startup Trigger to Open all PDBS     November 26, 2020 11:39:40 AM CET   November 26, 2020 11:39:40 AM CET   Success
Set SysPassword and Create PwFile        November 26, 2020 11:39:40 AM CET   November 26, 2020 11:39:42 AM CET   Success
Creating pfile                           November 26, 2020 11:39:42 AM CET   November 26, 2020 11:39:43 AM CET   Success
Updating db env                          November 26, 2020 11:39:43 AM CET   November 26, 2020 11:39:44 AM CET   Success
Enable DbSizing Template                 November 26, 2020 11:39:44 AM CET   November 26, 2020 11:41:00 AM CET   Success
Update Database Global Name              November 26, 2020 11:41:00 AM CET   November 26, 2020 11:41:01 AM CET   Success
Create tns entry                         November 26, 2020 11:41:01 AM CET   November 26, 2020 11:41:02 AM CET   Success
Running datapatch                        November 26, 2020 11:41:02 AM CET   November 26, 2020 11:41:11 AM CET   Success
Set CPU pool                             November 26, 2020 11:41:11 AM CET   November 26, 2020 11:41:11 AM CET   Success
Reset Associated Networks                November 26, 2020 11:42:38 AM CET   November 26, 2020 11:42:41 AM CET   Success
Copy Pwfile to Shared Storage            November 26, 2020 11:42:41 AM CET   November 26, 2020 11:42:44 AM CET   Success

That’s it, our database is now using ASM like the other databases. You can control with another:

odacli list-database

Conclusion

This is the cleanest way to move a database from ACFS to ASM or vice-versa. Please make sure your backup is OK before deleting the database. Be carreful if your database is the latest one to use ACFS, because your recovery area ACFS volume could be removed after the source database deletion. If you want to make sure that your backup will persist, do it on a nfs share or restore the database with a new name.