About Me

Database and GIS Consultant.
Showing posts with label Patch. Show all posts
Showing posts with label Patch. Show all posts

Wednesday, September 9, 2020

SP2-0640: Not connected error message when running catcdb.sql

Problem: Error message when creating dictionary views and system stored procedures.

SP2-0640: Not connected error message when running catcdb.sql 


Environment:

Database Software: Oracle 12c Release 2

Operating System: Windows Server 2012 R2 Standard - 64 Bit


Workaround:

In sqlnet.ora make sure below parameter is set:-

SQLNET.AUTHENTICATION_SERVICES = (NTS)


This SQLNET.AUTHENTICATION_SERVICES = (NTS) parameter is required in order for the the catcdb.sql script and subsequent perl scripts to successfully connect to the database and run, otherwise you may encounter "SP2-0640: Not connected" error messages. Once the installation is complete, you may remove this parameter or comment it out.


Exit out of SQL*Plus, reconnect, drop and recreate the database, and rerun "catcdb.pl" script.


Hope it helps.


Can't locate util.pm in @INC (you may need to install the util module)

Error message when creating dictionary views and system stored procedures.

Can't locate util.pm in @INC (you may need to install the util module) 


Environment:

Database Software: Oracle 12c Release 2

Operating System: Windows Server 2012 R2 Standard - 64 Bit


Problem: This script "catcdb.sql", calls a perl script "catcdb.pl", both these files are located in "ORACLE_HOME\rdbms\admin" folder. 


There is a bug in Oracle 12c R2 base release, the perl script "catcdb.pl" will look for a utility module called "util.pm" in the "ORACLE_HOME\rdbms\admin" folder which is absent by default, throwing the below error message.

Can't locate util.pm in @INC (you may need to install the util module) (@INC contains: ORACLE_HOME/rdbms/admin ORACLE_HOME/perl/site/lib ORACLE_HOME/perl/lib .) at ORACLE_HOME/rdbms/admin/catcdb.pl line 35. BEGIN failed--compilation aborted at ORACLE_HOME/rdbms/admin/catcdb.pl line 35.


Workaround: Copy "util.pm" from "ORACLE_HOME\perl\lib\Hash" to "ORACLE_HOME\rdbms\admin" folder

> copy F:\Oracle12cR2_64Bit_DB\product\perl\lib\Hash\util.pm F:\Oracle12cR2_64Bit_DB\product\rdbms\admin


Exit out of SQL*Plus, reconnect and rerun the "catcdb.pl" script.


Hope it helps!






Tuesday, May 26, 2020

How to Install Oracle Patch - Basic Steps

Purpose: Basic steps involved in installing an Oracle Bundle Patch (Windows OS)

Environment:
Database Software: Oracle 12c Release 2
Operating System: Windows Server 2012 R2 Standard - 64 Bit
Patch to Install: Oracle Database Patch 30446296, which a Bundle Patch (BP) patch BP 12.2.0.1.200114 (latest available as of date), downloaded from Oracle Support.

Prepare:


1. Download the latest Bundle patch and extract it at a staging area.

Read the "README.html" file that comes along with the patch. The "Prerequisites" says that "You must use the OPatch utility version 12.2.0.1.7 or later to apply this patch. Oracle recommends that you usethe latest released OPatch 12.2, which is available for download from My Oracle Support patch 6880880 by selecting the 12.2.0.1.0 release."

Install


2: Check the existing OPatch version that came as part of the 12cR2 base release:-

set ORACLE_HOME=C:\Oracle12cR2_64Bit_DB\product
set Path=C:\Oracle12cR2_64Bit_DB\product\bin;C:\Oracle12cR2_64Bit_DB\product\OPatch;C:\Program Files (x86)\

C:\> opatch version
OPatch Version: 12.2.0.1.6

OPatch succeeded.

3. Download and Copy new OPatch

I have an older version, which means I need to download OPatch 12.2.0.1.7 or later, so I again downloaded OPatch 12.2.0.1.21 (Patch 6880880) from Oracle Support and extracted it at a staging area (E:\Ora_Patch_Stage\OP_p6880880\OPatch).

Backup the existing OPatch, just in case.

xcopy /E /I C:\Oracle12cR2_64Bit_DB\product\OPatch C:\Oracle12cR2_64Bit_DB\product\OPatch_BKP

Delete the old OPatch folder

rmdir /s /q C:\Oracle12cR2_64Bit_DB\product\OPatch

Copy over the downloaded OPatch folder to the Oracle Home.

xcopy /E /I E:\Ora_Patch_Stage\OP_p6880880\OPatch C:\Oracle12cR2_64Bit_DB\product\OPatch
Check the OPatch version again:-

C:\>opatch version
OPatch Version: 12.2.0.1.21

OPatch succeeded.


Which meets the Prerequisites, so let’s proceed with installing the Oracle Bundle Patch.

4: Install the Oracle Bundle Database Bundle Patch
 

Navigate to the location where its extracted and install

E:
cd E:\Ora_Patch_Stage\BP_p30446296\30446296
cd E:\Ora_Patch_Stage\BP_p30446296\30446296\opatch apply

Verify


5. Verify the install status by checking the OPatch logs at 

"C:\Program Files\Oracle\Inventory\logs
"ORACLE_HOME\cfgtoollogs\opatch"

You can also check what patches have been installed by

C:\> opatch lsinventory