César Carvalho
DBlink Oracle for three databases in SQL Server
Category: Database Author: César Carvalho Date: 2 years ago Comments: 0

DBlink Oracle for three databases in SQL Server

Building access via dblink to three SQL Server databases.
We will use a native technology of the Oracle database, the Heterogeneous Services (HS).
 
Databases:
10.16.0.11 - Source Database Oracle database

10.16.0.15 - SQL Server target database

 

Create a user with the necessary read permissions in the SQL Server environment:

 

User: USR_CONSULTA

Snhea: P!!2012300

 

Use some Oracle/EPEL repository:

 

[root@instance-20220613-1754 yum.repos.d]# cat oracle-linux-ol7.repo

[ol7_latest]

name=Oracle Linux $releasever Latest ($basearch)

baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

gpgcheck=1

enabled=1

 

We can use the Microsoft repository too:

 

curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo

 

Installing the necessary packages:

 

yum clean all

yum repolist

yum install unixODBC unixODBC-devel freetds -y

 

ODBC installation validation:

 

[root@olaria ~]# odbcinst -j

unixODBC 2.3.7

DRIVERS............: /etc/odbcinst.ini

SYSTEM DATA SOURCES: /etc/odbc.ini

FILE DATA SOURCES..: /etc/ODBCDataSources

USER DATA SOURCES..: /root/.odbc.ini

SQLULEN Size.......: 8

SQLLEN Size........: 8

SQLSETPOSIROW Size.: 8

[root@olaria ~]#

 

Creating the configuration init of Heterogeneous Services in Oracle referring to the three SQL Server databases that we will access via dblink:
Name of the databases that we will access in SQL Server: AEQUUS,FINANCIAL,CONTABILIS

 

[oracle@olaria ~]$ cd $ORACLE_HOME/hs/admin/




[oracle@olaria admin]$ cat initAEQUUS.ora

HS_FDS_CONNECT_INFO = AEQUUS

HS_FDS_TRACE_LEVEL = OFF

HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so # LIB

set ODBCINI=/etc/odbc.ini




[oracle@olaria admin]$ cat initFINANCIAL.ora

HS_FDS_CONNECT_INFO = FINANCIAL

HS_FDS_TRACE_LEVEL = OFF

HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so # LIB

set ODBCINI=/etc/odbc.ini




[oracle@olaria admin]$ cat initCONTABILIS.ora

HS_FDS_CONNECT_INFO = CONTABILIS

HS_FDS_TRACE_LEVEL = OFF

HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so # LIB

set ODBCINI=/etc/odbc.ini

 

Create if it doesn’t exist or edit the ODBC configuration file that we installed earlier, each bank must have a connection entry:

 

[root@olaria yum.repos.d]# cat /etc/odbc.ini




[DBC Data Sources]

AEQUUS = MSSQL Server




[AEQUUS]

# Reference driver from the "/etc/odbcinst.ini" file.

# Driver          = FreeTDS

# Or use a direct driver reference, rather than reference

# one in the "/etc/odbcinst.ini" file.

Driver=/usr/lib64/libtdsodbc.so.0

Description     = MSSQL Server

Trace           = No

Server          = 10.16.0.15

Database        = AEQUUS

Port            = 1433

TDS_Version     = 7.4 # >= MSSQL2012 = 7.4, MSSQL2008= 7.3, MSSQL2005=7.2, 8.0

VarMaxAsLong = Yes

DisguiseGuid = Yes

text size = 64512

#AnsiNPW=YES

#VarMaxAsLong=YES

#client charset = UTF-8







[ODBC Data Sources]

CONTABILIS = MSSQL Server




[CONTABILIS]

# Reference driver from the "/etc/odbcinst.ini" file.

# Driver          = FreeTDS

# Or use a direct driver reference, rather than reference

# one in the "/etc/odbcinst.ini" file.

Driver=/usr/lib64/libtdsodbc.so.0

Description     = MSSQL Server

Trace           = No

Server          = 10.16.0.15

Database        = CONTABILIS

Port            = 1433

TDS_Version     = 7.4 # >= MSSQL2012 = 7.4, MSSQL2008= 7.3, MSSQL2005=7.2, 8.0

VarMaxAsLong = Yes

text size = 64512

#QuotedId=YES

#AnsiNPW=YES

#VarMaxAsLong=YES

#client charset = UTF-8







[ODBC Data Sources]

FINANCIAL = MSSQL Server




[FINANCIAL]

# Reference driver from the "/etc/odbcinst.ini" file.

# Driver          = FreeTDS

# Or use a direct driver reference, rather than reference

# one in the "/etc/odbcinst.ini" file.

Driver=/usr/lib64/libtdsodbc.so.0

Description     = MSSQL Server

Trace           = No

Server          = 10.16.0.15

Database        = FINANCIAL

Port            = 1433

TDS_Version     = 7.4 # >= MSSQL2012 = 7.4, MSSQL2008= 7.3, MSSQL2005=7.2, 8.0

VarMaxAsLong = Yes

text size = 64512

#QuotedId=YES

#AnsiNPW=YES

#VarMaxAsLong=YES

#client charset = UTF-8

 

Create if it doesn’t exist or edit the ODBC configuration file that we installed earlier, each bank must have a connection entry:

 

[root@olaria yum.repos.d]# cat /etc/odbc.ini




[DBC Data Sources]

AEQUUS = MSSQL Server




[AEQUUS]

# Reference driver from the "/etc/odbcinst.ini" file.

# Driver          = FreeTDS

# Or use a direct driver reference, rather than reference

# one in the "/etc/odbcinst.ini" file.

Driver=/usr/lib64/libtdsodbc.so.0

Description     = MSSQL Server

Trace           = No

Server          = 10.16.0.15

Database        = AEQUUS

Port            = 1433

TDS_Version     = 7.4 # >= MSSQL2012 = 7.4, MSSQL2008= 7.3, MSSQL2005=7.2, 8.0

VarMaxAsLong = Yes

DisguiseGuid = Yes

text size = 64512

#AnsiNPW=YES

#VarMaxAsLong=YES

#client charset = UTF-8







[ODBC Data Sources]

CONTABILIS = MSSQL Server




[CONTABILIS]

# Reference driver from the "/etc/odbcinst.ini" file.

# Driver          = FreeTDS

# Or use a direct driver reference, rather than reference

# one in the "/etc/odbcinst.ini" file.

Driver=/usr/lib64/libtdsodbc.so.0

Description     = MSSQL Server

Trace           = No

Server          = 10.16.0.15

Database        = CONTABILIS

Port            = 1433

TDS_Version     = 7.4 # >= MSSQL2012 = 7.4, MSSQL2008= 7.3, MSSQL2005=7.2, 8.0

VarMaxAsLong = Yes

text size = 64512

#QuotedId=YES

#AnsiNPW=YES

#VarMaxAsLong=YES

#client charset = UTF-8







[ODBC Data Sources]

FINANCIAL = MSSQL Server




[FINANCIAL]

# Reference driver from the "/etc/odbcinst.ini" file.

# Driver          = FreeTDS

# Or use a direct driver reference, rather than reference

# one in the "/etc/odbcinst.ini" file.

Driver=/usr/lib64/libtdsodbc.so.0

Description     = MSSQL Server

Trace           = No

Server          = 10.16.0.15

Database        = FINANCIAL

Port            = 1433

TDS_Version     = 7.4 # >= MSSQL2012 = 7.4, MSSQL2008= 7.3, MSSQL2005=7.2, 8.0

VarMaxAsLong = Yes

text size = 64512

#QuotedId=YES

#AnsiNPW=YES

#VarMaxAsLong=YES

#client charset = UTF-8

 

Adjust tnsnames.ora with the access entries to the three SQL Server databases that we will use in dblink:

 

[oracle@olaria db_1]$ cat $ORACLE_HOME/network/admin/tnsnames.ora




# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.




AEQUUS =

   (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST=10.16.0.11)(PORT=1521))

      (CONNECT_DATA=(SID=AEQUUS))

      (HS=OK)

    )




CONTABILIS =

   (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST=10.16.0.11)(PORT=1521))

      (CONNECT_DATA=(SID=CONTABILIS))

      (HS=OK)

    )




FINANCIAL =

   (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST=10.16.0.11)(PORT=1521))

      (CONNECT_DATA=(SID=FINANCIAL))

      (HS=OK)

    )

 

Adjust the listener.ora with the access entries to the three SQL Server databases that we will use in the dblink:

 

[oracle@olaria db_1]$ cat $ORACLE_HOME/network/admin/listener.ora

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.4/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.




LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = olaria)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

  )

DEFAULT_SERVICE_LISTENER=orcl

ADR_BASE_LISTENER = /u01/app/oracle







SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = ORCL)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/db_1)

      (SID_NAME = ORCL)

    )

        (SID_DESC=

          (SID_NAME=AEQUUS)

          (ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1)

          (PROGRAM=dg4odbc)

        )




        (SID_DESC=

          (SID_NAME=CONTABILIS)

          (ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1)

          (PROGRAM=dg4odbc)

        )




        (SID_DESC=

          (SID_NAME=FINANCIAL)

          (ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1)

          (PROGRAM=dg4odbc)

        )




  )







- Reload listener.ora settings

[oracle@olaria db_1]$ lsnrctl reload




LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 16-JUN-2022 10:16:12

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=olaria)(PORT=1521)))

The command completed successfully

 

Test the access via odbc by the osql utility:

 

osql -S AEQUUS -U USR_CONSULTA -P 12398546




Attempting connection as dblinkdev ...

+ isql AEQUUS USR_CONSULTA 12398546 -v

+---------------------------------------+

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

+---------------------------------------+

SQL>













osql -S CONTABILIS -U USR_CONSULTA -P 12398546




Attempting connection as dblinkdev ...

+ isql CONTABILIS USR_CONSULTA 12398546 -v

+---------------------------------------+

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

+---------------------------------------+

SQL>







osql -S FINANCIAL -U USR_CONSULTA -P 12398546




Attempting connection as dblinkdev ...

+ isql FINANCIAL USR_CONSULTA 12398546 -v

+---------------------------------------+

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

+---------------------------------------+

SQL>

 

Create dblinks and perform access tests:

 

create public database link AEQUUS connect to "USR_CONSULTA" identified by "12398546" using 'AEQUUS';

create public database link CONTABILIS connect to "USR_CONSULTA" identified by "12398546" using 'CONTABILIS';

create public database link FINANCIALARACAJU connect to "USR_CONSULTA" identified by "12398546" using 'FINANCIALARACAJU';

 

Test select dblinks:

 

select "codigo","nome" from IMPACOES@AEQUUS;

select * from ALVARA@CONTABILIS;

select "nu_cnpj","sq_produto","nm_produto" from PRODUTO@FINANCIAL;

 

Note: If any SQL Server database has tables with the varchar(max) data type, we must create views to consume this data, because the varchar(max) data type is problematic with dblink, I could not get around this problem,
this way I created a view, see the example below:

 

CREATE VIEW VEW_IMPACOES

AS

SELECT codigo,CONVERT(VARCHAR(2000),nome) nome FROM IMPACOES;

 

 

 
César Carvalho – DBA
Contact: https://twitter.com/Cesar_DBA
https://sgbdbrasil.wordpress.com/

Applying ExaCC DomU patch
Category: Engineer System Author: César Carvalho Date: 2 years ago Comments: 0

Applying ExaCC DomU patch

Always read Oracle technical notes before applying any patches.

 

Technical References
DomU upgrades and cloud tooling

 

#### We will apply the patch in a RAC environment. ####
#### Performing Oracle Home backup of RAC nodes. ####
[oracle@srv01 ~]$ echo $ORACLE_HOME
/u02/app/oracle/product/11.2.0/dbhome_2

#### Node 1 ####
[root@srv01 ~]$ tar -pcvf /backup/cesar_update/oracle_home_srv01.tar dbhome_2
[root@srv01 ~]$ cd /u01/app/
[root@srv01 ~]$ tar -pcvf /backup/cesar_update/srv01_oraInventory.tar oraInventory

#### Node 2 ####
[root@srv02 ~]$ tar -pcvf /backup/cesar_update/oracle_home_srv02.tar dbhome_2
[root@srv02 ~]$ cd /u01/app/
[root@srv02 ~]$ tar -pcvf /backup/cesar_update/srv02_oraInventory.tar oraInventory

#### Checking RAC nodes Status ####
[oracle@srv01 ~]$ srvctl status database -d DBPROD
Instance DBPROD1 is running on node srv01
Instance DBPROD2 is running on node srv02

#### Checking version of dbaastools installed ####
[root@srv01 11.2.0]# rpm -qa|grep -i dbaastools
dbaastools_exa-1.0-1+19.1.1.1.0_211221.1316.x86_64

[root@srv01 11.2.0]# dbaascli patch tools list
DBAAS CLI version 19.1.1.1.0
Executing command patch tools list

[root@srv02 11.2.0]# rpm -qa|grep -i dbaastools
dbaastools_exa-1.0-1+19.1.1.1.0_211221.1316.x86_64

[root@srv02 11.2.0]# dbaascli patch tools list
DBAAS CLI version 19.1.1.1.0
Executing command patch tools list

#### Check if the patch download url is the same on all nodes ####
[root@srv01 exapatch]# cat /var/opt/oracle/exapatch/exadbcpatch.cfg |grep oss_container_url
[root@srv02 exapatch]# cat /var/opt/oracle/exapatch/exadbcpatch.cfg |grep oss_container_url

#### Check if the url is accessible ####
[root@srv01 exapatch]# curl -v -O URL GERADA ACIMA
[root@srv02 exapatch]# curl -v -O URL GERADA ACIMA

#### Export environment variables and check available patches to be applied ####
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_2
export PATH=${ORACLE_HOME}/bin:$PATH
export ORACLE_SID=DBPROD1
echo $ORACLE_SID

export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_2
export PATH=${ORACLE_HOME}/bin:$PATH
export ORACLE_SID=DBPROD2
echo $ORACLE_SID

[root@srv02 ~]# dbaascli patch db list --oh srv02:/u02/app/oracle/product/11.2.0/dbhome_2
DBAAS CLI version 19.1.1.1.0
Executing command patch db list --oh srv02:/u02/app/oracle/product/11.2.0/dbhome_2
INFO : EXACS patching

Available Patches
patchid :26610265 (DB 11.2.0.4.170814 QUARTERLY DATABASE PATCH FOR EXADATA - Aug 2017)
patchid :26635694 (DB 11.2.0.4.171017 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2017)
patchid :27011043 (DB 11.2.0.4.180116 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2018)
patchid :27475722 (DB 11.2.0.4.180417 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2018)
patchid :27980213 (DB 11.2.0.4.180717 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2018)
patchid :28462975 (DB 11.2.0.4.181016 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2018)
patchid :28833571 (DB 11.2.0.4.190115 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2019)
patchid :29257245 (DB 11.2.0.4.190416 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2019)
patchid :29698813 (DB 11.2.0.4.190716 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2019)
patchid :30070157 (DB 11.2.0.4.191015 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2019)
patchid :30501894 (DB 11.2.0.4.200114 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2020)
patchid :30805507 (DB 11.2.0.4.200414 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2020)
patchid :31220011 (DB 11.2.0.4.200714 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2020)
patchid :31718644 (DB 11.2.0.4.201020 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2020)
patchid :32131241 (DB 11.2.0.4.210119 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2021)
patchid :32537095 (DB 11.2.0.4.210420 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2021)
patchid :32917411 (DB 11.2.0.4.210720 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2021)
patchid :33248386 (DB 11.2.0.4.211019 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2021)
patchid :33575241 (DB 11.2.0.4.220118 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2022)
Install database patch using
dbaascli patch db apply --patchid 33575241 --dbnames <>

[root@srv01 ~]# dbaascli patch db list --oh srv01:/u02/app/oracle/product/11.2.0/dbhome_2
DBAAS CLI version 19.1.1.1.0
Executing command patch db list --oh srv01:/u02/app/oracle/product/11.2.0/dbhome_2
INFO : EXACS patching

Available Patches
patchid :26610265 (DB 11.2.0.4.170814 QUARTERLY DATABASE PATCH FOR EXADATA - Aug 2017)
patchid :26635694 (DB 11.2.0.4.171017 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2017)
patchid :27011043 (DB 11.2.0.4.180116 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2018)
patchid :27475722 (DB 11.2.0.4.180417 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2018)
patchid :27980213 (DB 11.2.0.4.180717 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2018)
patchid :28462975 (DB 11.2.0.4.181016 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2018)
patchid :28833571 (DB 11.2.0.4.190115 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2019)
patchid :29257245 (DB 11.2.0.4.190416 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2019)
patchid :29698813 (DB 11.2.0.4.190716 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2019)
patchid :30070157 (DB 11.2.0.4.191015 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2019)
patchid :30501894 (DB 11.2.0.4.200114 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2020)
patchid :30805507 (DB 11.2.0.4.200414 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2020)
patchid :31220011 (DB 11.2.0.4.200714 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2020)
patchid :31718644 (DB 11.2.0.4.201020 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2020)
patchid :32131241 (DB 11.2.0.4.210119 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2021)
patchid :32537095 (DB 11.2.0.4.210420 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2021)
patchid :32917411 (DB 11.2.0.4.210720 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2021)
patchid :33248386 (DB 11.2.0.4.211019 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2021)
patchid :33575241 (DB 11.2.0.4.220118 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2022)
Install database patch using
dbaascli patch db apply --patchid 33575241 --dbnames <>

#### Precheck all nodes before patchid 33575241 ####
[root@srv01 ~]$ dbaascli patch db prereq --patchid 33575241 --instance1 srv01:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD -alldbs
[root@srv02 ~]$ dbaascli patch db prereq --patchid 33575241 --instance1 srv02:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD -alldbs

#### Last lines of the log informing that it was executed successfully ####
INFO: status of slave txn###: Precheck completed on srv01
INFO: -precheck_async completed on srv01:/u02/app/oracle/product/11.2.0/dbhome_2
INFO: Successfully released ohome lock. Proceeding to release local provisioning lock
INFO: Successfully released local provisioning lock
INFO: -precheck_async completed on all nodes

INFO: status of slave txn###: Precheck completed on srv02
INFO: -precheck_async completed on srv02:/u02/app/oracle/product/11.2.0/dbhome_2
INFO: Successfully released ohome lock. Proceeding to release local provisioning lock
INFO: Successfully released local provisioning lock
INFO: -precheck_async completed on all nodes

#### Apply patchid 33575241 on node srv02 ####
[root@srv02 ~]$ nohup dbaascli patch db apply --patchid 33575241 --instance1 srv02:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD --run_datasql 0 &

#### Tracking patch application logs ####
[root@srv02 ~]$ tail -f /var/opt/oracle/log/exadbcpatch/exadbcpatch.log
2022-05-19 18:07:00.950618 - Instance check cleared for node srv02 w.r.t nodelist
2022-05-19 18:07:00.950760 - INFO: deleting patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-19 18:07:00.958084 - INFO: deleted patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-19 18:07:00.958209 -
INFO: initpatch being run for post ecs patching
2022-05-19 18:07:00.958467 - Output from cmd /var/opt/oracle/misc/initpatch.pl ecsbppost run on localhost is:
INFO : No patch needed
2022-05-19 18:07:01.510654 - cmd took 0.551481008529663 seconds
2022-05-19 18:07:01.510964 - ##### INFO: Exadbcpatch completed successfully #####

#### Apply patchid 33575241 on node srv01 ####
[root@srv02 ~]$ nohup dbaascli patch db apply --patchid 33575241 --instance1 srv01:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD --run_datasql 1 &

#### Tracking patch application logs ####
[root@srv01 ~]$ tail -f /var/opt/oracle/log/exadbcpatch/exadbcpatch.log

2022-05-20 09:47:27.879789 - Instance check cleared for node srv01 w.r.t nodelist
2022-05-20 09:47:27.880011 - INFO: deleting patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-20 09:47:27.891809 - INFO: deleted patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-20 09:47:27.892030 -
INFO: initpatch being run for post ecs patching
2022-05-20 09:47:27.893285 - Output from cmd /var/opt/oracle/misc/initpatch.pl ecsbppost run on localhost is:
INFO : No patch needed
2022-05-20 09:47:28.447038 - cmd took 0.553269147872925 seconds
2022-05-20 09:47:28.447205 - ##### INFO: Exadbcpatch completed successfully #####
César Carvalho – DBA
Contact: https://twitter.com/Cesar_DBA
https://sgbdbrasil.wordpress.com/

Applying ExaCC DomU patch dataguard
Category: Engineer System Author: César Carvalho Date: 2 years ago Comments: 0

Applying ExaCC DomU patch dataguard

 
 
Always read Oracle technical notes before applying any patches.
 
Technical References
DomU upgrades and cloud tooling
#### We will apply the patch in a RAC environment. ####
#### Performing Oracle Home backup of RAC nodes. ####
[oracle@srv01 ~]$ echo $ORACLE_HOME
/u02/app/oracle/product/11.2.0/dbhome_2

#### Node 1 ####
[root@srv01 ~]$ tar -pcvf /backup/cesar_update/oracle_home_srv01.tar dbhome_2
[root@srv01 ~]$ cd /u01/app/
[root@srv01 ~]$ tar -pcvf /backup/cesar_update/srv01_oraInventory.tar oraInventory

#### Node 2 ####
[root@srv02 ~]$ tar -pcvf /backup/cesar_update/oracle_home_srv02.tar dbhome_2
[root@srv02 ~]$ cd /u01/app/
[root@srv02 ~]$ tar -pcvf /backup/cesar_update/srv02_oraInventory.tar oraInventory

#### Checking RAC nodes Status ####
[oracle@srv01 ~]$ srvctl status database -d DBPROD
Instance DBPROD1 is running on node srv01
Instance DBPROD2 is running on node srv02

#### Checking version of dbaastools installed ####
[root@srv01 11.2.0]# rpm -qa|grep -i dbaastools
dbaastools_exa-1.0-1+19.1.1.1.0_211221.1316.x86_64

[root@srv01 11.2.0]# dbaascli patch tools list
DBAAS CLI version 19.1.1.1.0
Executing command patch tools list

[root@srv02 11.2.0]# rpm -qa|grep -i dbaastools
dbaastools_exa-1.0-1+19.1.1.1.0_211221.1316.x86_64

[root@srv02 11.2.0]# dbaascli patch tools list
DBAAS CLI version 19.1.1.1.0
Executing command patch tools list

#### Check if the patch download url is the same on all nodes ####
[root@srv01 exapatch]# cat /var/opt/oracle/exapatch/exadbcpatch.cfg |grep oss_container_url
[root@srv02 exapatch]# cat /var/opt/oracle/exapatch/exadbcpatch.cfg |grep oss_container_url

#### Check if the url is accessible ####
[root@srv01 exapatch]# curl -v -O URL GERADA ACIMA
[root@srv02 exapatch]# curl -v -O URL GERADA ACIMA

#### Export environment variables and check available patches to be applied ####
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_2
export PATH=${ORACLE_HOME}/bin:$PATH
export ORACLE_SID=DBPROD1
echo $ORACLE_SID

export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_2
export PATH=${ORACLE_HOME}/bin:$PATH
export ORACLE_SID=DBPROD2
echo $ORACLE_SID

[root@srv02 ~]# dbaascli patch db list --oh srv02:/u02/app/oracle/product/11.2.0/dbhome_2
DBAAS CLI version 19.1.1.1.0
Executing command patch db list --oh srv02:/u02/app/oracle/product/11.2.0/dbhome_2
INFO : EXACS patching

Available Patches
patchid :26610265 (DB 11.2.0.4.170814 QUARTERLY DATABASE PATCH FOR EXADATA - Aug 2017)
patchid :26635694 (DB 11.2.0.4.171017 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2017)
patchid :27011043 (DB 11.2.0.4.180116 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2018)
patchid :27475722 (DB 11.2.0.4.180417 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2018)
patchid :27980213 (DB 11.2.0.4.180717 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2018)
patchid :28462975 (DB 11.2.0.4.181016 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2018)
patchid :28833571 (DB 11.2.0.4.190115 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2019)
patchid :29257245 (DB 11.2.0.4.190416 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2019)
patchid :29698813 (DB 11.2.0.4.190716 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2019)
patchid :30070157 (DB 11.2.0.4.191015 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2019)
patchid :30501894 (DB 11.2.0.4.200114 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2020)
patchid :30805507 (DB 11.2.0.4.200414 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2020)
patchid :31220011 (DB 11.2.0.4.200714 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2020)
patchid :31718644 (DB 11.2.0.4.201020 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2020)
patchid :32131241 (DB 11.2.0.4.210119 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2021)
patchid :32537095 (DB 11.2.0.4.210420 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2021)
patchid :32917411 (DB 11.2.0.4.210720 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2021)
patchid :33248386 (DB 11.2.0.4.211019 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2021)
patchid :33575241 (DB 11.2.0.4.220118 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2022)
Install database patch using
dbaascli patch db apply --patchid 33575241 --dbnames <>

[root@srv01 ~]# dbaascli patch db list --oh srv01:/u02/app/oracle/product/11.2.0/dbhome_2
DBAAS CLI version 19.1.1.1.0
Executing command patch db list --oh srv01:/u02/app/oracle/product/11.2.0/dbhome_2
INFO : EXACS patching

Available Patches
patchid :26610265 (DB 11.2.0.4.170814 QUARTERLY DATABASE PATCH FOR EXADATA - Aug 2017)
patchid :26635694 (DB 11.2.0.4.171017 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2017)
patchid :27011043 (DB 11.2.0.4.180116 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2018)
patchid :27475722 (DB 11.2.0.4.180417 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2018)
patchid :27980213 (DB 11.2.0.4.180717 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2018)
patchid :28462975 (DB 11.2.0.4.181016 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2018)
patchid :28833571 (DB 11.2.0.4.190115 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2019)
patchid :29257245 (DB 11.2.0.4.190416 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2019)
patchid :29698813 (DB 11.2.0.4.190716 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2019)
patchid :30070157 (DB 11.2.0.4.191015 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2019)
patchid :30501894 (DB 11.2.0.4.200114 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2020)
patchid :30805507 (DB 11.2.0.4.200414 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2020)
patchid :31220011 (DB 11.2.0.4.200714 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2020)
patchid :31718644 (DB 11.2.0.4.201020 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2020)
patchid :32131241 (DB 11.2.0.4.210119 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2021)
patchid :32537095 (DB 11.2.0.4.210420 QUARTERLY DATABASE PATCH FOR EXADATA - Apr 2021)
patchid :32917411 (DB 11.2.0.4.210720 QUARTERLY DATABASE PATCH FOR EXADATA - Jul 2021)
patchid :33248386 (DB 11.2.0.4.211019 QUARTERLY DATABASE PATCH FOR EXADATA - Oct 2021)
patchid :33575241 (DB 11.2.0.4.220118 QUARTERLY DATABASE PATCH FOR EXADATA - Jan 2022)
Install database patch using
dbaascli patch db apply --patchid 33575241 --dbnames <>

#### Precheck all nodes before patchid 33575241 ####
[root@srv01 ~]$ dbaascli patch db prereq --patchid 33575241 --instance1 srv01:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD -alldbs
[root@srv02 ~]$ dbaascli patch db prereq --patchid 33575241 --instance1 srv02:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD -alldbs

#### Last lines of the log informing that it was executed successfully ####
INFO: status of slave txn###: Precheck completed on srv01
INFO: -precheck_async completed on srv01:/u02/app/oracle/product/11.2.0/dbhome_2
INFO: Successfully released ohome lock. Proceeding to release local provisioning lock
INFO: Successfully released local provisioning lock
INFO: -precheck_async completed on all nodes

INFO: status of slave txn###: Precheck completed on srv02
INFO: -precheck_async completed on srv02:/u02/app/oracle/product/11.2.0/dbhome_2
INFO: Successfully released ohome lock. Proceeding to release local provisioning lock
INFO: Successfully released local provisioning lock
INFO: -precheck_async completed on all nodes

################### DATAGUARD ###################
#### Apply patchid 33575241 on node srv02 Dataguard ####
[root@srv02 ~]$ nohup dbaascli patch db apply --patchid 33575241 --instance1 srv02:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD --run_datasql 0 &

#### Tracking patch application logs ####
[root@srv02 ~]$ tail -f /var/opt/oracle/log/exadbcpatch/exadbcpatch.log
2022-05-19 18:07:00.950618 - Instance check cleared for node srv02 w.r.t nodelist
2022-05-19 18:07:00.950760 - INFO: deleting patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-19 18:07:00.958084 - INFO: deleted patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-19 18:07:00.958209 -
INFO: initpatch being run for post ecs patching
2022-05-19 18:07:00.958467 - Output from cmd /var/opt/oracle/misc/initpatch.pl ecsbppost run on localhost is:
INFO : No patch needed
2022-05-19 18:07:01.510654 - cmd took 0.551481008529663 seconds
2022-05-19 18:07:01.510964 - ##### INFO: Exadbcpatch completed successfully #####

#### Apply patchid 33575241 on node srv01 Dataguard ####
[root@srv02 ~]$ nohup dbaascli patch db apply --patchid 33575241 --instance1 srv01:/u02/app/oracle/product/11.2.0/dbhome_2 --dbnames DBPROD --run_datasql 0 &

#### Tracking patch application logs ####
[root@srv01 ~]$ tail -f /var/opt/oracle/log/exadbcpatch/exadbcpatch.log

2022-05-20 09:47:27.879789 - Instance check cleared for node srv01 w.r.t nodelist
2022-05-20 09:47:27.880011 - INFO: deleting patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-20 09:47:27.891809 - INFO: deleted patching_progress, patched_ohome, patched_ohome_name from creg
2022-05-20 09:47:27.892030 -
INFO: initpatch being run for post ecs patching
2022-05-20 09:47:27.893285 - Output from cmd /var/opt/oracle/misc/initpatch.pl ecsbppost run on localhost is:
INFO : No patch needed
2022-05-20 09:47:28.447038 - cmd took 0.553269147872925 seconds
2022-05-20 09:47:28.447205 - ##### INFO: Exadbcpatch completed successfully #####

César Carvalho – DBA
Contact: https://twitter.com/Cesar_DBA
https://sgbdbrasil.wordpress.com/

Oracle Linux 8 Security Updates
Category: Operational System Author: César Carvalho Date: 3 years ago Comments: 0

Oracle Linux 8 Security Updates

Today’s topic is very important, we will know the various types of security updates available in Oracle Linux 8, before working on the practical part, we will know some basic definitions of what is CVE and ELSA.
CVE, short for Common Vulnerabilities and Exposures, is a list of publicly disclosed computer security flaws. When someone refers to a CVE, they mean a security flaw that’s been assigned a CVE ID number.
Security advisories issued by vendors and researchers almost always mention at least one CVE ID. CVEs help IT professionals coordinate their efforts to prioritize and address these vulnerabilities to make computer systems more secure.
CVE Details: https://linux.oracle.com/ords/f?p=130:21
                      https://www.cvedetails.com/vulnerability-list/vendor_id-93/year-2021/Oracle.html
                      https://linux.oracle.com/security/
 
ELSA, Enterprise Linux Security Advisory, is nothing more than a way to consult and get details of security holes or bugs and which packages must be updated or have been affected.
ELSA Details: https://linux.oracle.com/ords/f?p=105:21
For this example I used the outdated Oracle Linux 8.0.
 
1 - Checking for security updates available for download and installation.
    Verificando atualizações de segurança disponiveis para download e instalação.
    
[root@ol8 ~]# dnf updateinfo sec
Last metadata expiration check: 0:04:37 ago on Tue 07 Sep 2021 12:15:28 PM -03.
Updates Information Summary: available
    173 Security notice(s) <===================== We see that we have 173 security updates out of which 64 are important.
         64 Important Security notice(s) <========= Vemos que temos 173 atualizações de segurança sendo que as 64 são importantes.
         92 Moderate Security notice(s)  <========= 92 de nivel moderado.
         17 Low Security notice(s)		 17 de nivel baixo de segurança.
		
2 - Checking in detail which packages/applications have updates and should be updated. As the list of packages is very large, I am summarizing the packages listed.
    Verificando de forma detalhada quais pacotes/aplicativos possuem atualizações e devem sofrer atualizações. Como a lista é muito grande de pacotes, estou resumindo os pacotes listados.
    
[root@ol8 ~]# dnf updateinfo list sec | awk '{print $3}'

expiration
NetworkManager-1:1.22.8-5.el8_2.x86_64
NetworkManager-1:1.30.0-7.0.1.el8.x86_64
NetworkManager-libnm-1:1.22.8-5.el8_2.x86_64
NetworkManager-libnm-1:1.30.0-7.0.1.el8.x86_64
NetworkManager-team-1:1.22.8-5.el8_2.x86_64
NetworkManager-team-1:1.30.0-7.0.1.el8.x86_64
NetworkManager-tui-1:1.22.8-5.el8_2.x86_64
NetworkManager-tui-1:1.30.0-7.0.1.el8.x86_64
bash-4.4.19-14.el8.x86_64
bind-export-libs-32:9.11.13-3.el8.x86_64
bind-export-libs-32:9.11.13-5.el8_2.x86_64
bind-export-libs-32:9.11.20-5.el8.x86_64
bind-export-libs-32:9.11.20-5.el8_3.1.x86_64
bind-export-libs-32:9.11.26-4.el8_4.x86_64
bind-export-libs-32:9.11.4-17.P2.el8_0.1.x86_64
bind-export-libs-32:9.11.4-17.P2.el8_0.x86_64
bind-export-libs-32:9.11.4-26.P2.el8.x86_64
brotli-1.0.6-3.el8.x86_64
cpio-2.12-10.el8.x86_64
cryptsetup-libs-2.3.3-2.el8.x86_64
cups-libs-1:2.2.6-33.el8.x86_64
cups-libs-1:2.2.6-38.el8.x86_64
curl-7.61.1-11.el8.x86_64
curl-7.61.1-12.el8.x86_64
curl-7.61.1-14.el8.x86_64
curl-7.61.1-18.el8.x86_64
cyrus-sasl-lib-2.1.27-5.el8.x86_64
dbus-1:1.12.8-10.0.1.el8_2.x86_64
dbus-1:1.12.8-9.0.1.el8.x86_64
dbus-common-1:1.12.8-10.0.1.el8_2.noarch
dbus-common-1:1.12.8-9.0.1.el8.noarch
dbus-daemon-1:1.12.8-10.0.1.el8_2.x86_64
dbus-daemon-1:1.12.8-9.0.1.el8.x86_64
dbus-libs-1:1.12.8-10.0.1.el8_2.x86_64
dbus-libs-1:1.12.8-9.0.1.el8.x86_64
dbus-tools-1:1.12.8-10.0.1.el8_2.x86_64
dbus-tools-1:1.12.8-9.0.1.el8.x86_64
dhcp-client-12:4.3.6-34.el8.x86_64
dhcp-client-12:4.3.6-44.el8_4.1.x86_64
dhcp-common-12:4.3.6-34.el8.noarch
dhcp-common-12:4.3.6-44.el8_4.1.noarch
dhcp-libs-12:4.3.6-34.el8.x86_64
dhcp-libs-12:4.3.6-44.el8_4.1.x86_64
dnf-4.2.7-6.el8.noarch
dnf-data-4.2.7-6.el8.noarch
dnf-plugins-core-4.0.8-3.el8.noarch
e2fsprogs-1.45.4-3.el8.x86_64
e2fsprogs-libs-1.45.4-3.el8.x86_64
elfutils-default-yama-scope-0.176-5.el8.noarch
elfutils-libelf-0.176-5.el8.x86_64
elfutils-libs-0.176-5.el8.x86_64
expat-2.2.5-4.el8.x86_64
freetype-2.9.1-4.el8_3.1.x86_64
gettext-0.19.8.1-17.el8.x86_64
gettext-libs-0.19.8.1-17.el8.x86_64
glib2-2.56.4-10.el8_4.1.x86_64
glib2-2.56.4-10.el8_4.x86_64
glib2-2.56.4-7.el8.x86_64
glib2-2.56.4-8.el8.x86_64
glib2-2.56.4-9.el8.x86_64
glibc-2.28-101.0.1.el8.x86_64
glibc-2.28-127.0.1.el8.x86_64
glibc-2.28-151.0.1.el8.x86_64
glibc-2.28-72.0.1.el8.x86_64
glibc-common-2.28-101.0.1.el8.x86_64
glibc-common-2.28-127.0.1.el8.x86_64
glibc-common-2.28-151.0.1.el8.x86_64
glibc-common-2.28-72.0.1.el8.x86_64
glibc-langpack-en-2.28-101.0.1.el8.x86_64
glibc-langpack-en-2.28-127.0.1.el8.x86_64
glibc-langpack-en-2.28-151.0.1.el8.x86_64
glibc-langpack-en-2.28-72.0.1.el8.x86_64
gnupg2-2.2.20-2.el8.x86_64
gnupg2-smime-2.2.20-2.el8.x86_64
gnutls-3.6.14-7.el8_3.x86_64
gnutls-3.6.14-8.el8_3.x86_64
gnutls-3.6.8-10.el8_2.x86_64
gnutls-3.6.8-11.el8_2.x86_64
gnutls-3.6.8-8.el8.x86_64
grub2-common-1:2.02-78.0.2.el8.noarch
grub2-common-1:2.02-78.0.3.el8_1.1.noarch
grub2-common-1:2.02-82.0.2.el8_2.1.noarch
grub2-common-1:2.02-90.0.2.el8.noarch
grub2-common-1:2.02-90.0.2.el8_3.1.noarch
grub2-pc-1:2.02-78.0.2.el8.x86_64
grub2-pc-1:2.02-78.0.3.el8_1.1.x86_64
grub2-pc-1:2.02-82.0.2.el8_2.1.x86_64

3 - Details of the packages to be updated. As the list of packages is very large, I am summarizing the packages listed.
    Detalhes dos pacotes a serem atualizados. Como a lista é muito grande de pacotes, estou resumindo os pacotes listados.
    
    [root@ol8 ~]# dnf updateinfo list
Last metadata expiration check: 0:10:17 ago on Tue 07 Sep 2021 12:15:28 PM -03.
ELBA-2019-4856 bugfix         NetworkManager-1:1.20.0-3.0.1.el8.x86_64
ELBA-2019-4279 bugfix         NetworkManager-1:1.20.0-5.0.1.el8_1.x86_64
ELBA-2020-1847 bugfix         NetworkManager-1:1.22.8-4.el8.x86_64
ELSA-2020-3011 Moderate/Sec.  NetworkManager-1:1.22.8-5.el8_2.x86_64
ELBA-2020-5474 bugfix         NetworkManager-1:1.26.0-12.0.1.el8_3.x86_64
ELBA-2021-0563 bugfix         NetworkManager-1:1.26.0-13.0.1.el8_3.x86_64
ELBA-2021-1099 bugfix         NetworkManager-1:1.26.0-14.0.1.el8_3.x86_64
ELBA-2020-4499 bugfix         NetworkManager-1:1.26.0-8.0.1.el8.x86_64
ELBA-2020-4850 bugfix         NetworkManager-1:1.26.0-9.0.1.el8_3.x86_64
ELBA-2020-5940 bugfix         NetworkManager-1:1.26.0-9.0.2.el8_3.x86_64
ELBA-2021-3055 bugfix         NetworkManager-1:1.30.0-10.0.1.el8_4.x86_64
ELSA-2021-1574 Moderate/Sec.  NetworkManager-1:1.30.0-7.0.1.el8.x86_64
ELBA-2021-2576 bugfix         NetworkManager-1:1.30.0-9.0.1.el8_4.x86_64
ELBA-2019-4856 bugfix         NetworkManager-libnm-1:1.20.0-3.0.1.el8.x86_64
ELBA-2019-4279 bugfix         NetworkManager-libnm-1:1.20.0-5.0.1.el8_1.x86_64
ELBA-2020-1847 bugfix         NetworkManager-libnm-1:1.22.8-4.el8.x86_64
ELSA-2020-3011 Moderate/Sec.  NetworkManager-libnm-1:1.22.8-5.el8_2.x86_64
ELBA-2020-5474 bugfix         NetworkManager-libnm-1:1.26.0-12.0.1.el8_3.x86_64
ELBA-2021-0563 bugfix         NetworkManager-libnm-1:1.26.0-13.0.1.el8_3.x86_64
ELBA-2021-1099 bugfix         NetworkManager-libnm-1:1.26.0-14.0.1.el8_3.x86_64
ELBA-2020-4499 bugfix         NetworkManager-libnm-1:1.26.0-8.0.1.el8.x86_64
ELBA-2020-4850 bugfix         NetworkManager-libnm-1:1.26.0-9.0.1.el8_3.x86_64
ELBA-2020-5940 bugfix         NetworkManager-libnm-1:1.26.0-9.0.2.el8_3.x86_64
ELBA-2021-3055 bugfix         NetworkManager-libnm-1:1.30.0-10.0.1.el8_4.x86_64
ELSA-2021-1574 Moderate/Sec.  NetworkManager-libnm-1:1.30.0-7.0.1.el8.x86_64
ELBA-2021-2576 bugfix         NetworkManager-libnm-1:1.30.0-9.0.1.el8_4.x86_64
ELBA-2019-4856 bugfix         NetworkManager-team-1:1.20.0-3.0.1.el8.x86_64
ELBA-2019-4279 bugfix         NetworkManager-team-1:1.20.0-5.0.1.el8_1.x86_64
ELBA-2020-1847 bugfix         NetworkManager-team-1:1.22.8-4.el8.x86_64
ELSA-2020-3011 Moderate/Sec.  NetworkManager-team-1:1.22.8-5.el8_2.x86_64
ELBA-2020-5474 bugfix         NetworkManager-team-1:1.26.0-12.0.1.el8_3.x86_64
ELBA-2021-0563 bugfix         NetworkManager-team-1:1.26.0-13.0.1.el8_3.x86_64
ELBA-2021-1099 bugfix         NetworkManager-team-1:1.26.0-14.0.1.el8_3.x86_64
ELBA-2020-4499 bugfix         NetworkManager-team-1:1.26.0-8.0.1.el8.x86_64
ELBA-2020-4850 bugfix         NetworkManager-team-1:1.26.0-9.0.1.el8_3.x86_64
ELBA-2020-5940 bugfix         NetworkManager-team-1:1.26.0-9.0.2.el8_3.x86_64
ELBA-2021-3055 bugfix         NetworkManager-team-1:1.30.0-10.0.1.el8_4.x86_64
ELSA-2021-1574 Moderate/Sec.  NetworkManager-team-1:1.30.0-7.0.1.el8.x86_64
ELBA-2021-2576 bugfix         NetworkManager-team-1:1.30.0-9.0.1.el8_4.x86_64
ELBA-2019-4856 bugfix         NetworkManager-tui-1:1.20.0-3.0.1.el8.x86_64
ELBA-2019-4279 bugfix         NetworkManager-tui-1:1.20.0-5.0.1.el8_1.x86_64
ELBA-2020-1847 bugfix         NetworkManager-tui-1:1.22.8-4.el8.x86_64
ELSA-2020-3011 Moderate/Sec.  NetworkManager-tui-1:1.22.8-5.el8_2.x86_64
ELBA-2020-5474 bugfix         NetworkManager-tui-1:1.26.0-12.0.1.el8_3.x86_64
ELBA-2021-0563 bugfix         NetworkManager-tui-1:1.26.0-13.0.1.el8_3.x86_64
ELBA-2021-1099 bugfix         NetworkManager-tui-1:1.26.0-14.0.1.el8_3.x86_64
ELBA-2020-4499 bugfix         NetworkManager-tui-1:1.26.0-8.0.1.el8.x86_64
ELBA-2020-4850 bugfix         NetworkManager-tui-1:1.26.0-9.0.1.el8_3.x86_64
ELBA-2020-5940 bugfix         NetworkManager-tui-1:1.26.0-9.0.2.el8_3.x86_64
ELBA-2021-3055 bugfix         NetworkManager-tui-1:1.30.0-10.0.1.el8_4.x86_64
ELSA-2019-1959 Important/Sec. kernel-tools-4.18.0-80.7.1.el8_0.x86_64
ELSA-2019-2411 Important/Sec. kernel-tools-4.18.0-80.7.2.el8_0.x86_64
ELSA-2019-3832 Important/Sec. kernel-tools-libs-4.18.0-147.0.2.el8_1.x86_64
ELSA-2019-3871 Important/Sec. kernel-tools-libs-4.18.0-147.0.3.el8_1.x86_64
ELEA-2020-5481 enhancement    microcode_ctl-4:20200609-2.20201112.1.0.1.el8_3.x86_64
ELBA-2021-0621 bugfix         microcode_ctl-4:20200609-2.20210216.1.0.1.el8_3.x86_64
ELBA-2021-1613 bugfix         microcode_ctl-4:20210216-1

4 - Listing the classification of packages by criticality levels (Moderate,Low,Important).
    Listando a classificação dos pacotes por niveis de criticidade (Moderado,Baixo,Importante).
    
[root@ol8 ~]# dnf updateinfo list --sec-severity=Moderate
Last metadata expiration check: 0:12:53 ago on Tue 07 Sep 2021 12:15:28 PM -03.
ELSA-2020-3011 Moderate/Sec. NetworkManager-1:1.22.8-5.el8_2.x86_64
ELSA-2021-1574 Moderate/Sec. NetworkManager-1:1.30.0-7.0.1.el8.x86_64
ELSA-2020-3011 Moderate/Sec. NetworkManager-libnm-1:1.22.8-5.el8_2.x86_64
ELSA-2021-1574 Moderate/Sec. NetworkManager-libnm-1:1.30.0-7.0.1.el8.x86_64
ELSA-2020-3011 Moderate/Sec. NetworkManager-team-1:1.22.8-5.el8_2.x86_64
ELSA-2021-1574 Moderate/Sec. NetworkManager-team-1:1.30.0-7.0.1.el8.x86_64
ELSA-2020-3011 Moderate/Sec. NetworkManager-tui-1:1.22.8-5.el8_2.x86_64
ELSA-2021-1574 Moderate/Sec. NetworkManager-tui-1:1.30.0-7.0.1.el8.x86_64
ELSA-2020-1845 Moderate/Sec. bind-export-libs-32:9.11.13-3.el8.x86_64
ELSA-2020-4500 Moderate/Sec. bind-export-libs-32:9.11.20-5.el8.x86_64
ELSA-2019-3583 Moderate/Sec. yum-4.2.7-6.el8.noarch

[root@ol8 ~]# dnf updateinfo list --sec-severity=Low
Last metadata expiration check: 0:13:01 ago on Tue 07 Sep 2021 12:15:28 PM -03.
ELSA-2021-1679 Low/Sec. bash-4.4.19-14.el8.x86_64
ELSA-2019-3552 Low/Sec. bind-export-libs-32:9.11.4-26.P2.el8.x86_64
ELSA-2020-1765 Low/Sec. cups-libs-1:2.2.6-33.el8.x86_64
ELSA-2020-4469 Low/Sec. cups-libs-1:2.2.6-38.el8.x86_64
ELSA-2019-3575 Low/Sec. elfutils-default-yama-scope-0.176-5.el8.noarch
ELSA-2019-3575 Low/Sec. elfutils-libelf-0.176-5.el8.x86_64

[root@ol8 ~]# dnf updateinfo list --sec-severity=Important
Last metadata expiration check: 0:13:09 ago on Tue 07 Sep 2021 12:15:28 PM -03.
ELSA-2020-2338 Important/Sec. bind-export-libs-32:9.11.13-5.el8_2.x86_64
ELSA-2021-0670 Important/Sec. bind-export-libs-32:9.11.20-5.el8_3.1.x86_64
ELSA-2021-1989 Important/Sec. bind-export-libs-32:9.11.26-4.el8_4.x86_64
ELSA-2019-1714 Important/Sec. bind-export-libs-32:9.11.4-17.P2.el8_0.1.x86_64
ELSA-2019-1145 Important/Sec. bind-export-libs-32:9.11.4-17.P2.el8_0.x86_64
ELSA-2020-3014 Important/Sec. dbus-1:1.12.8-10.0.1.el8_2.x86_64
ELSA-2020-3014 Important/Sec. dbus-common-1:1.12.8-10.0.1.el8_2.noarch
ELSA-2020-3014 Important/Sec. dbus-daemon-1:1.12.8-10.0.1.el8_2.x86_64
ELSA-2020-3014 Important/Sec. dbus-libs-1:1.12.8-10.0.1.el8_2.x86_64
ELSA-2020-3014 Important/Sec. dbus-tools-1:1.12.8-10.0.1.el8_2.x86_64
ELSA-2021-2359 Important/Sec. dhcp-client-12:4.3.6-44.el8_4.1.x86_64
ELSA-2021-2359 Important/Sec. dhcp-common-12:4.3.6-44.el8_4.1.noarch
ELSA-2021-2359 Important/Sec. dhcp-libs-12:4.3.6-44.el8_4.1.x86_64
ELSA-2020-4952 Important/Sec. freetype-2.9.1-4.el8_3.1.x86_64
ELSA-2021-2170 Important/Sec. glib2-2.56.4-10.el8_4.x86_64
ELSA-2021-1206 Important/Sec. gnutls-3.6.14-8.el8_3.x86_64
ELSA-2020-2637 Important/Sec. gnutls-3.6.8-11.el8_2.x86_64
ELSA-2019-4869 Important/Sec. grub2-common-1:2.02-78.0.2.el8.noarch
ELSA-2020-5786 Important/Sec. grub2-common-1:2.02-82.0.2.el8_2.1.noarch
ELSA-2021-9077 Important/Sec. grub2-common-1:2.02-90.0.2.el8.noarch
ELSA-2019-4869 Important/Sec. grub2-pc-1:2.02-78.0.2.el8.x86_64
ELSA-2020-5786 Important/Sec. grub2-pc-1:2.02-82.0.2.el8_2.1.x86_64
ELSA-2021-9077 Important/Sec. grub2-pc-1:2.02-90.0.2.el8.x86_64

6 - To list Common Security Vulnerabilities and Exposures (CVE).
    Para listar Vulnerabilidades e Exposições Comuns (CVE) de segurança.
    
[root@ol8 ~]# dnf updateinfo list cves
# Checking information from a specific CVE.
# Verificando informações de uma CVE especifica.
[root@ol8 ~]# dnf updateinfo list --cve CVE-2020-4000

# Updating a specific CVE.
# Atualizando uma CVE especifica.
[root@ol8 ~]# dnf update --cve CVE-2020-4000

# Fixing or applying ELSA security updates.
# Corrigindo ou aplicando atualizações de segurança ELSA.
[root@ol8 ~]# dnf update --advisory ELSA-2020-4010

7 - To apply all security updates.
    Para aplicar todas as atualizações de segurança.

[root@ol8 ~]# dnf --security update -y
Last metadata expiration check: 0:06:24 ago on Tue 07 Sep 2021 12:29:24 PM -03.
Dependencies resolved.
====================================================================================================================================================================
 Package                                      Arch                    Version                                              Repository                          Size
====================================================================================================================================================================
Installing:
 kernel                                       x86_64                  4.18.0-305.12.1.el8_4                                ol8_baseos_latest                  5.9 M
 kernel-core                                  x86_64                  4.18.0-305.12.1.el8_4                                ol8_baseos_latest                   36 M
 kernel-modules                               x86_64                  4.18.0-305.12.1.el8_4                                ol8_baseos_latest                   28 M
Upgrading:
 libX11                                       x86_64                  1.6.8-4.el8                                          ol8_appstream                      611 k
 libX11-common                                noarch                  1.6.8-4.el8                                          ol8_appstream                      158 k
 libX11-xcb                                   x86_64                  1.6.8-4.el8                                          ol8_appstream                       14 k
 libdrm                                       x86_64                  2.4.103-1.el8                                        ol8_appstream                      165 k
 libglvnd                                     x86_64                  1:1.3.2-1.el8                                        ol8_appstream                      127 k
 libglvnd-glx                                 x86_64                  1:1.3.2-1.el8                                        ol8_appstream                      137 k
 libjpeg-turbo                                x86_64                  1.5.3-10.el8                                         ol8_appstream                      155 k
 libmspack                                    x86_64                  0.7-0.3.alpha.el8.4                                  ol8_appstream                       71 k
 libreswan                                    x86_64                  4.3-3.0.1.el8                                        ol8_appstream                      1.3 M
 mesa-libGL                                   x86_64                  20.3.3-2.el8                                         ol8_appstream                      188 k
 mesa-libglapi                                x86_64                  20.3.3-2.el8                                         ol8_appstream                       65 k
 nspr                                         x86_64                  4.25.0-2.el8_2                                       ol8_appstream                      142 k
 nss                                          x86_64                  3.53.1-17.el8_3                                      ol8_appstream                      723 k
 nss-softokn                                  x86_64                  3.53.1-17.el8_3                                      ol8_appstream                      484 k
 nss-softokn-freebl                           x86_64                  3.53.1-17.el8_3                                      ol8_appstream                      376 k
 nss-sysinit                                  x86_64                  3.53.1-17.el8_3                                      ol8_appstream                       72 k

Complete!

 
8 - Applying security updates by category.
    Aplicando atualizações de segurança por categoria.
 
 # Updates each package to the latest available version that provides a bug fix, enhancement, or fix for a security (security) issue.
 # Atualiza cada pacote para a versão mais recente disponível que fornece uma correção de bug, aprimoramento ou uma correção para um problema de segurança (segurança).
 
 [root@ol8 ~]# dnf --security upgrade-minimal
 ====================================================================================================================================================================
 Package                                      Arch                    Version                                              Repository                          Size
====================================================================================================================================================================
Upgrading:
 libX11                                       x86_64                  1.6.8-4.el8                                          ol8_appstream                      611 k
 libX11-common                                noarch                  1.6.8-4.el8                                          ol8_appstream                      158 k
 libX11-xcb                                   x86_64                  1.6.8-4.el8                                          ol8_appstream                       14 k
 libdrm                                       x86_64                  2.4.103-1.el8                                        ol8_appstream                      165 k
 libglvnd                                     x86_64                  1:1.3.2-1.el8                                        ol8_appstream                      127 k
 libglvnd-glx                                 x86_64                  1:1.3.2-1.el8                                        ol8_appstream                      137 k
 libjpeg-turbo                                x86_64                  1.5.3-10.el8                                         ol8_appstream                      155 k
 libmspack                                    x86_64                  0.7-0.3.alpha.el8.4                                  ol8_appstream                       71 k
 libreswan                                    x86_64                  3.29-7.0.1.el8_2                                     ol8_appstream                      1.3 M
 mesa-libGL                                   x86_64                  20.3.3-2.el8                                         ol8_appstream                      188 k
 mesa-libglapi                                x86_64                  20.3.3-2.el8                                         ol8_appstream                       65 k
 nspr                                         x86_64                  4.25.0-2.el8_2                                       ol8_appstream                      142 k
 nss                                          x86_64                  3.53.1-17.el8_3                                      ol8_appstream                      723 k
 nss-softokn                                  x86_64                  3.53.1-11.el8_2                                      ol8_appstream                      484 k
 nss-softokn-freebl                           x86_64                  3.53.1-11.el8_2                                      ol8_appstream                      289 k
 nss-sysinit                                  x86_64                  3.53.1-17.el8_3                                      ol8_appstream                       72 k
 nss-tools                                    x86_64                  3.53.1-17.el8_3                                      ol8_appstream                      560 k
 nss-util                                     x86_64                  3.53.1-17.el8_3                                      ol8_appstream                      136 k
 plymouth                                     x86_64                  0.9.3-15.0.1.el8                                     ol8_appstream                      114 k
 plymouth-core-libs                           x86_64                  0.9.3-15.0.1.el8                                     ol8_appstream                      114 k
 plymouth-scripts                             x86_64                  0.9.3-15.0.1.el8                                     ol8_appstream                       42 k
 python3-unbound                              x86_64                  1.7.3-15.el8                                         ol8_appstream                      119 k
 rsyslog                                      x86_64                  8.1911.0-3.el8                                       ol8_appstream                      730 k
Transaction Summary
====================================================================================================================================================================
Install   26 Packages
Upgrade  167 Packages
Skip      69 Packages

Total download size: 442 M
Is this ok [y/N]: y <========================= YES
Downloading Packages:
(1/193): kernel-4.18.0-240.22.1.el8_3.x86_64.rpm                                                                                    4.8 MB/s | 4.4 MB     00:00
(2/193): kernel-core-4.18.0-240.22.1.el8_3.x86_64.rpm                                                                               7.9 MB/s |  30 MB     00:03
(3/193): grub2-tools-efi-2.02-90.0.2.el8_3.1.x86_64.rpm                                                                              98 kB/s | 472 kB     00:04
(4/193): kernel-core-4.18.0-305.12.1.el8_4.x86_64.rpm                                                                               7.7 MB/s |  36 MB     00:04
(5/193): libssh-config-0.9.4-2.el8.noarch.rpm                                                                                       103 kB/s |  18 kB     00:00
(6/193): libzstd-1.4.4-1.0.1.el8.x86_64.rpm                                                                                         3.3 MB/s | 266 kB     00:00
(7/193): mozjs60-60.9.0-4.0.1.el8.x86_64.rpm                                                                                        7.1 MB/s | 6.6 MB     00:00
(8/193): perl-Encode-2.97-3.el8.x86_64.rpm                                                                                          7.2 MB/s | 1.5 MB     00:00
(9/193): perl-File-Temp-0.230.600-1.el8.noarch.rpm                                                                                  1.4 MB/s |  63 kB     00:00
(10/193): perl-Getopt-Long-2.50-4.el8.noarch.rpm                                                                                    1.4 MB/s |  63 kB     00:00
(11/193): perl-HTTP-Tiny-0.074-1.el8.noarch.rpm                                                                                     741 kB/s |  58 kB     00:00

Complete!
 
 #====================================================================================================================================================================
 
 # Security updates and bug fixes only pertaining to the kernel.
 #Atualizações de segurança e correções bugs apenas referente ao kernel.
 
[root@ol8 ~]# dnf --security upgrade-minimal kernel*
Last metadata expiration check: 0:49:03 ago on Tue 07 Sep 2021 12:15:28 PM -03.
Dependencies resolved.
====================================================================================================================================================================
 Package                                 Arch                      Version                                               Repository                            Size
====================================================================================================================================================================
Installing:
 kernel                                  x86_64                    4.18.0-240.22.1.el8_3                                 ol8_baseos_latest                    4.4 M
 kernel-core                             x86_64                    4.18.0-305.12.1.el8_4                                 ol8_baseos_latest                     36 M
 kernel-modules                          x86_64                    4.18.0-305.12.1.el8_4                                 ol8_baseos_latest                     28 M
Upgrading:
 dracut                                  x86_64                    049-135.git20210121.0.2.el8                           ol8_baseos_latest                    374 k
 dracut-config-rescue                    x86_64                    049-135.git20210121.0.2.el8                           ol8_baseos_latest                     60 k
 dracut-network                          x86_64                    049-135.git20210121.0.2.el8                           ol8_baseos_latest                    108 k
 dracut-squash                           x86_64                    049-135.git20210121.0.2.el8                           ol8_baseos_latest                     60 k
 iptables                                x86_64                    1.8.4-17.0.1.el8                                      ol8_baseos_latest                    584 k
 iptables-ebtables                       x86_64                    1.8.4-17.0.1.el8                                      ol8_baseos_latest                     72 k
 iptables-libs                           x86_64                    1.8.4-17.0.1.el8                                      ol8_baseos_latest                    107 k
 kernel-tools                            x86_64                    4.18.0-305.12.1.el8_4                                 ol8_baseos_latest                    6.1 M
 kernel-tools-libs                       x86_64                    4.18.0-305.12.1.el8_4                                 ol8_baseos_latest                    5.9 M
 kexec-tools                             x86_64                    2.0.20-46.0.1.el8_4.2                                 ol8_baseos_latest                    510 k
 libnftnl                                x86_64                    1.1.5-4.el8                                           ol8_baseos_latest                     83 k
 linux-firmware                          noarch                    999:20210617-999.8.git0f66b74b.el8                    ol8_baseos_latest                    178 M
 systemd                                 x86_64                    239-45.0.2.el8_4.3                                    ol8_baseos_latest                    3.6 M
 systemd-libs                            x86_64                    239-45.0.2.el8_4.3                                    ol8_baseos_latest                    1.1 M
 systemd-pam                             x86_64                    239-45.0.2.el8_4.3                                    ol8_baseos_latest                    470 k
 systemd-udev                            x86_64                    239-45.0.2.el8_4.3                                    ol8_baseos_latest                    1.4 M
Installing dependencies:
 kernel-core                             x86_64                    4.18.0-240.22.1.el8_3                                 ol8_baseos_latest                     30 M
 kernel-modules                          x86_64                    4.18.0-240.22.1.el8_3                                 ol8_baseos_latest                     26 M

Transaction Summary
====================================================================================================================================================================
Install   5 Packages
Upgrade  16 Packages

Total download size: 322 M
Is this ok [y/N]: y <========================= YES
Downloading Packages:
(1/21): kernel-core-4.18.0-305.12.1.el8_4.x86_64.rpm                                                                                9.5 MB/s |  36 MB     00:03
(2/21): kernel-4.18.0-240.22.1.el8_3.x86_64.rpm                                                                                     610 kB/s | 4.4 MB     00:07
(3/21): kernel-modules-4.18.0-305.12.1.el8_4.x86_64.rpm                                                                             9.0 MB/s |  28 MB     00:03
(4/21): dracut-049-135.git20210121.0.2.el8.x86_64.rpm                                                                               5.0 MB/s | 374 kB     00:00
(5/21): dracut-config-rescue-049-135.git20210121.0.2.el8.x86_64.rpm                                                                 1.6 MB/s |  60 kB     00:00
(6/21): dracut-network-049-135.git20210121.0.2.el8.x86_64.rpm                                                                       1.1 MB/s | 108 kB     00:00
(7/21): dracut-squash-049-135.git20210121.0.2.el8.x86_64.rpm                                                                        1.3 MB/s |  60 kB     00:00
(8/21): iptables-1.8.4-17.0.1.el8.x86_64.rpm                                                                                        6.9 MB/s | 584 kB     00:00
(9/21): iptables-ebtables-1.8.4-17.0.1.el8.x86_64.rpm                                                                               3.8 MB/s |  72 kB     00:00
(10/21): iptables-libs-1.8.4-17.0.1.el8.x86_64.rpm                                                                                  3.3 MB/s | 107 kB     00:00
(11/21): kernel-tools-4.18.0-305.12.1.el8_4.x86_64.rpm                                                                              4.8 MB/s | 6.1 MB     00:01
(12/21): kernel-tools-libs-4.18.0-305.12.1.el8_4.x86_64.rpm                                                                         5.6 MB/s | 5.9 MB     00:01
(13/21): kernel-core-4.18.0-240.22.1.el8_3.x86_64.rpm                                                                               2.3 MB/s |  30 MB     00:13
(14/21): kexec-tools-2.0.20-46.0.1.el8_4.2.x86_64.rpm                                                                               5.2 MB/s | 510 kB     00:00
(15/21): kernel-modules-4.18.0-240.22.1.el8_3.x86_64.rpm                                                                            2.2 MB/s |  26 MB     00:11
(16/21): systemd-239-45.0.2.el8_4.3.x86_64.rpm                                                                                      6.7 MB/s | 3.6 MB     00:00
(17/21): systemd-libs-239-45.0.2.el8_4.3.x86_64.rpm                                                                                 8.6 MB/s | 1.1 MB     00:00
(18/21): systemd-pam-239-45.0.2.el8_4.3.x86_64.rpm                                                                                  5.3 MB/s | 470 kB     00:00
(19/21): systemd-udev-239-45.0.2.el8_4.3.x86_64.rpm                                                                                 8.1 MB/s | 1.4 MB     00:00
(20/21): libnftnl-1.1.5-4.el8.x86_64.rpm                                                                                             27 kB/s |  83 kB     00:03
(21/21): linux-firmware-20210617-999.8.git0f66b74b.el8.noarch.rpm                                                                    14 MB/s | 178 MB     00:12
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                12 MB/s | 322 MB     00:26
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                            1/1
  Running scriptlet: linux-firmware-999:20210617-999.8.git0f66b74b.el8.noarch                                                                                   1/1
  Upgrading        : linux-firmware-999:20210617-999.8.git0f66b74b.el8.noarch                                                                                  1/37
  Upgrading        : iptables-libs-1.8.4-17.0.1.el8.x86_64                                                                                                     2/37
  Upgrading        : systemd-libs-239-45.0.2.el8_4.3.x86_64                                                                                                    3/37
  Running scriptlet: systemd-libs-239-45.0.2.el8_4.3.x86_64                                                                                                    3/37
  Upgrading        : systemd-pam-239-45.0.2.el8_4.3.x86_64                                                                                                     4/37
  Running scriptlet: systemd-239-45.0.2.el8_4.3.x86_64                                                                                                         5/37
  Upgrading        : systemd-239-45.0.2.el8_4.3.x86_64                                                                                                         5/37
  Running scriptlet: systemd-239-45.0.2.el8_4.3.x86_64                                                                                                         5/37
  Upgrading        : systemd-udev-239-45.0.2.el8_4.3.x86_64                                                                                                    6/37
  Running scriptlet: systemd-udev-239-45.0.2.el8_4.3.x86_64                                                                                                    6/37
  Upgrading        : dracut-049-135.git20210121.0.2.el8.x86_64                                                                                                 7/37
  Installing       : kernel-core-4.18.0-240.22.1.el8_3.x86_64                                                                                                  8/37
  Running scriptlet: kernel-core-4.18.0-240.22.1.el8_3.x86_64                                                                                                  8/37
  Installing       : kernel-modules-4.18.0-240.22.1.el8_3.x86_64                                                                                               9/37
  Running scriptlet: kernel-modules-4.18.0-240.22.1.el8_3.x86_64                                                                                               9/37
  Installing       : kernel-core-4.18.0-305.12.1.el8_4.x86_64                                                                                                 10/37
  Running scriptlet: kernel-core-4.18.0-305.12.1.el8_4.x86_64                                                                                                 10/37
  Upgrading        : dracut-network-049-135.git20210121.0.2.el8.x86_64                                                                                        11/37
  Running scriptlet: dracut-network-049-135.git20210121.0.2.el8.x86_64                                                                                        11/37
  Upgrading        : dracut-squash-049-135.git20210121.0.2.el8.x86_64                                                                                         12/37
  Upgrading        : libnftnl-1.1.5-4.el8.x86_64                                                                                                              13/37
  Running scriptlet: libnftnl-1.1.5-4.el8.x86_64                                                                                                              13/37
  Running scriptlet: iptables-1.8.4-17.0.1.el8.x86_64                                                                                                         14/37
  Upgrading        : iptables-1.8.4-17.0.1.el8.x86_64                                                                                                         14/37
  Running scriptlet: iptables-1.8.4-17.0.1.el8.x86_64                                                                                                         14/37
  Upgrading        : kernel-tools-libs-4.18.0-305.12.1.el8_4.x86_64                                                                                           15/37
  Running scriptlet: kernel-tools-libs-4.18.0-305.12.1.el8_4.x86_64                                                                                           15/37

Upgraded:
  dracut-049-135.git20210121.0.2.el8.x86_64        dracut-config-rescue-049-135.git20210121.0.2.el8.x86_64 dracut-network-049-135.git20210121.0.2.el8.x86_64
  dracut-squash-049-135.git20210121.0.2.el8.x86_64 iptables-1.8.4-17.0.1.el8.x86_64                        iptables-ebtables-1.8.4-17.0.1.el8.x86_64
  iptables-libs-1.8.4-17.0.1.el8.x86_64            kernel-tools-4.18.0-305.12.1.el8_4.x86_64               kernel-tools-libs-4.18.0-305.12.1.el8_4.x86_64
  kexec-tools-2.0.20-46.0.1.el8_4.2.x86_64         libnftnl-1.1.5-4.el8.x86_64                             linux-firmware-999:20210617-999.8.git0f66b74b.el8.noarch
  systemd-239-45.0.2.el8_4.3.x86_64                systemd-libs-239-45.0.2.el8_4.3.x86_64                  systemd-pam-239-45.0.2.el8_4.3.x86_64
  systemd-udev-239-45.0.2.el8_4.3.x86_64

Installed:
  kernel-4.18.0-240.22.1.el8_3.x86_64                 kernel-core-4.18.0-305.12.1.el8_4.x86_64               kernel-modules-4.18.0-305.12.1.el8_4.x86_64
  kernel-core-4.18.0-240.22.1.el8_3.x86_64            kernel-modules-4.18.0-240.22.1.el8_3.x86_64

Complete!

# Checking if they still have kernel updates or bugs to apply.
# Verificando se ainda possuem atualizações de kernel ou bugs para serem aplicados.

[root@ol8 ~]# dnf --security upgrade-minimal kernel*
Last metadata expiration check: 0:52:36 ago on Tue 07 Sep 2021 12:15:28 PM -03.
No security updates needed for "kernel*", but 1 update available
Dependencies resolved.
Nothing to do.
Complete!

9 - Checking if we have security updates pending to be applied.
    Verificando se temos atualizações de segurança pendentes para serem aplicadas.
    
[root@ol8 ~]# dnf updateinfo sec
Last metadata expiration check: 0:12:03 ago on Tue 07 Sep 2021 01:25:53 PM -03.
[root@ol8 ~]#

 
 
   
Search for CVE details: https://linux.oracle.com/ords/f?p=130:21
Search for ELSA details: https://linux.oracle.com/ords/f?p=105:21

Creating a simple sftp in OL8 using the free resources of OCI.
Category: Cloud Author: César Carvalho Date: 3 years ago Comments: 0

Creating a simple sftp in OL8 using the free resources of OCI.

  1. 1. Provisioning Compute service.
For those who are not used to OCI, here is a description of what Compute Instances is.
The Compute service helps you provision VMs and bare metal instances to meet your compute and application requirements. An instance is a compute host. Choose between virtual machines (VMs) and bare metal instances. The image that you use to launch an instance determines its operating system and other software.
All the resources used are free, a VM with 1 OCP and 1GB of ram memory, with two 50GB block volume.
1.1 Enter the name of your instance and change the version of Oracle linux that we will use to OL8.
1.2 For those who are used to working and studying using OCI, we know that linux environments are accessed using a private key and not by user and password. In this way, download the private key and publish what the OCI will generate so that you can have access to the OL8 environment, then go to the create option.
1.3 Wait until the instance is provisioned and created.
1.4 Instance created and available for use, on the right side we have the public access ip and the user that we will use together with the private key.
2. We will add two 50gb block storage that OCI makes available for free, we will provision these two disks and we will use LVM to compose 100gb dedicated for our sftp files. Block volumes provide high-performance network storage to support a broad range of I/O intensive workloads.
2.1 Creating two free 50gb block volumes.
2.2 We will name it vol1, we will use Block Volume in the same Availability Domain as our instance with Oracle Linux 8, then we will go to the custom option to use the maximum performance of the volume allowed with the higther performance option.
2.3 Waiting for the provisioning and creation of the Block volume.
3. Adding the block volumes vol1 and vol2 in the instance Oracle Linux 8 sftp. Click on vol1, then attached instances.
3.1 We will add the vol1 and vol2 in instance, then we will choose the type of access and device path.
3.2 Provisioning and Attaching block volumes vol1 and vol2
4. Accessing the OL8 laboratory1 instance with a private key, in this example I am using the Mobaxterm tool.
4.1 Adding block volumes vol1 and vol2 on Oracle Linux 8 iSCSI.
Run the commands copied from the iSCSI Commands tab.
5 Adding block volumes vol1 and vol2 on Oracle Linux 8 with LVM.
5.1 Creating Physical Volumes
5.2 List physical volumes created PVS.
5.3 Create volume group with size of 100gb, adding the two block volumes vol1 and vol2.
5.4 Create logical volume with 100gb for use.
5.5 Formatting volume created from LVM volsftp in xfs.
5.6 Configuring fstab to automatically mount the volume created in the LVM.
5.7 Mounting the LVM volume.
6. Installing the SFTP service on Oracle Linux 8.
6.1 Configuring SFTP.
6.2 Creating the cesar user that we will use to access sftp.
6.3 Adding the user cesar to have access to sftp.
6.4 As at OCI we access linux environments with a private key, we will have to adjust it so that the user can access by password and not by private key.
6.5 Enabling and starting the sftp service.
6.6 For security change the user password opc.
6.7 Testing access using wiscp with sftp on the public ip of the instance.
 
César Carvalho – DBA
Contact: https://twitter.com/Cesar_DBA
https://sgbdbrasil.wordpress.com/

Adding OCI target manually using SSH Private Key in Enterprise Manager Cloud Control 13c
Category: Middleware Author: César Carvalho Date: 3 years ago Comments: 1

Adding OCI target manually using SSH Private Key in Enterprise Manager Cloud Control 13c

Guys, today’s tip is about how to add an OCI target manually in Enterprise Manager Cloud Control 13c using private key ssh.
This week I was implementing Enterprise Manager Cloud Control 13c using machines on Oracle Cloud Infrastructure (OCI), as access to Oracle 11g bank server was done only using a private key, I needed to add this server to be monitored on Cloud Control 13c using ssh private key, I researched a lot and broke my head to add an OCI host, so I decided to post to help other people, below are the steps:
Manually adding the Oracle database server to be monitored in Enterprise Manager Cloud Control 13c.
 
Guys today’s tip is about how to add an OCI target manually in Enterprise Manager Cloud Control 13c using private key ssh.
This week I was implementing Enterprise Manager Cloud Control 13c using machines on Oracle Cloud Infrastructure (OCI), as access to Oracle 11g bank server was done only using private key, I had the need to add this server to be monitored on Cloud Control 13c using ssh private key, I researched a lot and broke my head to add an OCI host, so I decided to post to help other people, below are the steps:
Manually adding the Oracle database server to be monitored in Enterprise Manager Cloud Control 13c
Adding the Oracle 11g Linux platform host
Create the directory in oracle home with oracle user to install the Agent on the server that we will monitor Oracle database 11g.
mkdir -p /u02/app/oracle/product/11.2.0/agentem13c
 
Add the base agent directory to deploy to Enterprise Manager Cloud Control 13c
Discovering the private key to be added from the default user opc in the OCI to add in Enterprise Manager Cloud Control 13c.
cat /home/opc/.ssh/id_rsa
Just copy all the text with the private key.
Fill in the UserName field with the opc user and paste the private key in the SSH Private Key field, then change the run privilege field to sudo and run as for the oracle user.
Okay, just go ok and follow the next steps that the deployment to the target with Oracle database 11g will finish and be successfully added to the Enterprise Manager Cloud Control 13c.

 

 

César Carvalho – DBA
Contact: https://twitter.com/Cesar_DBA
https://sgbdbrasil.wordpress.com/