Friday, August 7, 2015

APEX Listener configuration on standalone Mode.


Download the Apex listner (2.0) and unzip.

unzip apex_listener.2.0.0.354.17.05.zip

Create Images:

[apexxxx@xxxx /apps/apexxxx/apex_listener]$ /apps/apexxx/java/jdk1.7.0_10/bin/java -jar apex.war static /apps/apexxx/APEX/apex_sw/apex/images
WAR Generation complete
 WAR location     : /apps/apexxx/apex_listener/i.war
 Context path     : /i
 Static resources : /apps/apexxx/APEX/apex_sw/apex/images

Once images created.


Run Stand alone Script:

/apps/apexxxx/java/jdk1.7.0_10/bin/java -jar apex.war standalone --port 8090 --apex-images /apex/apexxx/APEX/apex_sw/apex/images

Aug 07, 2015 11:27:34 AM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: /apps/apexxxx/apex_lsnr/apex
Aug 07, 2015 11:27:35 AM oracle.dbtools.standalone.Standalone execute
INFO: NOTE:

Standalone mode is designed for use in development and test environments. It is not supported for use in production environments.

Aug 07, 2015 11:27:35 AM oracle.dbtools.standalone.Standalone execute
INFO: Starting standalone Web Container in:  /apps/apexmgr/apex_lsnr/apex
Aug 07, 2015 11:27:35 AM oracle.dbtools.standalone.Deployer deploy
INFO: Will deploy application path = /apps/apexxx/apex_lsnr/apex/apex/WEB-INF/web.xml
Aug 07, 2015 11:27:35 AM oracle.dbtools.standalone.Deployer deploy
INFO: Deployed application path = /apps/apexxxr/apex_lsnr/apex/apex/WEB-INF/web.xml
Aug 07, 2015 11:27:35 AM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder: /apps/apexxxx/apex_lsnr/apex
Configuration properties for: apex
cache.caching=false
cache.directory=/tmp/apex/cache
cache.duration=days
cache.expiration=7
cache.maxEntries=500
cache.monitorInterval=60
cache.procedureNameList=
cache.type=lru
db.hostname=xxxxerp.xxxx.com
db.password=******
db.port=1525
db.sid=XXXX
debug.debugger=false
debug.printDebugToScreen=false
error.keepErrorMessages=true
error.maxEntries=50
jdbc.DriverType=thin
jdbc.InactivityTimeout=1800
jdbc.InitialLimit=3
jdbc.MaxConnectionReuseCount=1000
jdbc.MaxLimit=10
jdbc.MaxStatementsLimit=10
jdbc.MinLimit=1
jdbc.statementTimeout=900
log.logging=false
log.maxEntries=50
misc.compress=
misc.defaultPage=apex
security.disableDefaultExclusionList=false
security.maxEntries=2000
db.username=APEX_PUBLIC_USER
Using JDBC driver: Oracle JDBC driver version: 11.2.0.3.0
Aug 07, 2015 11:27:37 AM oracle.dbtools.rt.web.SCListener contextInitialized
INFO: Oracle Application Express Listener initialized
Application Express Listener version : 2.0.0.354.17.06
Application Express Listener server info: Grizzly/1.9.49

Aug 07, 2015 11:27:37 AM com.sun.grizzly.Controller logVersion
INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.49 - 8/7/15 11:27 AM
Aug 07, 2015 11:27:37 AM oracle.dbtools.standalone.Standalone execute
INFO: http://localhost:8090/apex started.

Concurrent Processing - ICM log file shows 'CONC-SM TNS FAIL', 'Call to PingProcess failed', and/or 'Call to StopProcess failed' for FNDCPGSC/FNDOPP


Check the ICM log File:

SELECT 'ICM_LOG_NAME=' || fcp.logfile_name 
FROM apps.fnd_concurrent_processes fcp, apps.fnd_concurrent_queues fcq
WHERE fcp.concurrent_queue_id = fcq.concurrent_queue_id
AND fcp.queue_application_id = fcq.application_id
AND fcq.manager_type = '0'
AND fcp.process_status_code = 'A';

if you any error in log file as below follow the below steps to resolve.

CONC-SM TNS FAIL
Call to PingProcess failed for FNDCPGSC
CONC-SM TNS FAIL
Call to StopProcess failed for FNDCPGSC
CONC-SM TNS FAIL
Call to PingProcess failed for FNDOPP
CONC-SM TNS FAIL
Call to StopProcess failed for FNDOPP


Solution:

1. Stop all middle tier services including the concurrent managers. Make sure no FNDLIBR, FNDSM, or other dead processes are running.

2. Stop and then restart the database.

3. Connect to SQLPLUS as APPS user and run the following :

EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT; 

4.  Reference Note.260887.1 regarding the Steps to Clean Nonexistent Nodes or IP Addresses from FND_NODES. 

5.. Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers and Web tiers to repopulate the required system tables. 

6. Connect to SQLPLUS as APPS user and run the following statement :

select CONCURRENT_QUEUE_NAME
from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME like 'FNDSM%';

If the above SQL does not return any value please do the following:

cd $FND_TOP/patch/115/sql

Connect to SQLPLUS as APPS user and run the following script :

SQL> @afdcm037.sql;

Reference Note 218893.1 How to Create The Service Manager 'FNDSM' on Oracle Applications
to 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. Please run the Concurrent Manager Recovery feature to address any Concurrent Manager / Concurrent Processing issues within the Oracle Application Manager.

8. Start the middle tier services including your concurrent manager.

9. Retest the issue.

Tuesday, August 4, 2015

Data block corruption in particular datafile

Find the Data block corruption details:
SELECT name FROM v$datafile WHERE file#=34;

SELECT ts# "TSN" FROM v$datafile WHERE file#=34;

SELECT tablespace_name FROM dba_data_files WHERE file_id=34--APPS_TS_TX_DATA

SELECT block_size FROM dba_tablespaces 
WHERE tablespace_name = 
(SELECT tablespace_name FROM dba_data_files WHERE file_id=&AFN);---8192

SELECT tablespace_name, file_id "AFN", relative_fno "RFN" FROM dba_data_files;


SELECT *
FROM dba_extents
WHERE file_id = &AFN
and &BL between block_id AND block_id + blocks - 1;

SELECT * 
FROM dba_free_space 
WHERE file_id = 34 
and 682478 between block_id AND block_id + blocks - 1; 

Solution:


RMAN> run {blockrecover datafile 34 block 682478;}
RMAN>  backup check logical validate datafile 34;
analyze table PA.PA_COST_XXX_ALL validate structure online; 

If table has analyzed your in good shape.
If it is not analyzed and it shows again datafile has been corrupted.

 SQL> alter table PA.PA_COST_XXXX_LINES_ALL move;  
Table altered.  


  SELECT * FROM dba_free_space WHERE file_id = 34 and 682478 between block_id AND block_id + blocks - 1; 

Return any rows it means block has been changed.rebuild the indexes on this table.


select * from V$DATABASE_BLOCK_CORRUPTION;
no rows selected.

Now there is no db blocks on Database.

Note: 28814.1 - Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g/11g

Note: 403747.1 - FAQ: Physical Corruption
Note: 68117.1 - Introduction to the Corruption Category

Note: 840978.1 - Physical and Logical Block Corruptions. All you wanted to know about it