Monday, March 30, 2009

Relation between RMAN retention period and control_file_record_keep_time

RMAN backup keeps the backup metadata information in the reusable section of the controlfile. Its depends on the parameter CONTROL_FILE_RECORD_KEEP_TIME.

CONTROL_FILE_RECORD_KEEP_TIME specifies the minimum number of days before a reusable record in the control file can be reused. In the event a new record needs to be added to a reusable section and there is not enough space then it will delete the oldest record, which are aged enough. Backup retention policy is the rule to set regarding which backups must be retained (whether on disk or other backup media) to meet the recovery and other requirements. If the CONTROL_FILE_RECORD_KEEP_TIME is less than the retention policy then it may overwrite reusable records prior to obsoleting them in the RMAN metadata. Therfore it is recommended that the CONTROL_FILE_RECORD_KEEP_TIME should set to a higher value than the retention policy. Formula CONTROL_FILE_RECORD_KEEP_TIME = retention period + level 0 backup interval + 1

For e.g:

A level 0 backup once a week with retention policy of a recovery windows of 14 days then in this case the CONTROL_FILE_RECORD_KEEP_TIME should be 14+7+1=22

Internet Explorer 7 Crashes When Using Web.show_document With an URL to Download a File

Internet Explorer 7 Crashes When Using Web.show_document With an URL to Downloads a File
Running the same URL in the following cases are working fine:

- From Form using FireFox/Netsacpe browsers.

- Outside Forms using Internet Explorer 7 browser

This is because Internet Explorer 7 has a security checks that are enabled by default to protect computers from automatic downloads from websites.
To work around this issue, please execute the following steps:

1. In Internet Explorer, click Tools, and then click Internet Options.

2. Click the Security tab.

3. There are four security zones listed:

• Internet• Local intranet• Trusted sites• Restricted sites

Click the zone "Internet".
4. Under Security level for this zone, click Custom Level.

5. Under ActiveX controls and plug-ins, under Automatic prompting for ActiveX controls, click Enable.

6. Under Downloads, under Automatic prompting for file downloads, click Enable, and then click OK.

script for creating soft link for all Custom concurrent programs on target system after cloning

This code snippet helps to create all the soft link for custom concurrent program after clone on a target system.
Script is invoked from applmgr user account.
Shell Script for soft link creation on target system after cloning.
cat <<-EOF
# Usage
# Used for target System after cloning to take care of soft link
# for all the custom program to the executable $FND_TOP/bin/fndcpesr
# Procedure :
# Should be run manually
# ---------------------------------------------------------------
# Dependencies :
# NO
# Change history :
# ---------------------------------------------------------------
# For displaying help and usuage

while getopts h OPT
case $OPT in
h) doc
exit 0;;
\?) echo "Usage : $0 "
exit -1;;
shift `expr $OPTIND - 1`
# Check for APPL_TOP

if [ t${APPL_TOP} = "t" ]
then echo "Appl Top is not set, Set the appltop and run it again"
exit 0;

# Code for soft link creation

for prgName in `ls */11.5.0/bin/*prog`
echo "Creating link for - $prgName"
rm `echo $prgName sed 's/\.prog//'`
ln -s $FND_TOP/bin/fndcpesr `echo $prgName sed 's/\.prog//'`
echo "\t\t\t.......created for $prgName"

How To Prevent Concurrent Requests Executing on New Cloned Environment

How to prevent Concurrent Requests executing on a environment created as part of a clone.
To prevent concurrent requests executing on a newly cloned environment 2 steps will be required.

1) Prevent Concurrent Managers from starting as part of the Clone

2) Change data concerning concurrent requests so they do not execute when the concurrent managers start.

To prevent Applications Services (including Concurrent Managers) from starting automatically during Rapid Clone an enhancement request has been raised to see if this can be considered an option during the clone.
Until this feature is available there is the following workaround.

1. Edit the $COMMON_TOP/clone/bin/

2. Go to the end of the file

3. Change the following lines:-
print "\n Starting application Services for $s_dbSid:\n";print "Running:\n";print(" $s_com/admin/scripts/$s_contextname/adstrtal.$ext $s_apps_user/\n");system("$s_com/admin/scripts/$s_contextname/adstrtal.$ext $s_apps_user/$PWD");
print "\nNOT Starting application Services for $s_dbSid:\n";#print "Running:\n";#print(" $s_com/admin/scripts/$s_contextname/adstrtal.$ext $s_apps_user/\n");#system("$s_com/admin/scripts/$s_contextname/adstrtal.$ext $s_apps_user/$PWD");

4. Run "perl appsTier" as normal.
The services will not start Automatically when the clone completes allowing data to be changed safely.
There is a need to change 2 sets of concurrent requests to prevent execution

a) Terminate 'Running' Requestsb) Set Pending jobs to 'On Hold'

a) Set Terminating or Running to Completed/TerminatedUPDATE fnd_concurrent_requestsSET phase_code = 'C', status_code = 'X'WHERE status_code ='T'OR phase_code = 'R'/

b) Place Pending/(Normal/Standby) to On HoldUPDATE fnd_concurrent_requestsSET hold_flag = 'Y'WHERE phase_code = 'P'AND status_code in ('Q','I')/

Once these changes have been committed then the Application services including concurrent manager can be restarted and the concurrent jobs will not be executed.

What Is the OAFM JVM Process Used For?

When running status you notice a java process-type named "OC4J-oafm". When running you may observe that file is called to
What is this OAFM Java Virtual Machine? What is it used for, can it be turned off, and how is it scaled.
OAFM is short for "Oracle Applications Fusion Middleware", however this doesn't best describe what the JVM is currently used for.
More specifically the OAFM JVM is used for Map Viewer applications, Oracle Transport Agent XML transactions, and Web Services.
There are 2 applications in Release 12 that use Map Viewer, these are:
Field Service and Transportation Planning
You may be wasting resources on your server by starting the OAFM JVM's if your not using Field Service, Transportation Planning, XML Gateway or Web services. If you are not using these products you can safely disable the OAFM JVM. You can follow the steps below to stop the JVM from starting when running

1. Stop the OAFM JVM via stop

2. Edit context via the context editor and change s_oafmstatus to disabled

3. Run Autoconfig

Now when is run the script will not be called and thus OAFM processes will not start. If you have more than one application tier please perform the actions above on all application tiers.

If you are using Field Service and/or Transportation Planning a good rule of thumb would be to have 1 OAFM jvm per 80-100 active Map Viewer users. Map data generally is quite large in size so stick to the lower end of the scale....80 users per JVM.

To adjust the number of OAFM JVMs edit context via the context editor and change s_oafm_nprocs to the number of JVMs required per node. Now run Autoconfig to propagate the change. Repeat the steps for each application tier.

Thursday, March 19, 2009

Connect to Oracle as sys via toad or any other third party software

A remote connect as a privileged user requires the database to be configured to allow remote DBA operations. The remote user will HAVE to supply a password in order to connect AS SYSDBA.

Ie: In Oracle to perform a remote connect AS SYSDBA you must use the syntax


To allow remote SYSDBA connections you must:
- Set up a password file for the database on the server
- Set up any relevant init.ora parameters

-- Setting up a Password File:
The password protection is controlled by an Oracle 'Password' file. To create a password file log in as the Oracle software owner and issue the command:

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=mypasswd

using the required password. The file name is important and should specified as above. You should create this file when the database is shut down.

To change a password:
- shut down the database,
- Rename the $ORACLE_HOME/dbs/orapw$ORACLE_SID file
- Issue a new orapwd command with a new password

Alternatively, when the database is open use:


This will propagate the (hashed) password to the existing password file.

-- Setting up the Init.Ora file To enable remote SYSDBA connections set the init.ora parameters thus:

EXCLUSIVE forces the password file to be tied exclusively to a single instance. To disable remote internal connections set REMOTE_LOGIN_PASSWORDFILE to NONE.

NOTE: The setting of REMOTE_OS_AUTHENT does NOT affect the ability to connect AS SYSDBA from a remote machine.

How To Move The Central Inventory To Another Location on unix host

1. Find the current location of the central inventory.
$ find / -name oraInventory -print/u01/app/oracle/oraInventory

2. Open the oraInst.loc file (by default this is in /etc or /var/opt/oracle depending on which Unix / Linux platform you are using) and check the value of inventory_loc
For example:
$ find / -name oraInst.loc -print/etc/oraInst.loc
$cat /etc/oraInst.locinventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall
The oraInst.loc file is simply a pointer to the location of the central inventory (oraInventory)

3. Copy the oraInventory directory to the destination directory
For example:
$cp -Rp /u01/app/oracle/oraInventory /u02/app/oracle

4. Edit the oraInst.loc file to point to the new location
For example:
$vi /etc/oraInst.loc
(make the required change and then save the file)
$cat /etc/oraInst.locinventory_loc=/u02/app/oracle/oraInventory inst_group=oinstall

Wednesday, March 18, 2009

List out Oracle's undocumented/hidden database parameters.

You can view your database hidden or underscore parameters by running this query:

SELECT x.ksppinm NAME, y.ksppstvl VALUE, ksppdesc DESCRIPTION FROM x$ksppi x, x$ksppcv y WHERE x.inst_id = userenv('Instance')AND y.inst_id = userenv('Instance') AND x.indx = y.indx AND SUBSTR(x.ksppinm,1,1) = '_' ORDER BY 1;

Monday, March 16, 2009

R12 OA framework: common questions

1)How to enable log in R12?

Since there is no Jserv as in 11i, there is no more dependency on file for enabling of log.Here are the details how to enable log on R12:

In R12,Goto $ORA_CONFIG_HOME/10.1.3/opmn/conftake the backup of opmn.xmledit opmn.xml for data id="java-options" and add the following:-DAFLOG_ENABLED=true -DAFLOG_LEVEL=statement-DAFLOG_MODULE=fnd%-DAFLOG_FILENAME=/tmp/aflog.txt -Djbo.debugoutput=console

The log message should get written in,


2)How to add custom classpath in OC4J server classpath ?

Add an entry in,

prepending the existing library path.

4)Steps for Manual compilation of jsp in R12.

> cd $FND_TOP/patch/115/bin
> --compile -s hello.jsp

5)DBC file location in R12:


6)Bouncing OC4J server, for OAF to pick latest class and xml files.

In R12, there are two scripts which need to run to bounce the HTTP server and make OC4J container pick latest class files instead of one as in 11i, we only need to run shell script to bounce Apache Jserv.
Since in R12 Jserv is replaces by OC4J container, we need to run two scripts:

1)Script which is responsible for bouncing Oracle HTTP Server (powered by Apache).(

2)Script which responsible for bouncing OC4J container (
So basically, here is the sequence of steps you need to do :
1) stop
2) stop
3) start
4) start

All these scripts are in $ADMIN_SCRIPTS_HOME

Friday, March 13, 2009

What is the parameter names for parameters in the context file for Workflow

These are the parameter names for parameters in the context file for

Outbound EMail Account (SMTP) Server Name.
Inbound EMail Account (IMAP) Server Name,
Reply-To Address?.

Parameters for the seeded Workflow Notification Mailer appear in AutoConfig as well as in the notification mailer configuration wizard.When you specify values for these parameters through the notification mailer configuration wizard, your AutoConfig context file is synchronized with those values as well.Likewise, if you specify values for these parameters through AutoConfig, the Workflow Notification Mailer configuration will be synchronized with those values as well. The following parameters appear in AutoConfig:

SMTP Server
IMAP ServerInbox
UsernameReply To E-mail Address
HTML Agent Name ex. http://

Alternatively, you can check the context file and here are the names of the parameters:

s_javamailer_imap_user - Oracle Workflow Java Mailer IMAP User Name s_javamailer_reply_to - Oracle Workflow Java Mailer IMAP ReplyTo Address s_javamailer_imaphost - Oracle Workflow Java Mailer IMAP Host s_javamailer_imapdomainname - Oracle Workflow Java Mailer domain s_wf_admin_role - Oracle Workflow Admin Role s_smtphost - SMTP Server Host s_smtpdomainname - Email Server Domain.

Tuesday, March 10, 2009

Unable to launch the Rapidwiz for Oracle Application Release 12

When we launch the rapidwiz installer for Oracle Applications release 12. We have received the following error message.

# /u01/stage12/;startCD/Disk1/rapidwiz/jre/Linux/1.5.0/bin/java:error while loading shared libraries: cannot open shared object file: No such file or directory.

Issue is similar to bug 8268502.This is caused by setting LD_ASSUME_KERNEL to 2.4.19 based on wrong version calculation. We have implemented the workaround of commenting line 111 of which is located in startCD/Disk1/rapidwiz/bin . Please note that this workaround should be implemented only in case of Enterprise Linux 5 Update 3 environments.

"Linux" "Linux_x64")
if test -f "/etc/redhat-release"; then
grep -e 3 -e 4 /etc/redhat-release > /dev/null 2>&1
if test "$exit_code" == "0" ; then
# LD_ASSUME_KERNEL=2.4.19 This has been commented to resolve issues on EL 5 Update 3
if [ x${PATH} != x ] ; then
export PATH

Restart the Rapidwiz installer after implementing this workaround.

Monday, March 9, 2009

How to create a password file

1. Log on as the Oracle owner

2. Shutdown the database

3. UNIX:
cd $ORACLE_HOME\database

4. Issue the following command. (See explanatory comments at bottom for help)

$ ORAPWD FILE=filename [ENTRIES=numusers] [FORCE={YN}] [IGNORECASE={YN}] [NOSYSDBA={YN}] (NOTE: the NOSYSDBA option can be used only if Oracle OLAP has been implemented)

5. Add, in the init.ora file, the following:


6. Restart the database for this to take affect. (NOTE: If the password file is created for the first time, the database need not be restarted. But if a password file already exists, rename/backup the existing file, create a new password file and restart database for the changed to take effect)

Argument Description
========== ==================================
FILE: Name to assign to the password file. See your operating system documentation for name requirements. You must supply a complete path. If you supply only a file name, the file is written to the current directory.

ENTRIES: (Optional) Maximum number of entries (user accounts) to permit in the file.

FORCE: (Optional) If y, permits overwriting an existing password file.

IGNORECASE: (Optional) If y, passwords are treated as case-insensitive.

NOSYSDBA: (Optional) For Data Vault installations. See the Data Vault installation guide for your platform for more information.

NOTE: Under UNIX, the file name MUST be orapw'SID' for the database in which the password file is being created has to be used.

Thursday, March 5, 2009

Tips On Troubleshooting Java Exception Stack Traces

1) Collect Exception Details

NOTE: For OA Framework-based pages use FND Diagnostics and Apache logs. For others use any product-specific log files and Apache logs
Set Profile ‘FND: Diagnostics’ to ON. Reproduce the issue to get the Unexpected Exception page. Click the link in the text: "Click [here] for exception details." Save the whole page and review the Exception that starts with ‘### Detail 0 ###’ only.
Set FND Diagnostics Debug logging on (either to-page or to-file) and check the ouput. See
Note 290614.1 -How To Get Log Files In iProcurement, for steps.
Get the Apache error_log and mod_jserv.log files and check for exceptions.

2) Analyze the Exception Stack Trace.
Use the following example to understand which parts are important and useful to determine areas to investigate, potential causes and solutions.

java.lang.NullPointerException at java.lang.String.( at oracle.apps.icx.por.domain.ReqCustom.validateGLAccount( at oracle.apps.icx.por.domain.ReqDistribution.customValidateAccount( at oracle.apps.icx.por.domain.ReqDistribution.validate( at oracle.apps.icx.por.domain.ReqLine.validateReqDistribution( at oracle.apps.icx.por.domain.Requisition.validateReqDistribution( at oracle.apps.icx.por.apps.CreateReq.validateDistribution( at oracle.apps.icx.por.apps.CreateReq.requisitionAction( ...

Within this, the key parts to understand would be:
NullPointerException is the Java Error Type being raised.
java.lang.String. is the core (JDK) Java Method which is raising the above error.
validateGLAccount is the Oracle Method that is using the above core Java Method. is the Oracle Class File Name and Line Number that is making the call to the validateGLAccount method.
ReqDistribution.customValidateAccount is the Parent 'class.method' which is calling the above Method, and so forth down the list (child to parent).

3) Check for Similar Issues on Metalink:

Search on the functionality being used and the Java Error Type.
Search on first and second Oracle Class and Method names. Match any hits to the functionality and the failing Line Numbers.
Compare the file versions of any patches to those in the instance. Apply only those patches with later file versions, and on the same eBusiness Suite (eg. 11.5.10) and Procurement Family Pack (eg. FP.J) version. Always check the patch readme.txt for details.
Use background functionality, exception details and debug logfile hints information, to check instance setups and transaction data, as needed.

4) Understand the Common Java Exceptions

NullPointerException - Means a variable referred to in the code is not available (null). E.g. Profile Option may not be set.
NoClassDefFoundError / NoSuchMethodError / IllegalAccessError - Java code file is missing, or invalid reference is used.
OutOfMemoryException - The JVM cannot allocate more memory for use. Check server resources and AutoConfig and configuration.
ClassCastException / NumberFormatException - Incorrect conversion of a data type (e.g. Character to Number)
[StringArray]IndexOutOfBoundsException - Data being used exceeds the code structure being used for it. This commonly occurs from unexpected database results size.

These points can be used as a general guideline while facing java stack traces

Wednesday, March 4, 2009

Create A Shortcut To The Login Page of E-Business Suite 11i

Follow these steps to the E-Business Suite login page so that the users can access it directly without having to write the full URL

1. Right-click on the desktop.
2. Choose "New" => "Shortcut"
3. In the dialog box, click on the Browse button and point to the Internet Explorer executable(iexplore.exe, this is usually located under C:\Program Files\Internet Explorer) and press OK.
4. The text box will now show the full path of iexplore.exe, before pressing Next, go to the endof this path, add a space then the URL you need to access, which is (http://host.domain:port# /OA_HTML/AppsLocalLogin.jsp)
5. Press Next.
6. Give the shortcut a name, e.g. Oracle Apps Login and press Finish.Now, if you click this shortcut, the login page will open directly.

Tuesday, March 3, 2009

SQL prompt takes long time to open while starting the database

whenever we start our database through sqlplus, the sqlplus hangs for some time at "Database Mounted" stage, but in the alert log everything looks fine and we are able to connect the database from other session, but the session which we used to start takes long time to prompt the Database opened and SQL.

Database Version:
Application Version: 12.0.4

The following query will let you know whether the instance uses the PFILE or SPFILE.

SQL> SELECT name,value FROM v$parameter WHERE name = 'spfile';

---------- --------------------------------------------------
spfile /u01/oracle/product/9.2.0/spfileTEST.ora


SQL> show parameter spfile
----------------------------------- ----------- ------------------------------
spfile string /u01/oracle/NGIND/db/tech_st/1

The following query is used to check the current size, minimum size and maximum size of the initialization parameters.

select component, current_size, min_size, max_size, granule_size from v$sga_dynamic_components

shared pool 419430400 419430400 0 4194304
large pool 0 0 0 4194304
java pool 8388608 8388608 0 4194304
streams pool 16777216 0 0 4194304

SGA_TARGET specifies the total size of all SGA components
If SGA_TARGET is set the values for the following parameters are set dynamically.
Buffer cache (DB_CACHE_SIZE)

Shared pool (SHARED_POOL_SIZE)
Large pool (LARGE_POOL_SIZE)
Java pool (JAVA_POOL_SIZE)
Streams pool (STREAMS_POOL_SIZE)

In order to overcome this issue.We need to diasable the SGA_TARGET parameter and specify the minimal values for the following components

Buffer cache (DB_CACHE_SIZE)
Shared pool (SHARED_POOL_SIZE)
Large pool (LARGE_POOL_SIZE)
Java pool (JAVA_POOL_SIZE)
Streams pool (STREAMS_POOL_SIZE)

Before specifying the manual values for the following parameters the database should be taken down
If the instance is using the pfile. We can directly change the values of these parameters using the VI editor.
If the instance uses the spfile. It has to be convereted to pfile using the following script.

Sql> create pfile from spfile.

Now the values of the pfile are edited and again converted back to spfile.
We need to comment are remove the SGA_TARGET parameter form the pfile and need to set the minimal values for the above parameters.
You can find out the minimal values of the initialization parameters using the following query.

select component, current_size, min_size, max_size, granule_size from v$sga_dynamic_components

Recreate the spfile using the following command.
Sql> create spfile from pfile;

Start the database.

Monday, March 2, 2009

Is it Safe To End Date Some Applications Users like GUEST ?

The following 10 users are generated by the Oracle applications


Is it safe to assign end dates to these users (if you are under a condition as not to remove them)?
In particular many are concerned with ASGADM and MOBILEADMIN as these have access to the responsibility System Administrator.

You may end date somes users and must not do it for some others like GUEST.

To get an in depth understanding, you can the review the chapter AUTHENTICATION ( page 23 ) of the white paper "Best Practices for Securing Oracle E-Business Suite" from Metalink Note 189367.1 .
It shows the users which can be end dated and the users which must not be , depending on the Applications you are using.