Saturday, September 18, 2010

How to secure login with oracle SQL*Plus with a password On UNIX and Linux platforms

ost of us sometimes start SQL * Plus with a password on UNIX and Linux platforms without knowing security threat.
For example, an application user connects SQL * Plus by passing username and password on Unix/Linux Server.
$ sqlplus apps/apps@proddb
Here the sqlplus command parameters are very much available for viewing by all operating system users on the same host computer; as a result, password entered on the command line could be exposed to other users, as below.
$ ps -efgrep sqlplus
oracle 14490 2190 0 16:31:53 pts/5 0:00 sqlplus apps/apps@proddb
oracle 14493 14491 0 16:32:01 pts/5 0:00 grep sqlplus
So, there might be a chance for an intruder to know the user id and password, and can connect to the database using that credentials.
Then, following is the secure and best way of connecting SQL * Plus where the password is not exposed on the command line.
$ sqlplus apps@proddb
Enter password: ****
Or, even not to expose the username and connecting string.
$ sqlplus
Enter user-name: apps@proddb
Enter password: ****
Or
$ sqlplus /nolog
SQL> connect apps@proddb
Enter password: ****
And also, do not use the password while invoking Export/Import Utility using exp/imp command line, and for any other command line utilities which you think the password will be exposed to others.
On Microsoft Windows, the command recall feature (the Up arrow) remembers user input across command invocations.
For example, if you use the CONNECT APPS/password notation in SQL*Plus, exit, and then press the Up arrow to repeat the CONNECT command, the command recall feature discloses the connect string and shows the password. So, it is advice *NOT* to pass the password while connecting to SQL * Plus on windows as well.

RMAN BACKUP FAILURE AFTER CLONING:

Rman target /
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORQ4 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128′; # default
CONFIGURE COMPRESSION ALGORITHM ‘BZIP2′; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u2490/app/oracle/product/11.1.0/db_1/dbs/snapcf_orq41.f’; # default
Configure  as :
RMAN configuration parameters for database with db_unique_name ORQ4 are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO ‘SBT_TAPE’;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE ‘SBT_TAPE’ TO ‘%F’;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’;
CONFIGURE DEVICE TYPE ‘SBT_TAPE’ PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 5 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE ‘SBT_TAPE’ TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE ‘SBT_TAPE’ TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL DEVICE TYPE ‘SBT_TAPE’ PARMS  ‘BLKSIZE=262144,ENV=(CvClientName=qmnalx1109,CvInstanceName=Instance001,CvOraSID=orq41)’; ()
CONFIGURE MAXSETSIZE TO 30 G;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM ‘AES128′;
CONFIGURE COMPRESSION ALGORITHM ‘BZIP2′;
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u2490/app/oracle/product/11.1.0/db_1/dbs/snapcf_orq41.f’; # default
export TNS_ADMIN=/home/oracle/sqlnet
rman target / catalog rmanapps/rmanapps@RCVCAT
RMAN>list incarnation of database orq4;
RMAN>register database;
RMAN>exit
Check for the scheduled backup using crontab –l
#ORQ4 BACKUP
00 23 * * 2 /home/oracle/scripts_v2/backup_db_cvault.sh -d orq41 -c rmanapps -l 0 -f 0
00 23 * * 0,1,3,4,5,6 /home/oracle/scripts_v2/backup_db_cvault.sh -d orq41 -c rmanapps -l 1 -f 1
16 10 09 07 * /home/oracle/scripts_v2/backup_db_cvault.sh -d orq41 -c rmanapps -l 1 -f 1
Invoke the Backup
Sh  /home/oracle/scripts_v2/backup_db_cvault.sh -d orq41 -c rmanapps -l 0 -f 0

Create Database Link

CREATE DATABASE LINK prd
CONNECT AS userid
IDENTIFIED BY password
USING ‘tns:name’;
DELETE table;
INSERT INTO table
SELECT * FROM table@prd;
DROP DATABASE LINK prd;
COMMIT;

HOW TO SET A PROFILE TO A USER IN an INSTANCE

SYSTEM ADMINISTRATOR à PROFILE à SYSTEM à
CHECK for User Insert the UserID to the Right.
Find the Profile what you want to Assign to the User.  à Click Find.

Problem of Inactive, No Manager in one of the request submitted:

This problem seems to be inactive ICM.
When ICM is not up u will get error inactive-no manager.
Just check with manager and make it up.
ps -ef|grep LIBR
if it shows the manager is down then start the CM using script adcmctl.sh.
And if the manager is up but it is showing the inactive-nomanager then check for the log file and do the needful.
As my idea y dont u try with cmclean.sql.(not supported by oracle)
1.Bring down CM.
2.run cmclean.sql
3.Bring up CM.

Check for Locked Objects

set serveroutput on size 10000
declare
cursor c1 is
select * from v$lock where request != 0
order by id1, id2;
wid1            number := -999999;
wid2            number := -999999;
wholder_detail  varchar2(200);
v_err_msg          varchar2(80);
wsid            number(5);
wstep           number(2);
wtype           varchar2(10);
wobject_name    varchar2(180);
wobject_name1   varchar2(80);
wlock_type      varchar2(50);
w_lastcallet  varchar2(11);
h_lastcallet  varchar2(11);
begin
for c1_rec in c1 loop
if c1_rec.id1 = wid1 and c1_rec.id2 = wid2 then
null;
else
wstep  := 10;
select sid , type into wsid , wtype
from v$lock
where id1  = c1_rec.id1
and id2  = c1_rec.id2
and request = 0
and lmode != 4;
dbms_output.put_line(‘  ‘);
wstep  := 20;
select ‘Holder DBU: ‘||s.username ||’ OSU: ‘||s.osuser ||’
DBP:’||p.spid||’ APP: ‘|| s.process ||
‘ SID:’ || s.sid || ‘ Status: ‘ || s.status  ||
‘ (‘ ||         floor(last_call_et/3600)||’:'||
floor(mod(last_call_et,3600)/60)||’:'||
mod(mod(last_call_et,3600),60) ||
‘) Module:’|| module ||
‘ AppSrvr: ‘ ||
substr(replace(machine,’GEIPS-AMER\’,null),1,15)
into wholder_detail
from v$session s, v$process p
where s.sid= wsid
and s.paddr = p.addr;
dbms_output.put_line(wholder_detail);
begin
select decode(wtype,’TX’, ‘Transaction’,
‘DL’, ‘DDL Lock’,
‘MR’, ‘Media Recovery’,
‘RT’, ‘Redo Thread’,
‘UN’, ‘User Name’,
‘TX’, ‘Transaction’,
‘TM’, ‘DML’,
‘UL’, ‘PL/SQL User Lock’,
‘DX’, ‘Distributed Xaction’,
‘CF’, ‘Control File’,
‘IS’, ‘Instance State’,
‘FS’, ‘File Set’,
‘IR’, ‘Instance Recovery’,
‘ST’, ‘Disk Space Transaction’,
‘TS’, ‘Temp Segment’,
‘IV’, ‘Library Cache Invalida-tion’,
‘LS’, ‘Log Start or Switch’,
‘RW’, ‘Row Wait’,
‘SQ’, ‘Sequence Number’,
‘TE’, ‘Extend Table’,
‘TT’, ‘Temp Table’,
‘Un-Known Type of Lock’)
into wlock_type
from dual;
declare
cursor c3 is
select object_id from v$locked_object
where session_id = wsid;
begin
wobject_name := ”;
for c3_rec in c3 loop
select object_type||’: ‘||owner||’.'||object_name
into wobject_name
from dba_objects
where object_id = c3_rec.object_id;
wobject_name := wobject_name ||’ ‘||wobject_name1;
end loop;
exception
when others then
wobject_name := wobject_name ||’ No Object Found’;
end;
dbms_output.put_line(‘Lock Held: ‘||wlock_type||’ for Object
:’||wobject_name);
exception
when no_data_found then
dbms_output.put_line(‘Lock Held: ‘||wlock_type||’ No object found
in DBA Objects’);
end;
end if;
wstep  := 30;
select ‘….   Requestor DBU: ‘||s.username ||’ OSU: ‘||s.osuser ||’
DBP:’||p.spid||’ APP: ‘|| s.process ||
‘ SID:’ || s.sid || ‘ Status: ‘ || s.status  ||
‘ (‘ ||         floor(last_call_et/3600)||’:'||
floor(mod(last_call_et,3600)/60)||’:'||
mod(mod(last_call_et,3600),60) ||
‘) Module:’|| module ||
‘ AppSrvr: ‘ ||
substr(replace(machine,’GEIPS-AMER\’,null),1,15)
into wholder_detail
from v$session s, v$process p
where s.sid= c1_rec.sid
and s.paddr = p.addr;
dbms_output.put_line(wholder_detail);
wid1  := c1_rec.id1;
wid2  := c1_rec.id2;
end loop;
if wid1 = -999999 then
wstep  := 40;
dbms_output.put_line(‘No one requesting locks held by others’);
end if;
exception
when others then
v_err_msg := (sqlerrm ||’  ‘|| sqlcode||’ step=’||to_char(wstep));
DBMS_OUTPUT.PUT_LINE(v_err_msg);
end;

HOW TO Trace a concurrent program

1. Go to System Administrator >> Concurrent >> Program >> Define
2. Query back the concurrent program that you want to trace.
3. Click ‘Enable Trace’ and save it.
4. Run the concurrent program as a concurrent request
5. A SQL trace file will be saved in the ../udump directory on the database server



(OR)
How do you enable/disable a trace to a Concurrent Program?
1. Connect to Oracle Applications
2. Navigate to System Administrator->Concurrent->Program->Define
3. Query the concurrent program on which you want to enable trace.
4. Check the enable trace check box bottom of the screen, Save it.
5. Ask the developer to submit the request, Once the request got submitted and completed normal.
6. Get the spid as select oracle_process_id from apps.fnd_concurrent_requests where request_id=456624.
7. You will get a spid like 12340.
8. Goto Udump and ls -ltr *12344*.
9 . You will get trace file.
Query to Get the Udump Location:

SQL>SELECT name,value from v$parameter WHERE name like ‘user_dump_dest’;
NAME
——————————————————————————–
VALUE
——————————————————————————–
user_dump_dest
/u2190/app/oracle/product/11.1.0/db_1/admin/orq11_qmnalx1109/diag/rdbms/orq1/orq
11/trace

Profile Options for Oracle Apps DBA

Here is the list of few profile options which Apps DBA use frequently. It is not necessary that you as Apps DBA must know all profile options, it depends on your implemnetation. I am goingto update more about Profile Options.
Applications Help Web Agent  Applications Servlet Agent  Applications Web Agent  Concurrent: Active Request Limit  Concurrent: Hold Requests  Concurrent: Multiple Time Zones  Concurrent: Report Access Level  Concurrent: Report Copies  Concurrent: Request priority  Database Instance  Enable Security Group FND: Debug Log Filename  FND: Debug Log Level  Forms Runtime Parameters  Gateway User ID ICX: Discoverer Launcher ICX: Forms Launcher ICX: Report Launcher ICX: Limit Connect ICX: Limit time ICX: Session Timeout MO Operating Unit Node Trust Level RRA: Delete Temporary Files RRA: Enabled RRA: Service Prefix RRA: Maximum Transfer Size Self Service Personal Home Page Mode Sign-On: Audit Level Signon Password Failure Limit Signon Password Hard to Guess Signon Password Length Signon Password No Reuse Site Name Socket Listener Port TCF: Host TCF: Port TWO TASK Viewer: Text Applications Help Web Agent

Compile INVALID Objects

How to find the Invalid Objects?
select count(*) from DBA_OBJECTS where status=’INVALID’;
select owner,object_type,count(*) from dba_objects where status=’INVALID’ group by owner,object_type;
Compile Invalid Objects:
cd $ORACLE_HOME/rdbms/admin/utlrp.sql
Connect sqlplus “as sysdba”
sql>@utlrp.sql
This sql will compile all the invalid Objects

Assign the Responsibility to the User but it is not reflecting

Login as sysadmin
workflow->sitemap->configuration->service components
Screen appearing ..Just activate the Workflow Java Deferred Listener .
Next Run the two requests login as sysadmin
Workflow Directory Services User/Role Validation
Synchronize WF LOCAL tables
These two programs must run Compulsory

Monitoring Pending Requests in the Concurrent Managers


Monitoring Pending Requests in the Concurrent Managers
You may find that requests are stacking up in the concurrent managers with a status of “pending”. This can be caused by any of these conditions:
1. The concurrent managers were brought down will a request was running.
2. The database was shutdown before shutting down the concurrent managers.
3. There is a shortage of RAM memory or CPU resources.
When you get a backlog of pending requests, you can first allocate more processes to the manager that is having the problem in order to allow most of the requests to process, and then make a list of the requests that will not complete so they can be resubmitted, and cancel them.
To allocate more processes to a manager, log in as a user with the System Administrator responsibility. Navigate to Concurrent -> Manager -> Define. Increase the number in the Processes column. Also, you may not need all the concurrent managers that Oracle supplies with an Oracle Applications install, so you can save resources by identifying the unneeded managers and disabling them.
However, you can still have problems. If the request remains in a phase of RUNNING and a status of TERMINATING after allocating more processes to the manager, then shutdown the concurrent managers, kill any processes from the operating system that won’t terminate, and execute the following sqlplus statement as the APPLSYS user to reset the managers in the FND_CONCURRENT_REQUESTS table:
update fnd_concurrent_requestsset status_code=’X', phase_code=’C'where status_code=’T';

Problems & Solutions on Concurrent Managers

Problems: I hit the Restart button to start the Standard manager, but it still did not start? Solution: The ICM will start Standard Manager in the next process monitor session or the next time the ICM starts. Use Activate to start a manager immediately. When a manager is deactivated manually, the ICM will not restart it, you will need to set it to Restart, or activate it manually.
Problem: When you try to submit a request like Active users or Active responsibilities, request gets submitted. When we view the requests, you find that it is inactive / nomanager. Within 12 to 15 seconds, you refresh-it gets completed.
Solution: when this occurs where a request goes “inactive/no manager” and is then processed a short time later, the solution is to either increase the cache size for your Standard manger, or increase the actual number of Standard manager processes.
HELPFUL DIAGNOSTIC SCRIPTS
The following SQL scripts located under $FND_TOP/sql are useful when diagnosing concurrent manager problems:
afimchk.sql Tells the status of the ICM and PMON method
afcmstat.sql Lists active manager processes
afrqrun.sql Lists all the running, waiting and terminating requests
afrqwait.sql Lists requests that are constrained and waiting for the ICM to release them
afrqscm.sql Prints log file name of managers that can run a given request. It can be used to check for possible errors when a request stays in pending status. It requires a request id value.
afcmcreq.sql Prints the log file name of the manager that processed the request
afrqstat.sql Summary of completed concurrent requests grouped by completion status and execution type. It requires number of days prior to today on which to report parameter.
afimlock.sql Lists locks that the ICM is waiting to get
afcmrrq.sql Lists managers that currently are running a request

How to retrieve Summary of concurrent Jobs/status/Count in Last 1 hour

How to retrieve Summary of concurrent Jobs/status/Count in Last 1 hour?
Use following query:

selectfcpt.USER_CONCURRENT_PROGRAM_NAME,DECODE(fcr.phase_code,‘C’, ‘Completed’,‘I’, ‘Inactive’,‘P’, ‘Pending’,‘R’, ‘Running’,fcr.phase_code) PHASE ,DECODE(fcr.status_code,‘A’, ‘Waiting’,‘B’, ‘Resuming’,‘C’, ‘Normal’,‘D’, ‘Cancelled’,‘E’, ‘Errored’,‘F’, ‘Scheduled’,‘G’, ‘Warning’,‘H’, ‘On Hold’,‘I’, ‘Normal’,‘M’, ‘No Manager’,‘Q’, ‘Standby’,‘R’, ‘Normal’,‘S’, ‘Suspended’,‘T’, ‘Terminating’,‘U’, ‘Disabled’,‘W’, ‘Paused’,‘X’, ‘Terminated’,‘Z’, ‘Waiting’,fcr.status_code) STATUS,count(*)from apps.fnd_concurrent_programs_tl fcpt,apps.FND_CONCURRENT_REQUESTs fcrwhere fcpt.CONCURRENT_PROGRAM_ID=fcr.CONCURRENT_PROGRAM_IDand fcpt.language = USERENV(’Lang’)and fcr.ACTUAL_START_DATE > sysdate – 1/24group by fcpt.USER_CONCURRENT_PROGRAM_NAME,fcr.phase_code,fcr.status_code

Concurrent Manager: Output Post-processor issue

The concurrent program the output of which is XML report is failing in warning and the log shows the below message:
Beginning post-processing of request 5292785 on node AP6105RT at 02-AUG-2006 04:47:48. Post-processing of request 5292785 failed at 02-AUG-2006 04:49:48 with the error message:

The Output Post-processor is running but has not picked up this request. No further attempts will be made to post-process this request, and the request will be marked with Warning status.
Setting the profile option Concurrent: OPP Response Timeout to a higher value may be necessary. Example if the responce time is set to 60 make it atleast 180. Bounce the concurrent manager once this is done. This will resolve the issue.

If the issue still persist, check the OPP log file. You follow below navigation

System Administrator -> Concurrent : Manager -> Administrator

On this screen click on Output Post Processor and then click on Processes button -> Manager Log button

A new web page will open showing the manager log. Come to the bottom, you might see followng error

[10/7/08 10:15:56 PM] [1900472:RT5709298] Completed post-processing actions
for request 5709298.
[10/7/08 10:20:07 PM] [OPPServiceThread1] Post-processing request 5709301.
[10/7/08 10:20:07 PM] [1900472:RT5709301] Executing post-processing actions
for request 5709301.
[10/7/08 10:20:07 PM] [1900472:RT5709301] Starting XML Publisher
post-processing action.
[10/7/08 10:20:07 PM] [1900472:RT5709301]
@ Template code: FAXSRPIM
Template app: OFA
Language: EN
Territory: US
Output type: PDF
[10/7/08 10:20:07 PM] [UNEXPECTED] [1900472:RT5709301]
java.io.FileNotFoundException:
/appslog/fin_top/utl/fintest/out/xdosCfJu5EHsa100708_1020071837.fo (No such
file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:179)
at java.io.FileOutputStream.(FileOutputStream.java:131)
@ at oracle.apps.xdo.common.tmp.TmpFile.createTmpFileJDK118(TmpFile.java:146)
@ at oracle.apps.xdo.common.tmp.TmpFile.createTmpFile(TmpFile.java:113)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:987)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1657)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:967)

So the path /appslog/fin_top/utl/fintest/out/ is not correct. As per the note ID 428855.1 changed the path to valid location

Navigate the following as the responsibility “XML Publisher Administrator”
Select Administration on the Personal Home Page
Under the Configuration tab select Properties and then General.
From there the Temporary directory will be displayed.

Changed the path to some thing that is existing physically.

After that bounce the output post processor. This should resolve the issue

Concureent manager

The concurrent managers serve important administrative functions. The concurrent managers ensure that the applications are not overwhelmed with requests, and the second areas of functions are the management of batch processing and report generation.
In The Oracle e-Business suite has three important Concurrent Managers:
Internal Concurrent Manager: The ICM (Internal Concurrent Manager) controls all of the other concurrent managers.
Standard Manager: The Standard Manager accepts any and all requests. It has no predefined specialization rules and is active all the time. It is not recommended to add specialization rules to the standard manager as it can cause problems.
Conflict Resolution Manager: The Conflict Resolution Manager resolves conflicts, such as request incompatibilities.
How to check concurrent manager running or not?
Log in to applications as System Administrator responsibility and navigate to the concurrent > manager > administration page and under the processes column if the target and actual column equal the same number (above 0) this means the managers are up and running.
How to Start / Stop Concurrent manager ?
If concurrent managers down, Use this syntax to start the concurrent managers from the command line:
adcmctl.sh start apps/
You stop the concurrent managers from the command line:
adcmctl.sh stop apps/
Location where you find adcmctl.sh scripts is $COMMN_TOP/admin/scripts/$CONTEXT_NAME/

Where the location of Concurrent Managers Log files?
The concurrent manager log files can be located in one of the following places:
1. If the environment variable $APPLCSF is set, the default location is $APPLCSF/$APPLLOG
2. If the environment variable $APPLCSF is not set, the logs go to $FND_TOP/$APPLLOG
NOTE: The default name of the concurrent manager log files is std.mgr. You can change these by setting the parameter logfile=.
Manager Log Files:
Standard manager log: w.mgr
Transaction manager log: t.mgr
Conflict Resolution manager log: c.mgr
Where: is the concurrent process id of the manager

Status of a particular Concurrent Request

set verify off
col sid format 9999
col spid format a9
col inst_id format 99
col serial# format 999999
col process format a10
set lines 180 pages 100
col username format a10
col program format a20
col machine format a18
col module format a25
col Action format a14
col logon_time format a21

PROMPT;
PROMPT;

ACCEPT inp_prog PROMPT 'Enter the desired Concurrent Request : ';

select s.inst_id,request_id,s.username,s.sid,s.serial#,s.process,
p.spid,
to_char(logon_time,'DD-MON-YYYY HH24:MI:SS') logon_time ,
s.status,
-- substr(s.program,1,10) "Program",
substr(s.machine,1,12) "Machine",
substr(s.module,1,12) "Module",
substr(s.action,1,14) "Action"
from gv$session s , gv$process p , apps.fnd_concurrent_requests fnd
where s.process = fnd.os_process_id
and s.paddr=p.addr
and s.inst_id=p.inst_id
and request_id like decode('&&inp_prog','',request_id,'&&inp_prog')
and phase_code='R'
order by request_id,logon_time
/

Service Management

R12 uses 10.1.3 fusion middle-ware AS stack, hence services in R12 is managed by OPMN (Oracle Process Manager and Notification Server).
OPMN consists of two main components (Oracle Process Manager) and (Oracle Notification Server).
Oracle Process Manager is responsible for
1) starting
2) stopping
3) restarting
4) monitoring the services it manages (this includes death detection and automatic restart of the process)
Oracle Notification Server is the transport mechanism for failure, recovery, startup, and other related notifications between components in AS.
Single configuration file(opmn.xml) is used OPMN to manage the services. Config file location is given as $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml
Services managed by opmn are (grep process-type opmn.xml)
1) HTTP_Server
2) oacore
3) forms
4) oafm
Getting OPMN managed running process(es) status
bash-2.05$ ./adopmnctl.sh status
You are running adopmnctl.sh version 120.4
Checking status of OPMN managed processes…
Processes in Instance: SID_host.host.domain.com
———————+——————–+———–+———
ias-component | process-type | pid | status
———————+——————–+———–+———
OC4J | oafm | 13500 | Alive
OC4J | forms | 28358 | Alive
OC4J | oacore | 15899 | Alive
HTTP_Server | HTTP_Server | 23530 | Alive
ASG | ASG | N/A | Down
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /ebiz/oracle/SID/inst/apps/SID_host/logs/appl/admin/log/adopmnctl.txt for more information
Starting OPMN managed Services
Starting Complete OC4J container
bash-2.05$ ./adopmnctl.sh startproc ias-component=OC4J
Starting individual process-type(s)
bash-2.05$ ./adopmnctl.sh startproc ias-component=OC4J process-type= oafm
bash-2.05$ ./adopmnctl.sh startproc ias-component=OC4J process-type= forms
bash-2.05$ ./adopmnctl.sh startproc ias-component=OC4J process-type= oacore
Starting HTTP Server (Apache)
bash-2.05$ ./adopmnctl.sh startproc ias-component=HTTP_Server
Stoping OPMN managed Services
Stoping Complete OC4J container
bash-2.05$ ./adopmnctl.sh stopproc ias-component=OC4J
Stoping individual process-type(s)
bash-2.05$ ./adopmnctl.sh stopproc ias-component=OC4J process-type= oafm
bash-2.05$ ./adopmnctl.sh stopproc ias-component=OC4J process-type= forms
bash-2.05$ ./adopmnctl.sh stopproc ias-component=OC4J process-type= oacore
Stoping HTTP Server (Apache)
bash-2.05$ ./adopmnctl.sh stopproc ias-component=HTTP_Server
Benefits of OPMN
There are many benefits because of OPMN. To give an example,
Consider the scenario where one of your OC4J process has died. OPMN detects the death of the process which it manages and brings up in almost no time.
To elucidate this here is an example
bash-2.05$ ./adopmnctl.sh status
You are running adopmnctl.sh version 120.4
Checking status of OPMN managed processes…
Processes in Instance:  SID_host.host.domain.com
———————+——————–+———–+———
ias-component | process-type | pid | status
———————+——————–+———–+———
OC4J | oafm | 13500 | Alive
OC4J | forms | 15898 | Alive
OC4J | oacore | 15899 | Alive
HTTP_Server | HTTP_Server | 23530 | Alive
ASG | ASG | N/A | Down
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /ebiz/oracle/SID/inst/apps/SID_host/logs/appl/admin/log/adopmnctl.txt for more information …
All the OPMN managed processes are alive. Lets see, how opmn reacts to the death of the oacore OC4J process. I have killed the process with PID – 15898
bash-2.05$ kill -9 15898
bash-2.05$ ./adopmnctl.sh status
You are running adopmnctl.sh version 120.4
Checking status of OPMN managed processes…
Processes in Instance:  SID_host.host.domain.com
———————+——————–+———–+———
ias-component | process-type | pid | status
———————+——————–+———–+———
OC4J | oafm | 13500 | Alive
OC4J | forms | 28358 | Init
OC4J | oacore | 15899 | Alive
HTTP_Server | HTTP_Server | 23530 | Alive
ASG | ASG | N/A | Down
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /ebiz/oracle/SID/inst/apps/SID_host/logs/appl/admin/log/adopmnctl.txt for more information …
Within no time, OPMN detects the death and restarts the process it manages.(one or two seconds users will face the failures due to the process unavailability to serve the requests)
$LOG_HOME/ora/10.1.3/opmn/opmn.log is appened with the information ( it dumps the death detection and restart information)
08/05/02 12:34:04 [pm-process] Process Crashed: OC4J~forms~default_group~1 (691565399:15898) – Restarting
08/05/02 12:34:04 [pm-process] Starting Process: OC4J~forms~default_group~1 (691565400:0)
08/05/02 12:34:24 [pm-process] Process Alive: OC4J~forms~default_group~1 (691565400:28358)
This is one of greatest advantage you will get when you have R12, Even if oacore JVM crashes due to out of memory issue, opmn restarts after it detects OC4J has died.
What algorithm OPMN uses to detect the death?
1) OS process is checked by OPMN for every 2 seconds.
2) forward ping: periodically OPMN pings the process for every 20 seconds and expects response
3) reverse ping: every 20 seconds managed process sends OPMN a ping notification
Script Details
All the admin scripts are running the opmnctl in the background from the $ORACLE_CONFIG_HOME/opmn/bin directory. This environment variable is set in the $INST_TOP/apps/VIS_appl_node1/ora/10.1.3/VIS_appl_node1.env file. This contains all the required environment variables needed by opmnctl to run. So this file needs to be sourced before running the opmnctl for Ebiz.
bash-2.05# pwd
/ebiz/oracle/SID/inst/apps/SID_host/ora/10.1.3
bash-2.05# ls
Apache cfgtoollogs deconfig javacache opmn
VIS_appl_node1.env config j2ee network
bash-2.05# opmn/bin/opmnctl status
Unable to connect to opmn.
Opmn may not be up.
bash-2.05# source VIS_appl_node1.env
bash-2.05# opmn/bin/opmnctl status
Processes in Instance:  SID_host.host.domain.com
——————-+——————–+———+———
ias-component | process-type | pid | status
——————-+——————–+———+———
OC4J | oafm | N/A | Down
OC4J | forms | 8071 | Alive
OC4J | oacore | N/A | Down
HTTP_Server | HTTP_Server | 16572 | Alive
ASG | ASG | N/A | Down

Function not available for this responsibility

Error Faced:
Function is not available for this responsibility.Contact your system
Administrator or change the responsibility
Reason:
When a custom module is defined and forms are being run from this custom_top,
Forms dont run from custom top in servlet mode but run in socket mode….this is because in servlet mode the environment is read from the file
$ORA_CONFIG_HOME/10.1.2/forms/server/default.env
The location of the FMX files is determined by the value set for CUSTOM_TOP. If
this location is not found the error as seen is raised.
To get the custom_top defined in default.env the following steps are to be followed:

Solution:
1.Submit the “Compile Security” Concurrent program with the parameter everything set to Yes to verify that all the menu functions are compiled properly.
2.Create your-own AutoConfig template file
2.1 Define a product_top
Use the Oracle Applications Manager Context Editor to add your custom product_top to the context file.
This will add the CUSTOM_TOP to the .xml file, so it picked up when the default.env is created by Autoconfig
Or if you are well acquainted with Auto-config and Context_name.xml, add the Custom top manually to Context_name.xml using any editor and save.
3.Run AutoConfig
4.Restart apps services
5.Retest.

Connect Toad with Oracle Database

http://linuxappsdba.blogspot.com/2009/06/connect-toad-with-oracle-database.html

INTERMITTENT ORA-06502 DURING PEAK LOADING

In 10.2.0.3,
non reproducible ORA-06502 arises from
time to time when the production has the peak loading.
Alter system flush shared pool helps the problem for a while....

Error:
ORA-06502:
numeric or value error: associative array shape is not consistent with
session parameters
(PLS-01910)
numeric or value error: character to number conversion error (PLS-01900)
Solution:
Apply patch 5890966 to resolve the error using opatch utility.

Upgrade R12 Database server

How to upgrade R12 Database server from 10.2.0 to 11.1.0 (10g to 11g) manually ?

We cannot upgrade the existing Oracle Home, since 11g is not a patchset. We have to install 11g oracle home
as a separate ORACLE_HOME in parallel to 10g Oracle Home.
We have to install the new database for upgrading the existing database.
But before installing check the software versions for…..
a)Oracle database version and check the appropriate upgrade path accordingly depending on the present version.
b)E-business suite version—minimum is 12.0.4 and apply interoperability patch for 11g on apps node using adpatch
c)Autoconfig has to be upgraded to latest version by applying 7207440.
I did not need to apply as my instance is on 12.0.6 and 6728000(12.0.6 upgrade patch) supersedes this autoconfig patch..
Now steps for database installation
1.Apply patch 6400501 to Apps 10.1.0.5 Oracle-home
2. Deregister the current database if you want to change database sid,host,port.
And update autoconfig for database also before that.
$ perl $ORACLE_HOME/appsutil/bin/adgentns.pl appspass=apps
contextfile=$CONTEXT_FILE -removeserver
3. Update applications context file with new database parameters….
s_dbhost
s_dbdomain
s_db_serv_sid
s_dbport
s_apps_jdbc_connect_descriptor
to new database values. Don’t run auto config on apps tier now….
otherwise apps will not be able to connect to database at all.
Run autoconfig only after complete upgrade process is finished..
Database Installation
The 11.1.0 Oracle home must be installed on the database server node
in a different directory other than the current Oracle home
Log in to the database server node as the owner
of the Oracle RDBMS file system and database instance. Ensure
that environment settings, such as ORACLE_HOME, are set for the new
Oracle home you are about to create, and not for any existing
Oracle homes on the database server node
Choose to install software only (without any default database) in the new location.
After the installation,
Run utlu111i.sql (located in 11g_ORACLE_HOME/rdbms/admin) on source 10g database
and check the output.
SQL>@/11g_oracle_home/rdbms/admin/utlu111i.sql
It displays warnings and recommends steps to clear the issues.
Time Zone Issue
select * from v$timezone_file;
FILENAME VERSION
———— ———-
timezlrg.dat 3
If time zone file version is less than 4 then apply time zone patch 5632264
This can be done using opatch.
unzip the patch and run opatch going into the unzipped patch directory.
or manually copy the .dat files under 5632264/files/oracore/zoneinfo into
$ORACLE_HOME/oracore/zoneinfo
Bounce the database and check the TIMEZONE version.
Do not forget to take a backup of old zoneinfo directory before this.
Re-run utlu111i.sql after patching the database to record
the new timezone file version.
This time it says something like Database contains stale optimizer statistics.
So..
Gather statistics
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
SQL> EXEC DBMS_STATS.GATHER_SCHEMA_STATS(’SYS’);
SQL> EXEC DBMS_STATS.GATHER_SCHEMA_STATS(’SYSMAN’);
And other schemas which ever it recommends for.
Run the pre-upgrade utility once again to make sure,
you don’t get any warnings.
Copy initialization file (pfile) from source (10g) to target (11g)
Modify initialization parameters
1.
background_dump_dest replaced by diagnostic_dest
user_dump_dest replaced by diagnostic_dest
core_dump_dest replaced by diagnostic_dest
comment above three deprecated parameters
and add
*.diagnostic_dest=’/11g_base’
2.
Change *.compatible=’10.2.0′
to *.compatible=’11.1.0′
Set Environment to new Oracle home
export ORACLE_HOME=/oraDB/app/oracle/product/11.1.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=TEST
export TNS_ADMIN=$ORACLE_HOME/network/admin/Context_Name
sqlplus ‘/as sysdba’
Startup the database in upgrade mode.
SQL> startup upgrade
SQL> SPOOL upgrade.log
SQL> @catupgrd.sql
This takes considerably a long time depending on the size of database.
Once the upgrade finishes,It will shut down the database automatically.
Login again as sysdba and startup in normal mode.
You will get NLS errors as nls directory under new oracle_home does not have 9idata directory
Run the $ORACLE_HOME/nls/data/old/cr9idata.pl script to create the $ORACLE_HOME/nls/data/9idata directory.
I , actually copied the 9idata directory from 10g oracle_home to new location.
After creating the directory,
make sure that the ORA_NLS10 environment variable is set to the full path of the 9idata directory whenever you enable the 11g Oracle home.
SQL>startup
Check the dba_registry for the components and its status
SQL> select comp_name,version, status from dba_registry;
Run Post-Upgrade Status Tool provides a summary of the upgrade
SQL>@?/rdbms/admin/utlu111s.sql
Perform upgrade actions that do not require the database to be in UPGRADE mode
SQL>@?/rdbms/admin/catuppst.sql
Check for invalid objects
SQL> select object_name, owner, object_type from all_objects where status= ‘INVALID’;
Compile Invalids
SQL> @?/rdbms/admin/utlrp.sql
Copy tnsnames.ora, listener.ora, sqlnet.ora and include file from source oracle_home to target oracle_home
This finishes upgrade of 10.2.0.3 database to 11.1.0.6 in E-Business Suite R12.
Further we have to upgrade the existing 11.1.0.6 to 11.1.0.7 using a patchset.
which I will discuss in my next post..
After Upgrade
Start the new database listener
Set the TNS_ADMIN environment variable to the directory where you created your listener.ora and tnsnames.ora files.
Run adgrants.sql
Copy $APPL_TOP/admin/adgrants.sql (adgrants_nt.sql for Windows) from the administration server node to the database server node.
$ sqlplus ‘/ as sysdba’
SQL> @adgrants.sql APPLSYS
Grant create procedure privilege on CTXSYS
Copy $AD_TOP/patch/115/sql/adctxprv.sql from
the administration server node to the database server node.
$ sqlplus apps/apps
SQL>@adctxprv.sql SYSTEM_password CTXSYS
Implement and run AutoConfig in the new database Oracle Home.
How to implement autoconfig in a new oracle_home …coming up…..

Html or Self-service page not coming up

This happened on a Test instance.

A user today came up with this error .
On examining the exception details which looks something like this.
Exception Details.
oracle.apps.fnd.framework.OAException: Could not load application module ‘oracle.apps.pos.supplier.server.SuppSummAM’. at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:279) at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1283) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:536) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:424) at _OA._jspService(_OA.java:212) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:702) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359) at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:252) at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42) at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:186) at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283) at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:191) at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:322) at _RF._jspService(_RF.java:225) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230) at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) ## Detail 0 ## JBO-30003: The application pool (parasaktidev.sinewloresoft.comDEVPCIL1527oracle.apps.pos.supplier.server.SuppSummAM) failed to checkout an application module due to the following exception: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.apps.fnd.framework.OAException, msg=Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: ORA-20001: SQL_PLSQL_ERROR: N, ROUTINE, MO_GLOBAL.INIT, N, ERRNO, -20001, N, REASON, ORA-20001: APP-FND-02902: Multi-Org profile option is required. Please set either MO: Security Profile or MO: Operating Unit profile option. ORA-06512: at “APPS.FND_MESSAGE”, line 509 ORA-06512: at “APPS.MO_GLOBAL”, line 36 ORA-06512: at “APPS.MO_GLOBAL”, line 757 ORA-06512: at “APPS.MO_GLOBAL”, line 700 ORA-06512: at line 1


The highlighted part shows that the Profile options MO:Security Profile and MO:Operating Unit
need to be set correctly.
These profile options are being changed by some other user while testing.
On reverting to the relevant and appropriate values, everything went fine.

About Kernel Parameters

Edit /etc/sysctl.conf to edit the kernel parameters required for Applications
vi /etc/sysctl.conf
# semaphores in kernel.sem: semmsl semmns semopm semmni
kernel.sem = 256 32000 100 142
kernel.shmmax = 2288490188
kernel.shmmni = 4096
kernel.shmall = 3279547
fs.file-max = 327679
net.ipv4.ip_local_port_range = 1024 65000
kernel.msgmax = 8192
kernel.msgmni = 2878
kernel.msgmnb = 65535
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
SHMMAX
The SHMMAX parameter is used to define the maximum size (in bytes) for a
shared memory segment and should be set large enough for the largest SGA size.
If the SHMMAX is set incorrectly (too low), it is possible that the Oracle SGA
(which is held in shared segments) may be limited in size. An inadequate
SHMMAX setting would result in the following:
ORA-27123: unable to attach to shared memory segment
You can determine the value of SHMMAX by performing the following:
# cat /proc/sys/kernel/shmmax
33554432
As you can see from the output above, the default value for SHMMAX is 32MB.
This is often too small to configure the Oracle SGA. I generally set the SHMMAX
parameter to 2GB.
NOTE: With a 32-bit Linux operating system, the default maximum size of the SGA is 1.7GB.
This is the reason I often set the SHMMAX parameter to 2GB since it requires a larger value for SHMMAX.
On a 32-bit Linux operating system, without Physical Address Extension (PAE), the physical
memory is divided into a 3GB user space and a 1GB kernel space. It is therefore possible to
create a 2.7GB SGA, but you will need make several changes at the Linux operating system
level by changing the mapped base. In the case of a 2.7GB SGA, you would want to set the
SHMMAX parameter to 3GB.
This is method I use most often.
This method sets the SHMMAX on startup by inserting the
following kernel parameter in the /etc/sysctl.conf startup file:
# echo “kernel.shmmax=2147483648″ >> /etc/sysctl.conf
•If you wanted to dynamically alter the value of SHMMAX without rebooting the machine, you
can make this change directly to the /proc file system. This command can be made
permanent by putting it into the /etc/rc.local startup file:
# echo “2147483648″ > /proc/sys/kernel/shmmax
•You can also use the sysctl command to change the value of SHMMAX:
# sysctl -w kernel.shmmax=2147483648
SHMMNI
We now look at the SHMMNI parameters. This kernel parameter is used to set the
maximum number of shared memory segments system wide. The default value for
this parameter is 4096. This value is sufficient and typically does not need to be
changed.
You can determine the value of SHMMNI by performing the following:
# cat /proc/sys/kernel/shmmni
4096
SHMALL
Finally, we look at the SHMALL shared memory kernel parameter. This parameter
controls the total amount of shared memory (in pages) that can be used at one
time on the system. In short, the value of this parameter should always be at least:
ceil(SHMMAX/PAGE_SIZE)
The default size of SHMALL is 2097152 and can be queried using the following
command:
# cat /proc/sys/kernel/shmall
2097152
From the above output, the total amount of shared memory (in bytes) that can be
used at one time on the system is:
SM = (SHMALL * PAGE_SIZE)
= 2097152 * 4096
= 8,589,934,592 bytes
The default setting for SHMALL should be adequate for our Oracle installation.
NOTE: The page size in Red Hat Linux on the i386 platform is 4096 bytes. You can, however,
use
bigpages which supports the configuration of larger memory page sizes.
fs.file-max
——————
When configuring our Linux database server, it is critical to ensure that the maximum number
of file handles is large enough. The setting for file handles designate the number of open files
that you can have on the entire Linux system.
Use the following command to determine the maximum number of file handles for the entire
system:
# cat /proc/sys/fs/file-max
103062
Oracle recommends that the file handles for the entire system be set to at least 65536. In
most cases, the default for Red Hat Linux is 103062
This is method I use most often. This method sets the maximum number of file handles
(using the kernel parameter file-max) on startup by inserting the following kernel parameter in
the /etc/sysctl.conf startup file:
# echo “fs.file-max=65536″ >> /etc/sysctl.conf
•If you wanted to dynamically alter the value of all semaphore kernel parameters without
rebooting the machine, you can make this change directly to the /proc file system. This
command can be made permanent by putting it into the /etc/rc.local startup file:
# echo “65536″ > /proc/sys/fs/file-max
NOTE: It is also possible to query the current usage of file handles using the following
command:
# cat /proc/sys/fs/file-nr
1140 0 103062
In the above example output, here is an explanation of the three values from the file-nr
command:
•Total number of allocated file handles.
•Total number of file handles currently being used.
•Maximum number of file handles that can be allocated. This is essentially the value of filemax
- (see above).
NOTE: If you need to increase the value in /proc/sys/fs/file-max, then make sure that the
ulimit is set properly. Usually for 2.4.20 it is set to unlimited. Verify the ulimit setting my
issuing the ulimit command:
# ulimit
unlimited
net.ipv4.ip_local_port_range
————————————–
The /proc/sys/net/ipv4/ip_local_port_range defines the local port range that is used by TCP
and UDP traffic to choose the local port. You will see in the parameters of this file two
numbers: The first number is the first local port allowed for TCP and UDP traffic on the server,
the second is the last local port number. For high-usage systems you may change its default
parameters to 32768-61000 -first-last.
The default setup for the ip_local_port_range parameters under Red Hat Linux is: “1024
4999″
To change the values of ip_local_port_range, type the following command on your terminal:
[root@deep] /# echo “32768 61000″ >/proc/sys/net/ipv4/ip_local_port_range
You must restart your network for the change to take effect.
[root@deep] /# /etc/rc.d/init.d/network restart
kernel.msgmni
——————–
msg queues I use message queue’s to pass messages around. I use the same queue to
send and receive messages. This is actually very bad (now that I think about it), cause you
might fill up the queue, and cause a deadlock (hmm, that appears to be happening!). anyway
to increase the sizes put bigger sizes into
/proc/sys/kernel/msgmax
The max number of bytes per message (redhat 7.2 default = 8192)
/proc/sys/kernel/msgmnb
The total size of the queue. (redhat 7.2 default = 16384)
/proc/sys/kernel/msgmni
Number of messages. (redhat 7.2 default = 16)
Basically these low numbers make message queues pretty useless in a high traffic
application. Probably you can just up these numbers to be pretty large
msgmax: ( default 2048 )
The parameter “msgmax” is the maximum number of bytes that can be in
any one message. msgsnd() will give the error EINVAL if a message is
longer than this.
msgmnb: ( default 4096 )
The parameter “msgmnb” is the maximum number of message bytes that
can be on any one queue at a given time. If a message would cause a
queue to grow larger than this, that msgsnd() would either block
until space was available, or would give the error EAGAIN if user
specified non-blocking mode. For obvious reasons “msgmnb” must be at
least as large as “msgmax”, however, it is probably good to set it to
some integral number of “msgmax.” This way, a few messages of the
maximum size could be queued at any time. However, making “msgmnb”
too large compared to the total bytes available for messages (see
below) may allow one queue to hog the message system.
msgmni: ( default 50 )
The parameter “msgmni” is the number of message queue ids available
to the system. Each message queue requires one id. msgget() gives
the error ENOSPC if all the ids have been used up.

Common ORA Errors Faced

ORA:12154 TNS could not resolve Service Name
1) Check the listener, if it is started and listening or not.
2) Check that the instance or database name is being typed in correctly.
3)This is an issue with tnsnames.ora or listener.ora or sqlnet.ora.
Need to check with naming methods we are using and correct for those methods.
The entries for Alias Name with which we are trying to connect got to have same values,
Ie. for Hostname, Port number, Service Name or protocol used.
4) Or the issue might arise because of NIC Card or Network card settings.
The card might have got disabled.
If there are 2 NIC cards, then there might be a conflict with the hostname entries ,
ie. the card with which the database is installed and used might have been disabled.
The IP set for card and the entry in hosts file may get changed.
5) Sometimes if it is taking the localhost as the default entry for the card,
on the same systems where there is no IP set for the system.
Then the loopback address needs to be checked. The entry should be there in hosts file like
127.0.0.1 localhost.localdomain localhost
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

1) The instance is actually trying to acquire the shared memory it is assigned and is unable to do the same.
ORACLE_HOME and ORACLE_SID should be set correctly for this to be resolved.
2) The SGA parameters might have been edited and the instance is unable to get the new SGA size allocated.
Replace the original parameters and try again.
3) An abrupt shutdown of the database or the server might have happened,
by which the previous database session has not released the memory yet.
Shutdown the database gracefully, restart the server and try again.
ORA:01652 Unable to extend Temp Segment
This might be caused when TEMP tablespace is out of space. This happens when there is a sorting or any similar activity by a session.
Check the free space using
select sum(free_blocks)
from v$sort_segment
where tablespace_name = ‘TEMP’
IF the result is 0,Then add a datafile to the TEMP tablespace
If it is found that there is free space available, then the reason is instance is unable to extend the segment.
Resize the tablespace and add space to it.
or
Increase sort_area_size and/or pga_aggregate_target using alter session command

AD-UTILITIES Interview Questions or FAQs

1)      What is an AD Utility? Why do we require ad-utilities?
2)      Which ad-utility do you use regularly and why?
3)      What is the pre-requisite to run any ad-utility?
4)      Do you need database to be up in order to run ad-utilities? Why?
5)      On a multi-node architecture, on which node do you invoke ad-utilities?(adadmin,apatch and adconfig)
6)      What are the prompts you get when you invoke adadmin?
7)      Why do you need system password for adadmin?
8)      Where is adadmin log file located?
9)      Where are the executables located for ad-utilities?
10)   What do you do when an adadmin session fails or errors out?
11)   What is the difference between .log and .lgi files?
12)   What is the script that runs when Compile Apps Schema in adadmin is started?
13)   Can we invoke more than one adadmin session simultaneously? If so when? If not Why?
14)   Which options do you choose to
Generate Jar files
Generate Reports
Compile Jsps
Relink Programs
15)   What does Relink option do?
16)   What will you do if relinking has failed for a particular product?
17)   How do you proceed if a single Jsp or multiple jsp’s compilation fails?
18)   When do you need to run maintain snapshot information?
19)   What is the difference between compile apps schema and validate apps schema?
20)   What is the difference between generate jar files and reload jar files to database?
21)   What is the script that runs when you change maintenance mode from adadmin?
22)   How do you check in database whether maintenance mode is enabled or not?
23)   When do you need to enable maintenance mode?
24)   Why do you need to maintain MRC schema?
25)   What  does adadmin do when it runs Re-create grants and synonyms for apps schema option?
26)   What is the default character set in your Environment?
27)   When do you need to convert character set?
28)   What does copy files to destinations copy and to what location?
29)   Generation of forms failed through adadmin…how do you generate manually?
30)   What is the difference between fmb and fmx files?
31)   Adadmin is not accepting apps password even if it is correct password..why and what is your course of action?
32)   What is the extension of report files? How do you generate them manually?
33)   What is the location of forms and reports?
34)   What is the location of compiled jsps?
35)   How do you invoke adadmin session in non-interactive mode?
36)   Where is the defaults file located ?
37)   What is a patch?
38)    How do you apply a patch for Application file system?
39)   What are the different types of patches ?
40)   What are steps you follow before applying a patch?
41)   What is a mini-pack, maintenance pack, CU patches and CPU patches?
42)   What are various modes of applying a patch?
43)   What are the various options while applying a patch?
44)   How do you a patch a multi node environment
a)      if it is non-shared and c,d,g drivers are there
b)      if it is shared system and c,d,g drivers are there
c)       if it is non-shared and u driver
d)      shared and u-driver is there
45)   Can we invoke more than one patch session at a time? Why? Or why not?
46)   What does an adpatch do while
A c-driver action is going on?
A d-driver action is going on?
A g-driver action is going on?
47)   Can we rollback an applied patch ? How?
48)   What are b.ldt and f.ldt files?
49)   How do you check a patch is applied successfully or not?
50)   What is the difference between ad_bugs and ad_applied_patches?
51)   Where is patch log file located?
52)   A patch session errored out and which has already run for more than 3 hours time. On metalink search, it is found that a pre-req patch is there to be applied. How do you proceed?
53)   A patch readme suggests to apply it for R12. How do you decide if you can apply this patch for your system which is on 12.0.5?
54)   How many patches do you apply for a week?
55)   A patch failed while c-driver is going on. What will you do? Also for d and g drivers?
56)   A patch hangs for a long time while d-driver. If It is running a sql script, If it is generating forms, , How do you proceed in each scenario?
57)   If a patch fails while compiling jsps and relinking, how do you proceed in both issues?
58)   What is ad-controller?
59)   A worker hangs , What is your course of action?
60)   How do you restart a job? How do you assign a job to a different worker?
61)   How do you restart a worker?
62)   What is skipping a worker and how to do it?
63)   How do you check which drivers of a patch are applied ?
64)   When do you need to merge patches?
65)   Which patches can be merged and which not?
66)   Can a Payables patch be merged with HRMS patch? Why or why not?
67)   How do you merge patches?
68)   How do you check a file version?
69)   Adident shows number of line entries for a file version? Which one to consider?
70)   What is auto-config?
71)   How do you run auto-config in your organization?
72)   How can we run auto-config in test mode?
73)   What does adchkcfg.sh do ?
74)   Where are the output files created when we run adchkcfg.sh?
75)   What is a difference file and how do you analyze it?
76)   What are the phases while running autoconfig?
77)   What happens in INSTE8_PRF phase and INSTE8_APPLY phase?
78)   What are the essential files needed for running autoconfig?
79)   What is a template file and a driver file? What do they consist of?
80)   How do you run autoconfig in multi-node environment (shared and non-shared file system)?
81)   What does autoconfig process do? Explain.
82)   Do you need to bring down your database while running auto config? Why or why not?
83)   Can you run auto config in DB tier while the database is up? Why?
84)   When do we need to run autoconfig?
85)   Where is autoconfig log file located?
86)   What is a customization? How do you know there are customizations in your system?
87)   How to preserve customizations?
88)   Autoconfig failed while PROFILE phase, what will you do?
89)   Autoconfig failed during APPLY phase, what next?
90)   Can autoconfig be run in parallel in all nodes of application? If so how?
91)   What are the errors you faced while running autoconfig? How did you resolve?
92)   Your XML file is corrupted and you don’t have access to backup xml. What will you do?
93)   Where is autoconfig script in database tier?
94)   You need to run autoconfig on Apps and DB tiers.Which tier will you run first?
95)   What is DBC file? Where is it located?
96)   How do you check status of a dbc file?
97)   Autoconfig fails when creating dbc file? What will you do?
98)   What are the options to recreate a dbc file?
99)   What is Admin App Server?  How to run it?
100)                       Do we require java to run autoconfig? Why?
101)                       What is cloning?
102)                       What are the pre-reqs for cloning complete Application file system?
103)                       What does pre clone script do on source system?
104)                       Can we run pre clone script on Apps tier when services are up? Why?
105)                       Where is the adpreclone.pl script located in DB and APPS? How do you start it in both ?
106)                       What is the precaution you need to take before copying the file system to Target ?
107)                       Where is adcfgclone.pl located ? Where is its log file created?
108)                       What are the prompts adcfgclone.pl asks for on target system?
109)                       What are the errors you faced while cloning? How did you resolve?
110)                       Can we clone a cloned system? How?
111)                       How do we clone a single-node to multi-node system?
112)                        Can we clone a multi-node to single-node ? How?
113)                       Do profile options get updated as in source when cloning ?
114)                       Which post clone steps you need to do manually?

File System Interview Questions (FAQs)

1)      Which script is used to start/stop Concurrent Managers? What is the syntax? And where is the script located in R12?
2)      Where are the startup scripts log files located?
3)      What is the meaning of status 0, status 1, status 150 when starting services?
4)      Which is the default Oracle Home set in the apps R12 Environment?
5)      How do we set Default Oracle home to the home used by Apache, if required?
6)      Which Home is used for forms and reports in R12?
7)      Which Home is used for Apache in R12?
8)      What is the default Database version that comes with 12.0.4 Apps installation and 12.1.1 installation?
9)      How many products are brought in by default installation of Apps?
10)   Can a multi-user installation be done with a single mount point in linux?(yes or no)
11)   Why do we need to edit limits.conf under /etc/security for installation of Apps?
12)   What is an Instance Top used for? What are the practical advantages of instance top?
13)   A Shared file system has all directories mounted onto various nodes. Then do we need to have a separate instance top for all nodes? If so why ?
14)   What are the various directories under each Product_Top?
15)   What is difference of Common top in R12 and 11i?
16)   What is AF_JLIB parameter in R12 and what is it set to?
17)   Is FND_TOP/secure and FND_SECURE same in R12?
18)   What is the difference between httpd.pid and httpd.lock files?
19)   What are the runtime executables for forms and reports in R12?
20)   What is the plugin required to run forms in R12?
21)   What is OPMN and what are the processes it manages?
22)   What is the script used for managing OC4J processes?
23)   Where are the opmn log files located?
24)   What is the advantage of Jserv getting replaced by OC4J in R12?
25)   How many instances of OC4J exist in R12 and what are they? And how are they managed?
26)   What is the configuration file for OC4J and its location?
27)   What are the various configuration files and their location for Apache?
28)   What is the formservlet.ini file replaced by in R12?
29)   What are the configuration files for Forms in R12?
30)   What is the difference between APPL_CONFIG_HOME, ORA_CONFIG_HOME and ORACLE_CONFIG_HOME in R12?
31)   Where are the Diagnostic Log files located for Apache and OC4J?
32)   What is the difference between fndenv.env and devenv.env?
33)   What is the use of webapps directory under COMMON_TOP?
34)   What is the use of META-INF and WEB-INF directories under OA_HTML?
35)   What is an odf file and what is it used for?
36)   What are the following executables used for?
a)      FNDSM
b)      FNDFS
37)   What are the following parameters used for in an Environment?
a)      FNDNAM
b)      GWYUID
c)       TWO_TASK
d)      APPLCSF
e)      APPLDCP
f)       APPLTMP
g)      NLS_LANG
h)      PATH
i)        APPL_TOP
j)        FND_TOP
k)      AU_TOP
l)        APPLFENV
m)    OA_JAVA
n)      LD_LIBRARY_PATH
o)      CLASSPATH
38)   What are the extensions for the following files
a) Source forms
b) Runtime forms
c) Message files
d) pl/sql libraries
e) Concurrent Manager Log files
f) Concurrent Request Log files
g) SSL certificates
h) Network Configuration files
i) Report files
j) Driver files
k) Environment files
l) Perl scripts, Shell Scripts, SQL scripts
m) Java Archives, Java Class files
39)   Where are the log files located for
a) Apache
b) Adpatch
c) OC4J
d) Autoconfig
e)  Concurrent Manager
40)   What is the use and location of files in R12?
a)      Context file
b)      Consolidated env file
c)       DBC file
d)      server.xml
e)      opmn.xml
f)       Apache pids
g)      appsweb.cfg
h)      default.env
i)        orion-web.xml
j)        orion-application.xml
k)      SSL certificates
l)        Adconfig.txt
m)    Topfile.txt
n)      Adovars.env
o)      Adjborg.txt and adjborg2.txt

Gather Schema Statistics from front-end

Sometimes , after continuous updating,inserting or deleting of data by users(Functional,technical
or End users), it becomes necessary to gather statistics as the performance of database becomes slow.
This can be done by simply submitting a request from Front-End Forms service…which substantially improves the performance of the Application and Database.

GATHER SCHEMA STATS from Back-end

Use the following command to gather schema statistics:
exec fnd_stats.gather_schema_statistics(‘ONT’) < For a specific schema >
exec fnd_stats.gather_schema_statistics(‘ALL’) < For all schemas >
Use the following command for gathering statistics on a temporary table
(ie: temporary tablename = TEMP_tmp in schema ABC):
exec fnd_stats.gather_table_stats(‘ABC’,'TEMP_tmp’);
Note 1065813.1 How to Gather Statistics on Custom Schemas for Ebusiness Suite 11i and R12? (Doc ID 1065813.1)
Monitoring:
exec fnd_stats.ENABLE_SCHEMA_MONITORING (SCHEMA_NAME);




How to submit a concurrent program using the CONCSUB utility from the operating system.

You can submit a concurrent request to run any concurrent program by running the CONCSUB program with the following syntax::
CONCSUB / \ \ \ \ [WAIT=NY] \ CONCURRENT \ \ \ [PROGRAM_NAME=””] \ [REPEAT_TIME=] \ [REPEAT_INTERVAL= ] \ [REPEAT_INTERVAL_UNIT=<>] \ [REPEAT_INTERVAL_TYPE=<>] \ [REPEAT_END=] \ [START=] \ [IMPLICIT=<> \ [ ... ]
For parameters that follow the CONCURRENT parameter and include spaces, enclose the parameter argument in double quotes, then again in single quotes. Oracle Application Object Library requires this syntax because it parses the argument string twice. For example, to pass this argument to a program:
This is an example pass this argument through CONCSUB: ’”
This is an example”’
Example:
Here is an example of the command to run CONCSUB: $ CONCSUB APPS/APPS \ SYSADMIN \ ”System Administrator” \ SYSADMIN \ WAIT=N \ CONCURRENT \ FND \ FNDFMRTC \ PROGRAM_NAME=’”Register Custom Tables Weekly”’ \ REPEAT_INTERVAL=7 \ REPEAT_INTERVAL_UNIT=”DAYS” \ REPEAT_INTERVAL_TYPE=”START” \ START=’”08–JUN–96 23:55:00”’ CGL APPLSYS ALL CGL
Please note that the above example uses the UNIX line continuation character ‘\’, not all operating systems support the use of this character. If the line continuation character is not supported then the CONCSUB command should be submitted as one continuous line…
Example
$ CONCSUB APPS/APPS SYSADMIN ”System Administrator” SYSADMIN WAIT=N CONCURRENT FND FNDFMRTC PROGRAM_NAME=’”Register Custom Tables Weekly”’
REPEAT_INTERVAL=7 REPEAT_INTERVAL_UNIT=”DAYS” REPEAT_INTERVAL_TYPE=”START” START=’”08–JUN–96 23:55:00”’ CGL APPLSYS ALL CGL
The following entries explain the required and optional parameters for submitting a concurrent program with CONCSUB. Default values are listed to the right.
Required. The ORACLE username and password that provides access to the data that your program uses.
Required. The application short name of the responsibility whose concurrent processing options you want to use. Required. The name of your responsibility. If the name of your responsibility includes spaces, enclose that name in double quotes.
Required. The uppercase username of the application user whose concurrent processing options you want to use.
Optional. A flag that indicates whether to wait for the submitted request to complete. If you leave this parameter out, the default value of N makes CONCSUB return you to the operating system prompt without waiting for your request to complete. Set WAIT=Y to have CONCSUB check the request status every 60 seconds and return you to the operating system prompt when your request is completed. You can also enter an integer value for a number of seconds, as in WAIT=30, for CONCSUB to check for request completion every seconds.
Attention: Using WAIT=Y or WAIT= requires that your request completes before CONCSUB returns you to the operating system. If the concurrent manager is down, your CONCSUB process waits indefinitely until the concurrent manager is started and the request completes.
Required. A flag that separates the program–specific parameters from the operating system parameters. Required. The application short name of your concurrent program. Required. The uppercase name of your program. It must be the short name that you enter in the Concurrent Programs window when defining a concurrent program.
Optional. A descriptive name for your program. The program field on the View Requests form displays this as the user–friendly program name. The concurrent program short name passed to CONCSUB is often hard for end users to understand, so the PROGRAM_NAME parameter allows you to pass a more easily remembered name for your concurrent program. If you do not specify a PROGRAM_NAME, the View Requests form displays the user–friendly program name specified in the Concurrent Programs window. You may also use the PROGRAM_NAME parameter to indicate the batch that your request processes for programs that process a set of data, where there could be several requests for a given program that are active at the same time.
Optional. The time of day to resubmit the request. The format for the time is HH24:MI or HH24:MI:SS. For example, REPEAT_TIME=14:30 resubmits your request daily at 2:30 p.m. Attention: Do not use REPEAT_TIME with other resubmission parameters except for the optional parameters REPEAT_END and START.
Optional. The interval between resubmission (a positive integer or real number). Use this parameter along with REPEAT_INTERVAL_UNIT to specify the time between resubmissions.
Optional. The unit of time used for the interval between resubmissions. The available units are MINUTES, HOURS, DAYS or MONTHS. Use this parameter along with REPEAT_INTERVAL to specify the time between resubmissions. For example, setting REPEAT_INTERVAL=12 and REPEAT_INTERVAL_UNIT=HOURS resubmits your request every twelve hours. The default value is DAYS. Attention: Do not use REPEAT_INTERVAL and REPEAT_INTERVAL_UNIT with REPEAT_TIME. Optional. Whether to time the resubmission interval from the requested start time of the request or from its completion. Set this parameter either toSTART or END. The default value is START. Attention: Use REPEAT_INTERVAL_TYPE only if you use REPEAT_INTERVAL.
Optional. The date and time to stop resubmitting the concurrent request. Use one of the following for the format of the end date: ’”DD–MON–RR HH24:MI:SS”’ (as in ’”07–APR–02 18:32:05”’) or ’”DD–MON–RRRR HH24:MI:SS”’ (as in ’”07–APR–2002 18:32:05”’) Note that because this date format includes a space, you must enclose the date in double quotation marks and single quotation marks. You can also specify just the date: ’DD–MON–RR’ or ’DD–MON–RRRR’
Optional. A start date and time for your program in this format: ’”DD–MON–RR HH24:MI:SS”’ (as in ’”07–APR–02 18:32:05”’) Because this date format includes a space, you must enclose the date in double quotation marks and single quotation marks. If you do not specify a start time, your program submits immediately and is processed by the next available concurrent manager. The default value is the current time.
Optional. Whether to show this concurrent request on the View Requests form. Specify NO, YES, ERROR or WARNING. The value IMPLICIT=NO allows the request to appear on the View Request form. The default value is NO. The value IMPLICIT=YES means that only the System Administrator’s privileged View Concurrent Requests form displays this request. Use this value if the request is not interesting to the user. Specify IMPLICIT=ERROR or IMPLICIT=WARNING, respectively, if you want the request to appear only if it fails or completes with warnings.
Optional. The number of days after which to repeat the concurrent request, calculated from the last requested start date. The number can be a positive integer or real number.
For example, REPEAT_DAYS=1.5 resubmits your request every 36 hours. Attention: Do not use REPEAT_DAYS with other resubmission parameters except for the optional parameters REPEAT_END and START. Suggestion: REPEAT_DAYS will become obsolete in a future release. You may therefore want to use REPEAT_INTERVAL, REPEAT_INTERVAL_TYPE and REPEAT_INTERVAL_UNIT instead of REPEAT_DAYS.
… Optional. Your program–specific parameters. If a parameter includes spaces, enclose that parameter in double quotes, then in single quotes. If a parameter contains a double quotation mark as part of the argument, precede that mark with a backslash [\]

oafm is not coming up after APPS & DB Tier servers bouncing

=== ODM Action Plan ===
1. When did you start facing this issue ? what are the recent changes made ?
Do the below action plan, and upload the required information
2. Shutdown all middle tier services ( Makes sure all process are down )
3. Clean all old log files
mv $LOG_HOME/ora/10.1.3 $LOG_HOME/ora/10.1.3_bkp
rm -fr $LOG_HOME/ora/10.1.3/Apache/*
rm -fr $LOG_HOME/ora/10.1.3/j2ee/forms/*
rm -fr $LOG_HOME/ora/10.1.3/j2ee/oacore/*
rm -fr $LOG_HOME/ora/10.1.3/j2ee/oafm/*
rm -fr $LOG_HOME/ora/10.1.3/javacache/*
rm -fr $LOG_HOME/ora/10.1.3/opmn/*
rm -fr /u0192/oracle/orp/inst/apps/orp_pmnalx1095/logs/appl/admin/log/adstrtal.log
rm -fr /u0192/oracle/orp/inst/apps/orp_pmnalx1095/logs/appl/admin/log/adoafmctl.txt
4. Start the services
// the following below are not required.//
5. Provide output for
sh adopmnctl.sh status

6. Upload the latest logfiles
zip -r log_latest.zip $LOG_HOME/ora/10.1.3/*
7. Upload the below files
adstrtal.log
adoafmctl.txt
(OR)
To implement the solution, please execute the following steps:
Clear the TLD cache:
- stop all middle tier services
- Delete/backup all the files under directory:
$COMMON_TOP/_TldCache
- start all middle tier services

Sunday, September 12, 2010

How to reset or Unlock the orcladmin password

Recently while upgrading Discoverer to 10.1.2.3 CP4 , we got stuck at one of the step.
This step asks for orcladmin password which was not known to us.
So , we need to reset that password.Here are the steps which we followed ;
Error:
orcladmin password lost or account locked
Cause:
orcladmin password not known to us.
Solution :
1. Login as OAS user [ here testbi ] and
sqlplus “/as sysdba”
SQL>> alter user ODS identified by [new password]
2. Execute $ORACLE_HOME/bin/oidpasswd create_wallet=true
3. oidpasswd connect=[connect string] change_oiddb_pwd=true
This will prompt us for old password and new password.
old password you can give the same as ODS user and unique new password.
4. To unlock the orcladmin account :
oidpasswd connect=[connect string] unlock_su_acct=trueThis will prompt for password ; enter the ODS password.Which will inturn unlock your orcladmin account.
5. To reset the password :
oidpasswd connect=[connect string] reset_su_password=true
This will prompt for new password. [keep the password same as ODS user.] and your are done.
You have successfully changed the orcladmin password.
Now, to test the password :
cd $ORACLE_HOME/bin/oidadmin
The window will prompt for orcladmin password.
Refer : http://eldapo.blogspot.com/2007/08/forcing-orcladmin-password.html

Report Builder:Warning: REP-0004: Unable to open user preference file

Oracle E-Business Suite R12 Report Builder:Release 10.1.2.2.0 Warning: REP-0004: Unable to open user preference file.

Error:
REP-0004: Warning: Unable to open user preference file.
Report Builder: Release 10.1.2.2.0 – Production on Mon Nov 17 14:43:42 2008
Solution
Copy prefs.ora from $ORACLE_HOME/tools/admin to $HOME
cp $ORACLE_HOME/tools/admin/prefs.ora $HOME/prefs.ora

After IP Change Oracle APPS R12 Web Application Services Failed

oafm,forms,oacore status down
ERROR Message…
Oracle Apps stratup Log
Root Service Oracle Process Manager for VIS_sys38 adopmnctl.sh Started
Web Entry Point Services Oracle HTTP Server VIS_sys38 adapcctl.sh Failed
Web Application Services OACORE OC4J Instance VIS_sys38 adoacorectl.sh Failed
Web Application Services FORMS OC4J Instance VIS_sys38 adformsctl.sh Failed
Web Application Services OAFM OC4J Instance VIS_sys38 adoafmctl.sh Failed
Batch Processing Services OracleTNSListenerAPPS_VIS_sys38 adalnctl.sh Started
Batch Processing Services OracleConcMgrVIS_sys38 adcmctl.sh Started
Batch Processing Services Oracle ICSM VIS_sys38 ieoicsm.sh Disabled
Batch Processing Services Oracle Fulfillment Server VIS_sys38 jtffmctl.sh Started
Other Services Disabled
Other Services OracleFormsServer-Forms VIS_sys38 adformsrvctl.sh Disabled
Other Services Oracle Metrics Client VIS_sys38 adfmcctl.sh Disabled
Other Services Oracle Metrics Server VIS_sys38 adfmsctl.sh Disabled
Other Services Oracle MWA Service VIS_sys38 mwactlwrpr.sh Disabled
================================================================================
APPS R12 Web Application Services Logs..
11/10/08-19:18:43 :: adoacorectl.sh version 120.11.12000000.2
11/10/08-19:18:43 :: adoacorectl.sh: starting OPMN if it is not running
opmnctl: opmn is already running.
11/10/08-19:18:43 :: adoacorectl.sh: Starting OPMN managed OACORE OC4J instance
opmnctl: starting opmn managed processes…
================================================================================
opmn id=sys38.doyen.in:6200
0 of 1 processes started.
ias-instance id=VIS_sys38.sys38.doyen.in
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
——————————————————————————–
ias-component/process-type/process-set:
OC4J/oacore/default_group/
Error
–> Process (index=1,uid=1832654593,pid=29902)
failed to start a managed process after the maximum retry limit
Log:
/u02/oracle/VIS/inst/apps/VIS_sys38/logs/ora/10.1.3/opmn/OC4J~oacore~default_group~1
11/10/08-19:19:14 :: adoacorectl.sh: exiting with status 204
================================================================================
OPMN managed OACORE OC4J instance Logs..
[applmgr@sys38 ~]$ sh /u02/oracle/VIS/inst/apps/VIS_sys38/admin/scripts/adoacorectl.sh status
You are running adoacorectl.sh version 120.11.12000000.2
Checking status of OPMN managed OACORE OC4J instance …
Processes in Instance: VIS_sys38.sys38.doyen.in
——————-+——————–+———+———
ias-component process-type pid status
——————-+——————–+———+———
OC4J oafm N/A Down
OC4J forms N/A Down
OC4J oacore N/A Down
HTTP_Server HTTP_Server 29760 Alive
adoacorectl.sh: exiting with status 0
adoacorectl.sh: check the logfile /u02/oracle/VIS/inst/apps/VIS_sys38/logs/appl/admin/log/adoacorectl.txt for more information …
Solution
1.Stop Oracle Apps Tier (Stop Oracle Apps Servies)
2. cd $INST_TOP/ora/10.1.3/j2ee
rm -fr oacore/persistence/*
rm -fr oafm/persistence/*
rm -fr forms/persistence/*
3.Start Oracle Apps Tier (Start Oracle Apps Servies)
4.adoacorectl.sh status
[applmgr@sys38 persistence]$ sh /u02/oracle/VIS/inst/apps/VIS_sys38/admin/scripts/adoacorectl.sh status
You are running adoacorectl.sh version 120.11.12000000.2
Checking status of OPMN managed OACORE OC4J instance …
Processes in Instance: VIS_sys38.sys38.doyen.in
——————-+——————–+———+———
ias-component process-type pid status
——————-+——————–+———+———
OC4J oafm 31945 Alive
OC4J forms 31874 Alive
OC4J oacore 31780 Alive
HTTP_Server HTTP_Server 29760 Alive
adoacorectl.sh: exiting with status 0

How to trace a Concurrent Request and generate the TKPROF file

I hope this document will help you to find-out the long-running concurrent request from an oracle applications 11i/R12.

1. Generate Trace File



Enable Tracing For The Concurrent Manager  Program
Select the Enable Trace Checkbox
Note : Checking the Trace Check box on the Concurrent Program gives an Event 10046 Level 8 trace. So even if the trace is set for Binds and Waits on the Submission form once the concurrent program is encountered in the trace it will reset to level 8 so no binds will be present in the trace after that point.
Turn On Tracing
•Responsibility: System Administrator
•Navigate: Profiles > System
•Query Profile Option Concurrent: Allow Debugging
•Set profile to Yes
Run Concurrent Program With Tracing Turned On
•Logon to the Responsibility that runs the Concurrent Program
•In the Submit Request Screen click on Debug Options (B)
•Select the Checkbox for SQL Trace
If the Debug option is greyed out & not updateable set the profile Concurrent: Allow Debugging to Yes
2. Find Trace File Name
Run the following SQL to find out the Raw trace name and location for the concurrent program.  The SQL prompts the user for the request id
prompt
accept request prompt ‘Please enter the concurrent request id for the appropriate concurrent program:’
prompt
column traceid format a8
column tracename format a80
column user_concurrent_program_name format a40
column execname format a15
column enable_trace format a12
set lines 80
set pages 22
set head off
SELECT ‘Request id: ‘||request_id ,
‘Trace id: ‘||oracle_Process_id,
‘Trace Flag: ‘||req.enable_trace,
‘Trace Name:
‘||dest.value||’/'||lower(dbnm.value)||’_ora_’||oracle_process_id||’.trc’,
‘Prog. Name: ‘||prog.user_concurrent_program_name,
‘File Name: ‘||execname.execution_file_name|| execname.subroutine_name ,
‘Status : ‘||decode(phase_code,’R',’Running’)
||’-'||decode(status_code,’R',’Normal’),
‘SID Serial: ‘||ses.sid||’,'|| ses.serial#,
‘Module : ‘||ses.module
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name=’user_dump_dest’
and dbnm.name=’db_name’
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id;
To check the timeline of the request :
SELECT request_id, TO_CHAR( request_date, ‘DD-MON-YYYY HH24:MI:SS’ )
request_date, TO_CHAR( requested_start_date,’DD-MON-YYYY HH24:MI:SS’ )
requested_start_date, TO_CHAR( actual_start_date, ‘DD-MON-YYYY HH24:MI:SS’ )
actual_start_date, TO_CHAR( actual_completion_date, ‘DD-MON-YYYY HH24:MI:SS’ )
actual_completion_date, TO_CHAR( sysdate, ‘DD-MON-YYYY HH24:MI:SS’ )
current_date, ROUND( ( NVL( actual_completion_date, sysdate ) – actual_start_date ) * 24, 2 ) duration
FROM fnd_concurrent_requests
WHERE request_id = TO_NUMBER(‘&p_request_id’);
You may produce a complete report reference of the request ID using the Note:187504.1 bde_request.sql Process and Session info for one Concurrent Request(11.5)

3. TKPROF Trace File
Once you have obtained the Raw trace file you need to format the file using TKPROF.
$tkprof raw_trace_file.trc output_file explain=apps/apps sort=(exeela,fchela) sys=no
Where:
raw_trace_file.trc: Name of trace file
output_file: tkprof out file
explain:  This option provides the explain plan for the sql statements
sort:  This provides the sort criteria in which all sql  statements will be sorted.  This will bring the bad sql at  the top of the outputfile.
sys=no:  Disables sql statements issued by user SYS
Another example: To get (TKPROF) sorted by longest running queries first and limits the results to the “Top 10″ long running queries
$ tkprof sys=no explain=apps/ sort=’(prsela,exeela,fchela)’ print=10