Sunday, April 7, 2019

UtilSession failed: Prerequisite check "CheckSystemSpace" failed.

[oracle@ODIGettingStarted OPatch]$ ./opatch apply /home/oracle/Downloads/27338049
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_11-28-32AM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemSpace" failed.
The details are:
Required amount of space(805.866MB) is not available.
UtilSession failed:
Prerequisite check "CheckSystemSpace" failed.
Log file location: /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_11-28-32AM_1.log

OPatch failed with error code 73
[oracle@ODIGettingStarted OPatch]$
[oracle@ODIGettingStarted OPatch]$ ./opatch util cleanup -oh /u01/app/oracle/product/11.2.0/orcl
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_11-32-14AM_1.log

Invoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
y
User Responded with: Y

Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$

How to Increase Virtual Box Disk size in windows 10


Note: We have to remove ODI 12c Getting Started VM-disk2.vdi attachment (Settings --> Storage) from Virtual Box before following below steps.

I have increased disk size 14g to 20gb in below example:

C:\Program Files\Oracle\VirtualBox>VboxManage.exe modifymedium "C:\Users\rajam\VirtualBox VMs\ODI 12c Getting Started VM - OTN Image\ODI 12c Getting Started VM-disk2.vdi" --resize 20999
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

C:\Program Files\Oracle\VirtualBox>

C:\Users\rajam\VirtualBox VMs\ODI 12c Getting Started VM - OTN Image>dir /s
 Volume in drive C is System
 Volume Serial Number is E28D-8D5E

 Directory of C:\Users\rajam\VirtualBox VMs\ODI 12c Getting Started VM - OTN Image

04/07/2019  08:39 PM    <DIR>          .
04/07/2019  08:39 PM    <DIR>          ..
04/07/2019  08:38 PM    <DIR>          Logs
04/07/2019  08:39 PM             6,278 ODI 12c Getting Started VM - OTN Image.vbox
04/07/2019  08:39 PM             6,280 ODI 12c Getting Started VM - OTN Image.vbox-prev
04/07/2019  08:39 PM    10,615,783,424 ODI 12c Getting Started VM-disk1.vdi
04/07/2019  08:41 PM    15,268,315,136 ODI 12c Getting Started VM-disk2.vdi
               4 File(s) 25,884,111,118 bytes

 Directory of C:\Users\rajam\VirtualBox VMs\ODI 12c Getting Started VM - OTN Image\Logs

04/07/2019  08:38 PM    <DIR>          .
04/07/2019  08:38 PM    <DIR>          ..
04/07/2019  08:39 PM           135,482 VBox.log
04/07/2019  11:17 AM           161,939 VBox.log.1
04/07/2019  08:39 PM           353,519 VBoxHardening.log
               3 File(s)        650,940 bytes

     Total Files Listed:
               7 File(s) 25,884,762,058 bytes
               5 Dir(s)  26,158,559,232 bytes free

C:\Users\rajam\VirtualBox VMs\ODI 12c Getting Started VM - OTN Image>

Saturday, April 6, 2019

ORA-29259: end-of-input reached in oracle 11.2.0.4.0


[oracle@ODIGettingStarted ~]$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 7 01:20:15 2019

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

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping',NULL,'file:/u01/app/oracle/product/11.2.0/orcl/owm/wallet_51','xxxxxxxxxxxxxxxxxxxxxxxxxxxxx') FROM DUAL;
SELECT UTL_HTTP.request('https://wsctt.pearsonvue.com/cxfws2/services/Ping',NULL,'file:/u01/app/oracle/product/11.2.0/orcl/owm/wallet_51','xxxxxxxxxxxxxxxxxxxxxxxxxxxxx') FROM DUAL
       *
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1720
ORA-29259: end-of-input reached
ORA-06512: at line 1


SQL> SELECT UTL_HTTP.request('https://ws.pearsonvue.com/cxfws2/services/Ping',NULL,'file:/u01/app/oracle/product/11.2.0/orcl/owm/wallet_53','xxxxxxxxxxxxxxxxxxxxxxxxxxxxx') FROM DUAL;
SELECT UTL_HTTP.request('https://ws.pearsonvue.com/cxfws2/services/Ping',NULL,'file:/u01/app/oracle/product/11.2.0/orcl/owm/wallet_53','xxxxxxxxxxxxxxxxxxxxxxxxxxxxx') FROM DUAL
       *
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1720
ORA-29259: end-of-input reached
ORA-06512: at line 1


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
[oracle@ODIGettingStarted ~]$
[oracle@ODIGettingStarted ~]$ cd $ORACLE_HOME
[oracle@ODIGettingStarted orcl]$ cd OPatch
[oracle@ODIGettingStarted OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.20

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 07-APR-2019 01:24:16

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ODIGettingStarted)(PORT=1521)))
The command completed successfully
[oracle@ODIGettingStarted OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_11-22-37AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/lsinv/lsinventory2019-04-07_11-22-37AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: localhost
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


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

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$

[oracle@ODIGettingStarted OPatch]$ ./opatch prereq CheckConflictAgainstOHWithDetail -ph /home/oracle/Downloads/27338049
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-25-30AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$ ./opatch prereq CheckActiveFilesAndExecutables -ph /home/oracle/Downloads/27338049
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-26-01AM_1.log

Invoking prereq "checkactivefilesandexecutables"

Prereq "checkActiveFilesAndExecutables" for patch 17478514 passed.

Prereq "checkActiveFilesAndExecutables" for patch 18031668 passed.

Prereq "checkActiveFilesAndExecutables" for patch 18522509 passed.

Prereq "checkActiveFilesAndExecutables" for patch 19121551 passed.

Prereq "checkActiveFilesAndExecutables" for patch 19769489 passed.

Prereq "checkActiveFilesAndExecutables" for patch 20299013 passed.

Prereq "checkActiveFilesAndExecutables" for patch 20760982 passed.

Prereq "checkActiveFilesAndExecutables" for patch 21352635 passed.

Prereq "checkActiveFilesAndExecutables" for patch 21948347 passed.

Prereq "checkActiveFilesAndExecutables" for patch 22502456 passed.

Prereq "checkActiveFilesAndExecutables" for patch 23054359 passed.

Prereq "checkActiveFilesAndExecutables" for patch 24006111 passed.

Prereq "checkActiveFilesAndExecutables" for patch 24732075 passed.

Prereq "checkActiveFilesAndExecutables" for patch 25869727 passed.

Prereq "checkActiveFilesAndExecutables" for patch 26609445 passed.

Prereq "checkActiveFilesAndExecutables" for patch 26392168 passed.

Prereq "checkActiveFilesAndExecutables" for patch 26925576 passed.

Prereq "checkActiveFilesAndExecutables" for patch 27338049 passed.

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$ ./opatch apply /home/oracle/Downloads/27338049
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-27-09AM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-27-26AM_1.log

Verifying environment and performing prerequisite checks...
UtilSession failed:
To run in silent mode, OPatch requires a response file for Oracle Configuration Manager (OCM).
Please run "/tmp/oracle-home-1554614843190109/OPatch/ocm/bin/emocmrsp" to generate an OCM response file. The generated response file
can be reused on different platforms and in multiple OPatch silent installs.

To regenerate an OCM response file, Please rerun "/tmp/oracle-home-1554614843190109/OPatch/ocm/bin/emocmrsp".

Log file location: /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-27-26AM_1.log

OPatch failed with error code 73
[oracle@ODIGettingStarted OPatch]$ cleat
bash: cleat: command not found
[oracle@ODIGettingStarted OPatch]$ clear screen






[oracle@ODIGettingStarted OPatch]$ ./opatch apply /home/oracle/Downloads/27338049
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-35-11AM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-35-25AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489  20299013  20760982  21352635  21948347  22502456  23054359  24006111  24732075  25869727  26609445  26392168  26925576  27338049 

Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/orcl')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying sub-patch '17478514' to OH '/u01/app/oracle/product/11.2.0/orcl'

Patching component oracle.rdbms, 11.2.0.4.0...

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

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


How to Upgrade OPatch version while the patch(es) require higher versions

Note: Download p6880880 from support.oracle.com




oracle@ODIGettingStarted OPatch]$  lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:    OracleServer
Description:    Oracle Linux Server release 6.4
Release:    6.4
Codename:    n/a
Before apply latest OPatch p6880880_112000_Linux-x86-64.zip
-------------------------------------------------------------------------------------------------- 
[oracle@ODIGettingStarted ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/orcl
[oracle@ODIGettingStarted ~]$ cd $ORACLE_HOME
[oracle@ODIGettingStarted orcl]$ cd OPatch
[oracle@ODIGettingStarted OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$ ./opatch apply /home/oracle/Downloads/27338049
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-01-10AM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckMinimumOPatchVersion" failed.
The details are:


The OPatch being used has version 11.2.0.3.4 while the following patch(es) require higher versions:
Patch 17478514 requires OPatch version 11.2.0.3.5.
Patch 18031668 requires OPatch version 11.2.0.3.5.
Patch 18522509 requires OPatch version 11.2.0.3.5.
Patch 19121551 requires OPatch version 11.2.0.3.5.
Patch 19769489 requires OPatch version 11.2.0.3.5.
Patch 20299013 requires OPatch version 11.2.0.3.5.
Patch 20760982 requires OPatch version 11.2.0.3.5.
Patch 21352635 requires OPatch version 11.2.0.3.5.
Patch 21948347 requires OPatch version 11.2.0.3.5.
Patch 22502456 requires OPatch version 11.2.0.3.5.
Patch 23054359 requires OPatch version 11.2.0.3.5.
Patch 24006111 requires OPatch version 11.2.0.3.5.
Patch 24732075 requires OPatch version 11.2.0.3.5.
Patch 25869727 requires OPatch version 11.2.0.3.5.
Patch 26392168 requires OPatch version 11.2.0.3.5.
Patch 26609445 requires OPatch version 11.2.0.3.5.
Please download latest OPatch from My Oracle Support.

UtilSession failed: Prerequisite check "CheckMinimumOPatchVersion" failed.
Log file location: /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-07_01-01-10AM_1.log

OPatch failed with error code 73

Applying latest OPatch p6880880_112000_Linux-x86-64.zip
-------------------------------------------------------------------------------------------------- 
[oracle@ODIGettingStarted ~]$ pwd
/home/oracle
[oracle@ODIGettingStarted ~]$ cd Downloads
[oracle@ODIGettingStarted Downloads]$ ls -ltr
total 247464
-rw-rw-r--.  1 oracle oracle 113078049 Apr  7 01:05 p6880880_112000_Linux-x86-64.zip
[oracle@ODIGettingStarted Downloads]$  cp p6880880_112000_Linux-x86-64.zip $ORACLE_HOME/
[oracle@ODIGettingStarted Downloads]$ cd $ORACLE_HOME
[oracle@ODIGettingStarted orcl]$
[oracle@ODIGettingStarted orcl]$ mv OPatch /home/oracle/Downloads/
[oracle@ODIGettingStarted orcl]$ unzip p6880880_112000_Linux-x86-64.zip
-------------
------------------
[oracle@ODIGettingStarted orcl]$ cd OPatch
[oracle@ODIGettingStarted OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.20

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$

Commands to check Linux and Ciphers Versions

[oracle@soa-training ~]$ cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="6.7"
ID="ol"
VERSION_ID="6.7"
PRETTY_NAME="Oracle Linux Server 6.7"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:6:7"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 6"
ORACLE_BUGZILLA_PRODUCT_VERSION=6.7
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=6.7
[oracle@soa-training ~]$ lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:    OracleServer
Description:    Oracle Linux Server release 6.7
Release:    6.7
Codename:    n/a
[oracle@soa-training ~]$ uname -r
3.8.13-44.el6uek.x86_64
[oracle@soa-training ~]$


[oracle@soa-training ~]$ openssl ciphers
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:ECDH-RSA-AES256-GCM-SHA384:ECDH-ECDSA-AES256-GCM-SHA384:ECDH-RSA-AES256-SHA384:ECDH-ECDSA-AES256-SHA384:ECDH-RSA-AES256-SHA:ECDH-ECDSA-AES256-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA:PSK-AES256-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:DHE-RSA-SEED-SHA:DHE-DSS-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:ECDH-RSA-AES128-GCM-SHA256:ECDH-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA256:ECDH-RSA-AES128-SHA:ECDH-ECDSA-AES128-SHA:ECDH-RSA-DES-CBC3-SHA:ECDH-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:SEED-SHA:CAMELLIA128-SHA:DES-CBC3-SHA:IDEA-CBC-SHA:PSK-AES128-CBC-SHA:PSK-3DES-EDE-CBC-SHA:KRB5-IDEA-CBC-SHA:KRB5-DES-CBC3-SHA:KRB5-IDEA-CBC-MD5:KRB5-DES-CBC3-MD5:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:RC4-SHA:RC4-MD5:PSK-RC4-SHA:KRB5-RC4-SHA:KRB5-RC4-MD5
[oracle@soa-training ~]$ openssl ciphers -v | awk '{print $2}' | sort | uniq
SSLv3
TLSv1.2
[oracle@soa-training ~]$


Friday, April 5, 2019

Rolling Back a Patch You Have Applied

[oracle@ODIGettingStarted OPatch]$ ./opatch rollback -id 20551790
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-05_08-49-58AM_1.log


Patches will be rolled back in the following order:
   20551790

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-05_08-50-06AM_1.log


Patches will be rolled back in the following order:
   20551790
The following patch(es) will be rolled back: 20551790 

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/orcl')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y

Rolling back patch 20551790...

RollbackSession rolling back interim patch '20551790' from OH '/u01/app/oracle/product/11.2.0/orcl'

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.rdbms, 11.2.0.4.0...
RollbackSession removing interim patch '20551790' from inventory
Log file location: /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-05_08-50-06AM_1.log

OPatch succeeded.
[oracle@ODIGettingStarted OPatch]$

Converting 3rd Party pkcs12 or .pfx Wallets for use with Oracle 12c


Oracle 12.1.0.x
Convert the wallet to Oracle 12 format with orapki by converting to a jks wallet and then to a pkcs12 wallet.
Steps:
1) First convert the 3rd party wallet to jks using orapki.
mseibt@tls]$ orapki wallet pkcs12_to_jks -wallet /tmp/wallet.pfx -jksKeyStoreLoc /tmp/wallet.jks -jksKeyStorepwd welcome1
Oracle PKI Tool : Version 12.1.0.2
Enter wallet password: (this is the pfx or 3rd party wallet password)
We now have a wallet.jks file at the location specified by -jksKeyStoreLoc :
oracle@tls]$ ls
wallet.pfx wallet.jks
2) Create a 12.1 ewallet.p12 which will become the new (and converted) pkcs12 wallet.
oracle@celdbvbx005]$ orapki wallet create -wallet . -pwd welcome1
oracle@celdbvbx005]$ ls
ewallet.p12 wallet.pfx wallet.jks
3) Lastly, move the jks wallet contents into the new ewallet.p12 that will be compatible with 12.1.
oracle@celdbvbx005]$ orapki wallet jks_to_pkcs12 -wallet /tmp -pwd welcome1 -keystore /tmp/wallet.jks -jkspwd welcome1

--(Doc ID 2147608.1)

Oracle 12.1.3.x
The orapki utility in 12.1.3.x installation has an "import_pkcs12" option which directly converts 3rd party pkcs12 wallets to a 12 compatible wallet.
Steps:
1) Create a new Oracle 12 wallet with orapki.
-bash-4.1$ orapki wallet create -wallet /tmp -pwd welcome1
Oracle PKI Tool : Version 12.1.0.1
Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
2) Move the 3rd party wallet contents into the new 12 compatible wallet.
-bash-4.1$ orapki wallet import_pkcs12 -wallet /tmp -pkcs12file /tmp/wallet.pfx -pkcs12pwd welcome1
Oracle PKI Tool : Version 12.1.3.0.0
Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
Enter wallet password:
orapki command import_pkcs12 executed successfully.

Thursday, April 4, 2019

UtilSession failed: To run in silent mode, OPatch requires a response file for Oracle Configuration Manager (OCM)


 [oracle@ODIGettingStarted ~]$ $ORACLE_HOME/ccr/bin/setupCCR –s –d
An unrecoverable network configuration error was encountered.
peer not authenticated

Unable to establish a network connection to Oracle. Specify the URL for an
Oracle Support Hub in this format:
    http[s]://<OracleSupportHubHost>:<OracleSupportHubPort>
If you do not wish to configure OCM through an Oracle Support Hub, enter NONE
Oracle Support Hub URL: NONE

Unable to establish a network connection to Oracle. If your systems require a
proxy server for outbound Internet connections, enter the proxy server details
in this format:
    [<proxy-user>@]<proxy-host>[:<proxy-port>]
If you want to remain uninformed of critical security issues in your
configuration, enter NONE
Proxy specification: NONE


** Installing base package **
Deploying core - Version 10.3.8.1.0
Deploying engines - Version 10.3.8.1.0
Deploying metricdata - Version 10.3.7.0.0
Deploying rda - Version 4.31.13.3.7
Deploying rdacelin - Version 4.31.13.3.7
Deploying scripts - Version 10.3.8.1.0

Oracle Configuration Manager has been configured in disconnected mode. If the
target ORACLE_HOME is running a database, please refer to the
"Post-installation Database Configuration" section of the OCM Installation
and Administration Guide
(http://www.oracle.com/technology/documentation/ocm.html) to complete the
installation.

View configuration data reports and access valuable configuration best
practices by going to My Oracle Support.
[oracle@ODIGettingStarted bin]$


Example:
[oracle@ODIGettingStarted ~]$ cd /home/oracle/Downloads
[oracle@ODIGettingStarted Downloads]$ unzip p20551790_112040_Linux-x86-64.zip
Archive:  p20551790_112040_Linux-x86-64.zip
   creating: 20551790/
   creating: 20551790/files/
   creating: 20551790/files/lib/
   creating: 20551790/files/lib/libplp11_pic.a/
  inflating: 20551790/files/lib/libplp11_pic.a/piht_pic.o 
   creating: 20551790/files/lib/libplp11.a/
  inflating: 20551790/files/lib/libplp11.a/piht.o 
   creating: 20551790/files/lib/libgeneric11.a/
  inflating: 20551790/files/lib/libgeneric11.a/nhpn.o 
  inflating: 20551790/files/lib/libgeneric11.a/nbio.o 
  inflating: 20551790/README.txt    
   creating: 20551790/etc/
   creating: 20551790/etc/config/
  inflating: 20551790/etc/config/actions.xml 
  inflating: 20551790/etc/config/deploy.xml 
  inflating: 20551790/etc/config/inventory.xml 
   creating: 20551790/etc/xml/
  inflating: 20551790/etc/xml/GenericActions.xml 
  inflating: 20551790/etc/xml/ShiphomeDirectoryStructure.xml 
[oracle@ODIGettingStarted Downloads]$ ls -ltr
total 280744
drwxrwxr-x.  4 oracle oracle      4096 Apr  3  2015 20551790
-rw-rw-r--.  1 oracle oracle     82137 Apr  4 10:18 p20551790_112040_Linux-x86-64.zip
[oracle@ODIGettingStarted Downloads]$ cd 20551790
[oracle@ODIGettingStarted 20551790]$ ls -ltr
total 16
-rw-rw-r--. 1 oracle oracle 6222 Apr  3  2015 README.txt
drwxr-xr-x. 3 oracle oracle 4096 Apr  3  2015 files
drwxr-xr-x. 4 oracle oracle 4096 Apr  3  2015 etc
[oracle@ODIGettingStarted 20551790]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.20

OPatch succeeded.
[oracle@ODIGettingStarted 20551790]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-24-48AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@ODIGettingStarted 20551790]$ $ORACLE_HOME/OPatch/opatch prereq CheckActiveFilesAndExecutables -ph ./
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-25-06AM_1.log

Invoking prereq "checkactivefilesandexecutables"

Prereq "checkActiveFilesAndExecutables" for patch 20551790 passed.

OPatch succeeded.
[oracle@ODIGettingStarted 20551790]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-25-24AM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-25-33AM_1.log

Verifying environment and performing prerequisite checks...
UtilSession failed:
To run in silent mode, OPatch requires a response file for Oracle Configuration Manager (OCM).
Please run "/tmp/oracle-home-1554387928976335/OPatch/ocm/bin/emocmrsp" to generate an OCM response file. The generated response file
can be reused on different platforms and in multiple OPatch silent installs.

To regenerate an OCM response file, Please rerun "/tmp/oracle-home-1554387928976335/OPatch/ocm/bin/emocmrsp".

Log file location: /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-25-33AM_1.log

OPatch failed with error code 73
[oracle@ODIGettingStarted 20551790]$ $ORACLE_HOME/ccr/bin/setupCCR –s –d
An unrecoverable network configuration error was encountered.
peer not authenticated

Unable to establish a network connection to Oracle. Specify the URL for an
Oracle Support Hub in this format:
    http[s]://<OracleSupportHubHost>:<OracleSupportHubPort>
If you do not wish to configure OCM through an Oracle Support Hub, enter NONE
Oracle Support Hub URL: NONE

Unable to establish a network connection to Oracle. If your systems require a
proxy server for outbound Internet connections, enter the proxy server details
in this format:
    [<proxy-user>@]<proxy-host>[:<proxy-port>]
If you want to remain uninformed of critical security issues in your
configuration, enter NONE
Proxy specification: NONE


** Installing base package **
Deploying core - Version 10.3.8.1.0
Deploying engines - Version 10.3.8.1.0
Deploying metricdata - Version 10.3.7.0.0
Deploying rda - Version 4.31.13.3.7
Deploying rdacelin - Version 4.31.13.3.7
Deploying scripts - Version 10.3.8.1.0

Oracle Configuration Manager has been configured in disconnected mode. If the
target ORACLE_HOME is running a database, please refer to the
"Post-installation Database Configuration" section of the OCM Installation
and Administration Guide
(http://www.oracle.com/technology/documentation/ocm.html) to complete the
installation.

View configuration data reports and access valuable configuration best
practices by going to My Oracle Support.
[oracle@ODIGettingStarted 20551790]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-39-16AM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-39-25AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   20551790 

Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/orcl')


Is the local system ready for patching? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
Backing up files...
Applying interim patch '20551790' to OH '/u01/app/oracle/product/11.2.0/orcl'

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

Patching component oracle.rdbms, 11.2.0.4.0...
Patch 20551790 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-39-25AM_1.log

OPatch succeeded.

[oracle@ODIGettingStarted 20551790]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.20
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/orcl
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/orcl/oraInst.loc
OPatch version    : 11.2.0.3.20
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/opatch2019-04-04_10-44-06AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/orcl/cfgtoollogs/opatch/lsinv/lsinventory2019-04-04_10-44-06AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: localhost
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  20551790     : applied on Thu Apr 04 10:39:41 EDT 2019
Unique Patch ID:  18776195
   Created on 3 Apr 2015, 01:19:56 hrs PST8PDT
   Bugs fixed:
     20551790



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

OPatch succeeded.

ORA-29263: HTTP protocol error in Oracle Database 12c Enterprise Edition Release 12.1.0.2.0

Step 1: Before applying Patch 24848928
********************************************************************************
SQL*Plus: Release 12.1.0.2.0 Production on Thu Apr 4 02:30:24 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> SELECT UTL_HTTP.request('https://ws.pearsonvue.com/cxfws2/services/Ping',NULL,'file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wallet_53','xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') FROM DUAL;
SELECT UTL_HTTP.request('https://ws.pearsonvue.com/cxfws2/services/Ping',NULL,'file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wallet_53','xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') FROM DUAL
       *
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-29263: HTTP protocol error
ORA-06512: at "SYS.UTL_HTTP", line 1491
ORA-06512: at line 1


SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Step 2: Applying Patch 24848928
********************************************************************************
[oracle@soa-training ~]$ pwd
/home/oracle
[oracle@soa-training ~]$ cd /u01/app/oracle/product/12.1.0/dbhome_2/OPatch
[oracle@soa-training OPatch]$ pwd
/u01/app/oracle/product/12.1.0/dbhome_2/OPatch
[oracle@soa-training OPatch]$ ls -ltr
total 164
-rw-r--r--. 1 oracle oinstall  2576 May  6  2009 opatch.pl
-rw-r--r--. 1 oracle oinstall 23695 Aug  2  2010 emdpatch.pl
-rwx--x---. 1 oracle oinstall  9352 Mar 31  2011 opatchdiag.bat
-rwx--x---. 1 oracle oinstall 10056 Mar 31  2011 opatchdiag
-rwx--x---. 1 oracle oinstall   569 Aug 12  2012 datapatch.bat
-rwx--x---. 1 oracle oinstall   537 Aug 12  2012 datapatch
-rwx--x---. 1 oracle oinstall 20009 Dec 29  2013 opatch.bat
-rwx--x---. 1 oracle oinstall 24478 Jan 26  2014 opatchauto
-rwx--x---. 1 oracle oinstall 33889 Mar 26  2014 opatch
drwxr-xr-x. 5 oracle oinstall  4096 Jul  9  2015 ocm
drwxr-xr-x. 4 oracle oinstall  4096 Jul  9  2015 opatchprereqs
drwxr-xr-x. 2 oracle oinstall  4096 Jul  9  2015 jlib
drwxr-xr-x. 2 oracle oinstall  4096 Jul  9  2015 docs
drwxr-xr-x. 3 oracle oinstall  4096 Jul  9  2015 oplan
-rw-r--r--. 1 oracle oinstall    49 Jul  9  2015 opatch.ini
[oracle@soa-training OPatch]$ ./opatch version
OPatch Version: 12.1.0.1.3

OPatch succeeded.
[oracle@soa-training OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version    : 12.1.0.1.3
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-04-04_02-44-30AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/lsinv/lsinventory2019-04-04_02-44-30AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


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

OPatch succeeded.
[oracle@soa-training OPatch]$ pwd
/u01/app/oracle/product/12.1.0/dbhome_2/OPatch
[oracle@soa-training OPatch]$ cd /home/oracle/Downloads
[oracle@soa-training Downloads]$ ls -ltr
total 3372
-rw-r--r--. 1 oracle oinstall 3450285 Apr  4 02:28 p24848928_121020_Linux-x86-64.zip
[oracle@soa-training Downloads]$ unzip p24848928_121020_Linux-x86-64.zip
Archive:  p24848928_121020_Linux-x86-64.zip
   creating: 24848928/
   creating: 24848928/etc/
   creating: 24848928/etc/config/
  inflating: 24848928/etc/config/actions.xml 
  inflating: 24848928/etc/config/inventory.xml 
   creating: 24848928/files/
   creating: 24848928/files/lib/
  inflating: 24848928/files/lib/libnnz12.so 
   creating: 24848928/files/lib/libnnz12.a/
  inflating: 24848928/files/lib/libnnz12.a/nzos.o 
   creating: 24848928/files/lib/libnnzst12.a/
  inflating: 24848928/files/lib/libnnzst12.a/ext_nzos.o 
  inflating: 24848928/README.txt    
[oracle@soa-training Downloads]$ ls -ltr
total 3376
drwxrwxr-x. 4 oracle oinstall    4096 Dec 21  2016 24848928
-rw-r--r--. 1 oracle oinstall 3450285 Apr  4 02:28 p24848928_121020_Linux-x86-64.zip
[oracle@soa-training Downloads]$ cd 24848920
bash: cd: 24848920: No such file or directory
[oracle@soa-training Downloads]$ cd 24848928
[oracle@soa-training 24848928]$ pwd
/home/oracle/Downloads/24848928
[oracle@soa-training 24848928]$ ls -ltr
total 16
-rw-rw-r--. 1 oracle oinstall 5932 Dec 21  2016 README.txt
drwxrwxr-x. 3 oracle oinstall 4096 Dec 21  2016 files
drwxrwxr-x. 3 oracle oinstall 4096 Dec 21  2016 etc
[oracle@soa-training 24848928]$ /u01/app/oracle/product/12.1.0/dbhome_2/OPatch/opatch version ./
OPatch Version: 12.1.0.1.3

OPatch succeeded.
[oracle@soa-training 24848928]$ /u01/app/oracle/product/12.1.0/dbhome_2/OPatch/opatch version
OPatch Version: 12.1.0.1.3

OPatch succeeded.
[oracle@soa-training 24848928]$ /u01/app/oracle/product/12.1.0/dbhome_2/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version    : 12.1.0.1.3
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-04-04_02-50-23AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/lsinv/lsinventory2019-04-04_02-50-23AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


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

OPatch succeeded.
[oracle@soa-training 24848928]$ /u01/app/oracle/product/12.1.0/dbhome_2/OPatch/opatch apply
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version    : 12.1.0.1.3
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/24848928_Apr_04_2019_02_52_36/apply2019-04-04_02-52-35AM_1.log

Applying interim patch '24848928' to OH '/u01/app/oracle/product/12.1.0/dbhome_2'
Verifying environment and performing prerequisite checks...
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.1.0/dbhome_2')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Patching component oracle.ldap.rsf, 12.1.0.2.0...

Patching component oracle.ldap.rsf.ic, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Verifying the update...
Patch 24848928 successfully applied
Log file location: /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/24848928_Apr_04_2019_02_52_36/apply2019-04-04_02-52-35AM_1.log

OPatch succeeded.
[oracle@soa-training 24848928]$ /u01/app/oracle/product/12.1.0/dbhome_2/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version    : 12.1.0.1.3
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-04-04_02-53-30AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/lsinv/lsinventory2019-04-04_02-53-30AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  24848928     : applied on Thu Apr 04 02:53:10 PDT 2019
Unique Patch ID:  20856904
   Created on 21 Dec 2016, 06:02:18 hrs PST8PDT
   Bugs fixed:
     24848928



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

OPatch succeeded.
[oracle@soa-training 24848928]$



Step 3: After applying Patch 24848928
********************************************************************************
SQL*Plus: Release 12.1.0.2.0 Production on Thu Apr 4 03:01:51 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 2147483648 bytes
Fixed Size            2926472 bytes
Variable Size         1207961720 bytes
Database Buffers      922746880 bytes
Redo Buffers           13848576 bytes

SQL> select status from v$instance;

STATUS
------------
STARTED

SQL> startup mount
ORACLE instance started.

Total System Global Area 2147483648 bytes
Fixed Size            2926472 bytes
Variable Size         1207961720 bytes
Database Buffers      922746880 bytes
Redo Buffers           13848576 bytes
Database mounted.
SQL> select status from v$instance;

STATUS
------------
MOUNTED

SQL> select * from DBA_REGISTRY_SQLPATCH;
select * from DBA_REGISTRY_SQLPATCH
              *
ERROR at line 1:
ORA-01219: database or pluggable database not open: queries allowed on fixed
tables or views only


SQL> alter database open;

Database altered.

SQL> select * from DBA_REGISTRY_SQLPATCH;

no rows selected

SQL> SELECT UTL_HTTP.request('https://ws.pearsonvue.com/cxfws2/services/Ping',NULL,'file:/u01/app/oracle/product/12.1.0/dbhome_2/owm/wallet_53','xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') FROM DUAL;

UTL_HTTP.REQUEST('HTTPS://WS.PEARSONVUE.COM/CXFWS2/SERVICES/PING',NULL,'FILE:/U0
--------------------------------------------------------------------------------
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soapen
v="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><soap:Code>
<soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:la
ng="en">Fault occurred while processing.</soap:Text></soap:Reason></soap:Fault><
/soap:Body></soap:Envelope>


Wednesday, April 3, 2019

Mutating Table Error

http://arunkaushikoracle.blogspot.in/2013/01/what-is-mutation-how-to-avoid-mutation.html
best : https://decipherinfosys.wordpress.com/2009/06/22/mutating-tabletrigger-error-and-how-to-resolve-it/

Mutating error :
The error is encountered when a row-level trigger accesses the same table on which it is based, while executing. The table is said to be mutating.
Mutating error normally occurs when we are performing some DML operations and we are trying to select the affected record from the same trigger. So basically we are trying to select records in the trigger from the table that owns the trigger. This creates inconsistency and Oracle throws a mutating error

there are different ways we can handle mutating table errors
1.First one is to create statement level trigger instead of row level.
2.By defining row level trigger as an autonomous transaction, we got rid of mutating table error but result is not correct.
3.In version 11g, Oracle made it much easier with introduction of compound triggers
       

SQL> CREATE TABLE mtt_same_table
  2  (
  3     col1   NUMBER,
  4     col2   VARCHAR2 (10)
  5  );

Table created.

SQL>
SQL> CREATE OR REPLACE TRIGGER mutation_on_same_table
  2     BEFORE INSERT OR UPDATE OR DELETE
  3     ON mtt_same_table
  4     FOR EACH ROW
  5  DECLARE
  6     vcount   NUMBER;
  7  BEGIN
  8     SELECT COUNT (*) INTO vcount FROM mtt_same_table;
  9
 10     DBMS_OUTPUT.put_line ('mtt');
 11  END;
 12  /

Trigger created.

SQL>
SQL> SELECT * FROM mtt_same_table;

no rows selected

SQL>
SQL> INSERT INTO mtt_same_table
  2       VALUES (1, 'arun');
mtt

1 row created.

/*When we select from sub query ,either its one value or many mutation error you face
because oracle don’t know how many rows are there until it fetch the rows */

SQL> INSERT INTO mtt_same_table
  2     SELECT sal, ename
  3       FROM emp
  4      WHERE deptno = 10;
INSERT INTO mtt_same_table
            *
ERROR at line 1:
ORA-04091: table SCOTT.MTT_SAME_TABLE is mutating, trigger/function may not see
it
ORA-06512: at "SCOTT.MUTATION_ON_SAME_TABLE", line 4
ORA-04088: error during execution of trigger 'SCOTT.MUTATION_ON_SAME_TABLE'

SQL> insert into mtt_same_table select 1,'arun' from dual;

insert into mtt_same_table select 1,'arun' from dual
            *
ERROR at line 1:
ORA-04091: table SCOTT.MTT_SAME_TABLE is mutating, trigger/function may not see
it
ORA-06512: at "SCOTT.MUTATION_ON_SAME_TABLE", line 4
ORA-04088: error during execution of trigger 'SCOTT.MUTATION_ON_SAME_TABLE'

/* Way (3): In version 11g, Oracle made it much easier with introduction of compound triggers */

CREATE OR REPLACE TRIGGER mutation_on_same_table FOR
   INSERT
   ON mtt_same_table
   COMPOUND TRIGGER                               --added for compound trigger
   v_count   NUMBER;
   BEFORE EACH ROW
   IS
   BEGIN
      DBMS_OUTPUT.put_line ('Insert IS done');
   END
   BEFORE EACH ROW;

   BEFORE STATEMENT
   IS
   BEGIN
      SELECT COUNT (*) INTO v_count FROM mtt_same_table;

      DBMS_OUTPUT.put_line ('Total records are ' || SQL%ROWCOUNT);
   END
   BEFORE STATEMENT;

END mutation_on_same_table;
/

Trigger created.

SQL> /* Formatted on 7/14/2016 12:08:58 PM (QP5 v5.256.13226.35510) */
SQL> INSERT INTO mtt_same_table
  2     SELECT sal, ename
  3       FROM emp
  4      WHERE deptno = 10;

3 rows created.

Delete Row Button to all records of Interactive Report in Oracle Apex

 1. add 'Delete' Del column to Report Query 2. Set the Following Properties for the DEL Column Type: Link Heading: Delete Targ...