Search This Blog

Tuesday, November 22, 2011

How to clear Apache cache from Application without bouncing listener in R12

1) Navigate to "Functional Administrator" responsibility
2) Once logged in click on the "Core Services" tab
3) Click on "Caching Framework" link in the blue menu bar
4) Click on "Global Configuration" link in the left vertical menu
5) In the "Cache Policy" region click on the "Clear All Cache" button
6) Click the "Yes" button to confirm the action
7) Click the "Apply" button to apply the changes

Sunday, November 13, 2011

Database States


Remember that there are, in essence, two different entities: the Oracle Instance and the database.  The instance is used to access and manipulate the database data and storage structures.
An instance can be Started up which builds the SGA in memory and starts the background processes.  The instances can also be SHUT DOWN which closes the database, stops the instance and removes the memory structures.  The database itself may be open, closed or mounted.
Database Start-up
It can be observed as below that the database can be altered in the upward direction (up the stairs) but not back down them. 
NOMOUNT
Starts up the instance without mounting the database.  Activities are limited to things like creating  a database.  The database is inaccessible with no dictionary available for password checking.
MOUNT
Starts up the instance and mounts the database.  It allows restricted use of the database for “DBA” tasks such as file management and database structuring.  There is no normal user access possible
OPEN
It starts the instance, mounts and then opens the database.  Other file management activities available such as Manipulating log files, taking datafiles offline, backing up control files.  Normal users processing is allowed.
FORCE
Shuts down an instance before starting it up in the specified mode and is the same as performing SHUTDOWN ABORT followed by a start-up.
RECOVER
This is an OPEN option which forces automatic recovery procedures on start-up.
RESTRICT
This is an OPEN option which limits access to the database to users who have been granted both CREATE SESSION AND RESTRICTED SESSION system privileges.  It is useful for doing tasks like database exports while there is no activity on the database.
SQL>STARTUP OPEN RESTRICT
Can be removed while open by doing the following command:
SQL>ALTER SYSTEM DISABLE RESTRICTED SESSION;
The above options can be combined at the SQL prompt to create the state you wish the database to start.
SQL>STARTUP [FORCE] [NOMOUNT | MOUNT | OPEN [open_options]][oracle_sid_name][PFILE=parameter file];
Examples:
SQL>STARTUP NOMOUNT
SQL>ALTER DATABASE MOUINT;
SQL>ALTER DATABASE OPEN;
Database Shutdown
The SHUTDOWN command closes the database, dismounts the database and then shuts down the instance.  There are several SHUTDOWN options that can be employed.
1        SQL>SHUTDOWN NORMAL
o     The database will only SHUTDOWN when all users have logged off and all work is committed (or rolled back). 
o     No new connections are allowed.
o     This option is difficult to use in man environments since the users are applications and all the applications have to be shutdown before the database would shutdown.
2        SQL>SHUTDOWN IMMEDIATE
o     Disconnects all users and performs rollback on all uncommitted data by using PMON
o     Terminates all current SQL statements
3        SQL>SHUTDOWN ABORT
o     Shuts down without tidying up; akin to system failure and requires system recovery on start-up
o     No rollback of uncommitted transactions

Script to find log & out files of a concurrent request

SELECT logfile_name, logfile_node_name, outfile_name, outfile_node_name,
       controlling_manager
  FROM fnd_concurrent_requests
 WHERE request_id = &&request_id

Saturday, November 12, 2011

Error : FRM-92050 : Failed to connect to the Server: /forms/lservlet-1

Oracle Application R12

When you login Oracle Application R12 have an error that

" Error “FRM-92050 : Failed to connect to the Server: /forms/lservlet-1” "

1. Internet --> Tools --> Internet Options
Security TAB --> Trusted Sites and click Custom level
2. Didsble XSS filter
3. Retest issue .

Concurrent Processing - CCM.sql Diagnostic Script to Diagnose Common Concurrent Manager Issues

 - - - - Code begins here - - - - - - - - - - - - - - -

REM #########################################################################
REM ## Purpose:  Diagnostic Script for Concurrent Manager
REM ## Author:   nabil albadin
REM ## Email:    nabil.albadin@oracle.com
REM ## Filename: ccm.sql
REM ## Cert:     10.7, 11, 11.5, 12.0
REM ## Note:
REM ## Usage:    sqlplus apps/<passwd> @ccm.sql
REM ## Output:   reqcheck.lst
REM ## Notes:
REM ##   Enter value for request ID WHEN PROMPT
REM ##
REM ##      $Id: request.sql, v 1.0 4/17/2002 10:22 nalbadin Exp $
REM #########################################################################

spool ccm.lst
prompt Step 1 Checking how many rows in FND_CONCURRENT_REQUEST.

select  count(*) from fnd_concurrent_requests;
prompt
-----------------------------------------

prompt Step 2 Checking how many rows in FND_CONCURRENT_PROCESSES table.

select  count(*) from fnd_concurrent_processes;
prompt
-----------------------------------------------


prompt Step 3 Checking sys.dual table which should have one and only one row.
select  count(*) from sys.dual;

prompt If you have more than one row in sys.dual, please delete it

prompt sql> delete rownum from SYS.DUAL;  
Prompt rownum= the row number to delete
prompt
prompt
prompt
---------------------------------------------


prompt Step 4 Checking fnd_dual. There must be at lest one row:

select  count(*) from fnd_dual;
prompt If there are no record selected,
prompt Update fnd_dual table to have at lest one record
prompt
----------------------------------------------

prompt Step 5 Checking the Internal Manager queue name "FNDICM" which should be=1

select concurrent_queue_id from fnd_concurrent_queues
where concurrent_queue_name='FNDICM';
prompt
----------------------------------------------

prompt Step 6 Checking for Active processes under the Internal Manager queue
prompt in fnd_concurrent_proceses table:
prompt
select a.concurrent_queue_name
  , substr(b.os_process_id,0,10) "OS Proc"
  , b.oracle_process_id "Oracle ID"
  , b.process_status_code
  from fnd_concurrent_queues a
  , fnd_concurrent_processes b
  where a.concurrent_queue_id=b.concurrent_queue_id
  and a.concurrent_queue_name='FNDICM'
  and b.process_status_code='A'
  order by b.process_status_code;
 
prompt If any rows found with process_status_code with value = 'A' (= Active)    
prompt The internal Manager will not start up ,so to avoide this issue
prompt update these rows to have process_status_code value ='K'(terminated)
prompt
prompt
-----------------------------------------
prompt Step 7 Checking for Active processes under the Standard Manager queue
prompt in fnd_concurrent_proceses table:
prompt
select a.concurrent_queue_name
  , substr(b.os_process_id,0,10) "OS Proc"
  , b.oracle_process_id "Oracle ID"
  , b.process_status_code
  from fnd_concurrent_queues a
  , fnd_concurrent_processes b
  where a.concurrent_queue_id=b.concurrent_queue_id
  and a.concurrent_queue_name='STANDARD'
  and b.process_status_code='A'
  order by b.process_status_code;
 
prompt If any rows found with process_status_code with value = 'A' (= Active)    
prompt The internal Manager will not start up ,so to avoide this issue
prompt update these rows to have process_status_code value ='K'(terminated)
prompt
prompt
------------------------------------------
prompt Step 8 Checking for Active processes under the Conflict Manager queue
prompt in fnd_concurrent_proceses table:
prompt
select a.concurrent_queue_name
  , substr(b.os_process_id,0,10) "OS Proc"
  , b.oracle_process_id "Oracle ID"
  , b.process_status_code
  from fnd_concurrent_queues a
  , fnd_concurrent_processes b
  where a.concurrent_queue_id=b.concurrent_queue_id
  and a.concurrent_queue_name='FNDCRM'
  and b.process_status_code='A'
  order by b.process_status_code;
 
prompt If any rows found with process_status_code with value = 'A' (= Active)    
prompt The internal Manager will not start up ,so to avoide this issue
prompt update these rows to have process_status_code value ='K'(terminated)
prompt
prompt
---------------------------------------------------
prompt Step 9 Checking Actual and Target Processes for Internal Manager:
select MAX_PROCESSES,RUNNING_PROCESSES
from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME='FNDICM';

prompt If the MAX_PROCESSES=RUNNING_PROCESSES that means the manager is UP.
prompt
prompt
--------------------------------------------------------

prompt Step 10 Checking Actual and Target Processes for the Standard Manager:
select MAX_PROCESSES,RUNNING_PROCESSES
from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME='STANDARD';

prompt If the MAX_PROCESSES=RUNNING_PROCESSES that means the manager is UP.
prompt
prompt
---------------------------------------------------------
prompt Step 11 Checking Actual and Target Processes for Conflict Resolution  Manager:
select MAX_PROCESSES,RUNNING_PROCESSES
from FND_CONCURRENT_QUEUES
where CONCURRENT_QUEUE_NAME='FNDCRM';

prompt If the MAX_PROCESSES=RUNNING_PROCESSES that means the manager is UP.
prompt
prompt
---------------------------------------------------------

Prompt Step 12 Checking if the control_code set to 'N':

select control_code from fnd_concurrent_queues
where control_code='N';
prompt
prompt If any rows selected, please update the table fnd_concurrent_queues:
prompt Update fnd_concurrent_queues set control_code = null
prompt where control_code ='N';
PROMPT Update fnd_concurrent_queues set target_node = null;
PROMPT commit;
prompt
prompt
--------------------------------

PROMPT Step 13 Checking terminated processes:
PROMPT
select count (*) from fnd_concurrent_requests
where status_code='T';
prompt
prompt If you have terminated processes run the following sql statement:
prompt
prompt SQL> Update fnd_concurrent_requests
prompt      set status_code = 'E', phase_code = 'C'
prompt      where status_code = 'T';
prompt
------------------------------------------


prompt Step 14 Checking pending requests:

select count(*) from fnd_concurrent_requests
where status_code='P';
prompt If any rows selected please run the following sql statement:

prompt SQL> Update fnd_concurrent_requests
prompt      set status_code = 'E', phase_code = 'C'
prompt      where status_code = 'P';
prompt
------------------------------------------------------
prompt Step 15 Checking Running processes:
prompt
select count (*) from fnd_concurrent_requests
where status_code='R';
prompt
prompt If you have Running processes run the following sql statement
prompt SQL> Update fnd_concurrent_requests
prompt      set status_code = 'E', phase_code = 'C'
prompt      where status_code = 'R';
prompt
------------------------------------------

prompt Step 16 Checking the PMON method, which should be set to LOCK:
prompt
select profile_option_id , profile_option_value
from FND_PROFILE_OPTION_VALUES
where profile_option_id= (select profile_option_id
from FND_PROFILE_OPTIONS
where profile_option_name='CONC_PMON_METHOD');
prompt
prompt If the PROFILE_OPTION_VALUE was't LOCK please
prompt Reset PMON to LOCK by running afimpmon.sql script(The manager should be down) 

prompt 1-At UNIX command prompt:

prompt 2-cd $FND_TOP/sql

prompt 3-Log into SQLPLUS as apps/

prompt SQL> @afimpmon.sql
prompt   prompt1:dual
prompt   prompt2:LOCK     (LOCK MUST BE ALL UPPERCASE)  
    
prompt For Oracle Applications Release 11.5 and 12.0, when you check the PMON
prompt Method you may get no rows selected which is normal,
prompt because in apps 11.5 and 12.0 the PMON Method is hard coded to Lock at
prompt the Operating System level.
prompt
prompt
-------------------------------------------------------

prompt Step-17 Checking how many FNDLIBR processes are running:
prompt -For Unix :From unix command  prompt $ ps -ef |grep -i fndlibr
prompt If you have any FNDLIBR processes running,please kill them before
prompt starting or shuting down the internal manager
prompt
prompt
prompt -For NT, through Task Manager, check the entries under the Processes tab
       for FNDLIBR.exe processes.
prompt If there are any, Highlight and click [End Process] button to kill processes
     
prompt
----------------------------------------------------------

prompt Step-18 Checking how many "FND_%"invalid objects:

 select substr(owner,1, 12) owner, substr(object_type,1,12) type,
 substr(status,1,8) status, substr(object_name, 1, 25) name
 from dba_objects
 where object_name like 'FND_%'
 and status='INVALID';

prompt If you have any invalied objects please see Note 113947.1

prompt
--------------------------------------------------------------

prompt Step-19-How to find the PID in the O/S for request_id:
prompt If you do not like to check this enter any number then click Enter to Exit

select r.request_id, p.os_process_id
from FND_CONCURRENT_REQUESTS r,FND_CONCURRENT_PROCESSES p
where r.controlling_manager = p.concurrent_process_id
and request_id=&request_id;

prompt
prompt Please upload the "ccm.lst" output to Support, Thanks.
prompt
spool off
 - - - - - - - - - - - - - - - -  Code ends here  - - - - - - - - - - - - - - - -

Transportable tablespace refresh

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