Thursday, September 24, 2009

Configuring smtp in Linux

Configuring smtp in Linux

1. Ask mail administrator to add the linux server from which we need to send mail to mail server

2. comment out following line in /etc/mail/

dnl This changes sendmail to only listen on the loopback device
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.

dnl DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')

3. Compile the changes we made,

m4 /etc/mail/ > /etc/mail/

4. Start the sendmail service

service sendmail start

5. Test the mail using the following,

echo "Hello World" mail -s "Test from NG Monitor"

6. The mail status can be checked through the following command
mail queue

Tuesday, September 22, 2009

Concurrent Requests Remain in Pending/Standby Status

Concurrent Requests Remain in Pending/Standby Status.

fact: Oracle Application Object Library
symptom: Concurrent requests remain in pending standby status
symptom: Conflict resolution manager will not manage concurrent requests
symptom: Conflict resolution manager hangs
symptom: FND_CONFLICTS_DOMAIN table locked

A concurrent request errored out just prior to first lockup and a user terminated another job prior to the second lockup. In the first case, the FNDLIBR did not exit properly and had to be killed. In the second case, the terminated concurrent request did not exit properly and had to be killed (but its status was set to "Completed Terminated" by the standard manager which processed it).

1. Kill the problem requests at the OS level with kill -9 command.
2. Restart the concurrent manager

How to rejoin new ORACLE_HOME with an installed EBS Instance?

If the database is currently running, do the following :

Remove ORACLE_HOME info from NetServices Toplogy model :

1. Set env from old $ORACLE_HOME
2. Start Listener and database
3. cd $ORACLE_HOME/appsutil/bin
Execute following command :
perl contextfile=old $ORACLE_HOME/appsutil/_.xml -removesystem

4. Shutdown Database and listener

Update new ORACLE_HOME :
5. Copy OLD $ORACLE_HOME/appsutil directory to new $ORACLE_HOME

6. Copy OLD $TNS_ADMIN directory to new $ORACLE_HOME
7. Edit new $TNS_ADMIN/*.ora files and update ORACLE_HOME path in following files :
8. Copy OLD $ORACLE_HOME/*.env to new $ORACLE_HOME
9. Edit /*.env files and update paths within10. Run /_.env
11. Rename any existing /dbs/initSID.ora or spfile
12. cd $ORACLE_HOME/appsutil/bin

Build a new context file via following command :

./ contextfile=/appsutil/_.xml validate=no

Enter the values to reflect new ORACLE_HOME

13. Run AutoConfig via following commands :

a) cd $ORACLE_HOME/appsutil/bin

b) ./ contextfile=/appsutil/SID_hostname.xml

NOTE: It will fail because database is down, but we want it to create configuration files

15. Start listener
16. Start Database

How to Run the Purge Concurrent Request and/or Manager Data Program and Which Tables Does it Purge?

To run the Purge Concurrent Request and/or Manager Data program:

1. Log in to Application as System Administrator responsibility.
2. Navigate to Request> Run> Single Request
3. Query up Purge Concurrent Requests.
4. For values to be entered in the parameter screen refer to the Oracle
Administration System Administration Guide
The following tables will be purged:
This table contains a complete history of all concurrent requests.
When a user submits a report set, this table stores information about the
reports in the report set and the parameter values for each report.
This table records arguments passed by the concurrent manager to each program
it starts running.
This table records when requests do not update database tables.
This table records information about Oracle Applications and operating system
This table collects runtime performance statistics for concurrent requests.
This table contains the concurrent program performance statistics generated by
the Purge Concurrent Request and/or Manager Data program. The Purge Concurrent
Request and/or Manager Data program uses the data in FND_CONC_STAT_LIST to
compute these statistics.
Stores the post request processing actions(e.g., print, notify) for each
submitted request. There's a concurrent_request_id here for each request_id

Stores the post request processing actions(e.g., print, notify) for
submitted request set programs that are stored in FND_RUN_REQUESTS

This table stores information about environment name and value for each of the
concurrent process

Is There a Method to Block Concurrent Requests From Running?

Yes. From the manager work shift, by making the processes=0 for that work shift at specific time and date.

Something to remember when creating manager work shifts that:

A. Date-specific work shifts override work shifts that do not specify a specific date.
B. Overlapping Work Shifts - Priority Levels:

1. The work shift with the more specific time period takes effect for the overlapping time period.

2. Overlapping work shifts with the same priority:

The work shift with the largest target processes takes effect.

Is Thers a Document That Defines All System Administrator Concurrent Requests?

No document exists that list all the concurrent programs definitions and descriptions.There are many programs and are handled by many different teams, there is documentation for eachindividual program, but nothing that summarizes all together.A search through My Oracle Support application with the concurrent program executable name will return references that contain details of the particular program..The following is a query that summarizes all the concurrent programs and a brief description ofthem plus their respective executable file. This is the same information that you can be obtained throughapplications if you navigate programs one by one.

SQL> select cp.concurrent_program_name, cpt.user_concurrent_program_name, cpt.description,ex.executable_name, ext.user_executable_name, ext.descriptionfrom fnd_concurrent_programs cp, fnd_concurrent_programs_tl cpt,fnd_executables ex, fnd_executables_tl extwhere cp.concurrent_program_id = cpt.concurrent_program_idand ex.executable_id = ext.executable_idand cp.executable_id = ex.executable_id;

The System Administrator’s Guide does summarize some of the common programs utilized andtheir description, for example:

- Function Security Reports

- Active Responsibilities Report

- Active Users Report

- Signon Audit Concurrent Requests Report

- Signon Audit Responsibilities Report

- Report Group Responsibilities Reportand so on.

You may use Concurrent Program Details Report, which will list every concurrent report, to find out more details on a specfic report.The "Concurrent Program Details Report" provides details on how the program is registered and the"description" abstract of the registered program.For usage, you need to reference applications manuals.

How To Ensure Load Balancing Of Concurrent Manager Processes In PCP-RAC Configuration

There are 2 types of resources in use for PCP/RAC:

1.O/S processes for manager and requests

2.Shadow processes for database connection for managers and requests.

O/S processes for managers (e.g. FNDLIBR, etc.) and request processes (ar60run, sqlplus, etc.)will run on primary node defined for manager.Shadow processes for database connection use load balanced alias (s_cp_twotask) and the load isdistributed between database nodes by sqlnet. This is controlled by sqlnet and CP code is notinvolved. This should mimic what happens to sqlplus connections using load balanced alias forRAC. The following sql can be used to check how manager connections are spread:

select inst_id, count(*) from gv$session where process in (select os_process_id from fnd_concurrent_processes where process_status_code = 'A') group by inst_id;

Now to loadbalance the shadow concurrent manager processes please set the below :

1.Set the profile option "Concurrent: PCP Instance Check" to "OFF"
2.Set the context variable s_cp_twotask to '_806_BALANCE' (This entry can be found in the tnsnames.ora file). You have to set this in both RAC nodes.

3.Run autoconfig and after that you can check for the loadbalancing aspects

How To Enable Debugging For Concurrent Managers?

1. Enable DIAG for the ICM, by modifying script
$COMMON_TOP/admin/scripts/SID_hostname/ as follows :
Replace line : CONTEXT_PARAMS="diag=N wait=N" With : CONTEXT_PARAMS="diag=Y wait=N"
Save file.

2. Enable the Debug Service if not yet enabled :
- Login with System Administrator responsibility
- Navigate to Concurrent / Manager /Define
- Query manager with name "Debug Service"
- tick the "Enabled" checkbox if not yet ticked
- save

3. Stop and restart the concurrent managers
Don't forget to switch it off after the debug information has been generated.

Browser Window Is Always Minimized When Viewing Concurrent Log/Out Files

This issue is caused by a new 'feature' in Java 1.6.0_10 and aboveMore details of the feature can be found at:

To implement the solution, please execute the following steps:

Note - this is a client machine specific solution:
1. Click Start.
2. Click Control Panel.
3. Double click on Java Control Panel.
4. Click Advance tab in Java Control Panel.
5. Scroll to Java Plug-in entry.
6. Uncheck the check box for Enable next-generation Java Plug-in.
7. Click Ok and restart the system.
8. Retest for the issue.

Monday, September 21, 2009

How to Display Time/Date During RMAN Operations

To display time / date during RMAN operations, follow the procedure:

To get time / date displayed during an RMAN operation the OS command (time and
date) should be
used with the option /T ( to stop the OS requiring user interaction)

To display a timestamp in the RMAN log, run something similar to the following -

RMAN >run{
allocate channel a1 type disk
HOST 'time /T';
HOST 'date /T';
release channel a1;

Output looks like -

04:09 PM
host command complete

host command complete


If you want the Time or Date to be recorded in a file you can use the following

RMAN> run{
host 'echo Backup stored in logfile (logrman.txt) taken on ->d:
host 'time /T>>d:\oracle\ora81\rmanbkp\rmandate.log';
host 'date /T>>d:\oracle\ora81\rmanbkp\rmandate.log';

This will produce a file that has -

Backup stored in logfile (logrman.txt) taken on -

To get time / date displayed during an RMAN operation the OS command (date)
should be used.

To display a timestamp in the RMAN log, run something similar to the following -

RMAN >run{
allocate channel a1 type disk
HOST 'date';
release channel a1;
Output looks like -

RMAN-03022: compiling command: host
Wed Jul 24 16:31:06 BST 2002
RMAN-06134: host command complete


If you want the Time or Date to be recorded in a file you can use the following

RMAN> run{
host 'echo Backup stored in logfile (logrman.txt) taken on ->/tmp/rmandate.
host 'date>>/tmp/rmandate.log';

This will produce a file that has -

Backup stored in logfile (logrman.txt) taken on -
Thu Sep 5 16:49:51 BST 2002

Wednesday, September 9, 2009

How to Check the Environment Variables for an Oracle Process

1. Determine the pid of the process at OS level, eg for the smon process:
ps -ef grep smon
2. Get the environment of the process:
pargs -e grep ORACLE
cat /proc//environ
ps eauwww
On this Unix flavor there is no command to grasp the process environment directly. This can only be
extracted using a debugger from the _environ structure. This procedure can be used on the other
Unix flavors, as follows:
gdb smon
This attaches gdb to the pid mentioned above. The smon name is just an indication that the process
we attach to is smon, but the only parameter that matters is the pid.
After attaching to the process, the following command extracts the information from the _environ
p ((char**)_environ)[0]@30
which would list the first 30 environment variables. If more are defined, just increase the parameter after @.
As well, the list can be extracted one item from the list at a time, using an iterator like:p ((char**)_environ)[i]
which would extract element #i+1.Windows:
To get the information on Windows, 2 things are needed:
1. check the registry for the ORACLE_* keys used to start the Oracle process. These keys are in:
(before 10g)
from 10g on.
2. check the environment variables that were used by the oracle process at startup.
For this, one would need the process explorer utility from sysinternals, which can be found at:
After starting the procexp utility, find the oracle process you want to check in the process list, right
click on it, then select Properties. The Environment tab should indicate all the environment variables
used when the process was started (even if dynamically in command line).
The utility also displays the key values from registry, but being so many it's difficult to look for them.