View Other Posts

Disclaimer

All data and information provided on this blog is for informational purposes only. Oracleapps11idba.blogspot.com makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this site and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis.Please use your discretion before taking any decisions based on the information in this blog.

Sunday, September 27, 2009

How to Install Oracle Applications R12 E-Business Suite

In this post i will discuss steps to install Oracle Applications R12 e-Business Suite.

First we need to create a staging area by unzipping all the zip files to create folders as given below.

  • docs
  • startCD
  • oraDB
  • oraAPPS
  • oraAS
  • oraAPPDB

This screen lists the components that are included in, or supported by R12 Oracle Applications. Click Next to continue.


   Use the Select Wizard Operation screen to select first option ‘install oracle applications release 12.1.1. This screen can be used for both new installations and upgrades. Based on the selection the Rapid Install wizard continues with the appropriate screen flow.


In this screen Provide your Metalink userID and password.



Configuration Choice screen, this indicate whether you will be using an existing Configuration file.In this screen you can specify Configuration file to use in Multi node Architecture, but if this is the first server in multinode architecture then select 'Create a new configuration'.



In this screen please specify Port Pool. Based on Port pool number oracle will assign port numbers to different Application services like http, forms,db etc..


In this screen please specify the database type,SID, Node name, Domain Name and Operating system for Database Server node. 


In this screen you need to specify server Name, Domain Name, Operating system, Application Owner and Group etc. 


In this screen please specify what services can be run on this Application server node based on your requirement. 


In this screen you can add additional servers to cater different services based on your requirement.


In this screen you need to specify server Name, Domain Name, Operating system, Application Owner and Group etc for additional Application server.


In this screen please specify what services can be run on this additional Application server node based on your requirement. 


At this point oracle will verify your configuration and if something is not correct it will give you an error and you may need to correct it before you start instllation.


This is the final screen before installation for your review.


In this screen click on Yes to start Installation.


This is installation screen where oracle will show you the installation progress.


Once Installation is finished Oracle will verify the system for Post installation steps.


And and Hurray you are done with the installation and now start exploring Release 12...

Monday, September 14, 2009

How to install Oracle Applications 11i e-Business Suite


  In this post i will discuss steps to install Oracle Applications 11i e-Business Suite version 11.5.10.2.


  First we need to create a staging area by unzipping all the zip files to create folders as given below.
  • docs
  • startCD
  • oraDB
  • oraAppDB
  • oraiAS
  • oraApps
  Next thing we need to make sure that all the OS related pre-requisite steps have been completed and all the required OS patches have been applied.


  Now start rapidwiz from startCD/Disk1/rapidwiz>./rapidwiz location ( don't forget to export DISPLAY parameter to valid x-server)


  First screen of installer will show you the list of components Rapidwiz will install as a part of Oracle applications 11i Installation. Click next to go the next screen.





   In the second screen you will have a choice to install a fresh Oracle Applications E-Business 11i or Upgrade to E-Business 11i from previous versions.




  In this screen you can specify Configuration file to use in Multi node Architecture, but if this is the first server in multinode architecture then select 'No'.







  In this screen you will get the option to select single node installation or Multinode installation. Based on your requirement please select the option.







  In this screen you can select Load balancing option if you have multiple Application tier like two or more Web tiers and two or more Admin Tier servers.





   In this screen please specify server name or Node name and Operating system for each Service like database, admin, concurrent and forms.
   If you are planning to use Shared File system please configure shared file system option in the screen only by clicking details button otherwise uncheck shared file system option.





  In this screen you need to specify the purpose of this instance. You can select Vision Demo Instance or you can select custom instance for your production,development or test purpose.







  In this screen you need to specify Oracle Database owner, group and file system (Mount points) architecture for binary files and database files.







  In this screen you need to specify Application Owner like applmgr and File System Architecture for all Application services. You can select single owner for database and Application if you are planning to install Vision instance only.





  In this screen please specify Domain Name, X-server Address and Port Pool. Based on Port pool number oracle will assign port numbers to different Application services like http, forms,db etc..







  If you are planning to use Multinode Architecture then you should save your configuration in some file which you will be using during other node installation.





  At this point oracle will verify your configuration and if something is not correct it will give you an error and you may need to correct it before you start instllation.





  This is the final screen before installation for your review.





  In this screen click on Yes to start Installation.





  This is installation screen where oracle will show you the installation progress.





  Once Installation is finished Oracle will verify the system for Post installation steps.







  And and Hurray you are done with the installation and now start exploring...



Wednesday, September 2, 2009

How to Configure Oracle Java Workflow Notification Mailer in Oracle apps 11i

Use following simple steps to configure Oracle Java Workflow Notification mailer in Oracle applications 11i



• Run $FND_TOP/sql/wfver.sql and review the output
• Check for invalid objects
• Generic Service Management (GSM) should be enabled in the system. Workflow mailer program runs as a service with in GSM.
• Verify if GSM DEBUG service run successfully without exceptions in the log from OAM.
• JDK1.3 or higher must be installed and configured on Concurrent processing node.

 JDK1.3 Home/bin/java -version


• Verify following variables for JDK version


 AF_JRE_TOP = $JDK1.3 Home
 AFJVAPRG = $JDK1.3 Home/bin/java
 AF_CLASSPATH = $JDK1.3 Home/lib/dt.jar:$JDK1.3 Home/lib/tools.jar:$JDK1.3 Home/jre/lib/rt.jar:$JDK1.3 Home/jre/lib/i18.jar: $JAVA_TOP/appsborg2.zip:$ORACLE HOME 8.0.6/forms60/java:$JAVA_TOP


• Verify if JMS libraries exist in AF_CLASSPATH.


 grep jar $APPL_TOP/admin/adjborg2.txt

Sample output should look like:



$ORACLE HOME 8.0.6/owm/jlib/jssl-1_1.jar
$ORACLE HOME 8.0.6/owm/jlib/javax-ssl-1_1.jar
$iAS HOME/rdbms/jlib/aqapi.jar
$iAS HOME/rdbms/jlib/jmscommon.jar
$iAS HOME/Apache/xsu/xsu12.jar
$iAS HOME/Apache/xsu/oraclexmlsql.jar
$iAS HOME/rdbms/jlib/xsu12.jar
$iAS HOME/lib/http_client.jar

  If the output is 0 (zero), it means that appsborg2.zip does not contain the JMS classes


• Create a IMAP Account in Lotus Notes with following information


User ID : WFMAILER
Password : WFMAILER
INBOX folder
PROCESS folder
DISCARD folder


Test your IMAP account


telnet testorcl.com 143
Trying 112.126.180.67...
Connected to testorcl.com.
Escape character is '^]'.
* OK Domino IMAP4 Server Release 5.0.11 ready Sun, 23 Nov 2003 10:26:49 -0800
1 login WFMAILER WFMAILER
1 OK LOGIN completed
1 select "INBOX"
* 23 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 0] UIDs valid
* FLAGS (\Flagged \Seen \Answered \Deleted \Draft)
* OK [PERMANENTFLAGS (\Flagged \Seen \Answered \Deleted \Draft)] Permanent flags
1 OK [READ-WRITE] SELECT completed
1 select "DISCARD"
* 54 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 6] UIDs valid
* FLAGS (\Flagged \Seen \Answered \Deleted \Draft)
* OK [PERMANENTFLAGS (\Flagged \Seen \Answered \Deleted \Draft)] Permanent flags
1 OK [READ-WRITE] SELECT completed
1 select "PROCESSED"
* 58 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 4] UIDs valid
* FLAGS (\Flagged \Seen \Answered \Deleted \Draft)
* OK [PERMANENTFLAGS (\Flagged \Seen \Answered \Deleted \Draft)] Permanent flags
1 OK [READ-WRITE] SELECT completed
1 logout
* BYE testorcl.com IMAP4rev1 server terminating connection
1 OK LOGOUT completed
Connection closed by foreign host.

Verify SMTP server Configuration

telnet mailhost 25
MAIL FROM: wfmailer@orcl.com
RCPT TO: kapil@orcl.com
DATA
Subject: Test message from workflow (mailhost)
Hello Kapil
.
Verify that kapil@orcl.com receives an email from wfmailer@orcl.com . If not, then the SMTP server is not configured properly.



Configure Workflow Notification Mailer using OAM

Log on to Oracle Application manager






Navigate to Workflow manager from pull down menu






Click the Notification Mailer status icon to navigate to the Service Components page for notification mailers






In the Service Components page, select the Workflow Notification Mailer service component and click the Edit button




Leave all settings as a default in the first page





Click on the next button to go to second step. If you are using inbound mails then define Inbound Thread Count more than  0 or else 0. For Outbound Mail define Outbound Thread Count to 1






In the Inbound eMail Account region, enter the inbound mail server and the username and password for the IMAP e-mail account. Please remember userid and password is case sensitive. In the Outbound eMail Account region, enter the outbound mail server that the Workflow Notification Mailer will use.




In the Send region of the Edit Notification Mailer: Message Generation page, enter the address of the reply-to e-mail account that receives incoming messages and the base URL that identifies the HTML web agent that handles HTML notification responses.






All other configuration parameters for the Workflow Notification Mailer are set to default values.
After you finish setting the configuration parameters, go to service component page and click on Workflow mailer Service.





In the Service Instances for Generic Service Component Container page select start all from pull down menu and click on go button.




Go to Service component page once again and verify that the status of the Workflow Notification Mailer service component is now running.





In the next Post i will discuss Workflow mailer troubleshooting.

Tuesday, September 1, 2009

How to Find out Undocumented Paramaters in Oracle Database

Use following SQL Query to find out Undocumented paramater and their value.

SELECT xpi.ksppinm "Parameter Name",
xpi.ksppdesc "Description",
xcv.ksppstvl "Session Value",
xsv.ksppstvl "Instance Value"
FROM x$ksppi xpi,
x$ksppcv xcv,
x$ksppsv xsv
WHERE xpi.indx = xcv.indx
AND xpi.indx = xsv.indx
AND SUBSTR (xpi.ksppinm, 1, 1) ='_'
ORDER BY xpi.ksppinm;

How to Monitor Long Running Concurrent Requests in Oracle 11i

Use following Script to monitor long running concurrent requests in Oracle 11i



------------Start of Script-------------------------------------
#!/bin/sh
# Long Running Concurrent Requests
#


SPOOL_FILE=long_runn_conc.html
FINAL_FILE=Long_Running_Concurrent.html


pchk1=`ps -ef | grep ora_smon_$ORACLE_SID | grep -v grep | wc -l`


if [ "$pchk1" -eq 0 ]; then
     echo "WARNING: Possible database shutdown problem"
     exit 0
fi


echo "Content-Type: text/html" >> ${FINAL_FILE}
sqlplus -s apps/apps EOF
set echo off
set pagesize 120
set markup html on spool on
spool ${SPOOL_FILE}


TTITLE CENTER 'Concurrent Requests running for more than 20 minutes'


SELECT gv.inst_id "Instance Number",
gv.sid "Sid",
gv.serial# "Serial#",
fcr.request_id "Request ID",
substr(fcr.program,1,40) "Program" ,
fcr.phase "Phase",
fcr.status "Status",
to_char(fcr.actual_start_date,'DD-MON-RR HH24:MI:SS') "Start",
to_char(fcr.actual_completion_date,'DD-MON-RR HH24:MI:SS') "End",
ROUND( ( NVL( fcr.actual_completion_date, sysdate ) - fcr.actual_start_date ) *60*24, 2 ) "Time(Min)",
fcqtl.user_concurrent_queue_name "Concurrent Manager",
fcr.user_name "User Name",
substr(gvw.event,1,30) "Event"
FROM apps.fnd_amp_requests_v fcr,
gv$session gv,
gv$session_wait gvw,
fnd_concurrent_queues_tl fcqtl,
fnd_concurrent_processes fcproc
WHERE Phase_code ='R'
and fcr.oracle_session_id=gv.audsid(+)
and gv.sid=gvw.sid(+)
and gv.inst_id=gvw.inst_id(+)
and fcr.controlling_manager = fcproc.concurrent_process_id
and fcproc.queue_application_id = fcqtl.application_id
and fcproc.concurrent_queue_id = fcqtl.concurrent_queue_id
and fcqtl.language='US'
and ROUND( ( NVL( fcr.actual_completion_date, sysdate ) - fcr.actual_start_date ) *60*24, 2 ) > 20
order by 9 desc;


spool off
set markup html off spool off
EOF


if [ `grep -c 'no rows selected' ${SPOOL_FILE}` -eq 1 ]
 then
   rm ${FINAL_FILE}
   rm ${SPOOL_FILE}
 exit 0
fi


cat ${SPOOL_FILE} | grep -v 'rows selected' >> ${FINAL_FILE}


(echo "Importance: High"; echo "Subject: VGOP: Long Running Concurrent Requests"; cat ${FINAL_FILE})  | /usr/sbin/sendmail -F VGOP dbadmin@activision.com


rm ${FINAL_FILE}
rm ${SPOOL_FILE}

-------------End of Script-------------------------------------


Use following SQL to get more information.


SELECT   gv.inst_id "Instance Number", gv.SID "Sid", gv.serial# "Serial#", fcr.request_id "Request ID", SUBSTR (fcr.program, 1, 40) "Program", fcr.phase "Phase", fcr.status "Status",
         TO_CHAR (NEW_TIME (fcr.actual_start_date, 'GMT', 'PDT'), 'DD-MON-RR HH24:MI:SS' ) "Start",
         TO_CHAR (NEW_TIME (fcr.actual_completion_date, 'GMT', 'PDT'), 'DD-MON-RR HH24:MI:SS' ) "End",
         ROUND (  (  NVL (fcr.actual_completion_date, SYSDATE)
                   - fcr.actual_start_date )* 60* 24,2) "Time(Min)",
         fcqtl.user_concurrent_queue_name "Concurrent Manager",
         fcr.user_name "User Name",
         (CASE
             WHEN gvw.event = 'latch free'
                THEN (SELECT vl.NAME || ': Latch Name'
                        FROM v$latch vl
                       WHERE vl.latch# = gvw.p2)
             ELSE SUBSTR (gvw.event, 1, 30)
          END
         ) "Event",
         (CASE
             WHEN (gvw.event = 'db file sequential read' or gvw.event ='gc buffer busy')
             AND dbo.object_name IS NULL
                THEN 'Rollback Segment'
             ELSE dbo.object_name
          END
         ) "Database Object",
         fcr.argument_text, gvw.p1, gvw.p2, gv.sql_id,gp.spid
    FROM apps.fnd_amp_requests_v fcr,
         gv$session gv,
         gv$process gp,
         gv$session_wait gvw,
         dba_objects dbo,
         fnd_concurrent_queues_tl fcqtl,
         fnd_concurrent_processes fcproc
   WHERE phase_code = 'R'
     AND gv.paddr    = gp.addr(+)
     and gv.inst_id=gp.inst_id(+)
     AND fcr.oracle_session_id = gv.audsid(+)
     AND gv.SID = gvw.SID(+)
     AND gv.inst_id = gvw.inst_id(+)
     AND gv.row_wait_obj# = dbo.object_id(+)
     AND fcr.controlling_manager = fcproc.concurrent_process_id
     AND fcproc.queue_application_id = fcqtl.application_id
     AND fcproc.concurrent_queue_id = fcqtl.concurrent_queue_id
     AND fcqtl.LANGUAGE = 'US'
 ORDER BY 10 DESC;

How to Monitor Temp Tablespace usage and Sort Operations


Use following Script to monitor Temp tablespace and Sort Operations in Oracle Database.

------------Start of Script-------------------------------------


#!/bin/sh
# Temp Tablespace & Sort segments Usage
#

SPOOL_FILE=temp_seg.html
FINAL_FILE=Temp_Segments.html
echo "Content-Type: text/html" >> ${FINAL_FILE}
sqlplus -s "/ as sysdba" EOF
set echo off
set pagesize 220
set markup html on spool on
spool ${SPOOL_FILE}
TTITLE CENTER 'Temp Tablespace and Sort Segments Usage'


SELECT gvs.inst_id "Instance",
gvs.SID,
gvs.username "User Name",
NVL (gvs.status, ' ') "Status",
NVL (gvs.osuser, ' ') "OS User",
NVL (gvs.program, ' ') "Program",
NVL (gvs.module, ' ') "Module",
gsu.TABLESPACE "Tablespace Name",
SUM (gsu.extents) "# of Ext",
SUM (gsu.blocks) "# of Blocks"
FROM gv$session gvs,
gv$sort_usage gsu
WHERE gvs.saddr = gsu.session_addr
AND gvs.inst_id = gsu.inst_id
GROUP BY gvs.inst_id,
gvs.SID,
gvs.username,
gvs.status,
gvs.osuser,
gvs.program,
gvs.module,
gsu.TABLESPACE
ORDER BY 9 DESC;

spool off

set markup html off spool off
EOF

if [ `grep -c 'no rows selected' ${SPOOL_FILE}` -eq 1 ]
then
rm ${FINAL_FILE}
rm ${SPOOL_FILE}
exit 0
fi


cat ${SPOOL_FILE} | grep -v 'rows selected' >> ${FINAL_FILE}


(echo "Importance: High"; echo "Subject: $ORACLE_SID: Temp Tablespace & Segment Usage"; cat ${FINAL_FILE}) | /usr/sbin/sendmail -F $ORACLE_SID test@testorcl.com


rm ${FINAL_FILE}
rm ${SPOOL_FILE}


------------End of Script--------------------------------------

Monday, August 31, 2009

How to Monitor Undo Tablespace and Segment Usage


Starting from release 9i oracle introduced Automatic Undo Management to help DBAs and Developers to cope with ORA-01555: snapshot too old error. Ofcourse you can't completely avoid ORA-01555 error but you can tweak some parameters with Automatic Undo Management along with application code tuning to reduce it, Parameters like UNDO_RETENTION parameter, which defines time in minutes how long oracle will keep the committed transactions in UNDO segments.
One should use UNDO advisor in order to calculate optimum UNDO tablespace Size and UNDO_RETENTION parameter value.
Use following SQL script to monitor Undo tablespace and Undo Segments or Rollback Segments usage in Oracle Database.

------------Start of Script-------------------------------------
#!/bin/sh
# Undo Segment Usage
#

SPOOL_FILE=undo_seg.html
FINAL_FILE=Undo_Segments.html
echo "Content-Type: text/html" >> ${FINAL_FILE}
sqlplus -s "/ as sysdba" EOF
set echo off
set pagesize 220
set markup html on spool on
spool ${SPOOL_FILE}
TTITLE CENTER 'Undo Segments Usage'
SELECT gvs.inst_id "Instance",
gvs.SID,
glo.os_user_name "OS User",
glo.oracle_username "DB User",
dbo.owner "Schema",
SUBSTR (dbo.object_name, 1, 30) "Object Name",
SUBSTR (dbo.object_type, 1, 10) "Object Type",
SUBSTR (drs.segment_name, 1, 15) "RBS Name",
gvt.used_urec "# of Records",
gvt.used_ublk "# of Blocks",
drs.tablespace_name "Tablespace"
FROM
gv$locked_object glo,
dba_objects dbo,
dba_rollback_segs drs,
gv$transaction gvt,
gv$session gvs
WHERE glo.object_id = dbo.object_id
AND glo.xidusn = drs.segment_id
AND glo.xidusn = gvt.xidusn
AND glo.xidslot = gvt.xidslot
AND gvt.addr = gvs.taddr
AND gvt.used_ublk > 1000
ORDER BY gvt.used_ublk DESC;
spool off
set markup html off spool off
EOF

if [ `grep -c 'no rows selected' ${SPOOL_FILE}` -eq 1 ]
then
rm ${FINAL_FILE}
rm ${SPOOL_FILE}
exit 0
fi

cat ${SPOOL_FILE} | grep -v 'rows selected' >> ${FINAL_FILE}

(echo "Importance: High"; echo "Subject: $ORACLE_SID: Undo Segment Usage"; cat ${FINAL_FILE}) | /usr/sbin/sendmail -F $ORACLE_SID
test@testorcl.com
rm ${FINAL_FILE}
rm ${SPOOL_FILE}

------------Start of Script--------------------------------------

How to Resolve ORA-27063 ORA-01114 ORA-01110 Errors


During hardware failure we got following error while starting one of our instances.

ALTER DATABASE OPEN
Thu Aug 6 23:21:00 2009
Errors in file /u01_orcltest/db/10.2.0/admin/ORCLTEST_orcltestdb01/udump/orcltest_ora_8866.trc:
ORA-01110: data file 407: '/u02_orcltest/data/apps_ts_queues_001.dbf'
ORA-01114: IO error writing block to file 407 (block # 1)
ORA-27063: number of bytes read/written is incorrect
Additional information: 8192
Thu Aug 6 23:21:00 2009
ORA-01201: file 407 header failed to write correctly
ORA-1113 signalled during: ALTER DATABASE OPEN...

We thought that the above file got currepted and we need to do media recovery and when we tried to recover database we got the same error again.

Thu Aug 6 23:48:28 2009
ALTER DATABASE RECOVER database
Thu Aug 6 23:48:28 2009
Media Recovery Start
Thu Aug 6 23:48:28 2009
Errors in file /u01_orcltest/db/10.2.0/admin/ORCLTEST_orcltestdb01/udump/orcltest_ora_13199.trc:
ORA-01110: data file 407: '/u02_orcltest/data/apps_ts_queues_001.dbf'
ORA-01114: IO error writing block to file 407 (block # 1)
ORA-27063: number of bytes read/written is incorrect
Additional information: 8192
Thu Aug 6 23:48:28 2009
Media Recovery failed with error 1201
ORA-283 signalled during: ALTER DATABASE RECOVER database ...


At this point we asked our Unix team to unmount and mount file system again for this instance. Once file system remounted we tried to open database but failed with ORA error again. In order to save our database at this point we recovered database using online redo log files.

ORA-279 signalled during: ALTER DATABASE RECOVER database using backup controlfile until cancel ...
Fri Aug 7 01:33:12 2009
ALTER DATABASE RECOVER LOGFILE '/u02_orcltest/data/log01a.log'
Fri Aug 7 01:33:12 2009
Media Recovery Log /u02_orcltest/data/log01a.log
Fri Aug 7 01:33:14 2009
Incomplete recovery applied all redo ever generated.
Recovery completed through change 1136061258397
Fri Aug 7 01:33:14 2009
Media Recovery Complete (ORCLTEST)
Completed: ALTER DATABASE RECOVER LOGFILE '/u02_orcltest/data/log01a.log'
Fri Aug 7 01:33:26 2009
alter database open resetlogs
Fri Aug 7 01:33:27 2009
RESETLOGS after complete recovery through change 1136061258397
Resetting resetlogs activation ID 2533705982 (0x970548fe)

Tuesday, August 25, 2009

How to Resolve ORA-00600: [kkoarl1]



Here you go again with ORA-00600: internal error code, arguments: [kkoarl1], [90139], [46226], [], [], [], [], [] error in our production database followed by "Memory Notification: Library Cache Object loaded into SGA" warning message. Luckily this error is not serious and we have a workaround also for ORA-00600 error and warning message.

As per Oracle one can see this error with very large and complex query. In our case we got this error from very complex and very large Discoverer report.

ORA-00600: internal error code, arguments: [kkoarl1], [90139], [46226], [], [], [], [], []Current SQL statement for this session:SELECT CASE WHEN ( SUBSTR(o102468.CHARGE_ACCOUNT_NUM,10,6) ) = '500000' THEN '220270' WHEN ( SUBSTR(o102468.CHARGE_ACCOUNT_NUM,10,6) ) = '500001' THEN '220270' WHEN ( SUBSTR(o102468.CHARGE_ACCOUNT_NUM,10,6) ) = '505000' THEN '220250' WHEN ( SUBSTR(o102468.CHARGE_ACCOUNT_NUM,10,6) ) = '505001' THEN '220250' WHEN ( SUBSTR ----------------
----------------
----------------
FROM POFG_PURCHASE_ORDERS o102467,en') as C_2,NVL(o102467.AUTHORIZATION_STATUS,'Incomplete') as C_1,ROUND(o102468.ORDERED_Q POFG_PO_DISTRIBUTIONS o102468,_5,ROUND(o102468.DELIVERED_QUANTITY,2)*o102470.ACTUAL_PRICE as C_6,ROUND(o102468.BILLED_ POFG_PO_LINES o102469,RICE as C_7
-------------------
-------------------
-------------------

This ORA-00600 error can be resolved by using "_optimizer_cost_based_transformation" parameter and set it false.

"_optimizer_cost_based_transformation"=false

During 11i upgrade also we had many standard forms failing with different errors and we end up setting this parameter to false in 11i e-Business suite. Although some experts says not to change this parameter because of performance issue and work on the the sql statment but we didn't have any performance issue after making changes to this parameter.

Memory Notification: Library Cache Object loaded into SGA

Memory Notification: Library Cache Object loaded into SGA
Heap size 109275K exceeds notification threshold (51200K)Details in trace file ORCLTEST_ora_19128.trc
KGL object name :EXPLAIN PLAN SET STATEMENT_ID = '117984602' INTO EUL4_US.EUL5_PLAN_TABLE FORSELECT CASE WHEN ( SUBSTR(o102468.CHARGE_ACCOUNT_NUM,10,6) ) IN ('785500','803500','810000','810100','810500','810510','810520','810530',
'810540','810550','810570','811010','823250','823500','823501','830500',
'831000','831100','831300','831400','840000','840001','840002','840003',
'840050','840070','840100','840120','840150','840200','840250','840300',
'840350','840400','840450','840500','840550','840600','840650','840700',
-----------
-----------

This is a simple warning message for KGL heap size warning threshold as some process is waiting for a long time in finding free memory extents. This warning message can be supress by using _kgl_large_heap_warning_threshold (hidden parameter) and set it to relatively high value in bytes, default value of this parameter is 50M in 10.2.0.4 .0. You may also try setting this parameter to zero to supress this warning.

Monday, August 17, 2009

How to Resolve ORA-00600: [sorsikbeg_1]

Now we got another ORA-00600 Error in our production database and this time error was ORA-00600: internal error code, arguments: [sorsikbeg_1], [5], [0], [], [], [], []

This error is generally caused by "CONNECT BY PRIOR" in SQL statement. In our trace file we could see the following connect by query:

SELECT COUNT(DISTINCT PAAF.PERSON_ID)
FROM PER_ALL_PEOPLE_F PAPF,
PER_ALL_ASSIGNMENTS_F PAAF,
PER_PERSON_TYPES PPT,
PER_PERSON_TYPE_USAGES_F PPTU,
PER_ASSIGNMENT_STATUS_TYPES PAST
WHERE 1 = 1 AND PAPF.PERSON_ID = PPTU.PERSON_ID
AND PPTU.PERSON_TYPE_ID = PPT.PERSON_TYPE_ID
AND PPT.SYSTEM_PERSON_TYPE = 'EMP'
AND PAPF.PERSON_ID = PAAF.PERSON_ID
AND PAAF.ASSIGNMENT_STATUS_TYPE_ID = PAST.ASSIGNMENT_STATUS_TYPE_ID AND
PAST.PER_SYSTEM_STATUS = 'ACTIVE_ASSIGN'
AND PAAF.ASSIGNMENT_TYPE = 'E'
CONNECT BY PRIOR PAAF.PERSON_ID = PAAF.SUPERVISOR_ID
AND TRUNC(SYSDATE)
BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE AND
TRUNC(SYSDATE) BETWEEN PPTU.EFFECTIVE_START_DATE AND PPTU.EFFECTIVE_END_DATE
AND TRUNC(SYSDATE) BETWEEN PAAF.EFFECTIVE_START_DATE AND
PAAF.EFFECTIVE_END_DATE START WITH 1 = 1 AND PAAF.PERSON_ID = :b1;

In order to resolve this error we temporary used following work around (Oracle Hint) but be careful as this hint can have serious performance issue.

SELECT /*+ NO_CONNECT_BY_FILTERING*/ COUNT(DISTINCT PAAF.PERSON_ID) FROM
PER_ALL_PEOPLE_F PAPF,
PER_ALL_ASSIGNMENTS_F PAAF,
PER_PERSON_TYPES PPT, PER_PERSON_TYPE_USAGES_F PPTU, PER_ASSIGNMENT_STATUS_TYPES PAST
WHERE 1 = 1
AND PAPF.PERSON_ID =PPTU.PERSON_ID
AND PPTU.PERSON_TYPE_ID = PPT.PERSON_TYPE_ID
AND PPT.SYSTEM_PERSON_TYPE = 'EMP'
AND PAPF.PERSON_ID = PAAF.PERSON_ID
AND PAAF.ASSIGNMENT_STATUS_TYPE_ID = PAST.ASSIGNMENT_STATUS_TYPE_ID
AND PAST.PER_SYSTEM_STATUS = 'ACTIVE_ASSIGN'
AND PAAF.ASSIGNMENT_TYPE = 'E'
CONNECT BY PRIOR
PAAF.PERSON_ID = PAAF.SUPERVISOR_ID
AND TRUNC(SYSDATE)BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE ANDTRUNC(SYSDATE) BETWEEN PPTU.EFFECTIVE_START_DATE AND PPTU.EFFECTIVE_END_DATEAND TRUNC(SYSDATE) BETWEEN PAAF.EFFECTIVE_START_DATE ANDPAAF.EFFECTIVE_END_DATE START WITH 1 = 1
AND PAAF.PERSON_ID = :b1;

another way to resolve this is to set the parameter "_optimizer_connect_by_cost_based" to false in the session itself using

alter session set "_optimizer_connect_by_cost_based"=FALSE by default value of this hidden parameter is TRUE, but one should be careful with hidden parameters and should always get blessing from oracle before using them otherwise you might get unpredictable results.

Monday, August 10, 2009

How to find out Patch Information and Duration in Oracle Applications 11i




Use following SQL Query to find out Installed Patch Information and duration.

SELECT AAP.PATCH_NAME "Patch Name",
NVL
(DECODE
(MERGED_DRIVER_FLAG,
'Y', AD_PA_VALIDATE_CRITERIASET.GET_CONCAT_MERGEPATCHES
(APD.PATCH_DRIVER_ID), '' ), 'Single Patch' ) "Merged Patches",
APR.START_DATE "Start Date", APR.END_DATE "End Date",
APD.DRIVER_FILE_NAME "Driver File",
APR.PATCH_ACTION_OPTIONS "Patch Options",
DECODE (APR.SERVER_TYPE_ADMIN_FLAG,
'Y', 'Admin,',
NULL
)
|| DECODE (APR.SERVER_TYPE_FORMS_FLAG, 'Y', 'Forms,', NULL)
|| DECODE (APR.SERVER_TYPE_NODE_FLAG, 'Y', 'Node,', NULL)
|| DECODE (APR.SERVER_TYPE_WEB_FLAG, 'Y', 'Web,', NULL)
"Server Type",
APD.PLATFORM "Platform",

SUBSTR (APR.PATCH_TOP, 1, 20) "Patch Top",
AD_CORE.GET_FORMATTED_ELAPSED_TIME

((APR.END_DATE - APR.START_DATE), 2 ) "Elapsed Time"
FROM AD_PATCH_RUNS APR,
AD_PATCH_DRIVER_LANGS APDL,
AD_PATCH_DRIVERS APD,
AD_APPLIED_PATCHES AAP
WHERE APD.PATCH_DRIVER_ID = APR.PATCH_DRIVER_ID
AND APD.PATCH_DRIVER_ID = APDL.PATCH_DRIVER_ID
AND APD.APPLIED_PATCH_ID = AAP.APPLIED_PATCH_ID
AND AAP.PATCH_NAME = &PATCH_NAME
ORDER BY END_DATE DESC;






Use following SQL query to find out Patch Job Details and Timings.



SELECT PROGRAM "Program", AAP.PATCH_NAME "Patch Name",
APRT.JOB_NAME "Job Name", APRT.PHASE_NAME "Phase",
APRT.START_TIME "Job Start Time",
APRT.END_TIME "Job End Time",
ROUND ((NVL
(APRT.END_TIME, SYSDATE) - APRT.START_TIME)
* 60 * 24, 2) "Elapsed Time"
FROM AD_PROGRAM_RUN_TASK_JOBS APRT,
AD_PATCH_RUNS APR,
AD_PATCH_DRIVERS APD,
AD_APPLIED_PATCHES AAP
WHERE APRT.SESSION_ID = APR.SESSION_ID
AND APR.PATCH_DRIVER_ID = APD.PATCH_DRIVER_ID
AND APD.APPLIED_PATCH_ID = AAP.APPLIED_PATCH_ID
AND AAP.PATCH_NAME = &PATCH_NAME
ORDER BY "Elapsed Time" DESC



Friday, August 7, 2009

How to Find Out Pending Concurrent Requests in Oracle Applications 11i


  
   Use following script to monitor Pending concurrent requests status in the oracle applications 11i. You can schedule this using crontab or use only sql script to get the results. This script will help you to understand pending concurrent requests status and to resolve any issue with pending concurrent requests.

------------Start of Script-------------------------------------


#!/bin/sh
# Long Running Concurrent Requests
#

SPOOL_FILE=/home/oracle/scripts/pending_conc.html
FINAL_FILE=/home/oracle/scripts/Pending_Concurrent.html

echo "Content-Type: text/html" >> ${FINAL_FILE}
sqlplus -s apps/apps EOF
set echo off
set pagesize 120
set markup html on spool on
spool ${SPOOL_FILE}
TTITLE CENTER 'Pending Concurrent Requests '




SELECT DISTINCT far.request_id, SUBSTR (program, 1, 30), far.user_name,
                far.phase_code, far.status_code, phase, status,
                (CASE
                    WHEN far.phase_code = 'P' AND far.hold_flag = 'Y'
                       THEN 'Job is on Hold by user'
                    WHEN far.phase_code = 'P'
                    AND (far.status_code = 'I' OR far.status_code = 'Q')
                    AND far.requested_start_date > SYSDATE
                       THEN    'Job is scheduled to run at '
                            || TO_CHAR (far.requested_start_date,
                                        'DD-MON-RR HH24:MI:SS'
                                       )
                    WHEN far.phase_code = 'P'
                    AND (far.status_code = 'I' OR far.status_code = 'Q')
                    AND fcp.queue_control_flag = 'Y'
                       THEN 'ICM will run ths request on its next sleep cycle'
                    WHEN far.phase_code = 'P' AND far.status_code = 'P'
                       THEN 'Scheduled to be run by the Advanced Scheduler'
                    WHEN far.queue_method_code NOT IN ('I', 'B')
                       THEN    'Bad queue_method_code of: '
                            || far.queue_method_code
                    WHEN far.run_alone_flag = 'Y'
                       THEN 'Waiting on a run alone request'
                    WHEN far.queue_method_code = 'B'
                    AND far.status_code = 'Q'
                    AND EXISTS (
                           SELECT 1
                             FROM fnd_amp_requests_v farv
                            WHERE phase_code = 'P'
                              AND program_application_id =
                                                    fcps.to_run_application_id
                              AND concurrent_program_id =
                                             fcps.to_run_concurrent_program_id)
              THEN    'Incompatible request '
                  || (SELECT DISTINCT    farv.request_id
                                || ': '
                                || farv.program
                                || ' is Ruuning by : '
                                || farv.user_name
                      FROM fnd_amp_requests_v farv,fnd_concurrent_program_serial fcps1
                      WHERE phase_code = 'R'
                      AND program_application_id =fcps1.running_application_id
                      AND concurrent_program_id =fcps1.running_concurrent_program_id
                      AND fcps.to_run_application_id=fcps1.to_run_application_id
                      AND fcps.to_run_concurrent_program_id=fcps1.to_run_concurrent_program_id)
                    WHEN fcp.enabled_flag = 'N'
                       THEN 'Concurrent program is disabled'
                    WHEN far.queue_method_code = 'I' AND far.status_code = 'Q'
                       THEN 'This Standby request might not run'
                    WHEN far.queue_method_code = 'I' AND far.status_code = 'I'
                       THEN    'Waiting for next available '
                            || fcqt.user_concurrent_queue_name
                            || ' process to run the job. Estimate Wait time '
                            || fcq.sleep_seconds
                            || ' Seconds'
                    WHEN far.queue_method_code = 'I'
                    AND far.status_code IN ('A', 'Z')
                       THEN    'Waiting for Parent Request: '
                            || NVL (far.parent_request_id,
                                    'Could not locate Parent Request ID'
                                   )
                    WHEN far.queue_method_code = 'B' AND far.status_code = 'Q'
                       THEN 'Waiting on the Conflict Resolution Manager'
                    WHEN far.queue_method_code = 'B' AND far.status_code = 'I'
                       THEN    'Waiting for next available '
                            || fcqt.user_concurrent_queue_name
                            || ' process to run the job. Estimate Wait time '
                            || fcq.sleep_seconds
                            || ' Seconds'
                    WHEN far.phase_code = 'P' AND far.single_thread_flag = 'Y'
                       THEN 'Single-threaded request. Waiting on other requests for this user.'
                    WHEN far.phase_code = 'P' AND far.request_limit = 'Y'
                       THEN 'Concurrent: Active Request Limit is set. Waiting on other requests for this user.'
                 END
                ) reason
           FROM fnd_amp_requests_v far,
                fnd_concurrent_programs fcp,
                fnd_conflicts_domain fcd,
                fnd_concurrent_program_serial fcps,
                fnd_concurrent_queues fcq,
                fnd_concurrent_queue_content fcqc,
                fnd_concurrent_queues_tl fcqt
          WHERE far.phase_code = 'P'
            AND far.concurrent_program_id = fcp.concurrent_program_id
            AND fcd.cd_id = far.cd_id
            AND fcps.running_application_id(+) = far.program_application_id
            AND fcps.running_concurrent_program_id(+) = far.concurrent_program_id
            AND far.program_application_id = fcps.to_run_application_id(+)
            AND far.concurrent_program_id = fcps.to_run_concurrent_program_id(+)
            AND far.concurrent_program_id = fcqc.type_id(+)
            AND far.program_application_id = fcqc.type_application_id(+)
            AND fcq.concurrent_queue_id(+) = fcqc.concurrent_queue_id
            AND fcq.application_id(+) = fcqc.queue_application_id
            AND fcqt.concurrent_queue_id(+) = fcq.concurrent_queue_id
            AND fcqt.application_id(+) = fcq.application_id
       ORDER BY far.request_id DESC
/
spool off
set markup html off spool off
EOF


if [ `grep -c 'no rows selected' ${SPOOL_FILE}` -eq 1 ]
then
rm ${FINAL_FILE}
rm ${SPOOL_FILE}
exit 0
fi
cat ${SPOOL_FILE} | grep -v 'rows selected' >> ${FINAL_FILE}
(echo "Importance: High"; echo "Subject: ORCL: Pending Concurrent Requests"; cat ${FINAL_FILE}) | /usr/sbin/sendmail -F ORCL
test@testorcl.com

rm ${FINAL_FILE}
rm ${SPOOL_FILE}


-------------End of Script-------------------------------------