Search This Blog

Tuesday, October 21, 2014

ORA-00955: name is already used by an existing object & ORA-06512: at "SYS.UTL_RECOMP", line 662

Issue:

When I ran utlrp.sql to compile the INVALID objects in database, I see it error out due to

DOC>#
DECLARE
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
ORA-06512: at "SYS.UTL_RECOMP", line 662
ORA-06512: at line 4

Cause:

Looks like known bug#9881143 in Oracle Database - Enterprise Edition - Version 10.2.0.1 to 10.2.0.5 [Release 10.2] where an index is left from a previous failed execution of utl_recomp.

SQL> /

OWNER                          SEGMENT_NAME                                  SEGMENT_TYPE
------------------------------ --------------------------------------------- ------------------
SYS                            UTL_RECOMP_COMP_IDX1                          INDEX


Solution: Drop the index utl_recomp_comp_idx1 left by utl_recomp and then rerun the package.



SQL> drop index UTL_RECOMP_COMP_IDX1;

Index dropped.


Compile script completed successfully:
SQL> @?/rdbms/admin/utlrp.sql

TIMESTAMP
----------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2014-10-21 11:14:12

ERRORS DURING RECOMPILATION
---------------------------
                          0

PL/SQL procedure successfully completed.

Reference: Ora-955 Error Running Utl_Recomp.Recomp_Serial (Doc ID 1274504.1)

Friday, September 12, 2014

APP-FND-01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-06508: PL/SQL: could not find program unit being called



This issue has been observed under the following circumstances:

CUSTOM.plx file are of different date than the conversion date (last compilation date), the likeky reason for this is that CUSTOM.pll has not been properly compiled.
For example:
-rwxr-xr-x    1 oradev   dba           24576 Aug 24 2009  CUSTOM.pll
-rwxr-xr-x    1 oradev   dba           20480 Mar 31 12:36 CUSTOM.plx




To implement the solution, please do the following:
1. Take a backup of both files CUSTOM.PLL and CUSTOM.PLX
2. Get a working copy of the custom.pll file.
3. Compile the custom.pll using f60gen under the environment which creates the file custom.plx, where the last access date shows the current date.
f60gen \
module=$AU_TOP/resource/CUSTOM.pll \
userid=APPS/xxx \
output_file=$AU_TOP/resource/CUSTOM.plx \
module_type=library batch=yes compile_all=special
4. The $FORMS60_PATH needs to be in sync with the value set for the s_f60path variable in the Context.xml file.
i.e  >/oracle/apps/test10appl/au/11.5.0/resource:/oracle/apps/test10appl/au/11.5.0/resource/stub</FORMS60_PATH>

5. Run Autoconfig to instantiate the changes.

Ref:11i: "APP-FND-01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception" Error When Attempting to Launch Forms (Doc ID 1080160.1)

Wednesday, July 16, 2014

afadmprf.sh and afcpctx.sh failed during autoconfig

Error:

[AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution.  Errors are grouped by directory and phase.
The report format is:
      <filename>  <phase>  <return code where appropriate>

  [PROFILE PHASE]
  AutoConfig could not successfully execute the following scripts:
    Directory: /data02/erpval/oracle/valcomn/admin/install/VAL_s603914se2sl196
      afadmprf.sh             INSTE8_PRF         1
      afcpctx.sh              INSTE8_PRF         1


AutoConfig is exiting with status 2

Solution: followed below steps 
1. removed the log files from $APPLCSF
[applval@S603914SE2SL196 log]$ find . -type f -mtime +7 -exec rm -rf {} \;
2. cd $APPL_TOP

3. Source the APPSORA.env file.

4. Run relink as follows:
adrelink.sh force=y ranlib=y "AD all"

4a. Then run the following:
adrelink.sh force=y ranlib=y "fnd FNDCPUCF"

5. Run adadmin

6. Select option 2 "Maintain Applications Files Menu".

7. Select option 2 "Relink Applications Programs".

8. Relink all modules' programs.

9.then re-run the autoconfig and update the status
Reference: Autoconfig Failing On Concurrent Node At Afadmprf.sh & Afcpctx.sh INSTE8_PRF 1 (Doc ID 1634846.1)
After Appling 11i.ATG_PF.H.Delta.7 Error On afadmprf.sh & afcpctx.sh (Doc ID 943614.1)

Concurrent services not coming up after services restart/server reboot

Concurrent services not coming up after services restart/server reboot

Error in ICM log file:
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:05
Starting STANDARD Concurrent Manager               : 16-JUL-2014 13:27:05
Service Manager FNDSM_S603914SE2SL196_VAL could not initialize. The Service Manager has been unable to verify its environment and create its log file.
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:06
Starting STANDARD Concurrent Manager               : 16-JUL-2014 13:27:06
Service Manager FNDSM_S603914SE2SL196_VAL could not initialize. The Service Manager has been unable to verify its environment and create its log file.
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:06
Starting STANDARD Concurrent Manager               : 16-JUL-2014 13:27:06
Service Manager FNDSM_S603914SE2SL196_VAL could not initialize. The Service Manager has been unable to verify its environment and create its log file.
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /data02/erpval/oracle/valappl/fnd/11.5.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system admin : 16-JUL-2014 13:27:06

Solution: followed the below steps as part of resolutions.

1.ran cmclean.sql
2.exec FND_CONC_CLONE.SETUP_CLEAN;
3. execute autoconfig on db nodes
4. execute autoconfig on apps nodes
5. started the services
 


 

Sunday, May 11, 2014

Steps for configuring OCM



[orauser@erp1 ~]$ grep -i jdk $CONTEXT_FILE
         <JDK_TOP oa_var="s_jdktop">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre</JDK_TOP>
         <JRE_TOP oa_var="s_jretop">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre</JRE_TOP>
         <ADJVAPRG oa_var="s_adjvaprg" osd="UNIX">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre/bin/java</ADJVAPRG>
         <JAVA_HOME oa_var="s_db_java">/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre</JAVA_HOME>
[orauser@erp1 ~]$ export JAVA_HOME=/data/d02/orauser/usertest/db/tech_st/11.2.0/jdk/jre
[orauser@erp1 ~]$ cd $ORACLE_HOME/ccr/bin




[orauser@erp1 bin]$ ./setupCCR -s 123456 xyz.abc@doman.com

** Installing base package **
Deploying core - Version 10.3.4.0.0

** Registering installation with Oracle Configuration Manager server(s) **
Deploying engines - Version 10.2.7.1.0
Deploying metricdata - Version 10.2.4.0.3
Deploying scripts - Version 10.3.4.0.0

** Getting package updates from ContentServer **
Deploying core - Version 12.0.0.0.1
Deploying engines - Version 12.0.0.0.0
Deploying metricdata - Version 12.0.0.0.0
Deploying ocmcert - Version 12.0.0.0.1
Deploying scripts - Version 12.0.0.0.1

** Starting the Oracle Configuration Manager Scheduler **
Oracle Configuration Manager - Release: 12.0.0.0.1 - Production
Copyright (c) 2005, 2013, Oracle and/or its affiliates.  All rights reserved.
------------------------------------------------------------------
Starting Oracle Configuration Manager...
Waiting for status from Oracle Configuration Manager....
Start Date               10-May-2014 23:51:27
Last Collection Time     -
Next Collection Time     11-May-2014 23:49:00
Collection Frequency     Daily at 23:49
Collection Status        scheduled collection running
Log Directory            /data/d02/orauser/usertest/db/tech_st/11.2.0/ccr/hosts/erp1.com/log
Registered At            10-May-2014 23:49:25
Automatic Update         On
Collector Mode           Connected

Oracle Configuration Manager successfully started.

Oracle Configuration Manager has been configured in connected 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.
[orauser@erp1 bin]$

 Steps to drop OCM:

[orauser@erp1 bin]$ ./emCCR stop
Oracle Configuration Manager - Release: 12.0.0.0.1 - Production
Copyright (c) 2005, 2013, Oracle and/or its affiliates.  All rights reserved.
------------------------------------------------------------------
Oracle Configuration Manager Stopped...
[orauser@erp1 bin]$


[orauser@erp1 scripts]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Sun May 11 00:00:29 2014

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


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

SQL> @dropocm.sql
SQL> SET serveroutput on
SQL> set verify off
SQL>
SQL> -- handle 11+ databases (ACLs)
SQL> @@dropocm11plus
SQL> Rem
SQL> Rem dropocm11plus.sql
SQL> Rem
SQL> Rem Copyright (c) 2011, 2013, Oracle and/or its affiliates.
SQL> Rem All rights reserved.
SQL> Rem
SQL> Rem    NAME
SQL> Rem         dropocm11plus.sql - <one-line expansion of the name>
SQL> Rem
SQL> Rem    DESCRIPTION
SQL> Rem         <short description of component this file declares/defines>
SQL> Rem
SQL> Rem    NOTES
SQL> Rem         <other useful comments, qualifications, etc.>
SQL> Rem
SQL> Rem    MODIFIED   (MM/DD/YY)
SQL> Rem    imunusam    09/16/13 - To fix bug 17461614
SQL> Rem    jsutton     09/03/13 - make more tolerant of no xmldb
SQL> Rem    jsutton     09/16/11 - put 11+ operations in separate file
SQL> Rem    jsutton     09/16/11 - Created
SQL> Rem
SQL>
SQL>
SQL> SET serveroutput on
SQL> set verify off
SQL>
SQL> DECLARE
  2    l_instvers       VARCHAR2(100);
  3    l_comp_cnt       NUMBER;
  4    l_regexp_match   NUMBER;
  5    TYPE p_acl_ids_type  IS TABLE OF VARCHAR2(4000);
  6    TYPE p_acl_priv_type IS TABLE OF NUMBER;
  7    l_acl_ids        p_acl_ids_type;
  8    l_acl_privs      p_acl_priv_type;
  9    l_acl_cnt        NUMBER;
 10
 11  BEGIN
 12    -- Drop the Network ACL if the ACL was created.
 13    select LPAD(version,10,'0') into l_instvers from v$instance;
 14    IF l_instvers >= '11.0.0.0.0' THEN
 15      -- check for XML DB installed
 16      EXECUTE IMMEDIATE
 17      'select count(*) from dba_registry where COMP_NAME = ''Oracle XML Database'' and STATUS = ''VALID''' into l_comp_cnt;
 18      -- XML DB installed, proceed
 19      IF l_comp_cnt > 0 THEN
 20        -- drop the entire ACL if it is the one we created
 21        EXECUTE IMMEDIATE
 22        'select count(*) from dba_network_acls where regexp_like(acl,''.oracle-sysman-ocm-Resolve-Access.xml$'')' into l_regexp_match;
 23        IF (l_regexp_match > 0) THEN
 24          EXECUTE IMMEDIATE
 25          'BEGIN ' ||
 26          '  DBMS_NETWORK_ACL_ADMIN.DROP_ACL(''oracle-sysman-ocm-Resolve-Access.xml''); ' ||
 27          '  COMMIT;' ||
 28          'END;';
 29        END IF;
 30        -- check for resolve privilege for OCM user
 31        -- get all ACLIDs and determine whether ORACLE_OCM has resolve privilege through each
 32        BEGIN
 33          EXECUTE IMMEDIATE
 34          'SELECT acl, DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE_ACLID(aclid, ''ORACLE_OCM'', ''resolve'') acl_priv ' ||
 35          '  FROM dba_network_acls' BULK COLLECT INTO l_acl_ids, l_acl_privs;
 36          EXCEPTION
 37            WHEN OTHERS THEN NULL;
 38        END;
 39        -- walk the collection
 40        FOR i IN 1..l_acl_ids.count LOOP
 41          BEGIN
 42            IF (l_acl_privs(i) IS NOT NULL AND l_acl_privs(i) > 0) THEN
 43              -- remove resolve privilege
 44              EXECUTE IMMEDIATE
 45              'BEGIN ' ||
 46              '  DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE(acl => ' || l_acl_ids(i) || ',principal => ''ORACLE_OCM'');' ||
 47              '  COMMIT;' ||
 48              'END;' ;
 49            END IF;
 50            EXCEPTION
 51              WHEN OTHERS THEN NULL;
 52          END;
 53        END LOOP;
 54      END IF;
 55    END IF;
 56  END;
 57  /

PL/SQL procedure successfully completed.

SQL>
SQL> DECLARE
  2    l_user_dropped   BOOLEAN;
  3
  4   /*
  5    * Procedure to drop user.
  6    * If p_throw_exp is TRUE, throw exception if user cannot be dropped.
  7    */
  8    PROCEDURE drop_user
  9       (p_user IN VARCHAR2, p_dir_name IN VARCHAR2, p_dir_name2 IN VARCHAR2,
 10        p_throw_user_drop_exp BOOLEAN := FALSE,o_user_dropped OUT BOOLEAN)
 11    IS
 12      l_ll_user_exists       NUMBER;
 13      l_ll_pkg_exists       NUMBER;
 14      l_vers            v$instance.version%TYPE;
 15      l_compat_vers     v$parameter.value%TYPE;
 16      l_dirobj_cnt   NUMBER;
 17    BEGIN
 18      BEGIN
 19        select count(*) into l_ll_user_exists from dba_users where username = p_user;
 20        o_user_dropped := FALSE;
 21        IF l_ll_user_exists = 1 THEN
 22          SELECT count(*) into l_ll_pkg_exists FROM sys.user$ u, sys.obj$ o WHERE u.name = p_user AND o.name ='MGMT_DB_LL_METRICS' AND o.owner# = u.user# AND o.type# = 9 AND o.status LIKE '%' ;
 23          IF l_ll_pkg_exists = 1 THEN
 24            execute immediate 'drop user '|| p_user ||' cascade';
 25            o_user_dropped := TRUE;
 26          ELSIF p_throw_user_drop_exp  THEN
 27            RAISE_APPLICATION_ERROR(-20030,'Could not drop the OCM user ''' || p_user || '''. It does not contain OCM schema. Please drop this user to proceed.');
 28          END IF;
 29        END IF;
 30      EXCEPTION
 31        WHEN OTHERS THEN
 32          IF  p_throw_user_drop_exp  THEN
 33            raise_application_error(-20006,SQLERRM);
 34          ELSE
 35             NULL;
 36          END IF;
 37      END;
 38      select substr(version,1,5) into l_vers from v$instance;
 39      begin
 40        select substr(value,1,5) into l_compat_vers from v$parameter where lower(name) = 'compatible';
 41        exception
 42          WHEN NO_DATA_FOUND THEN
 43            l_compat_vers := l_vers;
 44      end;
 45      IF l_vers != '9.0.1' AND l_vers != '8.1.7' AND l_compat_vers != '8.1.7' THEN
 46        select count(*) into l_dirobj_cnt from  dba_directories where DIRECTORY_NAME = p_dir_name ;
 47        IF l_dirobj_cnt = 1 THEN
 48          execute immediate 'DROP DIRECTORY ' || p_dir_name;
 49        END IF;
 50        IF p_dir_name2 IS NOT NULL THEN
 51          select count(*) into l_dirobj_cnt from  dba_directories where DIRECTORY_NAME = p_dir_name2 ;
 52          IF l_dirobj_cnt = 1 THEN
 53            execute immediate 'DROP DIRECTORY ' || p_dir_name2;
 54          END IF;
 55        END IF;
 56      END IF;
 57    END drop_user;
 58
 59  BEGIN
 60     -- Drop previous OCM user
 61     -- discard the return value
 62     drop_user('CCR','CCR_CONFIG_DIR',NULL,FALSE,l_user_dropped);
 63
 64     -- Drop current OCM user
 65     drop_user('ORACLE_OCM','ORACLE_OCM_CONFIG_DIR','ORACLE_OCM_CONFIG_DIR2',TRUE,l_user_dropped);
 66     if( l_user_dropped ) THEN
 67       DBMS_OUTPUT.PUT_LINE('Dropped previous OCM schema successfully.');
 68     ELSE
 69       DBMS_OUTPUT.PUT_LINE('No previous OCM schema to drop.');
 70     END IF;
 71  END;
 72  /
Dropped previous OCM schema successfully.

PL/SQL procedure successfully completed.

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Ref:
OCM ( Oracle Configuration Manager ) and My Oracle Support : FAQ and Troubleshooting (Doc ID 369619.1)
Upgrading Oracle Configuration Manager (OCM) within E-Business Suite Release 12.0 (Doc ID 727157.1)

Tuesday, May 6, 2014

ORA-00245: control file backup operation failed , RMAN-03009

Error:
RMAN-03009: failure of backup command on disk4 channel at 05/06/2014 13:35:20
ORA-00245: control file backup operation failed
continuing other job steps, job failed will not be re-run
channel disk3: finished piece 1 at 06-MAY-2014 13:35:21
piece handle=/RMAN/Hot/SOA/SOA_20140506/DB_20140506_0kp7jv4o_1_1 tag=FULL_20140506 comment=NONE
channel disk3: backup set complete, elapsed time: 00:00:01
channel disk1: finished piece 1 at 06-MAY-2014 13:35:55
piece handle=/RMAN/Hot/SOA/SOA_20140506/DB_20140506_0gp7jv4n_1_1 tag=FULL_20140506 comment=NONE
channel disk1: backup set complete, elapsed time: 00:00:36
channel disk2: finished piece 1 at 06-MAY-2014 13:35:55
piece handle=/RMAN/Hot/SOA/SOA_20140506/DB_20140506_0hp7jv4n_1_1 tag=FULL_20140506 comment=NONE
channel disk2: backup set complete, elapsed time: 00:00:36
released channel: disk1
released channel: disk2
released channel: disk3
released channel: disk4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 05/06/2014 13:35:55
RMAN-03009: failure of backup command on disk4 channel at 05/06/2014 13:35:20
ORA-00245: control file backup operation failed
RMAN> RMAN>
Recovery Manager complete.
2014/05/06 13:35:56 ERROR: RMAN FULL backup Failed
Symptoms:
In RAC environment any form of controlfile backup may fail with ORA-0245 if the location of the Snapshot Controlfile is not a shared location.
The backup of the controlfile actualy makes a backup of the SNAPSHOT controlfile. The Snapshot controlfile is created when the controlfile is about to be backed up.
The Snapshot controlfile is a read-consistent copy of the controlfile.
 Solution:
 This is a RAC specific 'configuration' issue and the correct configuration is as described below
It is changed behaviour which requires that the snapshot controlfile in a RAC environment, is on a shared location. 
1. Check the snapshot controlfile location:

RMAN>  show snapshot controlfile name;
RMAN configuration parameters for database with db_unique_name SOAPROD are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/d06/soa/product/product/11.2.0/dbs/snapcf_SOA1.f'; # default

2. Configure the snapshot controlfile to a shared disk:
RMAN> RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/RMAN/Hot/SOA/snapcf_SOA1.f';
Or in case of ASM use
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+<DiskGroup>/snapcf_<DBNAME>.f';

Ref: ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared location (Doc ID 1472171.1)

Transportable tablespace refresh

  1.check tablespace for the user which need to refresh -------------------------------------------------------------------  SQL> select ...