Wednesday, October 30, 2013

Diskgroup is not compatible for database usage



At the time of database creation using dbca on X3 Exadata Box, found this compatibility mismatch issue.

Diskgroup "+DATA_DR" is not compatible for database usage. Database compatible attribute of diskgroup should be the same or lower than the database compatible initialization parameter value.Database compatible parameter is set to "11.2.0.0.0"and the diskgroup database compatibility attribute is set to "11.2.0.2".  


The error was easy to understand as compatible parameter set in the database initialization parameter was lower than the compatible rdbms set for the diskgroup in ASM. The db compatible parameter was set to 11.2.0.0.0 whereas for the diskgroup compatible rdbms was set to 11.2.0.2.0.

DBCA (choose General Purpose) doesn’t provide any screen wherein we can change the parameter value. But as we want to create the database using dbca, we need to change the parameter value in the template stored in ORACLE_HOME/assistants/dbca/templates

[oracle@xxxxx ~]$ cd {ORACLE_HOME}/assistants/dbca/templates
[oracle@xxxxx templates]$ vi General_Purpose.dbc 

         <initParam name="audit_file_dest" value="{ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump"/>
         <initParam name="compatible" value="11.2.0.2.0"/>

         <initParam name="remote_login_passwordfile" value="EXCLUSIVE"/>

Edit above compatible parameter to 11.2.0.2.0 and save the file and start creating database using dbca, you won't be faced this issue again.

Thank you,
Manish Nashikkar


You (oracle) are not allowed to use this program (crontab)

Problem:
$ crontab -e
You (oracle) are not allowed to use this program (crontab)
See crontab(1) for more information
Solution:
cd /usr/lib/cron or /etc directory
## or find where cron.allow and cron.deny are:
## find / -name "cron.allow"
## find / -name "cron.deny"
Either remove your user in
cron.deny
and add your username in
cron.allow
If files do not exist, we can create them.

Thursday, October 24, 2013

Some issues faced during upgrade to R12 (12.1.3) from 12.1.x and their Solutions



2  Run       AutoPatch R120     mth_pre_upgrade.sql         FAILED

"adwork002.log" 234201L, 8356714C

sqlplus -s MTH/***** @/u01/app/oracle/EBS/apps/apps_st/appl/mth/12.0.0/patch/115/sql/mth_pre_upgrade.sql
Connected.
DECLARE
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
ORA-06512: at line 59

Time when worker failed: Mon Apr 09 2012 00:28:06
"adwork002.log" 234201L, 8356714C               


Cause:  You're trying to create the same table (MTH_RESOURCES_D_TEMP) over and over again in your loop.
It will succeed the first time (provided the table does not yet exist), but will fail after that.

Solution:

SQL> conn mth/mth
Connected.
SQL> rename MTH_RESOURCES_D_TEMP to MTH_RESOURCES_D_TEMP_OLD;

Table renamed.

SQL> exit


Restart respective 2nd worker.

=========================================================================

ATTENTION: All workers either have failed or are waiting:

           FAILED: file POXOTCPO.sql on worker  1.
           FAILED: file arhzbobj.sql on worker  2.

        Control
Worker  Code      Context            Filename                    Status
------  --------  -----------------  --------------------------  --------------
     1  Run       AutoPatch R120     POXOTCPO.sql                FAILED
     2  Run       AutoPatch R120     arhzbobj.sql                FAILED


sqlplus -s APPS/***** @/u01/app/oracle/EBS/apps/apps_st/appl/po/12.0.0/patch/115/sql/POXOTCPO.sql
Connected.

Type body created.

O/S Message: Invalid argument


sqlplus -s APPS/***** @/u01/app/oracle/EBS/apps/apps_st/appl/ar/12.0.0/patch/115/sql/arhzbobj.sql
Connected.
drop type hz_person_cust_v2_bo_tbl
*


SQL> select OWNER,OBJECT_NAME,STATUS,OBJECT_TYPE from dba_objects where object_name like '%PO%_TYPE' and status='INVALID';

OWNER                          OBJECT_NAME                                                  STATUS  OBJECT_TYPE
------------------------------ ------------------------------------------------------------ ------- -------------------
APPS                           PO_EVENT_PARAMS_TYPE                                         INVALID TYPE BODY
APPS                           PO_VALIDATION_RESULTS_TYPE                                   INVALID TYPE BODY
APPS                           PO_AP_DIST_REC_TYPE                                          INVALID TYPE BODY
APPS                           PO_AP_LINE_LOC_REC_TYPE                                      INVALID TYPE BODY
APPS                           PO_DISTRIBUTIONS_REC_TYPE                                    INVALID TYPE BODY


===============================================================================================


ATTENTION: All workers either have failed or are waiting:

           FAILED: file xlajelns.pkh on worker  1.
           FAILED: file csdvints.pls on worker  6.

ATTENTION: Please fix the above failed worker(s) so the manager can continue.

[applmgr@ebs2 log]$ vi adwork001.log

sqlplus -s APPS/***** @/u01/app/oracle/EBS/apps/apps_st/appl/admin/EBS/out/p001invok.sql
Connected.
O/S Message: Invalid argument

[applmgr@ebs2 log]$ vi adwork006.log

sqlplus -s APPS/***** @/u01/app/oracle/EBS/apps/apps_st/appl/csd/12.0.0/patch/115/sql/csdvints.pls
Connected.
O/S Message: Invalid argument


Running Script Apreconb.pls Fails With Error 'O/S Message: Invalid argument' On OCFS2 File System (Doc ID 1264418.1)


I had entry of /dev/sdb1 like,

/dev/sdb1 /u01 ocfs2 rw,_netdev,datavolume,nointr  

My /etc/fstab entry look like after modification,

[root@ebs1 ~]# cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
/dev/sdb1               /u01                    ocfs2   rw,_netdev,nointr     0 0
172.18.0.195:/software  /software               nfs     defaults        0 0



restarted patch, after which patch application was successful.
=====================================================================================

At the time of Upgrade from R12.1.1 to R12.1.3, while applying main patch 9239090


[applmgr@db1 log]$ tail u9239090.log

Relinking executables...


[applmgr@db1 log]$ tail -f adrelink.log

make: *** [/u01/app/oracle/EBS/apps/apps_st/appl/fem/12.0.0/bin/FEMCCE] Error
1
Done with link of fem executable 'FEMCCE' on Sun Apr 15 05:26:30 IST 2012

Relink of module "FEMCCE" failed.
See error messages above (also recorded in log file) for possible
reasons for the failure.  Also, please check that the Unix userid
running adrelink has read, write, and execute permissions
on the directory /u01/app/oracle/EBS/apps/apps_st/appl/fem/12.0.0/bin,
and that there is sufficient space remaining on the disk partition
containing your Oracle Applications installation.

Done with link of product 'fem' on Sun Apr 15 05:26:30 IST 2012

.
.
.
.
.
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/adshell.pl to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/adshell.pl
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/aducsifm.pm to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/aducsifm.pm
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/aducssp.pl to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/aducssp.pl
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/adutils.pl to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/adutils.pl
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/adpchnew to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/adpatchnew
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/adadminnew to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/adadminnew
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/adwrknew to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/adworker
copying /u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bin/adctrlnew to
/u01/app/oracle/EBS/apps/apps_st/appl/ad/12.0.0/bintmp/adctrlnew

Swapping bintmp and binstage.
Stage preparation complete.

adrelink is exiting with status 1

End of adrelink session
Date/time is  Sun Apr 15 05:27:47 IST 2012
**********************************************************

Solution:

1.  To fix this problem, users are required to replace the following line under the Linux section of the $AD_TOP/bin/adrelinknew.sh:

CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh'

with

CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh -Wl,--noinhibit-exec'

2. After making this change, users are then required to run the adadmin utility and relink application executables.

Output after relinking FEM_TOP with adadmin utility
**********************************************************

Done with link of fem executable 'FEMCCE' on Sun Apr 15 06:42:27 IST 2012

Done relinking module FEMCCE in product fem
Done with link of product 'fem' on Sun Apr 15 06:42:27 IST 2012


adrelink is exiting with status 0

End of adrelink session
Date/time is  Sun Apr 15 06:42:27 IST 2012
**********************************************************

Continue patch where it stuck on "An error occurred while relinking application programs.

Continue as if it were successful [No] : Yes

Continue with patch application...



Thank you,
Manish Nashikkar

Friday, October 18, 2013

How to apply a patch in between a patch( Interim patch) in apps 11i/R12 or How to restart a failed adpatch in 11i/R12

adpatch reads the .drv(driver) file in the patch and does the actions accordingly.It creates two Internal tables in APPLSYS account called AD_DEFERRED_JOBS and FND_INSTALL_PROCESSES for controlling adworkers, the workers statuses are controlled in these tables.

Also the Actions of the adpatch are stored in .rf9 file format in $APPL_TOP/admin/$TWO_TASK/restart directory..

when ever an adpatch is restarted from a failed session,it looks in to this folder to do
the restart work from where it has failed!.

Coming to the Actual procedure how to apply an interim ad patch do the following procedures.

1. Login adctrl and choose the option (tell the manager that a worker failed its job) — to stop
the existing patching…

2.login to APPLSYS and create backup of the two tables AD_DEFERRED_JOBS & FND_INSTALL_PROCESSES

3. take a backup of the restart folder(or directory) under $APPL_TOP/admin/$TWO_TASK/

4.Apply the Interim(Intermediate ) patch successfully ,when asked for to continue
with failed session in adpatch say No and to the next question choose Yes
(so that you will erase the failed session and start a fresh patching).

5.After finishing the Intermediate patch , restore the tables AD_DEFERRED_JOBS and
FND_INSTALL_PROCESS and the restart directory under $APPL_TOP/admin/$TWO_TASK.

6.login to adctrl and instruct the manager to restart the jobs.

7.Return to the original patch directory and invoke adpatch and now it will
ask “whether to continue with failed session”.

You have to give “Yes” and proceed with the original or existing patching…


Thanks,
Manish