Wednesday, June 10, 2009

Start Unix with “vi” Editor


Basic Commands of vi Editor


vi Editor

You may use vi to open an already existing file by typing


vi filename


where "filename" is the name of the existing file. If the file is not in your current directory, you must use the full pathname.

Or you may create a new file by typing


vi newname


where "newname" is the name you wish to give the new file.

To open a new file called "testvi," enter


vi testvi


On-screen, you will see blank lines, each with a tilde (~) at the left, and a line at the bottom giving the name and status of the new file:

"testvi" [New file]

vi has two modes:

command mode

insert mode


In command mode, the letters of the keyboard perform editing functions (like moving the cursor, deleting text, etc.). To enter command mode, press the escape <Esc> key.

In insert mode, the letters you type form words and sentences. Unlike many word processors, vi starts up in command mode.


Entering Text

In order to begin entering text in this empty file, you must change from command mode to insert mode. To do this, type

i


Nothing appears to change, but you are now in insert mode and can begin typing text. In general, vi's commands do not display on the screen and do not require the Return key to be pressed.

Type a few short lines and press <Return> at the end of each line. If you type a long line, you will notice the vi does not word wrap, it merely breaks the line unceremoniously at the edge of the screen.


If you make a mistake, pressing <Backspace> or <Delete> may remove the error, depending on your terminal type.


Moving the Cursor

To move the cursor to another position, you must be in command mode. If you have just finished typing text, you are still in insert mode. Go back to command mode by pressing <Esc>. If you are not sure which mode you are in, press <Esc> once or twice until you hear a beep. When you hear the beep, you are in command mode.

The cursor is controlled with four keys: h, j, k, l.

Key Cursor Movement


--- ---------------


h left one space


j down one line


k up one line


l right one space


When you have gone as far as possible in one direction, the cursor stops moving and you hear a beep. For example, you cannot use l to move right and wrap around to the next line, you must use j to move down a line. See the section entitled "Moving Around in a File" for ways to move more quickly through a file.


Basic Editing

Editing commands require that you be command mode. Many of the editing commands have a different function depending on whether they are typed as upper- or lowercase. Often, editing commands can be preceded by a number to indicate a repetition of the command.


Deleting Characters

To delete a character from a file, move the cursor until it is on the incorrect letter, then type

x

The character under the cursor disappears. To remove four characters (the one under the cursor and the next three) type

4x

To delete the character before the cursor, type

X (uppercase)

To delete a word, move the cursor to the first letter of the word, and type


dw

This command deletes the word and the space following it.

To delete three words type

3dw

To delete a whole line, type

dd


The cursor does not have to be at the beginning of the line. Typing dd deletes the entire line containing the cursor and places the cursor at the start of the next line. To delete two lines, type

2dd


To delete from the cursor position to the end of the line, type


D (uppercase)

Replacing Characters

To replace one character with another:

Move the cursor to the character to be replaced.

Type r

Type the replacement character.

The new character will appear, and you will still be in command mode.

Replacing Words

To replace one word with another, move to the start of the incorrect word and type


cw


The last letter of the word to be replaced will turn into a $. You are now in insert mode and may type the replacement. The new text does not need to be the same length as the original. Press <Esc> to get back to command mode. To replace three words, type


3cw

To change text from the cursor position to the end of the line:


Type C (uppercase).


Type the replacement text.


Press <Esc>.

Inserting Text

To insert text in a line:

Position the cursor where the new text should go.

Type i


Enter the new text.


The text is inserted BEFORE the cursor.


4. Press <Esc> to get back to command mode.


Appending Text

To add text to the end of a line:

Position the cursor on the last letter of the line.


Type a


Enter the new text.


This adds text AFTER the cursor.


4. Press <Esc> to get back to command mode.

Opening a Blank Line

To insert a blank line below the current line, type


(lowercase)


To insert a blank line above the current line, type


O (uppercase)



To join two lines together:


Put the cursor on the first line to be joined.


Type J


To join three lines together:


Put the cursor on the first line to be joined.


Type 3J


To undo your most recent edit, type


u


To undo all the edits on a single line, type


U (uppercase)


Undoing all edits on a single line only works as long as the cursor stays on that line. Once you move the cursor off a line, you cannot use U to restore the line.


Moving Around in a File

There are shortcuts to move more quickly though a file. All these work in command mode.


Key Movement

--- --------

w forward word by word


b backward word by word


$ to end of line


0 (zero) to beginning of line


H to top line of screen


M to middle line of screen


L to last line of screen


G to last line of file


1G to first line of file


<Control>f scroll forward one screen


<Control>b scroll backward one screen


<Control>d scroll down one-half screen


<Control>u scroll up one-half screen


Moving by Searching



To move quickly by searching for text, while in command mode:

Type / (slash).


Enter the text to search for.


Press <Return>.


The cursor moves to the first occurrence of that text.

To repeat the search in a forward direction, type


n


To repeat the search in a backward direction, type


N

Closing and Saving a File

With vi, you edit a copy of the file, rather than the original file. Changes are made to the original only when you save your edits.


To save the file and quit vi, type


ZZ


The vi editor editor is built on an earler Unix text editor called ex. ex commands can be used within vi. ex commands begin with a : (colon) and end with a <Return>. The command is displayed on the status line as you type. Some ex commands are useful when saving and closing files.


To save the edits you have made, but leave vi running and your file open:


Press <Esc>.


Type :w


Press <Return>.


To quit vi, and discard any changes your have made since last saving:


Press <Esc>.


Type :q!


Press <Return>

Command Summary


STARTING vi


vi filename edit a file named "filename"


vi newfile create a new file named "newfile"



ENTERING TEXT


i insert text left of cursor


a append text right of cursor



MOVING THE CURSOR


h left one space


j down one line


k up one line


l right one space



BASIC EDITING


x delete character


nx delete n characters


X delete character before cursor


dw delete word


ndw delete n words


dd delete line


ndd delete n lines


D delete characters from cursor to end of line


r replace character under cursor


cw replace a word


ncw replace n words


C change text from cursor to end of line


o insert blank line below cursor


(ready for insertion)


O insert blank line above cursor


(ready for insertion)


J join succeeding line to current cursor line


nJ join n succeeding lines to current cursor line


u undo last change



U restore current line


MOVING AROUND IN A FILE


w forward word by word


b backward word by word


$ to end of line


0 (zero) to beginning of line


H to top line of screen


M to middle line of screen


L to last line of screen


G to last line of file


1G to first line of file


<Control>f scroll forward one screen


<Control>b scroll backward one screen


<Control>d scroll down one-half screen


<Control>u scroll up one-half screen


n repeat last search in same direction


N repeat last search in opposite direction


CLOSING AND SAVING A FILE


ZZ save file and then quit


:w save file


:q! discard changes and quit file




Retrive lost Context file


Retrive lost Context file


When INST_TOP is intact

The Applications context file can be retrieved by running the adclonectx.pl script.
To retrieve the Applications tier context file,

• perl /clone/bin/adclonectx.pl retrieve
• On being prompted for the context file to be retrieved, select the option of retrieving the
Applications tier context file that has been lost and retrieve it to the default location specified
by the script.

The above command can be used only when INST_TOP the is still intact.

When INST_TOP is not intact

In case that has also been lost accidentally, the Applications tier context file may be retrieved as follows:


• Execute the following command on the Database tier:
perl /appsutil/clone/bin/adclonectx.pl retrieve

• On being prompted for the context file to be retrieved, select the option of retrieving the
Applications tier context file that has been lost.

• While confirming the location for the context file, set it to any existing directory with write permission.

• Once the context file has been generated in the specified location, move it to the location specified for the context file in the context variable 's_contextfile'.

To retrieve the Database tier context file

• Execute the following command on the Database tier:
perl /appsutil/clone/bin/adclonectx.pl retrieve

• On being prompted for the context file to be retrieved, select the Database tier context file and
retrieve it to the default location specified by the script.


Oracle Self Service Web Applications (SSWA)

SSWA architecture

The Oracle Self-Service Web Applications, including Self-Service Expenses, Self-Service Human Resources, Internet Procurement, Internet Receivables, Self-Service Time, Web Suppliers, iStore, iPayment, iSupport, iMarketing, and eTravel from Oracle, extend the functionality of Oracle Applications by adding a browser-based, walk up and use functionality that supplements Oracle Applications


Oracle HTTP Server

SSWA can be either inquiry or transactional. Inquiry modules read but don't update the Oracle Applications database; transactional modules update the databases.


1. Webserver receives the user request for the particular port number. Web server Binds the request with the port number


2.Based on the cookie webserver serves the request by sending login page


3. The application user name and password is entered by the user(operations/welcome)


4. The application user login session is validated by connecting to Applsyspub/pub. Applsyspub contains application user session ,invalid logins,security related tables. The user & security is validated here


5. The responsibility page is displayed. User selects a particular responsibility


6. The responsibility and application name is validated by connecting to Applsys schema(fnd_Responsibility, fnd_application.......)


Note: Here we should remember the difference between applsys and apps schema. Applsys schema contains ad,fnd objects whereas apps schema is a global schema contains all application objects.


7. Once the application is validated , Connecting to apps schema to get access application tables. This is the reason why we should have apps and applsys passwords should be same


8. Once a particular form is selected the .dbc file is accessed to get the information about the GUEST username/pwdDisplaying Information Accessed from Servlets and Java Server Pages .







Oracle Apps 11i Form Server


Forms Server Connection

Step 1


The URL is run from a browser session via an HTTP request. If using the dynamic HTML method, the Listener (WebDB 2.2, or Apache for 11i) calls the Forms CGI Cartridge to generate the HTML page dynamically. This involves replacing tokens within a base HTML file with parameters passed in the URL, or defaulting to values specified in the appsweb.cfg file.


Step 2
The HTML page is returned to the client browser. Viewing the HTML page source in a browser should show valid HTML/Javascript, with the tokens having been replaced by valid data. Using Single Sign-on, it is not easy to view the HTML source, as the browser window’s menu has been disabled for security reasons.

Steps 3 and 4
Next, the browser reads the applet tags, mime types and other elements in the HTML page. It then launches the JInitiator plug-in (what is Jinitiator -- JInitiator is a replacement JRE (Java Runtime Engine) or JVM (Java Virtual Machine), which replaces the default JVM in the Netscape or Microsoft Internet Explorer (IE) browsers. It is essentially Sun’s Java plug-in,) , as defined by the MIME type, to replace the browser’s default JDK. JInitiator then launches the Forms Applet specified by the applet tags. First, it downloads the jar files specified in the archive tag via the WebDB or Apache listener. Once the jar files have been downloaded, the Forms Applet is started up. JInitiator implements jar caching and on-demand loading, so the way the jar files are actually downloaded is more complex.

Step 5
The Forms Applet is started up. It reads the serverPort, serverHost, and connectMode HTML parameters, and connects to the Forms listener using the host, port and protocol specified

Jinitiator, JDK and Client JavaTrusted Applets and Certificates

Oracle Applications requires a trusted Applet to function properly. A trusted applet is one that is allowed to perform certain operations outside the Java sandbox environment. Operations that require the applet to be trusted include:


1. Screen printing.
2. Launching on-line help, or any other feature that opens a new browser window.
3. Cutting and pasting from third party Applications.

If the applet is not trusted, a Java security exception will be raised on performing any of these actions. To make the applet trusted, the correct public key of the Applications certificate must be installed on each client PC ( same directory as Jinitiator stays ) that will run Applications, and JInitiator or Appletviewer must be configured to pick up the correct identitydb.obj file, If the certificate is not installed, you will see a yellow bar with the legend Untrusted Applet

Oracle Apps Files System Introduction


Oracle Apps Files System Introduction


In Release 11i, no Oracle files are stored on the desktop client. In Release 11i, the database server holds only database files. All Oracle Applications product files, technology stack files, common files and Oracle Enterprise Manager files are held in the file system on the applications tier servers.

Database Server and Applications Tier Server File System.




DATA Directory

The DATA file system contains the .dbf files of the Oracle Applications database. Rapid Install installs all the system, data, and index files in up to four different disks on the database server.

<TWO_TASK>APPL

Oracle Applications files are stored in the <dbname>APPL directory. The main environment file, called the <CONTEXT_NAME>.env file , and product directories for all products. Within the APPL_TOP directory, files associated with a product are installed under the product's top-level directory, which is stored in the <prod>_TOP environment setting.


Core Technology Directories

The admin, ad, au and fnd directories are the core technology directories.

The admin directory holds files used for the preliminary install or upgrade steps for all Oracle Applications products. Subdirectories in this admin directory hold the log and restart files that record the actions performed by installation and upgrade utilities and scripts.

The ad ( Applications DBA ) directory contains the installation and maintenance utilities such AutoUpgrade, AutoPatch, and the adadmin utility.


The au ( Applications Utilities ) directory contains PL/SQL libraries used by Oracle Forms and Oracle Reports, Oracle Forms source files, a copy of all Java files used to generate the desktop client and certain reports needed by Discoverer or BIS in the report subdirectory.


Note: The public copy of all Java files are stored in JAVA_TOP.


The fnd ( foundation ) directory contains the forms and C objects libraries, and scripts that are used to build the Oracle Applications data dictionary.


Product Directories
Each <prod>_TOP directory, such a sAPPL_TOP/ar/11.5.0, contains subdirectories for product files. Product files include forms files, reports files, and some files to install or upgrade the database.


Distributing the APPL_TOP Across Several Disks

The Oracle Applications file system on the applications tier requires a significant amount of disk space. If we choose multiple mount points in Rapid Install, we may distribute the APPL_TOP file across as many as four disk drives.


Note, that when distributing the files across disks, all four core technology directories ( admin, ad, au and fnd ) must always be on the same disk and must share the same directory structure.

The DB and ORA Directories

Oracle Applications supports employing an Applications database of one version, while linking Applications programs using the tools from a second or third version of the database. This multiple ORACLE_HOMEs configuration allows new features of the database to be supported, while maintaining compatibility with earlier releases. Release 11i utilizes three ORACLE_HOMEs:


1. The 9.2.0 ORACLE_HOME (Applications database home) is located in the DB directory. It contains the files needed for running and maintaining the Oracle Applications database.


2. The 8.0.6 directory contains the ORACLE_HOME for the Developer 6i products (Forms, Reports, and Graphics). The product libraries in the 8.0.6 ORACLE_HOME are used to relink Oracle Applications executables.


3. The iAS directory, also under the ORA, contains the ORACLE_HOME for Oracle9i Application

The COMMON_TOP Directory

The COMMON_TOP directory contains files that are used by several different Oracle Applications products ( or all Oracle Applications products), or that are used with third-party products.

admin subdirectory

The admin directory in the COMMON_TOP directory contains the log and output directories for concurrent managers ( CM log file can be redirected by environment settings )

The admin/assistants directory of the admin directory contains the License Manager utility. We can use the License Manager to license additional products or languages after installing Oracle Applications.

The admin/install directory contains scripts and log files used by Rapid Install during installation. The admin/scripts directory contains scripts to start and stop services such as listeners and concurrent managers.


html subdirectory

The OA_HTML environment settings points to the html directory. The Oracle Applications html sign-on screen and Oracle Self-Service Web Applications html files are installed here. The html directory also contains other files used by html-based products, such as java server page files, java scripts, xml files and style sheet.


java subdirectory

The JAVA_TOP/OA_JAVA point to the java directory. Rapid Install installs all Oracle Applications class files in the Oracle namespace of this JAVA_TOP directory. The java directory holds third-party java files used by Oracle Applications as well as other zip files. Most Java code used by Oracle Applications is version-controlled in the apps.zip file contained in the AU_TOP directory. ( Talk about patch appliaction-- updating individual classes in apps.zip under the AU_TOP directory, and from this apps.zip file JAR files are generated both in tech JAVA_TOP and <prod>_TOP directories. The same apps.zip file exists in both the AU_TOP and JAVA_TOP directories.

apps.zip file is a patchable archive of all Java class files required by Oracle Applications. Individual Java class files are usually not present on the file system


Note: we need to backup apps.zip very often. If apps.zip is messed up, the only way to rebuild apps.zip is to find the patch which has the missing java class files and run the patch C driver to rebuild it. You can not manually add the miss java classes into apps.zip.

portal subdirectory

The portal directory contains the Rapid Install Portal files. The Rapid Install Portal is a web page that includes the post-install tasks that may be necessary for your installation, server admin scripts, installation documentation and online help.


temp & util subdirectory

The temp directory is used for caching by some processes such as Oracle Reports.

The util directory contains the third-party utilities licensed to ship with Oracle Applications. These include, for example, JRE, JDK and the unzip utility.


Key environment files which MUST be understood


Oracle Apps 11i – Overview/Architecture


Internet Computing Architecture


Internet Computing Architecture is a framework for three-tiered, distributed computing that supports Oracle Applications products. Internet Computing Architecture distributes services among as many nodes on a network as are required to support the processing load. Each node is a machine on the network. Services are processes that run in the background, listening for requests and process these requests.

The below three tiers are the database tier, which manages Oracle database; the application tier, which manages Oracle Applications and other tools; and the desktop tier, which provides the user interface display. With the Internet Computing Architecture, only the presentation layer of Oracle Applications is on the desktop tier in the form of a plug-in to a standard Internet browser.


Forms-based Products

http://aaserver01.aa.com:8585/cgibin/f60cgi?config=test01&serverName=aaerver02&Port=4342&module=/d01/appl/test01/fnd/11.5.0/US/FNDSCSGN.fmx&userid=applsyspub/pub@test01


Desktop Tier ===> Browser running Jinititator, a Java plug-in ===>HTTP Server ( Apache HTTP Server) ===> Forms Server===> Data Server


Forms Server===>Forms Client running in the same browser


Desktop Tier -- Java enabled Web browser. The components required on the desktop tier are the Forms Client Applet and Oracle JInitiator.


Forms Client Applet -- The Forms client applet is packaged as Java archive ( JAR) files. The JAR files contain all Java classes typically required to run Oracle Applications forms.


Oracle Jinitiator -- The Forms client applet must run within a Java Virtual Machine (JVM) on the desktop. For Oracle Applications the JVM is supplied by Oracle JInitiator.


The Forms server mediates between the Forms client, a Java applet running on the desktop, and the Oracle database server on the back end. The Forms server produces the effects a user sees on the desktop screen and causes changes to database records based on user action. The forms client can display any Oracle Applications screen A Java-enabled We browser manages the downloading , start-up, and execution of the Forms client on the desktop. HTTP server helps start a client session over the internal or external Web.

HTML-based products ( Self-Service Web Applications)

http://aaserver01.us.oracle.com:8585/OA_HTML/ApplLocalLogin.jsp

SSWA provide a fast and cost-effective way to get information to and from people within an organization or business. SSWA doesn't use the Forms server as the application tier software or the Forms client on the desktop, but rely on HTTP-based servers on the application tier and a Java-enabled Web browser on the desktop. SSWA interface is familiar to Web users, easy to work with, and doesn't require any training.

Oracle Workflow automatically enforce business rules and policies and to provide a common notification system. ( Show an example here ) --> login to SSWA to do a internal order or expense report.

Most Oracle SSWA and Oracle WF are designed in HTML-based tools such as HTML, XML, and JavaScript. They operate by direct connection to the Apache HTTP server. Logic is controlled through stored procedures executed by the PL/SL cartridge and by Java servlets and JavaServer Pages (JSP) executed by the Apache JServ module. Apache communicates with the database using JDBC ( Java Data Base Connectivity)


Relationship between Oracle Applications and Oracle Server

Oracle Applications is built on top of Oracle Database. However, when we talk about Oracle Database and Oracle Applications, we should also have an understanding from two sides. Terminology is different, the elements usage and maintenance is also different. The below table shows the key factors inside database and applications.































































DATABASE



APPLICATIONS



RDBMS 9.2.0.1.0



Application 11.5.10



DB_NAME ( ORACLE_SID )



TWO_TASK



Oracle_Home ( 8.1.7, 9.1.0.1 ...)



Always 8.0.6 Oracle_Home ( split configuration allows Applications to use the Oracle Developer 6i tools built technology stack with the Oracle 8 database libraries, and to use the advanced features of the Oracle 8i database )
APPL_TOP
-- all AD C executables and possible FND executables are linked with 8.0.6 ORACLE_HOME tech stack they are not
catching up with the latest ORACLE version
--they are still using functions/procedures/libraries/headers from 8.0.6
--Auto Patch is a executable written in C and it uses lots of function calls to ORACLE_HOME tech stack they are calling functions from 8.0.6 ORACLE_HOME
-- it is not using functions from the newer ORACLE_HOME
unless AD/FND uptakes the new ORACLE_HOME, we need
to stick with 2 ORACLE Homes


Database Owner



APPL_TOP Owner



Database Host ( one for primary DB, up to 8 hosts for physical standby or logical standby )



Middle Tier Hosts ( Forms Server, Web Server, Concurrent Manager, Administration Server for adpatch )



Database Environment File ( normally one environment file )



Applications Environment File ( more than 10 environment file, such as APPLSYS.env, appsweb.cfg, adovars.env and so on )



Key Variables -- $PATH, $ORACLE_SID, $ORACLE_HOME, $TNS_ADMIN and so on



Key Variables are much much more !! -- $PATH, $APPL_TOP, $TWO_TASK, $LD_LIBRARY_PATH, $CLASSPATH, $OA_JRE_TOP, $<all_product>_TOP and so on



Database Executables ( $ORACLE_HOME/bin, such as sqlplus, exp, imp, nid, orapwd, sqlldr, lsnrctl and so on )



Applications Executables ( $FND_TOP/bin or $<Product_Top>/bin, such as f60webmx, ar60run, startmgr, FNDCRM, FNDLOAD and so on )



Database Up Means " Database is running and listener is up "



Environment is Up means " Database is up, Sqlplus works, forms server, webserver and concurrent manager are all up "



Database users such as system, sys and so on (created by using sqlplus ). A DB user may not be a product schema.



1. APPS & APPLSYS schema
2. Product schema, such as GL, AR, AP and so on ( created by adsplice ). A product schema is also a DB user.
3. FND Users/Applications login ( created inside the applications )


Change DB users password by using sql statement "alter user xx identified by xx" .



1.Change APPS, APPLSYS and all product schemas' password by using utility FNDCPASS ( using "alter user..." statement will screw up the whole environment )
2. Change FND users inside applications


DB Performance Tuning ( server, memory, parameters, SQL tuning and so on )



Environment Performance Tuning ( middle tier distribution, concurrent manager definition and so on )



DB cold backup, regular hot backup, RMAN backup, export



File System backup ( copy command or tar command )



If DB is crashed, applications must not be accessible



If Applications is crashed, DB might be still good



Oracle Applications Product Schemas

Oracle Applications cover almost 200 product, such as Financial products ( GL, AR, AP, FA and so on ), Human Resources products ( PER, PAY, and so on) . In general, for each product there is a corresponding schema that stores that product's data objects.

GL Schema includes hundreds and thousands objects for GL, such as table GL_BALANCES, GL_JE_LINES ...


AR Schema includes hundreds and thousands objects for AR, such as table AR_INVOICES.

Use of the APPS Schema

Oracle Applications are tightly integrated. A procedure in one schema ( product) may access data in another schema (product ) and call a function in a third schema ( product). To accomplish this, the procedure needs access to all three schemas, but maintaining the access rights to all three is time-consuming and error prone (you have to specify schema for each objects such as gl.gl_balances, ar.ar_invoices). Using the APPS schema solves this problem Each product's schema grants full privileges to the APPS schema. The APPS schema has synonyms to all base product tables and sequences. The APPS schema, therefore, has access to all Oracle Applications data.

Additional Schemas

The data objects for some products are combined within a single database account and schema. For example, tables for the Human Resources products ( PER, PAY and so on ) are combined under the database account and schema HR; tables for the Business Productivity Layer products (AOL, AD, and so on ) are combined under the database account and schema APPLSYS. There is an additional database account, APPLSYSPUB, that is used during sign-on process and doesn't actually own any database objects.

Schemas Used During Sign-on

1) When a user starts up Oracle Applications and reaches the 'Username Password' screen they have already been connected to the database


2)The APPLSYSPUB Oracle Userid ( often referred to as the 'Gateway Userid' or GWYUID) is used for the initial connection. The APPLSYSPUB schema has read only access via views to certain objects in the APPLSYS schema such as FND_USERS and FND_RESPONSIBILITIES.


3)once the User has entered a valid Username/Password combination and, if required, selected a Responsibility the User is automatically re-connected to the APPS schemas


4) The APPS schema owns all the code objects required by the user when navigating around and using Oracle Applications and Self-Service Web Applications and also has full access to all the product related schemas such as GL for General Ledger.


Oracle Applications product families and their members

The applications that make up Oracle Applications are grouped into product families. Each product family includes some products:


Oracle Financial Family :


Oracle Application Report Generator ( RG )


Oracle Assets ( FA )


Oracle Cash Management ( CE )


Oracle General Ledger ( GL )


Oracle Payable ( AP )


Oracle Receivables (AR )


Oracle Sales Family:


Oracle Manufacture Family:


Oracle Human Rescues Family:


Oracle Distribution Family:


Application Objects Library ( AOL / FND )

The Application Object Library is a primary element of the Business Productivity Layer. The Application Object Library is a collection of programs and database tables that provide common functionality across all applications products such as Receivables, General Ledger, Fixed Assets and Inventory. Using the Application Object Library ensures that the processing of flexfields or the procedure for report submission does not vary from one application to another

Concurrent manager at a glance


Concurrent Managers

A concurrent request to run a concurrent program has been submitted to a concurrent manager.
Users need to run report any time inside the applications, such as sales report, payroll report and so on. When a user runs a report, a request to run the report is generated. The command to run the report is a concurrent request. The program that generates the report is a concurrent program. Concurrent programs are started by a concurrent manager. If concurrent manager is down, all concurrent transactions can't be run.
Every time your users request a concurrent program to be run, their request is inserted into a database table, and is uniquely identified by a request ID. Concurrent managers read requests from this table.
Part of a manager's definition is how many operating system processes it can devote to running requests. This number is referred to as the manager's number of target processes.
A concurrent program actually starts running based on :

o When it is scheduled to start
o Whether it is placed on hold
o Whether it is incompatible ( cannot run ) with other programs
o Its request priority


Handles background processing
Concurrent managers are the controllers of background processing for the applications. A manager runs processes at the O.S. level and sends its requests to run selected programs. Usually, sites define several managers so users can process many requests and programs in parallel.
Various forms: Run Report, View Requests, etc.
Some useful concurrent manager forms within the applications (System Administrator):
View Concurrent Requests ( \ Nav Con Req )
Run Reports ( \ Nav Rep Run )
Administer Concurrent Managers ( \ Nav Con Man Adm )

Internal Concurrent Manager vs. other managers

The Internal Concurrent Manager (ICM) and the Standard manager are the pre-defined managers. The ICM functions as the "boss" of all the other managers. The ICM starts up, verifies the status of, resets, and shuts down the individual managers. The ICM definition cannot be altered.

The Standard Manager accepts any and all requests and is active all the time. The Standard manager definition should not be altered; if it is altered and additional managers are not defined to accept requests, some programs may not run. Thus, the Standard manager should be the manager who is always available to run any request. The concurrent manager definitions are defined in the Define Concurrent Manager form ( \ Nav Con Man Def ).
Note: Both the ICM and the Standard manager operating system programs are FNDLIBR.
Conflict Resolution Manager Some of programs should not be run together. For example, only one person should close a set of books 'Accounts'. To prevent this, programs can be prevented from running concurrently with other programs. This specialized manager ( conflict resolution manager ) queues jobs in a conflict state in its own queue. Just like the internal manager, it makes sense to have one arbiter of jobs.

In Oracle Applications, data is stored in tables that belong to a particular application. Each table may also contain the conditions need to be met to access the individual record. These conditions may consist of one or more of the following data groupings ( SOB, Multiple Operating Unit, MO, Business Group , FA book and so on ). A conflict domain is an abstract representation of the groupings used to partition your data. All programs are assigned a conflict domain when they are submitted. All programs use the Standard conflict domain unless a value is defined for the profile option Concurrent: Conflicts Domain or a conflict domain is defined through a program parameter. The Conflict Resolution Manager checks concurrent program definitions for incompatibility rules. If a program is identified as Run Alone, then Conflict Resolution Manager prevents the concurrent managers from starting other programs in the same conflict domain. When a program lists other programs as being incompatible with it, the Conflict Resolution Manager prevents the program form starting until any incompatible programs in the same domain have completed running.
Specialized Managers are configured by the Applications DBA at the request of functional users. The Apps DBA should monitor the queues to ensure that there are sufficient managers in each class to handle all requests.

How to start and Stop concurrent managers

Prior to startup on the financials, users must either run the environment file ($ . .env) or add it to the login (.profile or login.com). The default filename for the environment file is .env. Some of the variables set in the environment file are listed as follows (note: these are EXAMPLES).

Variables/Executables Description
$ORACLE_HOME 8.0.6
$APPL_TOP .env must be source
$APPLCSF APPLCSF is the top-level directory in which the Concurrent Manager
puts log and output files.
$APPLLOG & $APPLOUT APPLLOG and APPLOUT are the subdirectories in which the Concurrent Manager puts log and output files.
$APPLTMP APPLTMP is the directory in which Oracle Applications temporary files are created.
$APPLPTMP APPLPTMP is the directory in which PL/SQL output files are created. The value must be exactly same as "utl_file_dir" value in init.ora parameter file. ( sample bug 1516312 )
FNDLIBR ( executable ) The ICM spawns FNDLIBR processes based on the concurrent manager definitions. The number of FNDLIBR processes at the operating system level will be equal to the total number of max requests for each concurrent manager defined plus one for the ICM. FNDLIBR processes can be queried up at the operating system level by using
$ ps -ef grep FNDLIBR
Note: Remember there are also other manager processes for INVLIBR, MFGLIBR, etc.


Starting the Concurrent Managers

cd $COMMON_TOP/admin/scripts/(CONTEXT_NAME in case of Autoconfig is enabled )
adcmctl.sh start apps/appspwd


Shutting down the concurrent managers

cd $COMMON_TOP/admin/scripts/( CONTEXT_NAME in case of Autoconfig is enabled )

adcmctl.sh stop apps/appspwd


Concurrent managers log files

Each concurrent request generates a log file for details regarding the request and an outfile for report details. There are 3 types of log files for concurrent processing:
Request log file - documents the execution of a particular request ( l.req )
Manager log file - documents the performance of a concurrent manager process. ( W.mgr )
Internal Manager log file - documents the performance of the ICM.(std.mgr). This log file displays the parameters used with the'startmgr' command.
Log files can be viewed at operating system level in $product_TOP/$APPLLOG or $APPLCSF/$APPLLOG. $APPLLOG is always set and $APPLCSF is optional. Log files can also be viewed from within the applications from the View Concurrent Requests form ( \ Nav Con Req ).
The out files contain the output generated from a concurrent processing report. Out files can be viewed at operating system level in $product_TOP/$APPLOUT or $APPLCSF/$APPLOUT (if set). Out files can also be viewed from within the applications from View Concurrent Requests form ( \ Nav Con Req).


Concurrent Managers tables

• FND_CONCURRENT_PROCESSES FND_CONCURRENT_REQUESTS
• FND_CONCURRENT_QUEUES
• FND_CONCURRENT_PROGRAMS


FND_CONCURRENT_PROCESSES -- Lists information about managers; Useful for determining UNIX and Oracle process ids associated with managers; Identifies logfiles associated with managers.

FND_CONCURRENT_REQUESTS -- Primary jobs submission table; Queried by the managers; Jobs are inserted into this table; Table can grow rather large thus affecting performance; Clenup scripts available with the Applications.

FND_CONCURRENT_PROGRAMS --Stores information about concurrent programs. Each row includes a name and description of the concurrent program. Each row also includes the execution methods for the program (EXECUTION_METHOD_CODE), the argument method (ARGUMENT_METHOD_CODE), and whether the program is constrained (QUEUE_METHOD_CODE).


If the program is a special concurrent program that controls the concurrent managers,
QUEUE_CONTROL_FLAG is set to Y. Each row also includes flags that indicate whether the program is enabled and defined as run–alone, as well as values that specify the print style the concurrent manager should use to print program output, if any. There are also values that identify the executable associated with the concurrent program and the application with which the executable is defined, and flags that specify whether the concurrent program is a parent of a report set, whether to save the output file, and whether a print style is required.Information such as printer name and number of rows and columns on each page of the output file for the concurrent program is also included in the table.
You need one row for each concurrent program in each application. Oracle Application Object Library uses this information to run concurrent programs