Thursday, October 6, 2022

ADOP prepare fails with "[ERROR] ETCC not run in the database"

 


ISSUE:

12.2.9 adop prepare failed with the error below despite updated ETCC having been successfully ran:

....................................................................................................................

Validating system setup.

    Node registry is valid.

    [ERROR]     ETCC not run in the database node data16

                The EBS Technology Codelevel Checker needs to be run on the database node.

                It is available as Patch 17537119.

        Encountered the above errors when performing database validations.

    Resolve the above errors and restart adop.

....................................................................................................................

 

CAUSE:

Possible mismatch between FND_NODES and APPLSYS.TXK_TCC_RESULTS.

Failure occurred in my freshly cloned environment. In my case, the "domain" had been appended to the node_name.

 

SQL> SELECT NODE_NAME,DATABASE_NAME FROM APPLSYS.TXK_TCC_RESULTS;

NODE_NAME            DATABASE_NAME

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

data16.xyzdomain.com dbproject

app010                               dbproject

app010                               dbproject

SQL> SELECT NODE_NAME,NODE_ID,HOST FROM FND_NODES;

NODE_NAME               NODE_ID HOST

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

DATA16                              12125     data16

APP010                               12126     app010

AUTHENTICATION           12127

 

FIX:

#1: Backup the APPLSYS.TXK_TCC_RESULTS

create table APPS.TXK_TCC_RESULTS_backup as select * from APPLSYS.TXK_TCC_RESULTS;

 

#2: Update the APPLSYS.TXK_TCC_RESULTS to correct the NODE_NAME value:

update APPLSYS.TXK_TCC_RESULTS set node_name='DATA16' where node_name ='data16.xyzdomain.com';

commit;

 

#3: Verify:

SQL> SELECT NODE_NAME,DATABASE_NAME FROM APPLSYS.TXK_TCC_RESULTS;

NODE_NAME            DATABASE_NAME

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

DATA16                dbproject

app010                 dbproject

app010                 dbproject

app010                 dbproject

app010                 dbproject

 

 

Proceeded with adop prepare.

Thursday, May 19, 2022

ADOP: Fs_clone fails with error Failed to delete the directory

 

On : 12.2.9 version, Patch Application Issues: fs_clone fails with following error:

 

###ERROR:

................................................................................................................................

................................................................................................................................

 

Lines #(188-190):

TIME    : Fri April 15 13:53:08 2022

FUNCTION: main::removeDirectory [ Level 1 ]

ERRORMSG: Failed to delete the directory /uproject1/ora/uproject/fs2/EBSapps/comn.

 

/uproject1/ora/uproject/fs_ne/EBSapps/log/adop/35/20220415_135028/adop.log:

................................................................................................................................

................................................................................................................................

 

 

*******FATAL ERROR*******

PROGRAM : (/uproject1/ora/uproject/fs1/EBSapps/appl/ad/12.0.0/patch/115/bin/txkADOPPreparePhaseSynchronize.pl)

TIME    : Fri April 15 13:53:08 2022

FUNCTION: main::removeDirectory [ Level 1 ]

ERRORMSG: Failed to delete the directory /uproject1/ora/uproject/fs2/EBSapps/comn.

"txkADOPPreparePhaseSynchronize.log" 190L, 5846C  

 

[uproject@project bin]$

[uproject@project bin]$ echo $CONTEXT_FILE

/uproject1/ora/uproject/fs1/inst/apps/ccproject_project/appl/admin/ccproject_project.xml

[uproject@project bin]$

 

................................................................................................................................

................................................................................................................................

 

####CAUSE

Fs_clone is unable to delete directory due to Patch file system (FS2 in tis case) *comn* directory being in use.

 

................................................................................................................................

................................................................................................................................

[uproject@project TXK_SYNC_create]$ lsof | grep fs2

lsof: WARNING: can't stat() cifs file system /winshare/cotfin

      Output information may be incomplete.

java       6111       uproject  txt       REG               0,52      7710 4269120606 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/bin/java (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    255773 4268870522 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/i386/libsunec.so (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52  63439194 4266306476 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/rt.jar (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    110222 4268870521 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/i386/libnet.so (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    283852 4269013831 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/ext/sunjce_provider.jar (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    247427 4269013832 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/ext/sunpkcs11.jar (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    118834 4268946548 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/.nfs00000000fe72f474000135ac (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    661748 4268946551 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/.nfs00000000fe72f477000135ad (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52     82198 4266103557 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/i386/libnio.so (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    111314 4266103563 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/i386/libzip.so (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52     35388 4269013834 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/ext/sunec.jar (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52    186081 4266749473 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/i386/.nfs00000000fe516e21000135ae (192.168.50.200:/project_app02)

java       6111       uproject  mem       REG               0,52  11758682 4269276099 /uproject1/ora/uproject/fs2/EBSapps/comn/util/jdk32/jre/lib/i386/server/.nfs00000000fe77fbc3000135af (192.168.50.200:/project_app02)

................................................................................................................................

................................................................................................................................

 

 

#### SOLUTION

Killed the process that has the directory locked.

 

................................................................................................................................

................................................................................................................................

[uproject@project TXK_SYNC_create]$

[uproject@project TXK_SYNC_create]$ ps -aef | grep 6111

uproject  6111     1  0 Apr27 ?        00:43:39 java -jar bin/zEnterpriseConnector.jar -s

 

kill -9 6111

 

[uproject@project bin]$

[uproject@project bin]$ lsof | grep fs2 | wc -l

lsof: WARNING: can't stat() cifs file system /winshare/cotfin

      Output information may be incomplete.

0

[uproject@project bin]$

................................................................................................................................

................................................................................................................................

 

I then restarted adop by running fs_clone with the force=yes option

 

................................................................................................................................

................................................................................................................................

adop phase=fs_clone force=yes

................................................................................................................................

................................................................................................................................

Tuesday, January 22, 2013

Applying 11gR2 database patch


Apply the latest CPU patches for 11gR2 (11.2.0.2) using opatch

Steps:
1: Install the latest OPATCH
2: Apply the DB patches
 
Step #1
Check current version of opatch
$ opatch lsinv | grep -i version
Oracle Interim Patch Installer version 11.2.0.3.0
OPatch version    : 11.2.0.3.0
OUI version       : 11.2.0.2.0

Delete the OPatch directory from $ORACLE_HOME

$ cd $ORACLE_HOME
$ pwd
/u01/oracle/maria/db/11.2.0
$ rm -rf OPatch


Download the latest Opatch, and unzip it in $ORACLE_HOME

$ cp /staging/11gR2/opatch/p6880880_112000_HPUX-IA64.zip .
$ unzip p6880880_112000_HPUX-IA64.zip
 

Change to the new OPatch directory and run emocmrsp to create a response file that opatch will use

$ cd OPatch
$ cd ocm/bin
$ pwd
/u01/oracle/maria/db/11.2.0/OPatch/ocm/bin
$ ./emocmrsp

……..
The OCM configuration response file (ocm.rsp) was successfully created.
 

Verify the new version of opatch

$ opatch lsinv | grep -i version
Oracle Interim Patch Installer version 11.2.0.3.3
OPatch version    : 11.2.0.3.3
OUI version       : 11.2.0.2.0

 
Cleanup by deleting the no longer needed zip file:

$ rm -rf p6880880_112000_HPUX-IA64.zip

Step #2
Stop the Database

SQL> shutdown immediate
 

Stop the listener

$ lsnrctl stop $ORACLE_SID
LSNRCTL for HPUX: Version 11.2.0.2.0 - Production on 22-JAN-2013 14:42:27
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCmaria))
The command completed successfully
 

Apply the patch
- Copy the patch to an appropriate directory, unzip the file, change to the patch directory and run opatch
 

$ cd patch/
$ cp /staging/11gR2/patchsets/11.2.0.2/oneoffs/p14727315_112020_HPUX-IA64.zip .
$ unzip p14727315_112020_HPUX-IA64.zip
$ cd 14727315
$ opatch apply -silent -ocmrf $ORACLE_HOME/OPatch/ocm/bin/ocm.rsp
Oracle Interim Patch Installer version 11.2.0.3.3
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/oracle/maria/db/11.2.0
Central Inventory : /var/opt/oracle
   from           : /u01/oracle/maria/db/11.2.0/oraInst.loc
OPatch version    : 11.2.0.3.3
OUI version       : 11.2.0.2.0
Log file location : /u01/oracle/maria/db/11.2.0/cfgtoollogs/opatch/opatch2013-01-22_14-22-37PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   14275621  14727315
Do you want to proceed? [y|n]
Y (auto-answered by -silent)
User Responded with: Y
All checks passed.
…....
Verifying the update...
Composite patch 14727315 successfully applied.
Log file location: /u01/oracle/maria/db/11.2.0/cfgtoollogs/opatch/opatch2013-01-22_14-22-37PM_1.log
OPatch succeeded.


Verify patch was applied

$ opatch lsinv | grep 14727315
Patch  14727315     : applied on Tue Jan 22 14:25:47 EST 2013
Patch description:  "Database Patch Set Update : 11.2.0.2.9 (14727315)"
     10238786, 10132870, 10247152, 9953542, 14727315, 9572787, 15896434

 
Start the database and the listener

SQL> startup mount

ORACLE instance started.
….
 
$ lsnrctl start $ORACLE_SID

 Cleanup by deleting the zip file which is no longer needed.

Monday, January 21, 2013

Oracle Data Pump Export Utility


Oracle Data Pump replaced the older ‘exp’ and ‘imp’ utilities.

Create Data Pump Directory in the source DB host specifying the OS directory where the export will unload the data into a .dmp file

You can skip this step, and use an existing Directory.

SQL> CREATE DIRECTORY schema_refresh AS '/staging/tmpdir/dwdb';
Directory created.

SQL> SELECT directory_name, directory_path from all_directories;


SCHEMA_REFRESH
/staging/tmpdir/dwdb


I prefer to use a parameter file with expdp.
Create a parameter file to use with expdp; there a number of options to chose from, below basic options:

$ touch schema_refresh.par
$ vi  schema_refresh.par
" schema_refresh.par" [New file]
DUMPFILE= schema_refresh.dmp
DIRECTORY= SCHEMA_REFRESH
SCHEMAS=whse
EXCLUDE=TABLE:"IN ('USAGE_CONCURRENT_REQUESTS')"

 Run expdp command using the parameter file created in the step above. Preferably, and as per Oracle, do not run it ‘AS SYSDBA’.


$ expdp parfile= schema_refresh.par
…..
Export: Release 11.2.0.3.0 - Production on Mon Jan 21 15:31:13 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Username: whse
Password: *****
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
…….
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
….

While expdp is running, CTRL+C will allow one to make a number of changes to the job, such as:

Export> STATUS                {To check status of the job}
Export> KILL_JOB             {To kill the job}
Export> PARALLEL=16    {Assign number of workers to the job}
Export> EXIT_CLIENT      {Exit the client but job continues to run}


From another session, one can attach to a running expdp job:
$ expdp ATTACH=SYS_EXPORT_SCHEMA_01
….
Export: Release 11.2.0.3.0 - Production on Mon Jan 21 16:09:05 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Username: whse
Password: *****
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Job: SYS_EXPORT_SCHEMA_01