Wednesday 6 January 2021

Can't locate DBI.pm in @INC BEGIN failed--compilation aborted at /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/bin/txkSetADOPPatchSrvName.pl line 39

 

This document describes how to fix "Can't locate DBI.pm in @INC" issue while running autoconfig as part of appstuil synchronization.


Issue: Got below error while running autoconfig in DB node as part of appsutil sync process. 


Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5/5.10.0 /usr/lib64/perl5 /usr/share/perl5 . /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/perl /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/bin/txkSetADOPPatchSrvName.pl line 39.

BEGIN failed--compilation aborted at /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/bin/txkSetADOPPatchSrvName.pl line 39.


Solution: 

Issue is adper5lib location is wrong in context file.

1. Take backup of database context file.

2. Make below entry for PERL5LIB in context file.

<PERL5LIB oa_var="s_perl5lib" osd="unix">/u01/app/oraerptst/product/12.1.0.2/dbhome_1/perl/lib/5.14.1:/u01/app/oraerptst/product/12.1.0.2/dbhome_1/perl/lib/site_perl/5.14.1:/u01/app/oraerptst/product/12.1.0.2/dbhome_1/perl/lib/5.14.1/CGI:/u01/app/oraerptst/product/12.1.0.2/dbhome_1/appsutil/perl</PERL5LIB>

3. Export the path variable and confirm perl executable is present in the path as  $ORACLE_HOME/perl/bin. Verify the same by executing $echo $PATH

4. Run autoconfig now. It should complete.

 


Thanks for going through the post.......

ERROR: Invalid java version found: /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/jre/bin/java: cannot execute binary file


This post describes how to resolve  error "ERROR: Invalid java version found:" while creating DB node context file in R12.X


Let us assume we have restored and recovered database as part of cloning in new build. We want to generate context file. 

 

Issue: Getting below error while generating DB context file using adbldxml.pl. 

[oratest@apps bin]$ perl adbldxml.pl appsuser=apps appspass=xxxxxxx

Starting context file generation for db tier..

ERROR: Invalid java version found: /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/jre/bin/java: /u01/app/oratest/product/12.1.0.2/dbhome_1/appsutil/jre/bin/java: cannot execute binary file


Solution:

[oratest@apps bin]$ which java                             
/usr/bin/java 

Note: If the environment is new build and could not find java, then get java installed in the server and follow next steps.

[oratest@apps bin]$ ls -ltr /usr/bin/java
lrwxrwxrwx 1 root root 22 May 27  2019 /usr/bin/java -> /etc/alternatives/java

[oratest@apps bin]$ ls -ltr /etc/alternatives/java
lrwxrwxrwx 1 root root 41 May 27  2019 /etc/alternatives/java -> /usr/java/jdk1.8.0_191-amd64/jre/bin/java
[oratest@apps bin]$

Use below command to fix the issue.

[oratest@apps bin]$ perl adbldxml.pl appsuser=apps appspass=xxxxxxxx jtop=/usr/java/jdk1.8.0_191-amd64/jre


This action plan fixes the issue.



Thanks for going through the post...............

Tuesday 5 January 2021

How to stop export/import job in oracle

 This article explains how to stop export(expdp) or import(impdp) job in oracle database.


Let us assume that, we have an export job running in database. For some reason we have to cancel the running export job. Follow below steps to stop export/import job. 

Step 1. Find the job name which is running in the database using below query.

select JOB_NAME,state from dba_datapump_jobs;


20:45:45 SQL> select JOB_NAME,state from dba_datapump_jobs;

JOB_NAME                            STATE

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

SYS_EXPORT_SCHEMA_01 EXECUTING


20:45:46 SQL> 



Step 2: Attach export job using below command.

[oracle@server1 EXPDP_DATA]$ expdp \"/ as sysdba\" attach=SYS_EXPORT_SCHEMA_01




Step 3: We can check the status of export using status command.


Step 4: Use KILL_JOB command to stop export/import process.



Step 5: We can able to see now the export job has been killed.





Thanks for going through this post............