Showing posts with label Oracle Applications 11i. Show all posts
Showing posts with label Oracle Applications 11i. Show all posts

Sunday, March 17, 2013

Request URI:/OA_HTML/AppsLocalLogin.jsp - Exception:java.lang.NoClassDefFound

Below error in one of our 11.5.10.2 instance and login page is not coming.

Request URI:/OA_HTML/AppsLocalLogin.jsp -
Exception:
java.lang.NoClassDefFoundError 


Try to Clear Cache:
=============

In 11i use the apache start and stop commands and bounce the JVM running on JSERV and clear caches as follows:

To clear the jsp & modplsql caches run this command:

1)shutdown apache
2) verify ps xuc | rep http -- should not return any process
3)rm -Rf $OA_HTML/_pages/*
rm -Rf $COMMON_TOP/_pages/*
rm -Rf $IAS_ORACLE_HOME/Apache/modplsql/cache/*
4). start apache

From user point of view user needs to clear the brower cache

goto IE--> tools--> delete cookes
--> delete files

---> clear History

Once the above workaround is done, it should have resolve the issue. try login and verify the result.


Hope it should fix the issue.

Thursday, July 12, 2012

TO Enable SSO for a account as user has multiple accounts

User needs one of JPRASAD account to be SSO enabled as user has Multiple Accounts

User has two active Oracle accounts:
1 JPRASAD1(SSO enabled)
2 JPRASAD (SSO not enabled)

Before proceeding the below steps make sure the user has the right GUID for the appropriate account.
Asked user to login to the browser and enter as below:
Ebiz.domain.com(appropriate url to launch your Ebiz) in browser
And select Preferences Tab from the right side corner
Then select Account Settings Button as user has Multiple accounts, check with the user which accounts need to Activated. Here in this Case User needs APOWELL account as ACTIVE.
Then Select JPRASAD and click on Set as Default Button
Then Click on Apply Button
VALIDATION
Ask user to Clear Browser Cache by
Tools à Internet Options à General Tab à Delete Button à Select All Check Boxes à Delete Button
Once Clearing Cache, Close all existing Internet Explorer sessions and then open a fresh Internet Explorer session and try login with ebiz.domain.com(appropriate url to launch your Ebiz)

** Hope it will Resolve the Issue**

Wednesday, March 21, 2012

Adphrept to get list of patches applied to Appstier using ADPatch

####################################################################
ADPHREPT REPORT TO GET LIST OF PATCHES APPLIED USING ADPATCH
####################################################################


METHOD 1
###########
Check Patches applied in Oracle Applications Manager (OAM).

a) Connect to OAM:

http://hostname.domain:PORT/servlets/weboam/oam/oamLogin

Go to Site Map-->Maintenance-->Applied Patches

Enter Patch ID and press 'Go'

See if Patch was returned.


METHOD 2
#########
Use 'adphrept' utility


Patch History report usage:

adphrept query_depth \
bug_number or ALL \
bug_product or ALL \
end_date_from (mm/dd/rr or ALL) \
end_date_to (mm/dd/rr or ALL) \
patchname/ALL \
patchtype/ALL \
level/ALL \
language/ALL \
appltop/ALL \
limit to forms server? (Y/N) \
limit to web server? (Y/N) \
limit to node server? (Y/N) \
limit to admin server? (Y/N) \
only patches that change DB? (Y/N)

Specify 1 or 2 or 3 for query_depth

1-> Details of patches only
2-> Details of patches and their Bug Fixes only
3-> Details of patches their Bug Fixes and Bug Actions

Example: To get the complete patch details for patches applied in Dec 2000:

On UNIX:

$ cd $AD_TOP/patch/115/sql
$ sqlplus APPS/<PWD>

SQL> @adphrept.sql 1 ALL ALL 10/01/11 11/08/11 ALL ALL ALL ALL ALL N N N N N

This report should take less than a minute.

If you are prompted for any parameters, please exit and review the parameter list you have submitted.

Gathering data for report. Report output will be written to adfilerep.xml.

Writing data to report file.
Your AD Patch History XML Report is ready  at adfilerep.xml.

Note:Please copy the file to OA_HTML top to view it thru browser

Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

[applmgr@hostname: sql]$ cp adfilerep.xml /u1590/oracle/oad5/apps/apps_st/comn/webapps/oacore/html/.

Saturday, March 17, 2012

How To Clear Too Many Pending Requests For Password Reset [ID 875559.1]

On 12.0.6 in Production:
When attempting to use the "FORGET PASSWORD" feature from the Oracle Applications, the
user is unable to reset it's password due to the following error:

ERROR
Too many pending requests already exists in the system. Please check your email or contact the
System Administrator for further assistance.


Cause
The cause of the issue is that there are five 'Forgot password' requests that are currently active
for a user that have possibly timed out but not been processed by 'Workflow Background Process'.

If user doesn't respond within 4 hours after receiving email notification to reset password, the activity will time out but will remain active till 'Workflow Background Process' is run to process 'Timeout'
activities. When the number of such requests for a user exceeds five, the above warning message is displayed.

The following SQL shows status of request for a user:

select * from
(
SELECT WorkflowItemEO.ITEM_TYPE,
WorkflowItemEO.ITEM_KEY,
wf_fwkmon.getitemstatus(WorkflowItemEO.ITEM_TYPE,
WorkflowItemEO.ITEM_KEY, WorkflowItemEO.END_DATE,
WorkflowItemEO.ROOT_ACTIVITY,
WorkflowItemEO.ROOT_ACTIVITY_VERSION) STATUS_CODE
FROM WF_ITEMS WorkflowItemEO,
WF_ITEM_TYPES_VL WorkflowItemTypeEO,
WF_ACTIVITIES_VL ActivityEO,
WF_ITEM_ATTRIBUTE_VALUES attrib
WHERE WorkflowItemEO.ITEM_TYPE = WorkflowItemTypeEO.NAME
AND ActivityEO.ITEM_TYPE = WorkflowItemEO.ITEM_TYPE
AND ActivityEO.NAME = WorkflowItemEO.ROOT_ACTIVITY
AND ActivityEO.VERSION = WorkflowItemEO.ROOT_ACTIVITY_VERSION
AND attrib.item_type = WorkflowItemEO.ITEM_TYPE
AND attrib.item_key = WorkflowItemEO.ITEM_KEY
AND attrib.name = 'USER_NAME'
AND attrib.text_value = '<USER_NAME>'
) QRSLT
where
item_type = 'UMXLHELP';

.
Solution
To close the pending items, please execute the following steps:

1. submit concurrent request 'Workflow Background Process with following parameters:

Item Type : UMX Login Help
Process deferred: Yes
Process Timeout: Yes

2. Retest the issue after request completes to confirm that warning message no longer appears.

Form Compilation Against a 11g Database Hangs or Takes a Very Long Time [ID 880660.1]


When trying to compile some forms against an 11g Database using 'frmcmp.sh' and 'frmcmp_batch.sh' compilers, it seems to hang or it takes too much time (10 min +)
Compile command is like:

frmcmp_batch.sh module=test.fmb module_type=FORM compile_all=YES userid=scott/tiger@orcl


If we compile the same source with the same command line against the 9i/10g database there is no problem.
Cause
The cause of this problem has been identified and verified in an unpublished Forms Bug: 8557019 - APPSPERF: ONE SQL USING ALL_OBJECTS HAS PERFORMANCE ISSUE UNDER 11G INSTANCE. and the underlying unpublished Database (Dictionary) Bug: 8560951 - PERFORMANCE ISSUE WHEN RUNNING A QUERY IN 11G

These Bugs explain that there is a performance issue when executing a similar 'problematic' SQL Query against the 11g database like in the following example:


SELECT COUNT (*)
FROM ALL_OBJECTS
WHERE ( OWNER = 'SYS'
AND OBJECT_NAME = 'DBMS_JAVA'
AND OBJECT_TYPE = 'PACKAGE'
AND ALL_OBJECTS.STATUS = 'VALID' )
OR ( OWNER = 'SYSTEM'
AND OBJECT_NAME = 'ORA_DE_REFLECTION'
AND OBJECT_TYPE = 'PACKAGE'
AND ALL_OBJECTS.STATUS = 'VALID' )
OR ( OWNER = 'SYSTEM'
AND OBJECT_NAME = 'oracle/opb/Reflection'
AND OBJECT_TYPE = 'JAVA CLASS'
AND ALL_OBJECTS.STATUS = 'VALID' )
OR ( OWNER = 'SYSTEM'
AND OBJECT_NAME = 'oracle/opb/SchemaClassLoader'
AND OBJECT_TYPE = 'JAVA CLASS'
AND ALL_OBJECTS.STATUS = 'VALID' ) ;
Solution
To implement the solution, you can either:
A). First, apply the database Patch 8560951 on top of your Database. 
Important Notes:
  • The Patch 8560951 brings modifications in a sensible area and it is needed to use _FIX_CONTROL to enable the fix. This can be done usually either at the DB or session level, but here, as the compiler will launch its own session, it is needed to activate the fix at the DB level.
  • This patch is already included in higher database versions (e.g. 10.2.0.5, 11.2.0.2). For these it's not necessary to install the patch.
    But, "_FIX_CONTROL"='8560951:ON' still needs to be set as the fix is disabled by default.
Second, execute an additional step on your database to activate this fix:
SQL> ALTER SYSTEM SET "_FIX_CONTROL"='8560951:ON''
This will enable the fix in memory. If needed to restore things as they were, you can similarly turn the fix off with:
SQL> ALTER SYSTEM SET "_FIX_CONTROL"='8560951:OFF''
More info about _FIX_CONTROL in:
NOTE 782926.1 Info About Hidden Parameter _fix_control
(You can add scope=spfile and restart the DB to have the fix remain active in the future.)



OR


B) Use the following workaround:


1 Connect to the DB with SQL*Plus as the user who compiles the Forms application


2. Use the following command to create a synonym all_objects with:
SQL> create synonym all_objects for sys.dba_objects;
Note. If it's not working, grant SELECT privelege on sys.dba_objects to the user who will be compiling the form.
3. Compile again your Form.

If you want at the end, you can drop this synonym with:
SQL> drop synonym all_objects;

Sunday, September 12, 2010

Workflow Notifications – Override Email address for all Notifications

Very often on a Oracle Apps Test or Development environment, you would like all the Workflow Email notifications to be sent to your email address.
Please  find the steps required to assign your email address. This is of tremendous help when testing Oracle Workflows based applications.
These steps have been tried and tested on 11.5.10 environment.
As a developer, please do not try these steps on Production Environment, or else you will end up doing users work !
Step 1
Login to “Workflow Administrator Web Applications”
Image
Step 2
Ensure that Notification Mailer is running, and then click on icon as below
Image
Step 3
Click on “View Details”
Image
Step 4.
Click on “Set Override Address”
Image
Step 5.
Finally you can change the email address here. Please read the instructions in red carefully.
Image

Integrate Discoverer 10g with Oracle Applications 11.5.10.2

High Level Steps
1> Install Infra Oracle Application Server, OID – Refer my earlier document
2> Install Middleware components including discoverer and portal
3> Upgrade the database of the infra from 10.1.0.4 to 10.1.0.5
4> Apply patch 5861907 to upgrade the apps server from 10.1.2 to 10.1.2.2
5> Connect to Discoverer viewer/Plus
6> Configure Discoverer Desktop and Discoverer Admin Edition on Windows XP
Assumptions
Server Name: linux1
Oracle Applications 11.5.10.2
Red Hat 4.0 – update 4
Vision Instance
Server Name: linux2 – Current Installation
Discoverer 10g (Infra and middleware)
Red Hat 4.0 – update 4
Install Middleware discoverer and portal
su – asmid
./runInstaller
cd /usr/app/oracleAS
chmod -R 777 oraInventory
Register with Oracle Internet Directory
Host:linux2.com
Port:389
welcome1
Instance Name: middemo1
Ias_admin_password=welcome1
Confirm password=welcome1
Upgrade the database of the infra from 10.1.0.4 to 10.1.0.5
Download the patch
Stop the middle tier components
Stop all the infra components
Apply database patch p4505133_10105_LINUX
Sqlplus “/as sysdba”
1. Enter the following SQL*Plus commands:
2. SQL> STARTUP UPGRADE
3. SQL> SPOOL patch.log
4. SQL> @?/rdbms/admin/catpatch.sql
5. SQL> SPOOL OFF
6. Restart the database:
7. SQL> SHUTDOWN
8. SQL> STARTUP
9.
10.Run the utlrp.sql script to recompile all invalid PL/SQL packages now
instead of when the packages are accessed for the first time. This step is
optional but recommended.
SQL> @?/rdbms/admin/utlrp.sql
Apply patch 5861907 to upgrade the application server from 10.1.2 to 10.1.2.2
All infra components should be started including datatabase, OID
Upgrade application server from 10.1.2 to 10.1.2.2
Change the oracle_home accordingly – will need to toggle couple of times
Click ok
welcome1
welcome1
Oracle
Click ok
Apply the patch on middle tier
Check that all the services on the middle tier are stopped
su – asmid
./runInstaller
http://linux2.com:7777/pls/orasso – login using orcladmin/welcome1
http://linux2.com:7777/oiddas – login using orcladmin/welcome1
Click Directory
orcladmin/welcome1

Saturday, September 11, 2010

How to change hostname in application tier

This summary is not available. Please click here to view the post.

Applications 11i Health Check

As Oracle Apps DBA / Sysadmin you Apply patches & restart servives or make some configuration changes in applications 11i before releasing Instance to Application Users you wish to check if all components in E-Business Suite 11i are working fine. Here is list of components you should check apart from your custom services.

1. Check Web Server is Up : Check in browser http://hostname.domainname:port where hostname.domain name is Machine Name on which Web Server(OHS) is running. If you are using load balancer or Proxy Server in front of Web Server it will be loadbalancer / Proxy Server Name. Port is port on which Web Server is Listening. It is defined in $IAS_ORACLE_HOME /Apache /Apache /conf /httpd.conf . If you can’t access this check error_log at $IAS_ORACLE_HOME /Apache /Apache/ logs

2. Check Jserv is Up : Check if you can access OAM (Oracle Application Manager) page. http://hostname.domainname:port_number/servlets/weboam/oam/oamLogin If you can’t access login screen for OAM.

3. Check mod_pls is working fine : http://hostname.domainname:port/pls/$SID so if you installed vision instance with SID as VIS11I your SID here is VIS11II this sometime in documents also called as TWO_TASK. You should see output from procedure FND_WEB.PING . If not check that -
A) database listener is Up
B) GUEST User is not end dated & password is correct.
C) dbc (database connect descriptor) file is corerct at $FND_TOP/secure
D) apps password is correct in wdbsvr.app at $IAS_ORACLE_HOME/Apache/modplsql/cfg

4. Login to Application : Login to application with Application User to confirm login is working fine , if not check mod_pls for any issues.

5. Check Form Server is working : Click on any Core Responsibility like “System Administrator“, If you are facing any problem opening form Applet
A) Check jinitiator is installed, if not do you have access to install jinitiator
B) Try clearing cache from jinitiator
C) Check forms server parameters are configured properly in appsweb_$CONTEXT_NAME.cfg
D) Check if form server listener is Up : netstat -an | grep form_server_port

6. Check Concurrent Manager is Up & Running : Select “Administer Concurrent Manager” & check if “Actual” & “Target” are same. If not check $SID_MM_DD.mgr at $APPLCSF/$APPLLOG

7. Check Reports can display properly : Change “Active Users” reports output from “Text file” to “PDF” from Define Concurrent Request Screen. Submit Active Users request & click on Output , check if you can se report in PDF format. If you encounter error like REP-3000 Oracle Toolkit , issue is with DISPLAY.

8. Check Apps Listener is Up : Apps listener is different from database listener, Apps Listener is used for various purpose one is to check output & log files in concurrent requests. Check if apps listener is fine by clicking on log file & output file for Active Users request you submitted in Step 7 on previous page. If you encounter any issues while trying to access Log & Output file issue might be with Oracle Apps Listener. Check if adalnctl.sh (where ad is apps dba, aln is apps listener and ctl is control) on application tier started successfully. If yes then check this query (select logfile_name, logfile_node_name, outfile_name, outfile_node_name from fnd_concurrent_requests where request_id=[your request id number].

9. Check if Workflow is Up : Login to OAM (Oracle Application Manager) using url mentioned in step 2 in previous page. After login, On top right of page from “Nevigate to” select “Workflow Manager” from drop down menu and click on GO button. Check “Notification Mailers” is Up .

 10. Check if Discoverer 4i is Up : There are two type of discoverer 4i
Discoverer Viewer - Check http://yourhostname:port/discoverer4i/viewer
Discoverer Plus Check http://yourhostname:port/discwb4/html/english/welcome.htm

11. Custom applications : Any custom application configured with oracle apps 11i, oem any other monitoring software.

Printer Maintenance in Oracle Applications


  1. Log in with the SRC_Printer Menu Responsibility.
  2. Navigate to Register



Adding a Printer

  1. To add a printer fill in the Pinter Name first. Note that this MUST match the name of the print queue on the Linux machine that runs the concurrent managers and it cannot be changed once it is saved.
  2. The “Type” will be “--PASTA Universal Printer Type”.
  3. Type in a description for the Printer.
  4. Click “Save” on the toolbar.



 
Updating a Printer
  1. Open the printer form as above.
  2. Press F11 to enter Query mode.
  3. Enter the printer name that you’re querying in the ‘Printer’ field. Press Ctrl+F11.
Only  the “Type” and “Description” field can be changed (NOT the Printer Name)
      4. Update the fields that are necessary, and click ‘Save’



Deleting a Printer
  1. Open the printer form as above.
  2. Press F11 to enter Query mode.
  3. Enter the printer name that you’re querying in the ‘Printer’ field. Press Ctrl+F11.
  4. To delete a printer, just click the “Delete” button in the toolbar and click “Save”:
 

What’s Different TOP’s in Application 11i


If you want to learn apps dba or want training in apps dba and going through this documentation you might be confused to see again & again that everybody is talking about & its quite difficult to unserstand any topic without knowing what the hell is different tops like APPL_TOP , COMMON_TOP or what eaxctly is TOP ?
For me TOP is nothing but top level directory & preceded by related software . So TOP is top level directory in file system or oracle 11i software .
If you have done 11i or oracle application Installation by now ( if not please go though my training for apps dba in my previous posts) Oracle Installer Installs Apps 11i in DB Tier & Application Tier : so lets take Application Tier you will see three directories under your base Installation directory, these diretories are APPL, ORA & COMN (Check pic. at left top of this page) so directory APPL is called as APPL_TOP i.e. top appl directory where files & directories related to different Application ( like GL General Ledger, PO Purchase Order..) exists. If You are DBA you can correlate it with your Oracle database software installation (I know after reading this example you will say its weird but believe me thats how understood it initially , ORACLE_HOME can be called as ORA_TOP , network directory you can say TNS_TOP )
Under ( ORA_TOP ) you will see diretcory related to oracle home , there are two oracle HOME’s in Application Tier 8.0.6 for Forms & Reports , iAS for 9iAS acting as web server)
COMN_TOP will contain files & directories which will be used commonly by all components ( Isn’t this simple to understand )
similarly
IAS_TOP is top files/directory under ORA_TOP/iAS I hope it might be clear to you now if not donot worry it will be more clear once you start working as Apps DBA.
I am attaching few screenshot of other mount points ( Courtsey oracle 11i concepts guide , below is location if you want to read .
http://download-uk.oracle.com/docs/cd/B25516_08/current/acrobat/11iconcepts.pdf  (Add these three lines before putting in to browser , I have not put it in single line as it breaks my page layout )
So In this guide you will find few more screenshot of different TOP’s , Go through Chapter 2 , Just 13 Pages ( 13 unlucky number for someone but if understand this chapter , it can be very lucky for you in your Apps DBA Career.
So here I conclude my TOP’s Section , Please don’t forget to leave feedback & what you want hear next.
You can find some comanies on right side or top of this page who might be looking for Apps DBA , visit them by clicking & go to Career section to look for Apps DBA opportunity

Oracle Applications Architecture

Server – is a process or group of processes and provides a particular functionality/service For example, Database Server listen and process database requests, similarly Web Server listens for and processes HTTP requests.

Tier – is a logical grouping of services, may be on single machine or spread across more than one physical machine. For Example, Middle Tier in Oracle apps consist Form,Web,Report…Services. Forms & Report can be one machine 1 & Web Server can be on machine 2, still they will be part of same tier called as Application Tier or Middle Tier.

Node – is referred as Machine, Each tier may consist of one or more node and each node can potentially have more than one tier.

Desktop Tier – Oracle Applications/E-Business Suite is built on three tier Architecture with first Desktop Tier ic client machines accessing applications via browser(HTML based Self service applications) or Java Applet(Jinitiator) for Form based interface.

Application/Middle Tier – Second is Application Tier also called as middle tier consists of WebServer Forms, Reports, Concurrent processing, Discoverer and Admin Server. I suppose its known as Middle tier because it lies between our desktop & third tier called database tier.

Database Tier – Third is Database Tier contain Orale database server which store all your application data. I am sure if you are DBA you know it :)

About Architecture of Individual Component like , Web Server, Form Server …. I will cover in my future posts

How to Change Apps Password in 11i, if you forget ?

We need to change apps password manually, if you forgot and can’t check it in wdbsvr.app at $IAS_ORACLE_HOME/Apache/modplsql/cfg .

Please remember that the APPLSYS and APPS passwords always
have to be the same
. Always change both at the same time. When changing these
passwords, it is important to change the APPLSYS password first and the APPS later.
please back up the FND_ORACLE_ID and FND_USER tables before beginning.

1. Have all users log out of applications.

2. Shutdown the concurrent managers. (You can’t shutdown using adcmctl.sh if you don’t know apps password so use frontend)

3. Log in to applications as System Administrator.

4. Navigate to Security> Oracle> Register

5. Query up all available Oracle Ids.
(NOTE: do not log out of this session of Applications until you have verified
that all the following steps have been completed successfully).

6. At the same time, login to SQL*PLUS as the SYSTEM user.

7. In the applications session, enter the new password for APPLSYS. Re-enter (Same time do it in SQLPLUS ,after finishing Application part))
the same password when asked to re-enter the password to confirm.

8. Save the change.
Note: At this point of the procedure you will see a “Caution” dialog box which states the following:
“You are changing the APPLSYS password. Doing so will affect the whole system”.
NOTE: The first character of the APPLSYS password MUST NOT BE a numeric.
Use only alpha characters for the first character in the APPLSYS password.
all APPS schema passwords to match the APPLSYS password.

9. In the same applications session, change the APPS password.
Note: Re-query the form (query – run) every time after changing the APPS
password. If it is not re-queried and the APPS password is changed again, it is
impossible to continue.

10. In the SQL*Plus session, issue the following statements to change the
passwords in the database, where ‘XXX’ is the password assigned to that
user in the previous steps:
sql>ALTER USER APPLSYS IDENTIFIED BY XXX;
sql>ALTER USER APPS IDENTIFIED BY XXX;
“Remember don’t log out from the application yet”
11. Open a NEW session in applications, WITHOUT CLOSING THE PREVIOUS SESSION,
and log in.
If log in is successful, the change was successful. Otherwise, repeat steps 5
onward, ensuring the same password is used for both APPLSYS and APPS, in both
applications and SQL*Plus.
Followed the Metalink Doc Note:160337.1
But no need to change the password for APPLSYSPUB and in metalink note they did not mention about autoconfig..
The most important thing … Please run autoconfig. so that change will effect the entire system.
or Refer this Link

JInitiator 1.1.8.7 Crash when launch it from IE

Fixes
1. Try Uninstall existing JInitiator 1.1.8.7 and install the same
2. If the above dont work.. Try the following
Rename symcjit.dll into somethnig else ex: symcjit_old.dll
path is C:\Program Files\Oracle\JInitiator 1.1.8.16\bin

Apply India Localization Patches

How to apply india Localization Patches?
1. We have to install India localization Patch Application Tool by downloading patch 6491231
2. Copy the downloaded patch to $JA_TOP and unzip the same there
3. A directory inpatch will be created afer unzipping. In which india localization patch tool avaialable
perl install.pl appspwd=apps japwd=ja
Tables will be created successfully
4. Now download the patch 6355941 from the metalink and unzip in the temp directory or in $JA_TOP.
4. Go to india localization patch directory (6355941)
5. use following command
perl $JA_TOP/inpatch/indpatch.pl drvr_file=6355941.drv fnd_patchset=H appspwd=apps japwd=ja systempwd=manager logfile=$JA_TOP/$APPLLOG/6355941/6355941.log  test=y

How do you know what are india localization patches applied? Solution : using JAI_APPLIED_PATCHES

Inside the Oracle Concurrent Manager

The concurrent managers in the Oracle e-Business suite serve several important administrative functions. Foremost, the concurrent managers ensure that the applications are not overwhelmed with requests, and the second areas of functions are the management of batch processing and report generation.
This article will explore tools that are used by experienced administrators to gain insight and improved control over the concurrent management functions. We will explore how the concurrent managers can be configured via the GUI, and also explore scripts and dictionary queries that are used to improve the functionality of concurrent management.
The Master Concurrent Managers
There is a lot of talk about “the” concurrent manager in Oracle Applications. Actually, there are many Concurrent Managers, each governing flow within each Oracle Apps areas. In addition there are “super” Concurrent Managers whose job is to govern the behavior of the slave Concurrent Managers.
The Oracle e-Business suite has three important master Concurrent Managers:
*
Internal Concurrent Manager — The master manager is called the Internal Concurrent Manager (ICM) because it controls the behavior of all of the other managers, and because the ICM is the boss, it must be running before any other managers can be activated. The main functions of the ICM are to start up and shutdown the individual concurrent managers, and reset the other managers after one them has a failure.
*
Standard Manager — Another important master Concurrent Manager is called the Standard Manager (SM). The SM functions to run any reports and batch jobs that have not been defined to run in any specific product manager. Examples of specific concurrent managers include the Inventory Manager, CRP Inquiry Manager, and the Receivables Tax Manager.
*
Conflict Resolution Manager — The Conflict Resolution Manager (CRM) functions to check concurrent program definitions for incompatibility rules. However, the ICM can be configured to take over the CRM’s job to resolve incompatibilities.
Now that we understand the functions of the master Concurrent Managers, let’s take a quick look at techniques that are used by Oracle Apps DBAs to monitor the tune the behavior of the Concurrent Managers.

Tuning the Concurrent Manager
All successful Oracle Apps DBAs must understand how to monitor and tune each of the Concurrent Managers. This article will explore some of the important techniques for monitoring and tuning the Oracle Apps Concurrent Manager processes. The topics will include:
*
Tuning the Concurrent Manager
o
Tuning the Internal Concurrent Manager
o
Purging Concurrent Requests
o
Troubleshooting Oracle Apps performance problems
o
Adjusting the Concurrent Manager Cache Size
o
Analyzing the Oracle Apps Dictionary Tables
*
Monitoring Pending Requests in the Concurrent Manager
*
Changing the dispatching priority within the Concurrent Manager
Let’s start by looking at tuning the ICM, and drill-down into more detail.
Tuning the Internal Concurrent Manager (ICM)
The ICM performance is affected by the three important Oracle parameters PMON cycle, queue size, and sleep time.
*
PMON cycle — This is the number of sleep cycles that the ICM waits between the time it checks for concurrent managers failures, which defaults to 20. You should change the PMON cycle to a number lower than 20 if your concurrent managers are having problems with abnormal terminations.
*
Queue Size — The queue size is the number of PMON cycles that the ICM waits between checking for disabled or new concurrent managers. The default for queue size of 1 PMON cycle should be used.
*
Sleep Time — The sleep time parameter indicates the seconds that the ICM should wait between checking for requests that are waiting to run. The default sleep time is 60, but you can lower this number if you see you have a lot of request waiting (Pending/Normal). However, reducing this number to a very low value many cause excessive cpu utilization.
All of the concurrent managers, with the exception of the ICM and CRM, can be configured to run as many processes as needed, as well as the time and days a manager can process requests. However, the number of processes needed is dependent on each organization’s environment. An Applications DBA must monitor the concurrent processing in order to decide how to configure each manager. For a fresh install of the applications, initially configure the standard manager to run with five processes, and all the other managers with two processes. After the applications have been in operation for a while, the concurrent managers should be monitored to determine is more operating system process should be allocated.
Purging Concurrent Requests
One important area of Concurrent Manager tuning is monitoring the space usage for the subsets within each concurrent manager. When the space in FND_CONCURRENT_PROCESSES and FND_CONCURRENT_REQUESTS exceed 50K, you can start to experience serious performance problems within your Oracle Applications. When you experience these space problems, a specific request called “Purge Concurrent Requests And/Or Manager Data” should be scheduled to run on a regular basis. This request can be configured to purge the request data from the FND tables as well as the log files and output files on accumulate on disk.
Adjusting the Concurrent Manager Cache Size
Concurrent manager performance can also be enhanced by increasing the manager cache size to be at lease twice the number of target processes. The cache size specifies the number of requests that will be cached each time the concurrent manager reads from the FND_CONCURRENT_REQUESTS table. Increasing the cache size will boost the throughput of the managers by attempting to avoid sleep time.
Analyzing Oracle Apps Dictionary Tables for High Performance
It is also very important to run the request Gather Table Statistics on these tables:
*
FND_CONCURRENT_PROCESSES
*
FND_CONCURRENT_PROGRAMS
*
FND_CONCURRENT_REQUESTS
*
FND_CONCURRENT_QUEUES.
Run the request “Analyze All Index Column Statistics” on the indexes of these tables. Since the APPLSYS user is the owner of these tables, so you can also just run the request Analyze Schema Statistics for APPLSYS.
To troubleshoot performance, a DBA can use three types of trace. A module trace, such as PO or AR, can be set by enabling the module’s profile option Debug Trace from within the applications. Second, most concurrent requests can be set to generate a trace file by changing the request parameters. To enable trace for a specific request, log in as a user with the System Administrator responsibility. Navigate to Concurrent -> Program -> Define. Query for the request that you want to enable trace. At the bottom right of the screen you can check the box Enable Trace. (Figure 1)
Figure 1: Troubleshooting Concurrent Manager Performance.
Another popular way to troubleshoot the Concurrent Managers is to generate a trace file. This is done by setting the OS environment variable FNDSQLCHK to FULL, and running the request from the command line.
Monitoring Pending Requests in the Concurrent Managers
Occasionally, you may find that requests are stacking up in the concurrent managers with a status of “pending”. This can be caused by any of these conditions:
1. The concurrent managers were brought down will a request was running.
2. The database was shutdown before shutting down the concurrent managers.
3. There is a shortage of RAM memory or CPU resources.
When you get a backlog of pending requests, you can first allocate more processes to the manager that is having the problem in order to allow most of the requests to process, and then make a list of the requests that will not complete so they can be resubmitted, and cancel them.
To allocate more processes to a manager, log in as a user with the System Administrator responsibility. Navigate to Concurrent -> Manager -> Define. Increase the number in the Processes column. Also, you may not need all the concurrent managers that Oracle supplies with an Oracle Applications install, so you can save resources by identifying the unneeded managers and disabling them.
Figure 2: Allocating more processes to the Concurrent Manager.
However, you can still have problems. If the request remains in a phase of RUNNING and a status of TERMINATING after allocating more processes to the manager, then shutdown the concurrent managers, kill any processes from the operating system that won’t terminate, and execute the following sqlplus statement as the APPLSYS user to reset the managers in the FND_CONCURRENT_REQUESTS table:
update fnd_concurrent_requests
set status_code=’X', phase_code=’C’
where status_code=’T';
Changing Dispatching Priority within the Concurrent Manager
If there are requests that have a higher priority to run over other requests, you can navigate to Concurrent –> Program –> Define to change the priority of a request. If a priority is not set for a request, it will have the same priority as all other requests, or it will be set to the value specified in the user’s profile option Concurrent:Priority.
Also, you can specify that a request run using an SQL optimizer mode of FIRST_ROWS, ALL_ROWS, RULE, or CHOOSE, and this can radically effect the performance of the SQL inside the Concurrent request. If several long running requests are submitted together, they can cause fast running requests to have to wait unnecessarily. If this is occurring, try to schedule as many long running requests to run after peak business hours. Additionally, a concurrent manager can be created to run only fast running requests.
Using data Dictionary Scripts with the Concurrent Manager
Few Oracle Applications DBAs understand that sophisticated data dictionary queries can be run to reveal details about the workings within each Concurrent Manager. Oracle provides several internal tables that can be queried from SQL*Plus to see the status of the concurrent requests, and the most important are FND_CONCURRENT_PROGRAMS and FND_CONCURRENT_REQUESTS.
Oracle supplies several useful scripts, (located in $FND_TOP/sql directory), for monitoring the concurrent managers:
afcmstat.sql
Displays all the defined managers, their maximum capacity, pids, and their status.
afimchk.sql Displays the status of ICM and PMON method in effect, the ICM’s log file, and determines if the concurrent manger monitor is running.
afcmcreq.sql
Displays the concurrent manager and the name of its log file that processed a request.
afrqwait.sql Displays the requests that are pending, held, and scheduled.
afrqstat.sql Displays of summary of concurrent request execution time and status since a particular date.
afqpmrid.sql Displays the operating system process id of the FNDLIBR process based on a concurrent request id. The process id can then be used with the ORADEBUG utility.
afimlock.sql Displays the process id, terminal, and process id that may be causing locks that the ICM and CRM are waiting to get. You should run this script if there are long delays when submitting jobs, or if you suspect the ICM is in a gridlock with another oracle process.
In addition to these canned scripts you can skill write custom Concurrent Manager scripts. For example, the following query can be executed to identify requests based on the number of minutes the request ran:
conc_stat.sql
set echo off
set feedback off
set linesize 97
set verify off
col request_id format 9999999999 heading “Request ID”
col exec_time format 999999999 heading “Exec Time|(Minutes)”
col start_date format a10 heading “Start Date”
col conc_prog format a20 heading “Conc Program Name”
col user_conc_prog format a40 trunc heading “User Program Name”
spool long_running_cr.lst
SELECT
fcr.request_id request_id,
TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) exec_time,
fcr.actual_start_date start_date,
fcp.concurrent_program_name conc_prog,
fcpt.user_concurrent_program_name user_conc_prog
FROM
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcpt,
fnd_concurrent_requests fcr
WHERE
TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) > NVL(‘&min’,45)
and
fcr.concurrent_program_id = fcp.concurrent_program_id
and
fcr.program_application_id = fcp.application_id
and
fcr.concurrent_program_id = fcpt.concurrent_program_id
and
fcr.program_application_id = fcpt.application_id
and
fcpt.language = USERENV(‘Lang’)
ORDER BY
TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) desc;
spool off
Note that this script prompts you for the number of minutes. The output from this query with a value of 60 produced the following output on my database. Here we can see important details about currently-running requests, including the request ID, the execution time, the user who submitted the program and the name of the program.
Enter value for min: 60
Exec Time
Request ID (Minutes) Start Date Conc Program Name User Program Name
———– ———- ———- ——————– ————————————–
1445627 218 01-SEP-02 MWCRMRGA Margin Analysis Report(COGS Breakups)
444965 211 03-JUL-01 CSTRBICR5G Cost Rollup – No Report GUI
1418262 208 22-AUG-02 MWCRMRGA Margin Analysis Report(COGS Breakups)
439443 205 28-JUN-01 CSTRBICR5G Cost Rollup – No Report GUI
516074 178 10-AUG-01 CSTRBICR6G Cost Rollup – Print Report GUI
1417551 164 22-AUG-02 MWCRMRGA Margin Analysis Report(COGS Breakups)
1449973 160 03-SEP-02 MWCRMRGA Margin Analysis Report(COGS Breakups)
520648 159 13-AUG-01 CSTRBICR5G Cost Rollup – No Report GUI
446007 122 03-JUL-01 CSTRBICR5G Cost Rollup – No Report GUI
392996 120 01-JUN-01 BMCOIN Bill and Routing Interface
Conclusion
The Oracle Concurrent Managers remain on of Oracle most important components for the Oracle Applications eBusiness suite and they perform an important TP monitor function. It is only by properly understand the functions and tuning of the Concurrent Managers that the Oracle Apps DBA can be successful in keep their sophisticated Applications optimizer for high-performance.

No Active Responsibilities available for Apps user

Problem Statement : Recently I encountered a problem in Oracle Apps 11i (11.5.9). When a user login into the application he/she gets error “There are no active responsibilities available for this user”and user is not able to see any responsibility in the home page.
The problem is same even for sysadmin user. Now the challenge is that, if the system administrator is also not able to see any responsibility then its very difficult to administer other users facing same problem. So here is the solution that I found out as per metalink note ID 316959.1
Solution :
Part 1: Verification
Execute following queries for verification as per metalink note ID 335487.1
1) Please check if table FND_USER_RESP_GROUPS was backed up to table FND_USER_RESP_GROUPS_OLD in the APPLSYS schema, and verify that there is a SYNONYM  FND_USER_RESP_GROUPS_OLD in the APPS schema.
SELECT OWNER, OBJECT_NAME, OBJECT_TYPE
FROM ALL_OBJECTS
WHERE OBJECT_NAME LIKE ’FND_USER_RESP_GROUPS_OLD’
AND OBJECT_TYPE IN (‘VIEW’,’TABLE’, ‘SYNONYM’);
OWNER                          OBJECT_NAME                    OBJECT_TYPE
—————————— —————————— ——————
APPLSYS                        FND_USER_RESP_GROUPS_OLD       TABLE
APPS                           FND_USER_RESP_GROUPS_OLD       SYNONYM

2) Check if object FND_USER_RESP_GROUPS is a view or a table
SQL> SELECT OWNER, OBJECT_NAME, OBJECT_TYPE
FROM ALL_OBJECTS WHERE OBJECT_NAME LIKE ‘FND_USER_RESP_GROUPS’;  2
OWNER                          OBJECT_NAME                    OBJECT_TYPE
—————————— —————————— ——————
APPS                           FND_USER_RESP_GROUPS           VIEW
APPS_MRC                       FND_USER_RESP_GROUPS           SYNONYM
RTREADONLY                     FND_USER_RESP_GROUPS           SYNONYM
FND_USER_RESP_GROUPS should be a view in APPS schema.
If FND_USER_RESP_GROUPS is of type TABLE in the APPLSYS schema  please apply solution from step 3 from metalink note ID 335487.1
Else execute following steps from metalink note ID 316959.1
Part 2: Fix
Run following SQLs
1)
SELECT *
FROM Fnd_Responsibility_vl
WHERE Application_Id = 1
AND Responsibility_Name = ‘System Administrator’
AND Start_Date <= Sysdate
AND ( End_Date is NULL OR End_Date > Sysdate );
2)
SELECT count(*)
FROM Fnd_User_Resp_Groups;
3)
Back up the wf_role_hierarchies table into a new table you create.
CREATE TABLE wf_role_hierarchies_copy AS
SELECT * FROM wf_role_hierarchies;
Delete the entries in that table (2 rows exist)
TRUNCATE TABLE applsys.wf_role_hierarchies;
Run affurgol.sql FORCE
SQL> @$FND_TOP/patch/115/sql/affurgol.sql FORCE
Then replace those entries back into wf_role_hierarchies table
SQL> INSERT INTO wf_role_hierarchies
SELECT * FROM wf_role_hierarchies_copy;
Bounce Apache and try to login as sysadmin. You should be able to see the correct responsibilities.
Hope this helps !!

FNDLOAD to transfer the menus concurrent programs personalization from one instance to other

The Generic Loader (FNDLOAD) is a concurrent program that can transfer Oracle Application entity data between database and text file. The loader reads a configuration file to determine which entity to access. In simple words FNDLOAD is used to transfer entity data from one instance/database to other. For example if you want to move a concurrent program/menu/valuesets developed in DEVELOPMENT instance to PRODUCTION instance you can use this command.
Steps to Move a Concurrent program from one instance(Database) to other
  • Define your concurrent program and save it in first instance(for how to register a concurrent program click here)
  • Connect to your UNIX box on first instance and run the following command to download the .ldt file
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME=”Concurrent program application short name” CONCURRENT_PROGRAM_NAME=”concurrent program short name”
  • Move the downloaded .ldf file to new instance(Use FTP)
  • Connect to your UNIX box on second instance and run the following command to upload the .ldt file
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct
file_name.ldt
Note: Make sure you are giving proper .lct file in the commands and don’t confuse with .lct and .ldt files
These following are the other entity data types that we can move with FNDLOAD
1 - Printer Styles
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcppstl.lct file_name.ldt STYLE PRINTER_STYLE_NAME=”printer style name”
2 – Lookups
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct file_name.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME=”FND”
LOOKUP_TYPE=”lookup name”
3 – Descriptive Flexfield with all of specific Contexts
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt DESC_FLEX P_LEVEL=COL_ALL:REF_ALL:CTX_ONE:SEG_ALL APPLICATION_SHORT_NAME=”FND” DESCRIPTIVE_FLEXFIELD_NAME=”desc flex name” P_CONTEXT_CODE=”context name”
4 – Key Flexfield Structures
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt KEY_FLEX P_LEVEL=COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL APPLICATION_SHORT_NAME=”FND” ID_FLEX_CODE=”key flex code” P_STRUCTURE_CODE=”structure name”
5 – Concurrent Programs
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct file_name.ldt PROGRAM APPLICATION_SHORT_NAME=”FND” CONCURRENT_PROGRAM_NAME=”concurrent name”
6 - Value Sets
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET_VALUE FLEX_VALUE_SET_NAME=”value set name”
7 – Value Sets with values
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct file_name.ldt VALUE_SET FLEX_VALUE_SET_NAME=”value set name”
8 – Profile Options
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct file_name.ldt PROFILE PROFILE_NAME=”profile option” APPLICATION_SHORT_NAME=”FND”
8 – Request Groups
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct file_name.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”request group” APPLICATION_SHORT_NAME=”FND”
10 – Request Sets
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct file_name.ldt REQ_SET
APPLICATION_SHORT_NAME=”FND” REQUEST_SET_NAME=”request set”
11 – Responsibilities
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_RESPONSIBILITY RESP_KEY=”responsibility”
12 – Menus
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt MENU MENU_NAME=”menu_name”
13 – Forms Personalization
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct file_name.ldt FND_FORM_CUSTOM_RULES function_name=FUNCTION_NAME
Note: UPLOAD command is same for all except replacing the .lct and passing any extra parameters if you want to pass
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/corresponding.lct upload_file.ldt

SQL Loader

SQL LOADER is an Oracle utility used to load data into table given a datafile which has the records that need to be loaded. SQL*Loader takes data file, as well as a control file, to insert data into the table. When a Control file is executed, it can create Three (3) files called log file, bad file or reject file, discard file.
  • Log file tells you the state of the tables and indexes and the number of logical records already read from the input datafile. This information can be used to resume the load where it left off.
  • Bad file or reject file gives you the records that were rejected because of formatting errors or because they caused Oracle errors.
  • Discard file specifies the records that do not meet any of the loading criteria like when any of the WHEN clauses specified in the control file. These records differ from rejected records.
Structure of the data file:
The data file can be in fixed record format or variable record format.
Fixed Record Format would look like the below. In this case you give a specific position where the Control file can expect a data field:
7369 SMITH      CLERK        7902  12/17/1980         800
7499 ALLEN      SALESMAN  7698  2/20/1981           1600
7521 WARD      SALESMAN  7698  2/22/1981           1250
7566 JONES      MANAGER   7839  4/2/1981             2975
7654 MARTIN    SALESMAN  7698  9/28/1981           1250
7698 BLAKE      MANAGER   7839  5/1/1981             2850
7782 CLARK      MANAGER   7839  6/9/1981             2450
7788 SCOTT      ANALYST    7566  12/9/1982           3000
7839 KING        PRESIDENT          11/17/1981         5000
7844 TURNER    SALESMAN  7698  9/8/1981            1500
7876 ADAMS     CLERK         7788  1/12/1983          1100
7900 JAMES      CLERK         7698  12/3/1981          950
7902 FORD        ANALYST     7566  12/3/1981          3000
7934 MILLER     CLERK         7782  1/23/1982          1300
Variable Record Format would like below where the data fields are separated by a delimiter.
Note: The Delimiter can be anything you like. In this case it is “|”
1196700|9|0|692.64
1378901|2|3900|488.62
1418700|2|2320|467.92
1418702|14|8740|4056.36
1499100|1|0|3.68
1632800|3|0|1866.66
1632900|1|70|12.64
1637600|50|0|755.5
Structure of a Control file:
Sample CTL file for loading a Variable record data file:
OPTIONS (SKIP = 1)   –The first row in the data file is skipped without loading
LOAD DATA
INFILE ‘$FILE’             — Specify the data file  path and name
APPEND                       — type of loading (INSERT, APPEND, REPLACE, TRUNCATE
INTO TABLE “APPS”.”BUDGET”   — the table to be loaded into
FIELDS TERMINATED BY ‘|’           — Specify the delimiter if variable format datafile
OPTIONALLY ENCLOSED BY ‘”‘   –the values of the data fields may be enclosed in “
TRAILING NULLCOLS     — columns that are not present in the record treated as null
(ITEM_NUMBER    “TRIM(:ITEM_NUMBER)”, — Can use all SQL functions on columns
QTY                 DECIMAL EXTERNAL,
REVENUE             DECIMAL EXTERNAL,
EXT_COST            DECIMAL EXTERNAL TERMINATED BY WHITESPACE “(TRIM(:EXT_COST))”  ,
MONTH           “to_char(LAST_DAY(ADD_MONTHS(SYSDATE,-1)),’DD-MON-YY’)” ,
DIVISION_CODE    CONSTANT “AUD”  — Can specify constant value instead of Getting value from datafile
)
OPTION statement precedes the LOAD DATA statement. The OPTIONS parameter allows you to specify runtime arguments in the control file, rather than on the command line. The following arguments can be specified using the OPTIONS parameter.
SKIP = n – Number of logical records to skip (Default 0)
LOAD = n — Number of logical records to load (Default all)
ERRORS = n — Number of errors to allow (Default 50)
ROWS = n   — Number of rows in conventional path bind array or between direct path data saves (Default: Conventional Path 64, Direct path all)
BINDSIZE = n – Size of conventional path bind array in bytes (System-dependent default)
SILENT = {FEEDBACK | ERRORS | DISCARDS | ALL} — Suppress messages during run
(header, feedback, errors, discards, partitions, all)
DIRECT = {TRUE | FALSE} –Use direct path (Default FALSE)
PARALLEL = {TRUE | FALSE} — Perform parallel load (Default FALSE)
LOADDATA statement is required at the beginning of the control file.
INFILE: INFILE keyword is used to specify location of the datafile or datafiles.
INFILE* specifies that the data is found in the control file and not in an external file. INFILE ‘$FILE’, can be used to send the filepath and filename as a parameter when registered as a concurrent program.
INFILE   ‘/home/vision/kap/import2.csv’ specifies the filepath and the filename.
Example where datafile is an external file:
LOAD DATA
INFILE   ‘/home/vision/kap/import2.csv’
INTO TABLE kap_emp
FIELDS TERMINATED BY “,”
( emp_num, emp_name, department_num, department_name )
Example where datafile is in the Control file:
LOAD DATA
INFILE *
INTO TABLE kap_emp
FIELDS TERMINATED BY “,”
( emp_num, emp_name, department_num, department_name )
BEGINDATA
7369,SMITH,7902,Accounting
7499,ALLEN,7698,Sales
7521,WARD,7698,Accounting
7566,JONES,7839,Sales
7654,MARTIN,7698,Accounting
Example where file name and path is sent as a parameter when registered as a concurrent program
LOAD DATA
INFILE ‘$FILE’
INTO TABLE kap_emp
FIELDS TERMINATED BY “,”
( emp_num, emp_name, department_num, department_name )
TYPE OF LOADING:
INSERT   — If the table you are loading is empty, INSERT can be used.
APPEND  — If data already exists in the table, SQL*Loader appends the new rows to it. If data doesn’t already exist, the new rows are simply loaded.
REPLACE — All rows in the table are deleted and the new data is loaded
TRUNCATE — SQL*Loader uses the SQL TRUNCATE command.
INTOTABLEis required to identify the table to be loaded into. In the above example INTO TABLE “APPS”.”BUDGET”, APPS refers to the Schema and BUDGET is the Table name.
FIELDS TERMINATED BY specifies how the data fields are terminated in the datafile.(If the file is Comma delimited or Pipe delimited etc)
OPTIONALLY ENCLOSED BY ‘”‘ specifies that data fields may also be enclosed by quotation marks.
TRAILINGNULLCOLS clause tells SQL*Loader to treat any relatively positioned columns that are not present in the record as null columns.
Loading a fixed format data file:
LOAD DATA
INFILE ‘sample.dat’
INTO TABLE emp
(      empno         POSITION(01:04)   INTEGER EXTERNAL,
ename          POSITION(06:15)   CHAR,
job            POSITION(17:25)   CHAR,
mgr            POSITION(27:30)   INTEGER EXTERNAL,
sal            POSITION(32:39)   DECIMAL EXTERNAL,
comm           POSITION(41:48)   DECIMAL EXTERNAL,
deptno         POSITION(50:51)   INTEGER EXTERNAL)
Steps to Run the SQL* LOADER from UNIX:
At the prompt, invoke SQL*Loader as follows:
sqlldr USERID=scott/tiger CONTROL=<control filename> LOG=<Log file
name>
SQL*Loader loads the tables, creates the log file, and returns you to the system prompt. You can check the log file to see the results of running the case study.
Register as concurrent Program:
Place the Control file in $CUSTOM_TOP/bin.
Define the Executable. Give the Execution Method as SQL*LOADER.
Define the Program. Add the Parameter for FILENAME.
Skip columns:
You can skip columns using the ‘FILLER’ option.
Load Data



TRAILING  NULLCOLS
(
name Filler,
Empno ,
sal
)
here the column name will be skipped.