Thursday 26 February 2015

Concurrent Managers Do Not Start

After Doing a Clone All the Concurrent Managers Do Not Start

In Oracle Application Release 11i and R12, after performing a clone when attempting to start the concurrent managers in the target instance using the command below:

sh adcmctl.sh stop apps/<Appspassword> under $COMMON_TOP/admin/scripts  - 11i
sh adcmctl.sh stop apps/<Appspassword> under $ADMIN_SCRIPTS_HOME       - R12

Errors can be found in ICM logfile :


Could not initialize the Service Manager FNDSM__. Verify that has been registered for concurrent processing.

Routine AFPEIM encountered an error while starting concurrent manager PASMGR with library /oasa/oracle/oasaappl/pa/11.5.0/bin/PALIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system administrator to  : 22-FEB-2012 18:24:41

Starting PASMGR Concurrent Manager                 : 22-FEB-2012 18:24:41

Could not initialize the Service Manager FNDSM_oatest_OASA. Verify that oasa has been registered for concurrent processing.

Routine AFPEIM encountered an error while starting concurrent manager PASMGR with library /oasa/oracle/oasaappl/pa/11.5.0/bin/PALIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your system administrator to  : 22-FEB-2012 18:24:41
                     Process monitor session ended : 22-FEB-2012 18:24:41

==========

Cause
The issued was found to have been caused by the FND_NODES table having incorrect node entries (old node from the source instance) and that no Service Manager was found for the existing node.

Solution
1. Stop all middle tier services including the concurrent managers.
2. Stop the database.
3. Start the database.
4. Connect SQLPLUS as APPS user and run the following:
EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;
=========================
NOTE:260887.1 – Steps to Clean Nonexistent Nodes or IP Addresses from FND_NODES
=========================
( Note : In the case of a clone instance, it is strongly recommended to clean the non-existing nodes )
5. Run AutoConfig on all tiers, first on the DB tier and then the APPS tiers , webtiers to repopulate the required system tables.
6. Connect to SQLPLUS as APPS user and run the following statement:
$sqlplus  apps/<Appspassword>
select CONCURRENT_QUEUE_NAME from FND_CONCURRENT_QUEUES where CONCURRENT_QUEUE_NAME like ‘FNDSM%';
If the above SQL does not returning any rows/value then please do the following:
Go to $FND_TOP/patch/115/sql
Connect SQLPLUS as APPS user and run the following script :
SQL> @afdcm037.sql;
=========================
NOTE:218893.1 – How to Create The Service Manager ‘FNDSM’ on Oracle Applications
=========================
(Note : The same “afdcm037.sql” is used for Release 12 also ).
This script will create libraries for FNDSM and create managers for preexisting nodes.
Check again that FNDSM entries now exist:
select CONCURRENT_QUEUE_NAME from FND_CONCURRENT_QUEUES where CONCURRENT_QUEUE_NAME like ‘FNDSM%';
7. Go to cd $FND_TOP/bin
$ adrelink.sh force=y “fnd FNDLIBR”
$ adrelink.sh force=y “fnd FNDSM”
$ adrelink.sh force=y “fnd FNDFS”
$ adrelink.sh force=y “fnd FNDCRM”
8. Run the CMCLEAN.SQL script from the referenced note below (don’t forget to commit).
=========================
NOTE:134007.1 – CMCLEAN.SQL – Non Destructive Script to Clean Concurrent Manager Tables
=========================
9. Start the middle tier services including your concurrent manager.
10. Retest the issue.


utlrp.sql fails with: ORA-04045: errors during recompilation/revalidation of SYS.DBMS_REGISTRY_SYS

Issue :   utlrp.sql thrown the below errors

cd $ORACLE_HOME/rdbms/admin

sqlplus '/as sysdba'

SQL:/>  @utlrp.sql

PL/SQL procedure successfully completed.
DROP function local_enquote_name
*
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of SYSTEM.DROPLOG_TRIGGER
ORA-01031: insufficient privileges

BEGIN dbms_registry_sys.validate_components; END;
*
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of SYS.DBMS_REGISTRY_SYS
ORA-01031: insufficient privileges
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_REGISTRY_SYS"
ORA-06512: at line 1


Solution:

Either disable the trigger (alter system disable trigger sys.NAMECHECK_BEFORE_DDL_DB_TRG) OR disable the execution of all triggers on system level (ALTER SYSTEM SET "_system_trig_enabled" = FALSE;)

Eg:
sqlplus '/as sysdba'

SQL:/> ALTER SYSTEM SET "_system_trig_enabled" = FALSE




Reference Blog: 

http://blog.ronnyegner-consulting.de/2013/07/16/recompile-database-objects-utlrp-fails-with-ora-04045-errors-during-recompilationrevalidation-of-sys-dbms_registry_sys/