ODA X6-2S upgrade Databases to 12.2

In the Blog Post ODA X6-2 upgrade to 12.2 I described the way for upgrading an ODA to 12.2. In this post I will describe the two ways with ODA tools for upgrading a database to 12.2 and I will show on what you have to take care about.

Prerequisites for upgrading databases

Before you can upgrade a database you need to install a new 12.2 Database Home.

If you did not have downloaded the RDBMS Clone file for 12.2 then you have to download the patch 27119402

As soon you have downloaded this you have to copy this patch to the ODA (e.g. to /u01)

After this you can extract the file:

[root@edosrvoda03 ~]# cd /u01/
[root@edosrvoda03 u01]# unzip p27119402_122120_Linux-x86-64.zip 
Archive: p27119402_122120_Linux-x86-64.zip
 extracting: oda-sm-12.2.1.2.0-171124-DB-12.2.0.1.zip 
 inflating: README.txt 
[root@edosrvoda03 u01]#

Repository update

Now you are able to update the ODA repository with the new Oracle Home clone file.

[root@edosrvoda03 u01]# odacli update-repository -f /u01/oda-sm-12.2.1.2.0-171124-DB-12.2.0.1.zip 
{
 "jobId" : "056f54d4-e198-4e46-a0cd-1f1f4eac39bd",
 "status" : "Created",
 "message" : "/u01/oda-sm-12.2.1.2.0-171124-DB-12.2.0.1.zip",
 "reports" : [ ],
 "createTimestamp" : "February 27, 2018 16:25:42 PM CET",
 "resourceList" : [ ],
 "description" : "Repository Update",
 "updatedTime" : "February 27, 2018 16:25:42 PM CET"
}

Wait until the describe-job command show success

[root@edosrvoda03 u01]# odacli describe-job -i 056f54d4-e198-4e46-a0cd-1f1f4eac39bd

Job details 
----------------------------------------------------------------
 ID: 056f54d4-e198-4e46-a0cd-1f1f4eac39bd
 Description: Repository Update
 Status: Success
 Created: February 27, 2018 4:25:42 PM CET
 Message: /u01/oda-sm-12.2.1.2.0-171124-DB-12.2.0.1.zip

Task Name Start Time End Time Status 
-------------------------------------------------- ----------------------------------- ----------------------------------- ----------

Oracle Home creation

Now you are able to create a 12.2 Oracle Home.

[root@edosrvoda03 u01]# odacli create-dbhome --version 12.2.0.1

Job details 
----------------------------------------------------------------
 ID: 58c6809e-27b0-48c8-a3f0-50d13126a9e4
 Description: Database Home OraDB12201_home4 creation with version :12.2.0.1
 Status: Created
 Created: February 27, 2018 4:31:06 PM CET
 Message: Create Database Home

Task Name Start Time End Time Status 
-------------------------------------------------- ----------------------------------- ----------------------------------- ----------

 

Wait until the describe-job command show success

 

[root@edosrvoda03 u01]# odacli describe-job -i 58c6809e-27b0-48c8-a3f0-50d13126a9e4

Job details 
----------------------------------------------------------------
 ID: 58c6809e-27b0-48c8-a3f0-50d13126a9e4
 Description: Database Home OraDB12201_home4 creation with version :12.2.0.1
 Status: Success
 Created: February 27, 2018 4:31:06 PM CET
 Message: Create Database Home

Task Name Start Time End Time Status 
-------------------------------------------------- ----------------------------------- ----------------------------------- ----------
Setting up ssh equivalance February 27, 2018 4:31:07 PM CET February 27, 2018 4:31:07 PM CET Success 
Validating dbHome available space February 27, 2018 4:31:07 PM CET February 27, 2018 4:31:07 PM CET Success 
Creating DbHome Directory February 27, 2018 4:31:07 PM CET February 27, 2018 4:31:07 PM CET Success 
Extract DB clones February 27, 2018 4:31:07 PM CET February 27, 2018 4:32:15 PM CET Success 
Clone Db home February 27, 2018 4:32:15 PM CET February 27, 2018 4:33:18 PM CET Success 
Enable DB options February 27, 2018 4:33:18 PM CET February 27, 2018 4:33:29 PM CET Success 
Run Root DB scripts February 27, 2018 4:33:29 PM CET February 27, 2018 4:33:29 PM CET Success 
Removing ssh keys February 27, 2018 4:33:37 PM CET February 27, 2018 4:33:38 PM CET Success

Upgrade all Database attached to one Oracle Home with one command

To upgrade all databases from one Oracle Home (11.2 or 12.1) to 12.2 you need the DB Home ID for the this Oracle Home and you need the DB  Home ID of the new Oracle Home.

I will update all databases attached to the ORACLE_HOME with the ID cce28d1b-01cc-4917-8237-38683d34f53e to the ORACLE_HOME with the ID 929c8444-86f5-4032-9dd2-b5b95a2b6009 OraDB12201.

[root@edosrvoda03 u01]# odacli list-dbhomes

ID Name DB Version Home Location Status 
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
cce28d1b-01cc-4917-8237-38683d34f53e OraDB12102_home1 12.1.0.2.171017 (26914423, 26717470) /u01/app/oracle/product/12.1.0.2/dbhome_1 Configured
f4603d79-1392-4f6a-a2bf-ccc477cf9ca7 OraDB12102_home2 12.1.0.2.170814 (26680878, 26609798) /u01/app/oracle/product/12.1.0.2/dbhome_2 Configured
929c8444-86f5-4032-9dd2-b5b95a2b6009 OraDB12201_home1 12.2.0.1.171017 (27020386, 26710464) /u01/app/oracle/product/12.2.0.1/dbhome_1 Configured
82aeada2-9ebb-4fd7-a7e2-f3a8d343663b OraDB12201_home4 12.2.0.1.171017 (27020386, 26710464) /u01/app/oracle/product/12.2.0.1/dbhome_4 Configured
There is a Bug in ODA Software 12.2.1.2.0. For every database 15GB free space in /u01 is required. If this is not the case, the command will fail. If you have 4 Databases attached to one Oracle Home you need at least 60GB of free space in /u01 else you will get an error.

If you have enough free space in /u01 you can upgrade all databases attached to one Oracle Home with the following command:

[root@edosrvoda03 u01]# odacli upgrade-database -h
Usage: upgrade-database [options]
 Options:
 --databaseids, -i
 Database IDs to be upgraded
 Default: []
 * --destDbHomeId, -to
 DB HOME ID of the destination
 --help, -h
 get help
 --json, -j
 json output
 --sourceDbHomeId, -from

In this example it would be the command:

[root@edosrvoda03 u01]# odacli upgrade-database

[root@edosrvoda03 swingbench]# odacli describe-job -i 5b99bf52-245d-402c-abaf-be188e35845b

Job details
—————————————————————-
ID: 5b99bf52-245d-402c-abaf-be188e35845b
Description: Database service upgrade with db ids: [dbad46be-8c16-4d6a-8316-4f2bc3182a38]
Status: Success
Created: March 2, 2018 2:37:30 PM CET
Message:

Task Name Start Time End Time Status
————————————————– ———————————– ———————————– ———-
Setting up ssh equivalance March 2, 2018 2:37:30 PM CET March 2, 2018 2:37:30 PM CET Success
Database Upgrade March 2, 2018 2:37:30 PM CET March 2, 2018 3:04:33 PM CET Success
Database Upgrade Validation March 2, 2018 3:04:40 PM CET March 2, 2018 3:04:40 PM CET Success

-from cce28d1b-01cc-4917-8237-38683d34f53e -to 929c8444-86f5-4032-9dd2-b5b95a2b6009
{
 "jobId" : "5b99bf52-245d-402c-abaf-be188e35845b",
 "status" : "Created",
 "message" : null,
 "reports" : [ ],
 "createTimestamp" : "March 02, 2018 14:37:30 PM CET",
 "resourceList" : [ ],
 "description" : "Database service upgrade with db ids: [dbad46be-8c16-4d6a-8316-4f2bc3182a38]",
 "updatedTime" : "March 02, 2018 14:37:30 PM CET"
}

After the job  is successful your databases are upgraded:

[root@edosrvoda03 swingbench]# odacli describe-job -i 5b99bf52-245d-402c-abaf-be188e35845b

Job details 
----------------------------------------------------------------
 ID: 5b99bf52-245d-402c-abaf-be188e35845b
 Description: Database service upgrade with db ids: [dbad46be-8c16-4d6a-8316-4f2bc3182a38]
 Status: Success
 Created: March 2, 2018 2:37:30 PM CET
 Message:

Task Name Start Time End Time Status 
-------------------------------------------------- ----------------------------------- ----------------------------------- ----------
Setting up ssh equivalance March 2, 2018 2:37:30 PM CET March 2, 2018 2:37:30 PM CET Success 
Database Upgrade March 2, 2018 2:37:30 PM CET March 2, 2018 3:04:33 PM CET Success 
Database Upgrade Validation March 2, 2018 3:04:40 PM CET March 2, 2018 3:04:40 PM CET Success

Upgrade Database 1 to n databases at a time

If you are interested in upgrading databases independent of the ORACLE_HOME you have the possibility to use the same command (upgrade-database) with different parameters:

[root@edosrvoda03 swingbench]# odacli upgrade-database -h
Usage: upgrade-database [options]
 Options:
 --databaseids, -i
 Database IDs to be upgraded
 Default: []
 * --destDbHomeId, -to
 DB HOME ID of the destination
 --help, -h
 get help
 --json, -j
 json output
 --sourceDbHomeId, -from
 DB HOME ID of the source


You define the databases by its ID and define the ORACLE_HOME to which the databases should belong to after the upgrade. Please take care that the database are in running state before you start the command.
Please be aware that you have the same problem with the 15GB per database as if you upgrade all database attached to an ORACLE_HOME.

[root@edosrvoda03 u01]# odacli list-databases

ID DB Name DB Type DB Version CDB Class Shape Storage Status DbHomeID 
---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------- ------------ ----------------------------------------
3d698791-c2c9-43b8-8a96-c16cd214ae2b NCASM2 Si 12.1.0.2 false OLTP odb1 ASM Updating f4603d79-1392-4f6a-a2bf-ccc477cf9ca7 
5a0d1d09-262b-4c3f-8cae-17e6414fc8fe CACFS2 Si 12.1.0.2 true OLTP odb1 ACFS Configured f4603d79-1392-4f6a-a2bf-ccc477cf9ca7 



[root@edosrvoda03 u01]# odacli upgrade-database --databaseids 3d698791-c2c9-43b8-8a96-c16cd214ae2b,5a0d1d09-262b-4c3f-8cae-17e6414fc8fe --destDbHomeId 929c8444-86f5-4032-9dd2-b5b95a2b6009
{
 "jobId" : "95741127-8954-48e4-91d3-85816edb2e1e",
 "status" : "Created",
 "message" : null,
 "reports" : [ ],
 "createTimestamp" : "March 02, 2018 15:23:51 PM CET",
 "resourceList" : [ ],
 "description" : "Database service upgrade with db ids: [3d698791-c2c9-43b8-8a96-c16cd214ae2b, 5a0d1d09-262b-4c3f-8cae-17e6414fc8fe]",
 "updatedTime" : "March 02, 2018 15:23:51 PM CET"
}

 

After odacli describe-job shows success all databases in the parameter databaseids are upgraded to the new version.

[root@edosrvoda03 u01]# odacli describe-job -i 95741127-8954-48e4-91d3-85816edb2e1e

Job details 
----------------------------------------------------------------
 ID: 95741127-8954-48e4-91d3-85816edb2e1e
 Description: Database service upgrade with db ids: [3d698791-c2c9-43b8-8a96-c16cd214ae2b, 5a0d1d09-262b-4c3f-8cae-17e6414fc8fe]
 Status: Success
 Created: March 2, 2018 3:23:51 PM CET
 Message:

Task Name Start Time End Time Status 
-------------------------------------------------- ----------------------------------- ----------------------------------- ----------
Setting up ssh equivalance March 2, 2018 3:23:51 PM CET March 2, 2018 3:24:01 PM CET Success 
Database Upgrade March 2, 2018 3:24:01 PM CET March 2, 2018 3:51:48 PM CET Success 
Setting up ssh equivalance March 2, 2018 3:51:56 PM CET March 2, 2018 3:52:06 PM CET Success 
Database Upgrade March 2, 2018 3:52:06 PM CET March 2, 2018 4:45:28 PM CET Success 
Database Upgrade Validation March 2, 2018 4:46:02 PM CET March 2, 2018 4:46:02 PM CET Success

 

One Reply to “ODA X6-2S upgrade Databases to 12.2”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.