05 February 2024

Upgrade Database System to Linux 8 on OCI using console

When upgrading to Linux 8 of your Database System (Oracle Base Database), using the console, you will lose some settings that you have made manually.

https://docs.oracle.com/en/cloud/paas/base-database/upgrade-dbs/index.html#GUID-32241D49-BA5B-42D3-90B6-83D0A50480C9


What will you CERTAINLY lose:

* changes in /etc/fstab LOST

* extra directory in /opt/ LOST

* all stuff in /home/oracle  (scripts, changes in .bash_profile)

* extra mounted Filesystems. If they are external, you will need to put them back in /etc/fstab and remount.

* /etc/cron.allow is gone

* crontab of user oracle is gone (probably all crontabs!)

* contents of database directory objects if they are not on /u01, /u02, /u03!!

What goes ok:

  • extra stuff stored in /u01 /u02 /u03  (if you use Filesystem storage)
  • extra entries in tnsnames.ora  (which is in $ORACLE_HOME on u01)
  • The external /mnt to a filesystem is gone, but the filesystem itself is ok. Just remount it.


MAKE SURE TO BACKUP ALL BEFORE YOU START UPGRADE

02 November 2022

How to upgrade/patch Oracle Enterprise Manager Cloud Control

In this post, I'd like to give you the main lines of upgrading and patching Cloud Control

UPGRADING

Of course, your situation may be different. But if you have a simple Cloud Control setup, you may work with the following guidelines.

You should be working with Cloud Control 13c, specifically with 13.5

If you are on a lower version, first upgrade it to 13.5. I would suggest that 13.4 is fine as well, but an upgrade could be made nevertheless. 

If you need to upgrade, download the 13.5 version via edelivery (wget is preferred to do so).

When you start it up, you will get the option to upgrade. An example of the steps is on:

https://eclipsys.ca/oracle-enterprise-manager-upgrade-from-13-4-to-13-5/

This will create a whole new tree structure for gc_inst and OMS-home folders. So you need a lot of space.

You can follow all steps in the upgrade guide:

https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.5/emupg/introduction-upgrading-enterprise-manager-system-13c.html

After the installation, you can remove the old directory structures, but be careful with that.

https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.4/emupg/deleting-old-oms-home.html

After the upgrade, you will need to upgrade all the agents. 

Start with the Central Agent (on the OMS host itself). You can easily upgrade agents with the cloud control option under Setup>Manage Cloud Control>Upgrade Agents

After the central agent, you need to upgrade all target agents. You can do a few/some/a lot in one go.

Note that upgrade agents requires a root.sh script to be run. 

Note that after the upgrade of the agent you should run post-agent-upgrade steps (which cleans the old agent home).

Upgrading agents is a very smooth process that will not require any downtime (just briefly of the agent itself).

PATCHING

Now the patch áfter the 13.5 upgrade. Because you now have 13.5.0.0.0 installed on OMS and all the agents. 

There is a monthly patch, which can patch the OMS to 13.5.0.10.0 for example. This fixes a lot of bugs and issues.

You can find the patch in:

https://support.oracle.com/epmos/faces/DocumentDisplay?id=2902989.1

After downloading the latest patch (wget preferred), you should also download the latest OMSPatcher tool (follow the readme of OMS patch).

And you should also create a property file, which helps you installing the patch.

With the property file created and OMSPatcher tool upgraded, you can now 

omspatcher -apply -analyze -property_file /pathto/mypropertyfile.txt

emctl stop oms

omspatcher -apply -property_file /pathto/mypropertyfile.txt


The patch is in-place and gets you to OMS 13.5.0.x.0 (last patch).

Hope this helps you in your patching. Always follow the steps in Oracle Support documents!

26 September 2022

Quick install Oracle 19c+RU

Following Mike Dietrich's post https://mikedietrichde.com/2020/07/28/install-and-patch-in-one-single-action-with-oui/   I tried to do a quick install of 19c with the latest patchset (July 2022), in one go.

I didnt want to use any graphical interface, so a silent install would be needed.  Below I quickly note down my steps, use them at your own risk. 

I start with a compute node ('Instance') on OCI, with a OEL 8 image. 

Logon (ssh key) as opc user, and then...

sudo  yum -y install oracle-database-preinstall-19c

sudo mkdir /u01

sudo chown oracle: /u01

sudo su - oracle

mkdir /u01/software

cd /u01/software


Download 19.3 + patch + opatch:

The base installation is the V982063-01.zip. This is downloaded with the wget.sh script that is available from edelivery.

The quarterly patch, below is RU July 2022, that is found on MOS, and downloaded with wget script.

The OPatch, you can download in any way you like. I usually make a small wget script and use the link that can be derived from MOS.


[oracle@host01 software]$ ll *zip

-rw-r--r--. 1 oracle oinstall  124211908 Sep  1 13:33 newopatch.zip

-rw-r--r--. 1 oracle oinstall 1684302607 Jul 19 21:52 p34160831_190000_Linux-x86-64.zip

-rw-r--r--. 1 oracle oinstall 3059705302 Apr 23  2019 V982063-01.zip  


unzip -q p34160831_190000_Linux-x86-64.zip

mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1

cd $ORACLE_HOME

unzip -q /u01/software/V982063-01.zip

mv OPatch/ OPatch.prev/

unzip -q /u01/software/newopatch.zip


Now create a responsefile /home/oracle/db_patched.rsp, as below example. After that,

export CV_ASSUME_DISTID=OEL7.8

cd $ORACLE_HOME

./runInstaller -silent -applyRU /u01/software/34160831/34133642 -applyOneOffs /u01/software/34160831/34086870 -responseFile /home/oracle/db_patched.rsp



---[ responsefile ]------------------

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0

oracle.install.option=INSTALL_DB_SWONLY

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

ORACLE_BASE=/u01/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.OSDBA_GROUP=dba

oracle.install.db.OSOPER_GROUP=oper

oracle.install.db.OSBACKUPDBA_GROUP=backupdba

oracle.install.db.OSDGDBA_GROUP=dgdba

oracle.install.db.OSKMDBA_GROUP=kmdba

oracle.install.db.OSRACDBA_GROUP=racdba

oracle.install.db.rootconfig.executeRootScript=false

---------------------------------------


Run as root:

/u01/app/oraInventory/orainstRoot.sh

/u01/app/oracle/product/19.0.0/dbhome_1/root.sh