Wednesday 29 May 2013


How to open oracle forms in ubuntu 11.10


1. Download jre-6u31-linux-i586.bin from the following link http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html

2. chmod u+x jre-6u31-linux-i586.bin

3. ./jre-6u31-linux-i586.bin

4. sudo mv jre1.6.0_31 /usr/lib/jvm/

5. sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_31/bin/java" 1

6. sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/usr/lib/jvm/jre1.6.0_31/lib/i386/libnpjp2.so" 1

7. sudo update-alternatives --config java

There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode
  3            /usr/lib/jvm/jre1.6.0_31/bin/java          1         manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/jre1.6.0_31/bin/java to provide /usr/bin/java (java) in manual mode.

8. sudo update-alternatives --config mozilla-javaplugin.so

The output will be "There is only one alternative in link group mozilla-javaplugin.so: /usr/lib/jvm/jre1.6.0_31/lib/i386/libnpjp2.so  Nothing to configure."

Now restart the firefox browser and it will successfully open oracle forms.............

In forms opening page' click on "Always activate plugin for server2.xxxx.com"

That's it..........

HOW TO OPEN ORACLE WALLET MANAGER IN 11I with RHEL5.4

DB TIER

su - oraudev
cd $ORACLE_HOME
mv JRE JRE-ori
ln -s appsutil/clone/jre JRE
ln -s JRE/bin/java JRE/bin/jre
ln -s JRE/bin/i386/native_threads/java JRE/bin/i386/native_threads/jre

Now owm & opening successfully...........


LOW LEVEL LOGGING DIAGNASTIC ISSUE

Issue :
--------

While enter into the application page it shows warning message as follow as,
“Low-level Diagnostic Logging is turned on. This may temporarily reduce performance.”

Solution :
------------

Step1 : We can turn off low level logging by changing profile value

Login as system administrator → System Administrator → profile → system

fnd%debug%

Edit Debug Log Enabled to NO

Step2 :

Logging turned on the OS - $IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties(11i)
$INST_TOP/ora/10.1.3/opmn/conf/opmn.xml

wrapper.bin.parameters=-DAFLOG_ENABLED=TRUE change this value to false



INTERNEL ERROR 00600 [4194], [47], [41]

ISSUE :
-----------

While startup the database the following error message shows
ORA-00600: internal error code, arguments: [4194], [41], [47], [], [], [], [], [], [], [], [], []

SOLUTION :
-------------------

recover database until cancel;
alter database open resetlogs;

  1. SQL> Startup nomount
  2. SQL> Create pfile='/tmp/corrupt.ora' from spfile ;
  3. SQL> Shutdown immediate;
  4. SQL> Startup mount pfile='/tmp/corrupt.ora'
  5. SQL> Show parameter undo
  6. SQL> Alter database open ;
  7. SQL> Create rollback segment r01 ;
  8. SQL> Alter rollback segment r01 online ;
  9. SQL> Create undo tablespace undotbs_new datafile '<>' size <> M autoextend on;
  10. Edit your init.ora file and change the parameter "undo_tablespace=UNDOTBS_NEW" so it points to the newly created tablespace.                                                                                 Change undo_tablespace=UNDOTBS_NEW                                                                       Change undo_management=MANUAL
  11. SQL> Shutdown immediate;
  12. SQL> Startup
  13. SQL> show parameter undo_tablespace
  14. SQL>select owner, segment_name, tablespace_name, status from dba_rollback_segs order by 3;
  15. If the old segments are online, then they must be taken offline:                                                    
  16. SQL>alter rollback segment "_SYSSMU3$" offline;
  17. SQL>alter rollback segment "_SYSSMU2$" offline;
  18. SQL>drop tablespace UNDOTBS1 including contents and datafiles;
  19. ALTER TABLESPACE UNDOTBS_NEW RENAME TO UNDO_TBS;
  20. Edit your init.ora file do the following changes                                                  undo_management='AUTO'                                                                 undo_tablespace='UNDO_TBS'
  21. Restart the database
  22. Now issue solved completely.............




ORA-28000: THE ACCOUNT IS LOCKED

Issue :
---------

While executing adconfig.sh in db tier, it shows the above error message.

Trying to connect using SID...
getConnectionUsingSID()
-->
JDBC
URL: jdbc racle:thin oraapps.yantro.com:1616:ar12
Exception
occurred: java.sql.SQLException: ORA-28000: the account is locked

Trying
to connect using SID as ServiceName
getConnectionUsingServiceName()
-->
JDBC
URL: jdbc racle:thin (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraapps.yantro.com)(PORT=1616))(CONNECT_DATA=(SERVICE_NAME=ar12)))
Exception
occurred: java.sql.SQLException: ORA-28000: the account is locked

Trying
to connect using SID as ServiceName.DomainName
getConnectionUsingServiceName()
-->
JDBC
URL: jdbc racle:thin (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oraapps.yantro.com)(PORT=1616))(CONNECT_DATA=(SERVICE_NAME=ar12.yantro.com)))
Exception
occurred: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514,
TNS:listener does not currently know of service requested in connect descriptor

Connection
could not be obtained; returning null

-------------------ADX
Database Utility Finished---------------

Verifying
connection to the Database : Could not be stablished
No
Restore Profile file created.


Restore
Profile utility ran successfully

===========================================================================


adcvmlog.xml
renamed to /ar12/d02/oracle/R12I/db/tech_st/11.1.0/appsutil/log/ar12_oraapps/07131458/adcvmlog.xml.07131459


[AutoConfig
Error Report]
The
following report lists errors AutoConfig encountered during each
phase
of its execution. Errors are grouped by directory and phase.
The
report format is:
<filename>
<phase> <return code where appropriate>

[PROFILE
PHASE]
AutoConfig
could not successfully execute the following scripts:
Directory:
/ar12/d02/oracle/R12I/db/tech_st/11.1.0/appsutil/install/ar12_oraapps
afdbprf.sh
INSTE8_PRF 1

[APPLY
PHASE]
AutoConfig
could not successfully execute the following scripts:
Directory:
/ar12/d02/oracle/R12I/db/tech_st/11.1.0/appsutil/install/ar12_oraapps
adcrobj.sh
INSTE8_APPLY 1


AutoConfig
is exiting with status 2

AutoConfig
execution completed on Fri Jul 13 14:59:50 2012

Time
taken for AutoConfig execution to complete : 1 mins 7 secs

Solution :
-------------

I try to run afdbprf.sh file individually it shows ora -28000 error message.

Suoraar12
sqlplus '/as sysdba'
alter user apps account unlock;

Now issue solved and auto config successfully running.................

All about Apache web server configuration in Oracle Apps 11i

Oracle Web Server also called as OHS (Oracle Http Server) or Oracle-Apache is built on Apache Webserver. Oracle has added few custom component (like mod_plsql, mod_osso...) in Apache webserver & shipped it as Oracle Http Server.

Discussion in this page is currently w.r.t. Oracle Http Server Version 1.0.2.2.2 which is shipped with 11i (11.5.8-10). In coming weeks I'll add 10G Application Server Integration with Oracle Applications 11i.

Oracle Web Server or OHS is entry point in applications, It processes requests coming from network over Client. There is Web Listener listening for Web Requests. If request is for simple html page core Apace returns HTML page but if URL refernced need further processing it will be forwarded to respective module like mod_pls, mod_jserv ... I will start with basics like how to start stop webserver, important directories & files , troubleshooting , tuning & important things to know in oracle applications E-Business suite Webserver.

How to Start/Stop Web Server All startup shutdown scripts in Oracle Applications 11i(11.5.10) are in $OAD_TOP/admin/script/$CONTEXT_NAME where OAD_TOP is also called as COMMON_TOP and CONTEXT_NAME is your SID_hostname , lets say your SID or Instance Name is VISION and its on machine with name machine1 so your CONTEXT_NAME will be VISION_machine1. Script to start/stop Web Server is adapcctl.sh where ad (application dba), apc(apache), ctl(control) and sh stands for shell script. (You will find this script only on node on which you have webserver, if you have multi mode Installation and node 1 is only for Concurrent Manager, Reports & Database and node2 is webserver & forms then adapcctl.sh should be on node2 & not node1 ) adapcctl.sh calls apachectl (shell script in $IAS_ORACLE_HOME/Apache/Apache/bin) which in turn calls HTTPD (in same directory which is executable called http daemon) it starts using configuration file httpd.conf (from $IAS_ORACLE_HOME/Apache/Apache/conf directory , this file calls other configuration file. To know all important configuration file follow config files link)

File System for Web Server As you might already be aware of , if not there are three ORACLE_HOME in Apps

· Database ORACLE_HOME ( also called as 8i, 9i or 10g HOME depending on your database version)

· Forms & Reports ORACLE_HOME ( also called as 806 or 6i depneding on Forms Version)

· Internet Application Server ( iAS 1.0.2.2.2 or 1.0.2.2 depending on your Apps Version 11.5.5..11.5.10)

Web Server comes under third ORACLE_HOME & I will use it as IAS_ORACLE_HOME in my site in future. If you have Installed Oracle E-Business Suite Vision Instance you will see it under Middle Tier under . Lets assume you have installed apps under /u01/VIS11I then your iAS will be under directory /u01/VIS11I/ora/iAS & your IAS_ORACLE_HOME environment variable will point to /u01/VIS11I/ora/iAS. All files & directory related to Application Server will be under this directory.

For Apps DBA / oracle apps sysadmin following files/dir are important SID_Hostname.env, Apache, network .

· Env file is to set environment variable to iAS_ORACLE_HOME (During iAS patching )

· Apache is main directory where your most webserver configuration Sit also called as APACHE_TOP 

. Important directory under Apache are Apache, Jserv and plsql . Login to your server & check if these files/directories exists.

· Under iAS/Apache/Apache important directory/files are bin (executable, apachectl,httpd) ,conf ( httpd.conf, httpd_pls.conf, oracle_apache.conf ), logs (access_log, access_log_pls, error_log, error_log_pls, httpd.pid )

· Under iAS/Apache/Jserv files/directory you want to know are etc(config files), logs(jvm,mod_jserv.log)

· Under iAS/Apache/modplsql important bits are cache (cookie,plsql), cfg(wdbsvr.app , *.conf)

Its not feasible to explain features/importance of all files as and when I discuss a particular topic in further pages. I am sure you as oracle apps dba definately want to know How to troubleshoot Oracle apps web server, continue reading

Oracle Apps Web Server Troubleshooting

You as oracle application E-Business Suite sysadmin/dba should know how to troubelshoot & where to look in case of any issues with Webserver. In order to find any problems you should look at log file. All Oracle components have their own logs in respective directory. For Oracle Web Server (OHS/Apache) there are two places depending on type of issue , core apache/web server issues are recorded in

· Main Apache and its logs are at $IAS_ORACLE_HOME/Apache/Apache/logs Where as anything related to Servlets, mod_jserv, JVM (Java Virtual Machine) should be in

· mod_jserv for servlets & jvm issues and its logs are at $IAS_ORACLE_HOME/Apache/Jserv/ logs & jvm where $IAS_ORACLE_HOME environment variable points to /u01/VIS11I/ora9/iAS (here you have installed Oracle Apps Vision Instance under /u01 ) usages I am explaining here. are files are relateive to $IAS_ORACLE_HOME.

· When Apache starts , it starts with damon HTTP using httpd.conf (in Apache/Apache/conf) this is main configuration file which contain config parameters for Core Apache component(Few Important parameters are PidFile, Port, Listen, User, ServerAdmin, ServerName, DocumentRoot, ErrorLog, LogLevel, LogFormat, TransferLog, ErrorDocument , VirtualHost, SSLLog, SSLLogLevel, include, SSLCeritificateXXXX, RewriteEngine) To understand meaning of these parameters see below tail end of this article.

As an Oracle Apps DBA or sysadmin following configuration files are quite important in understanding and troubleshooting oarcle web server ot oracle applications 11i HTTP Server.

Important Configuration Files Contd... httpd.conf file calls jserv.conf (used for mod_jserv), oprocmgr.conf (oracle process manager), oracle_apache.conf (Oracle Custom Modules like mod_pls, mod_ossl, mod_osso..)

jserv.conf available at $IAS_ORACLE_HOME/Apache/Jserv/etc . This file calls few properties files ( jserv.properties, viewer4i.properties, forms.properties, xmlsvcs.properties )

oprocmgr.conf Used to configure and manage each remote apache Instances managed by local Apache Instance.

oracle_apache.conf This configuration file under $IAS_ORACLE_HOME/ Apache/Apache /conf is used to configure Oracle built modules supplied with default Apache ( for eg. mod_plsql, oem, imeeting). This file calls other configuration files ( plsql.conf, immeting.conf, apps.conf.

plsql.conf This file under $IAS_ORACLE_HOME / Apache/ modplsql/conf is used to configure pls (Plsql). This file defines to forward all requests like /pls/ to dedicated apache listener. There is another important file in this directory.

Database Server for Applications. This file contain your dad (database Access Descriptor ) information like database connection description & apps user name & password . If you are changing apps password you use utility FNDCPASS and after changing password you have to manually change apps password in this file. Now you will say this is security risk to see password like this in a file . Yes it is but you can obfuscate this password .

Database Server for Applications. This file contain your dad (database Access Descriptor ) information like database connection description & apps user name & password . If you are changing apps password you use utility FNDCPASS and after changing password you have to manually change apps password in this file. Now you will say this is security risk to see password like this in a file . Yes it is but you can obfuscate this password .

Meaning of Parameters defined in httpd.conf

· PidFile The file in which the server should record its process identification number when it starts.

· Port The port to which the standalone server listens, If listen is also there then Port is used to build Self Referencial URL's

· Listen The port to which the standalone server listens.

· User/Group The name (or #number) of the user/group to run httpd as

· ServerAdmin E-Mail address, where problems with the server should be e-mailed.

· ServerName ServerName allows you to set a host name which is sent back to clients for your server if it's different than the one the program would get (i.e., use "www" instead of the host's real name. You will see load balancer name if load balancer is configured for Oracle E-Business Suite 11i.

· DocumentRoot The directory out of which you will serve your documents. When http://teachmeoracle.com is typed index.html is returned from Directory set in httpd.conf

· ErrorLog The location of the error log file.

· LogLevel Control the number of messages logged to the error_log. Possible values include: debug, info, notice, warn, error, crit, alert, emerg. (Helpful during troubleshooting)

· LogFormat Format of your access_log which records all users hitting your site. Useful in monitoring your webserver & hits like who referred to your site , what all users came & for how long they stayed on site.

· TransferLog To implement Feature like rotatelog ( Logs will be rotated based on timestamp or size)

· ErrorDocument Customizable error response in case oracle web server return http code 500 or 404

· VirtualHost Used if you want to set Virtual Host for your Oracle Application Web Server.

· SSLLog Used to record SSL logs ( If SSL Secured Socket Layer is configured with oracle applications web server)

· SSLLogLevel Log Level of SSL logs, helpful in troubleshooting SSL issues with Oracle Web Server.

· include Uesd to include other configuration files.

· SSLCeritificateX If SSL is enabled on apps 11i , used to define ssl parameters, like certificate file ..

· RewriteEngine To define Redirects for your Oracle Apps Web Server.

HAPPY LEARNING !!



APPLICATION ERROR

Issue :

While developers working, the applcation page showing error message like500 Internal Server Error 12/08/04 17:43:38.489 html: JspServlet: unable to dispatch to requested page: Exception:java.lang.OutOfMemoryError: PermGen space

Solution :

cd $INST_TOP/ora/10.1.3/opmn/conf
vi opmn.xml
Edit the word after coming below line
<process-type id="oacore" module-id="OC4J" status="enabled" working-dir="$ORACLE_HOME/j2ee/home">

change the value -XX:MaxPermSize=160 to 512 in both <category id=start-parameters and stop-parameters>

Must follow the following URL


SQLPLUS connection issue

Issue:

When we give "sqlplus '/as sysdba'"as oracle user.
It shows the following error message

orakdev@ebs # sqlplus '/as sysdba'
                           Insufficient privileges

Solution:

We need to add the user to the dba group.
After adding the user to dba group we can verify it using /etc/group

root@ebs # usermod -a -G dba orakdev

PROJECT .NET ISSUE

Issue :

While creating subtask in project .net it shows the following error message.

" Unexpected cycle in dependency cycle. No data has been saved. "
Then I view page source of that html file. It shows

Caused by: java.sql.SQLException: ORA-25153: Temporary Tablespace is Empty
ORA-06512: at "PNET.SCHEDULE", line 1444
ORA-06512: at line 1

The issue is  temp file full.

Solution :

SQL > select * from database_properties where property_name like '%TABLESPACE';

SQL > alter database default temporary tablespace temp;

SQL > select username,temporary_tablespace,account_status from dba_users;

SQL > alter tablespace temp add tempfile '/Project.net/xe/oradata/XE/temp.dbf' reuse;

Ref :


Database Listener Issue

|TNS-12555: TNS permission denied

[oragama@server1 ~]$ lsnrctl start gama

LSNRCTL for Linux: Version 10.1.0.5.0 - Production on 13-MAR-2011 23:45:33
Copyright (c) 1991, 2004, Oracle.  All rights reserved.
Starting /hypprod/oracrp2/OraHome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.1.0.5.0 - Production
System parameter file is /hypprod/oracrp2/OraHome_1/network/admin/listener.ora
Log messages written to /hypprod/oracrp2/OraHome_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mkkdbserver1.mkkdomain.local)(PORT=1521)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted


Solution: 1
--------------

[root@mkkdbserver1 ~]# rm -rf /var/tmp/.oracle
Please be aware that this step should ONLY be taken as a last resort and ONLY when there are no  Net connections to the database(s).  This procedure could cause active sessions to be terminated.  It is NOT recommended to take this action in a RAC environment.  see Note 391790.1 for details.
Clear the /var/tmp/.oracle directory and start from fresh:
1. Stop all listeners
2. Remove the /var/tmp/.oracle directory, e.g. run the following from the root account:
rm -rf /var/tmp/.oracle
3. Check the listener(s) configuration contains unique keys specified for each IPC endpoint and each listener
4. Start the listener(s) from the normal Oracle OS user.
Clearing the /var/tmp/.oracle directory will force the listeners to recreate the socket files from fresh, each with its own correct ownership.
You need to make sure that you always start the listener(s) from the same OS user(s) and that you do not reuse IPC key endpoints between listeners running under different users, otherwise the problem will resurface.

Solution: 2
--------------

1. Ensure that /tmp/.oracle or /var/tmp/.oracle directory exists.
2. Confirm that the user who is trying to start the listener has adequate read and write permissions on the directory specified above. The permissions should be 777.
3. If the /tmp directory has reached full capacity, this would cause the listener to fail to write the socket files.
To implement the solution, please use the following example:
1. cd /var/tmp
2. Check the whether the .oracle directory exists:
cd .oracle
3. If the directory does not exist, request the System Administrator create the directory and set the ownership as root:root with the permissions set to 01777
mkdir /var/tmp/.oracle
chmod 01777 /var/tmp/.oracle
chown root /var/tmp/.oracle
chgrp root /var/tmp/.oracle
4. Next try starting the TNS Listener using the ‘lsnrctl start <listener_name>’ command.

Tuesday 28 May 2013



USEFUL SQL QUERIES

  1. Find known table inside unknown package in plsql.
          select owner, name, referenced_owner, type from dba_dependencies where                                                              
          REFERENCED_NAME ='IBY_FNDCPT_PAYER_ASSGN_INSTR_V';

    2.  How do i get the last 4 digits of a phone number in sql developer?

         SELECT VENDOR_NAME,UPPER(VENDOR_NAME), SUBSTR(VENDOR_PHONE,                                                                                              
         Length(VENDOR_PHONE)-4) FROM AP.VENDORS;

    3. Below query is used to check which financial family pack was applied in a instance.

        SELECT FA.APPLICATION_SHORT_NAME APP,
        FPI.PATCH_LEVEL
        FROM FND_PRODUCT_INSTALLATIONS FPI,
        FND_APPLICATION FA
        WHERE FA.APPLICATION_ID = FPI.APPLICATION_ID;  

The listener supports no services

If you face the above issue while starting listener, you may edit your listener.ora and tnsnames.ora file as per your environment.

LISTENER.ORA
----------------------

otm =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1523))
      (ADDRESS = (PROTOCOL = TCP)(HOST = server.xxxx.com)(PORT = 1523))
    )
  )
SID_LIST_otm =
  (SID_LIST =
        (SID_DESC =
         (SID_NAME = otm)
         (GLOBAL_DBNAME=otm.xxxx.com)
         (ORACLE_HOME = /otm/oracle/app/oracle/product/11.2.0)
        )
  )

ADR_BASE_LISTENER = /otm/oracle/app/oracle

TNSNAMES.ORA
------------

otm =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = server.xxxx.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = otm.xxxx.com)
      (GLOBAL_DBNAME=otm.xxxx.com)
      (SID_NAME=otm)
    )
  )

Now restart listener successfully with services.........

IO Error: Got minus one from a read call

Vendor code 17002


Issue :
--------
When tried to connect a newly installed instance through SQL developer, it shows the following error message.

“ An error was encountered performing the requested operation:

IO Error: Got minus one from a read call

Vendor code 17002 “

Solution :
------------
We need to comment out the following line in the sqlnet.ora file.

su – orair12

vi $ORACLE_HOME/network/admin/ir12_server1/sqlnet.ora

tcp.validnode_checking = yes
# tcp.invited_nodes=(server1.xxxx.com)

Now restart the listener.

Now everything fine.............

Ref : http://trinidba.wordpress.com/2012/05/02/sql-developer-vendor-code-17002/

Switching to the oracle user shows the following error messages,

Issue 1 :
-------------
su: incorrect password

Solution :
------------
passwd -u oracle -------------This will unlock the user account on behalf of expiration.
vi /etc/passwd  -> remove "x" for the oracle user.
vi /etc/group   -> remove "x" for the dba group.

Issue 2 :
----------
#passwd user
Authentication Token Manipulation Error
#

Solution :
------------
root@ebs # pwconv

Description about this error :
--------------------------------------
This error is being produced because you are using shadowed password files and the shadow doesn’t have entry for this user. i.e, /etc/passwd has an entry for this user, but /etc/shadow doesn’t.
In order to resolve this, you can either add the entry manually or recreate the shadow file. You can use pwconv to recreate the shadow file. See the manpage for more details on this.

Issue :
--------
While starting database using sqlplus, the below error message shown

ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemsper

Solution :
------------
vi /etc/sysctl.conf
kernel.sem = 256 32768 100 228

sysctl -p