Sunday, February 28, 2010

10g Application Server Installation and Errors

Had to setup 10g Application Server on Oracle Enterprise Linux 5 and came across few errors.


1. Infra-tire Installation failed to startup the service.
Error:
httpd: error while loading shared libraries: libdb.so.2

Solution: 
create a symbolic link "ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2" 


2. Mid-tire Installation failed

Error:
/usr/lib/libXtst.so.6: undefined reference to `__stack_chk_fail@GLIBC_2.4'
/usr/lib/libXtst.so.6: undefined reference to `__fprintf_chk@GLIBC_2.3.4'
/usr/lib/libXtst.so.6: undefined reference to `__sprintf_chk@GLIBC_2.3.4'
collect2: ld returned 1 exit status
make: *** [rwproxy] Error 1


Solution:
A) The following i386 packages are not part of the OS distribution media and must be downloaded separately (from http://oss.oracle.com/projects/compat-oracle/files/Enterprise_Linux for both OEL 5 and RHEL 5) and installed manually:

* openmotif21-2.1.30-11.EL5.i3861
* xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386
* binutils-2.17.50.0.6-6.0.1.i3862

B) Link to Motif library for Oracle Application Server 10.1.2 (on OEL 5 and RHEL 5 only)

Perform the following command (as root on your system) to update a required link to a Motif library prior to relinking or patching the 10.1.2 Application Server Oracle Home:

# unlink /usr/lib/libXtst.so.6
# ln -s /usr/X11R6/lib/libXtst.so.6.1 /usr/lib/libXtst.so.6



3. MiddleTire Installation failed to start the Discoverer Service


Errors:
dis51pr: error while loading shared libraries: libpthread.so.0


Solution:
Remove LD_ASSUME_KERNEL parameter from the opmn.xml (in the Discoverer section) file then reloaded it with "opmnctl reload"

ompnctl startproc ias-component=Discoverer

Friday, February 26, 2010

Clearing Cache in Oracle EBS R12

Readers,

Clearing the _pages in R12 creates blank login page issue, as in R12 the jsp files does not get compiled automatically.

For clearing middle tier cache :

+ Navigate to Functional Administrator responsibility > Core Services > Caching Framework > Global Configuration > Clear cache
+ Bounce Apache and OACORE services.

Comments are most welcome...

Thanks.

R12 : Getting Blank Page

Dear Readers,

Recently we had an issue with one of our development instance where the clients were getting blank page when they were accessing the web URL.

After investigating the log files under $LOG_HOME/ora/10.1.3/Apache/*, $LOG_HOME/ora/10.1.3/opmn/* and $LOG_HOME/ora/10.1.3/j2ee/* directory, I came to know that someone removed _pages directory from $COMMON_TOP and the _pages directory was empty.

When I checked the file $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml, I saw the following entries,

<init-param>
<param-name>main_mode</param-name>
<param-value>justrun</param-value>
</init-param>
</servlet>

So, When main_mode = justrun the OC4J container running the OACoreGroup is told that no compilation on the fly is allowed and only (pre)compiled classes are picked up. Since these have been removed the processing of the JSP page is blocked.

Finally as workaround, we regenerated the JSP file using the following commends,

$FND_TOP/patch/115/bin/perl ojspCompile.pl --compile --flush -p 2

and as Long Team Fix, we made the following changes on $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml file on all FE servers,

From :

<init-param>
<param-name>main_mode</param-name>
<param-value>justrun</param-value>
</init-param>
</servlet>

To :

<init-param>
<param-name>main_mode</param-name>
<param-value>recompile</param-value>
</init-param>
</servlet>

and Changed the following in $CONTEXT_FILE,

From : <jsp_debug_parameters oa_var="s_jsp_main_mode">justrun</jsp_debug_parameters>
To : <jsp_debug_parameters oa_var="s_jsp_main_mode">recompile</jsp_debug_parameters>

Reference Oracle Support Note : JSP Pages Hanging in R12 After Removing Cached Class Files in _pages [ID 433386.1]

Comments are most welcome.....

Thanks.

Tuesday, February 23, 2010

Rare Index with Double Quotes


Came across this rare index.

SQL> select index_name from dba_indexes where tablespace_name='MEDIUM_DATA';

INDEX_NAME
UK_F_PLAN_FC_ACT_jan
F_PLAN_FC_ACT_OLTAS_INDEX1_jan

2 rows selected.

SQL> alter index star.UK_F_PLAN_FC_ACT_jan rebuild;
alter index star.UK_F_PLAN_FC_ACT_jan rebuild
*
ERROR at line 1:
ORA-01418: specified index does not exist


SQL> alter index star."UK_F_PLAN_FC_ACT_jan" rebuild;

Index altered.

SQL>

Found a hint that it needs to be invoked with double quotes ""

Monday, February 15, 2010

Change Domainname - Oracle EBS R12

Hi All,

Today we will discuss on how to change the domain name of a server.
Before we do this please ensure you take one complete cold backup of the system.
The domain name change described here is for EBS R12 applications.
Domain name change is accomplished in 2 parts
>< Configure the Database to the new domainname
>< Configure applications to the new domainname

One would assume that before we start changing the domainname at the database and applications the values are already set at the Operating System level
with the help of SA.

- As a DBA ensure the hostname is followed by the correct domainname in the /etc/hosts file.

Config Changes on the DB Side
=============================


1. Shutdown application services
2. Ensure all services are down.
3. On the DB server node (DB should be up and running)
4. Execute the below command

orauat server050 oracle102 > perl /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/bin/adgentns.pl appspass=apps contextfile=/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml -removeserver


##########################################################################
Generate Tns Names
##########################################################################
Classpath :

:/u01/oracle/UAT/db/tech_st/10.2.0/jdbc/lib/ojdbc14.jar:/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/java/xmlparserv2.jar:/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/java:/u01/oracle/UAT/db/tech_st/10.2.0/jlib/netcfg.jar:/u01/oracle/UAT/db/tech_st/10.2.0/jlib/ldapjclnt10.jar

Loading ORACLE_HOME environment from /u01/oracle/UAT/db/tech_st/10.2.0
Logfile: /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/log/UAT_server050/02051831/NetServiceHandler.log

adgentns.pl exiting with status 0
ERRORCODE = 0 ERRORCODE_END



5. Now login into the Database as apps user and run the below sql queries and the results should be "no rows selected"
If the below query returns rows ,then
a) Shutdown DB
b) execute step 4 above again.

orauat server050 oracle102 >

as apps

SQL> select DB_NAME from FND_DATABASES;

no rows selected



SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='DB' and FND_NODES.NODE_NAME=upper('server050'); 2 3

no rows selected



6. Remove the Database server entry from FND_NET services by executing the below procedure

SQL> begin
FND_NET_SERVICES.remove_server('UAT', 'server050');
end; 2 3
4 /

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.




7. Now generate a New CONTEXT_FILE on the DB server .

Note:- 1. When prompted for "Do you want the inputs to be validated " say "n".
2. When it prompts for the contextfile name give a new name and take a note of the new contextfile and location

orauat server050 oracle102 > perl adclonectx.pl contextfile=/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications Rapid Clone

Version 12.0.0

adclonectx Version 120.18.12000000.7

Running:
/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/clone/bin/../jlib/ojdbc14.jar:/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/clone/bin/../jlib/xmlparserv2.jar:/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/clone/bin/../jlib/javaoracle.apps.ad.context.CloneContext -e /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml
Enter the APPS password : apps

Log file located at /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/clone/bin/CloneContext_0205185434.log

Provide the values required for creation of the new Database Context file.

Target System Hostname (virtual or normal) [server050] :

It is recommended that your inputs are validated by the program.
However you might choose not to validate them under following circumstances:

-If cloning a context on source system for a remote system.
-If cloning a context on a machine where the ports are taken and
you do not want to shutdown the services at this point.
-If cloning a context but the database it needs to connect is not available.

Do you want the inputs to be validated (y/n) [n] ? : n

Target Instance is RAC (y/n) [n] :

Target System Database SID : UAT

Target System Base Directory : /u01/oracle/UAT

Oracle OS User [orauat] :

Oracle OS Group [dba] :

Target System utl_file_dir Directory List : /u01/oracle/UAT/db/tech_st/10.2.0/admin/UAT_server050/tmp

Number of DATA_TOP's on the Target System [1] :

Target System DATA_TOP Directory 1 [/u01/oracle/UAT/db/apps_st/data] :

Target System RDBMS ORACLE_HOME Directory [/u01/oracle/UAT/db/tech_st/10.2.0] :

Target System Archive Log Directory [/u01/oracle/UAT/db/apps_st/data/archive] :

Do you want to preserve the Display [server050:0.0] (y/n) ? :

Invalid input value. 'y' or 'n' required.


Do you want to preserve the Display [server050:0.0] (y/n) ? : y

Target System Port Pool [0-99] : 1
Report file located at /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/temp/portpool.lst
Complete port information available at /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/temp/portpool.lst

New context path and file name [/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml] : /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT1_server050.xml

Creating the new Database Context file from :
/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/template/adxdbctx.tmp

The new database context file has been created :
/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT1_server050.xml

Log file located at
/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/clone/bin/CloneContext_0205185434.log
contextfile=/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT1_server050.xml

Check Clone Context logfile

/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/clone/bin/CloneContext_0205185434.log for details.



8. Once the above command successfully completes you should see a new contextfile with the new given at the location /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT1_server050.xml

9. Copy the new contextfile to the original name /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml (UAT1 to UAT)

10. There will be a entry for the location of the context file within the Context file search for the below string and replace with (it would be reflecting new xml file name ,replace UAT1 to UAT)

<oa_context_file_loc oa_var="s_contextfile">/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml</oa_context_file_loc>

11. Save and quit

12. Run autoconfig on Database node

orauat server050 oracle102 > ./adconfig.sh
Enter the full path to the Context file: /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml
Enter the APPS user password:
The log file for this session is located at: /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/log/UAT_server050/02051902/adconfig.log

AutoConfig is configuring the Database environment...

AutoConfig will consider the custom templates if present.
Using ORACLE_HOME location : /u01/oracle/UAT/db/tech_st/10.2.0
Classpath :

:/u01/oracle/UAT/db/tech_st/10.2.0/jdbc/lib/ojdbc14.jar:/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/java/xmlparserv2.jar:/u01/oracle/UAT/db/tech_st/10.2.0/appsutil/java:/u01/oracle/UAT/db/tech_st/10.2.0/jlib/netcfg.jar:/u01/oracle/UAT/db/tech_st/10.2.0/jlib/ldapjclnt10.jar

Using Context file : /u01/oracle/UAT/db/tech_st/10.2.0/appsutil/UAT_server050.xml

Context Value Management will now update the Context file

Updating Context file...COMPLETED

Attempting upload of Context file and templates to database...COMPLETED

Updating rdbms version in Context file to db102
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...

AutoConfig completed successfully.


13. Login into the Database as apps user and run the below queries to check if the node values are populated correctly

orauat server050 oracle102 > sqlplus apps

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Feb 5 19:03:35 2010

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select DB_NAME from FND_DATABASES;

DB_NAME
--------
UAT


SQL>
SQL>
SQL> select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES
where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and
SERVER_TYPE='DB' and FND_NODES.NODE_NAME=upper('server050'); 2 3

NAME SERVER_TYPE
------------------------ -----------------------------
server050_UAT_DB DB



SQL>

14. End of Configuration change on Database side


Config Changes on the Application Side
=================================


1. Take a backup of the context file .
2. Replace all the old values for the domainname with the new domainname. (Use OAM or vi editor)
3. Save and quit the contextfile
4. Run Autoconfig.
5. Start the applications and it should come up.

Monday, February 8, 2010

Permanent Fix for Reply to Address - R12

Hello All,

This is with reference to the posts by our author Sasikumar for the topic "R12 - WF Notification Mailer not sending email".

It would also be very useful to modify the CONTEXT_FILE variable as a permanent fix related to reply to address.

When we run autoconfig and if the tag for the reply to address is set as below ,then autoconfig overwrites existing settings.

perf server51 applmgr > grep -i s_javamailer_reply_to $CONTEXT_FILE
<username oa_var="s_javamailer_reply_to">NoReplyTo</username>
perf server51 applmgr >


Change the value within the context file to a valid reply to address and run autoconfig

perf server51 applmgr > grep -i s_javamailer_reply_to $CONTEXT_FILE
<username oa_var="s_javamailer_reply_to">donotreply@mail.in.com</username>
perf server51 applmgr >


Following are the scenarios when we miss to do the above

1. A fresh install and Workflow mailer configured without the reply to address
2. A cloned instance

Oracle Enterprise Manager ( OEM ) Online Training URL from Oracle University

Team,

Sharing the following online trainings from Oracle University,

Oracle EM 10g R4 -
http://oukc.oracle.com/static05/opn/oracle9i_database/47238/011708_47238/index.htm
Understanding Grid Control :
http://oukc.oracle.com/static05/opn/oracle9i_database/40263//013107_40263/index.htm
Oracle EM 10g :
http://oukc.oracle.com/static05/opn/oracle9i_database/47242/022808_47242/index.htm
Oracle EM 10g R4 - Application Server Diagnostics :
http://oukc.oracle.com/static05/opn/oracle9i_database/47240/021408_47240_source/index.htm
Enterprise Manager 10g Application Management Pack for Oracle Ebusiness Suite :
http://oukc.oracle.com/static05/opn/oracle9i_database/47241/022108_47241_source/index.htm
Oracle EM 10g Release 3 :
http://oukc.oracle.com/static05/opn/oracle9i_database/47193//103107_47193_source/index.htm
Oracle EM 10g Data Masking :
http://oukc.oracle.com/static05/opn/oracle9i_database/47237/011008_47237/index.htm

Comments are most welcome.

Thanks.

R12 - WF Notification Mailer not sending email

Dear Readers,

Recently I got a compliant from client saying that the event in wf_notification_out are not getting processed in R12 Non-Production instance.

When I checked the Workflow Notification status, all service components were up and running fine.

Then I noticed the following errors in the notification log file,

ERROR:[SVC-GSM-WFMLRSVC-12892-10006 : oracle.apps.fnd.wf.mailer.SMTPMessageHandler.prepareMessages(String)]:FormatterException -> oracle.apps.fnd.wf.mailer.FormatterException: Problem parsing XML-> org.xml.sax.SAXException: Replyto must be a valid email address
at oracle.apps.fnd.wf.mailer.NotificationFormatter.handleHeaderEndTag(NotificationFormatter.java:2103)
at oracle.apps.fnd.wf.mailer.NotificationFormatter.endElement(NotificationFormatter.java:522)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java(Compiled Code))
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:253)
at oracle.apps.fnd.wf.mailer.NotificationFormatter.getFormattedMessages(NotificationFormatter.java:338)
at oracle.apps.fnd.wf.mailer.SMTPMessageHandler.prepareMessages(SMTPMessageHandler.java:77)
at oracle.apps.fnd.wf.mailer.SMTPOutboundProcessor.read(SMTPOutboundProcessor.java(Compiled Code))
at oracle.apps.fnd.cp.gsc.SvcComponentProcessor.process(SvcComponentProcessor.java(Compiled Code))
at oracle.apps.fnd.cp.gsc.Processor.run(Processor.java(Compiled Code))
at java.lang.Thread.run(Thread.java:570)

Then I found the following Note from support.oracle.com which talks about the same issue,

Note ID : ID 743567.1
Subject : Email Notifications are not Sent, and Mailer Log File Shows Error "Replyto Must Be a Valid Email Address"

After that, I navigated to System Administrator --> OAM --> Workflow Manager --> Service Components --> Selected " Workflow Notification Mailer " and Clicked " View Detail " Button.

In detailed screen, the field "Reply-To Address" was having value as "NoReplyTo" instead of donotreply@<>.

After changing the value, I bounced the WF Notification mailer components and Users are able to get all the mails from the instance.

Thanks.

Sample Dataset for Oracle

I was recently working on a project where there was a demand to have random set of sales and transaction data to test performance. Well I thought of a better solution and it worked out with this website http://www.generatedata.com

Interestingly the dataset can be generated directly on the website itself and the maximum rows that will be generated is 5000.

The result output can be on different forms like excel,csv,html,xml and sql.
SQL was the best part , the page gives option to select the database type and then the tablename.
By default it creates the script with the create tablename and then the insert statements.

I hope this will help people who need sample dataset.