Tuesday, November 10, 2009

Important for oracle apps dba

Details of Adpreclone and Adcfgclone

What happens internally when you run adpreclone and adcfgclone
The steps for cloning like
1.adpreclone on apps and db tier
2.Then copy the file sytem to Target
3.run adcfgclone on apps tier and db Tier.
Lets understand,What happens when you run adpreclone and adcfgclone.
First,When you run this commnad adpreclone.pl dbTier .
This will run in two steps Techstack and database.
Techstack:It will create following directories in the ORACLE_HOME/appsutil/cloneJlib, db, data where “Jlib” relates to libraries “db” will contain the techstack information, “data” will contain the information related to datafiles and required for cloning.
Creates driver files at ORACLE_HOME/appsutil/driver/instconf.drv
Converts inventory from binary to xml, the xml file is located at $ORACLE_HOME/appsutil/clone/context/db/Sid_context.xml
Prepare database for cloning:This includes creating datbase control file script and datafile location information file at$ORACLE_HOME/appsutil/templateadcrdbclone.sql, dbfinfo.lst
Generates database creation driver file at ORACLE_HOME/appsutil/clone/data/driverdata.drv
Copy JDBC Libraries at ORACLE_HOME/appsutil/clone/jlib/classes12.jar and appsoui
When Running adpreclone appsTier
This will create stage directory at $COMMON_TOP/clone. This also run in two steps.
Techstack:Creates template files forOracle_iAS_Home/appsutil/templateOracle_806_Home/appsutil/template
Creates Techstack driver files forIAS_ORACLE_HOME/appsutil/driver/instconf.drv806_ORACLE_HOME/appsutil/driver/instconf.drv
APPL_TOP preparation:-It will create application top driver file$COMMON_TOP/clone/appl/driver/appl.drv-Copy JDBC libraries$COMMON_TOP/clone/jlib/classes111.zip
Now Shutdown all the services of Application and database for Copy the file System to target location
Configuring the target systemOnce it is done . Run as below adcfclone.pl for apps Tier and dbTier.
On database side:cd $ORACLE_HOME/appsutils/clone/bin
perl adcfgclone.pl dbTier pwd=apps
This will use the templates and driver files those were created while running adpreclone.pl on source system and has been copied to target system.
Following scripts are run by adcfgclone.pl dbTier for configuring techstack
adchkutl.sh — This will check the system for ld, ar, cc, and make versions.adclonectx.pl — This will clone the context file. This will ceate a new context file as per the details of this instance.runInstallConfigDriver — located in $Oracle_Home/appsutil/driver/instconf.drvRelinking $Oracle_Home/appsutil/install/adlnkoh.sh — This will relink ORACLE_HOME
For data on database side, following scripts are runDriver file $Oracle_Home/appsutil/clone/context/data/driver/data.drvCreate database adcrdb.zipAutoconfig is runControl file creation adcrdbclone.sql
On Application Side:COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier pwd=appsFollowing scripts are run by adcfgclone.plCreates context file for target adclonectx.pl
Run driver files$ORACLE_HOME/appsutil/driver/instconf.drv$IAS_ORACLE_HOME/appsutil/driver/instconf.drv
Relinking of Oracle Home$ORACLE_HOME/bin/adlnk806.sh$IAS_ORACLE_HOME/bin/adlnkiAS.shAt the end it will run the driver file $COMMON_TOP/clone/appl/driver/appl.drv and then runs autoconfig.


Basic Information on PrintingVia the Application,
A user will submit a request to run a report. This is most commonly done from the Submit Request Form (shortname =FNDRSRUN).The request is written into the concurrent queue/request table(s) (e.g.,FND_CONCURRENT_REQUESTS). The concurrent manager who eventually picks up the request will read the request and its definition from the queue. From there, the concurrent manager will kick off Oracle Reports. As Oracle Reports begins to run, it will look at a setting for how many copies you want. If copies = 0, then Oracle Reports will look at the Print Style definition for which SRW file to use. If copies > 0, then Oracle Reports will look at the Print Driver definition for which SRW file to use. In either case, Oracle Reports will look at the Print Style to determine the rows and columns that are contained in the report. The Print Style rows and columns overrides both the Print Style and Print Driver SRW files (which contain rows and columns as well). After the file has been generated using the appropriate SRW file and row/columns settings, the Concurrent Manager will pre-pend the initialization string and append the reset string to the output. As a general rule, the first component of the initialization string should be the reset string. You should not assume that the printer has been properly reset. It is the responsibility of the System Administrator to properly configure the initialization and reset strings. All of the seed data provided in Oracle Applications is for a DEC LN03 printer. This seed data is provided as example only. Chances are very good that your printers do not adhere to the DEC LN03 standards. There are numerous page description languages that are used to communicate with printers. The Big 3 are HP's PCL 5, Adobe's Postscript, and Microsoft's Windows GDI (Graphical Device Interface). Additionally, here are some other page descriptions languages.




Concurrent Manager:
---------------------
A mechanism that runs concurrent programs.
A manager operates duringthe time and days defined by a work shift. A manager can run any concurrent program, or be specialized to run anyconcurrent program, or be specialized to run only certain kinds of programs.

Concurrent Program:
---------------------
A program that runs concurrently (at the same time) as other programs.
Concurrentprograms run as background processes, while you continue to work at your terminal.”A concurrent program is an instance of an execution file, along with parameter definitions and incompatibilities.

Concurrent programs use concurrent program executables to locate the correct execution file.
Several concurrent programs may use the same execution file to perform their specific tasks, each having different parameter defaults and incompatibilities.

Concurrent Program Executable
---------------------------------
A concurrent program executable links an execution file or and the method used to execute it with a defined concurrent program.

Under Concurrent Processing, an execution method may be a program written in a standard language, a reporting tool, or an operating system language.

An execution method can be :

1. A PL/SQL Stored Procedure,
2. An Oracle Tool such as Oracle Reports or SQL*Plus, a spawned process, or
3. An operating system host language (eg . Shell or DCL).

Concurrent Program Execution File
=========================

A concurrent program execution file is an operating system file or database stored procedure which contains your application logic and can be executed by either invoking it directly on the command line or by invoking a program which acts upon it.

For example, you run a Pro*C program by invoking it on the command line. You run a SQL script by running SQL*Plus and passing the name of the SQL script without the .sql extension.


Oracle Applications consists of several types of Concurrent Managers.But it also gives the end-user flexibility to define any Concurrent Manager and in any number, as per the requirement.

Key Managers pre-defined by Oracle:

1. Internal Concurrent Manager (ICM)
2.Conflict Resolution Manager (CRM)
3. Standard Manager (SM)


ICM

Controls all other CM's.
Main task is to ensure all other CM's are up and running.
It also starts and stops Service Manager's on each node .
It sets the no. of active processes, monitors, restarts and terminates all other conc. processes through requests made to the service manager.

ICM in turn is monitored by Internal Monitor, is responsible for starting the failed ICM in a local node.
IMP: There should be an IMON defined on each node.


CRM

Takes care of resolving the program incompatabilities and checks if a request in a queue can be run in parallel with the running request.

SM

Is always running (24 hours , 365 days ) and can take care of processing any concurrent request.
In case a request has no defined Manager to take care, SM takes care of it.


Starting And Stoping Concurrent Manager
===============================

In Oracle Applications 11i all startup shutdown scripts (let's say control Scripts ) in 11i(11.5.10) are in $OAD_TOP/admin/script/$CONTEXT_NAME where $OAD_TOP is also called as $COMMON_TOP and $CONTEXT_NAME is your SID_hostname.

The script to start/stop concurrent manager is adcmctl.sh where ad is application dba , cm is concurrent manager & ctl means control.

When you run adcmctl.sh it records execution of this command in text file with name adcmctl.txt at directory $COMMON_TOP/admin/log/$CONTEXT_NAME.

Remember adcmctl.sh call's another script "startmgr" which in turn calls "batchmgr" in $FND_TOP/bin and this is actual file which kicks up Internal Concurrent Manager Process (ICM) .
Lets check important parameter in this file

1. DISPLAY Set it to some valid XServer , if this is not set properly your reports display will fail (specially one with PDF or Bar code dislay)

2. DIAG_PARAM Diagnosis parameter it will take value Y or N with default N, If you encounter some error while starting Concurrent Manager you change this to Y and then extra logging will be enabled then check Concurrent Manager log file.

3. CONCSUB stands for CONC(Concurrent) SUB(Submit) , used to submit concurrent request like shut down concurrent manager.

4. SLEEP holds the number of seconds that the manager should wait between checks for new requests.

5. MGRNAME is the name of the manager for locking and log purposes. So you can find if this is icm(Internal Concurrent Manager), sm(Service Manager)

6. RESTART is set to N if the manager should not restart itself after a crash. Otherwise, it is an integer number of minutes. The manager will attempt a restart after an abnormal termination if the past invocation lasted for at least RESTART minutes.

7. PMON is the duration of time between process monitor checks (checks for failed workers). The unit of time is concurrent manager iterations (request table checks). Default Value is 20 .

8. QUESIZ is the duration of time between worker quantity checks (checks for number of active workers). The unit of time is process monitor checks.

Note -> PMON, QUESIZ and SLEEP are important for Concurrent Manager Tuning.


(A)adcmctl.sh apps/<>
(B)By findinging the FNDLIBR process on the server and Killing the same by issuing Kill -9.
(c)Individual CM's can be deactivated from the Forms using the navigation >
Concurrent > Manager > Administer
(D) Using the CONCSUB utility.

CONCSUB username/passwd SYSADMIN 'system Administrator' SYSADMIN WAIT=Y CONCURRENT FND ABORT

How to find Concurrent Manager Node :

1. SQLPLUS> select node_name from apps.fnd_nodes where support_cp='Y';

2. In context file (SID_hostname.xml ) under $APPL_TOP/admin , check for variable

< oa_var="s_isConc">YES< / TIER_NODE>,

YES means this is Concurrent Manager Node.

3. From Front-end,Check for Administer Concurrent Manager request under SYSADMIN responsibility.

4. From Server , "ps -ef grep FNDLIBR" under application User on all nodes where FND (Foundation) LIBR(Library) is executable.



Important Tables and Profiles

The most important activities of an Apps DBA are applcation of Patches ( roughly its 50% of the daily work , what an Apps DBA performs ).The other main activity he is envolved in is troubleshooting Concurrent Manager or CM issues.
I have listed some important Tables which as an Apps DBA , need to look for any relevant info. regarding these Task.

Concurrent Manager
--------------------
FND_CONCURRENT_QUEUES
FND_CONCURRENT_PROGRAMS
FND_CONCURRENT_REQUESTS
FND_CONCURRENT_REQUESTS_TL
FND_CONCURRENT_PROCESSES
FND_CONCURRENT_QUEUE_SIZE


FND
------------
FND_APPL_TOPS
FND_LOGINS
FND_USER
FND_NODES
FND_DM_NODES
FND_TNS_ALIASES
FND_RESPONSIBILITY
FND_RESPONSIBILITY_TL
FND_DATABASES
FND_UNSUCCESSFUL_LOGINS
FND_LANGUAGES
FND_APPLICATION
FND_PROFILE_OPTION_VALUES
FND_SVC_COMPONENTS
FND_SVC_COMPONENTS_PARAM_VALS



AD / Patches
---------------------
AD_APPLIED_PATCHES
AD_PATCH_DRIVERS
AD_BUGS
AD_INSTALL_PROCESSES
AD_SESSIONS
AD_APPL_TOPS


Profile Options Useful for DBA
Here is the list of few profile options which Apps DBA use frequently. It is not necessary that you as Apps DBA must know all profile options, all of this depends on your implementation..


Applications Help Web Agent
Applications Servlet Agent
Applications Web Agent
Concurrent: Active Request Limit
Concurrent: Hold Requests
Concurrent: Multiple Time Zones
Concurrent: Report Access Level
Concurrent: Report Copies
Concurrent: Request priority
Database Instance
Enable Security Group
FND: Debug Log Filename
FND: Debug Log Level
Forms Runtime Parameters
Gateway User ID
ICX: Discoverer Launcher
ICX: Forms Launcher
ICX: Report Launcher
ICX: Limit Connect
ICX: Limit time
ICX: Session Timeout
MO Operating Unit
Node Trust Level
RRA: Delete Temporary Files
RRA: Enabled
RRA: Service Prefix
RRA: Maximum Transfer Size
Self Service Personal Home Page Mode
Sign-On: Audit Level
Signon Password Failure Limit
Signon Password Hard to Guess
Signon Password Length
Signon Password No Reuse
Site Name
Socket Listener Port
TCF: Host
TCF: Port
TWO TASK
Viewer: Text




Flow of Concurrent Request
1. Once a concurrent request is submitted by the user, the table FND_CONCURRENT_Requests is automatically updated by the details of the request.

2. Once the request is scheduled to run, the CM’s checks the FND_CONCURRENT_TABLES to find the request compatibility with any other request.

3. If no incompatibilities found in the check, than request is assigned to the concerned Manager.
Note: If there is any special Manager to take care of the request , then it goes to queue of its manager else the standard Manager takes care of the request.

4. Once the Request is processed, the FND_CONCURRENT_REQUEST table is updated with the status.

5. A conc.request can have many PHASES , when its being processed by the Manager

6. Every Phase has corresponding STATUS.

PHASE 1.Completed

STATUS

Normal : The request completed normally.

Error :The request failed.Check the log file for details about the error.

Warning :Request completed with a warning.Warning is generated when upon completion task don't complete succesfully.

Cancelled :The request was cancelled before it was started.Terminated : When a running request was terminated.

PHASE 2.Running

STATUS

Normal: Request is running normal and no interfere is required.

Paused : Request is waiting for some other request to be finished.(Dependency )

Resuming :Paused request is resuming, this happens when dependent request completes.

Terminating :User or sysadmin chooses to terminate the request.

3.Pending

Normal : Request is waiting for CM.

Standby :Request is incompatible with some other request.CRM needs to resolve this.

Waiting :Dependency of request.

Scheduled :Request is scheduled to run at a point of time in future.

4.Inactive

No Manager : CM is down or No specialzed Manager is defined for this request

Disabled : Conc.Program rquested has not been enabled yet.

On Hold: Pending request has been kept on hold for time being.

Posted by Biswajit at 12:04 PM 0 comments



Saturday, August 25, 2007
X server

Configure an X server for Framework applications

To take advantage of the dynamic image generation support Framework applications require access to graphical capabilities on the middle tier. In practical terms this means you need to configure your Webserver to use an X server for dynamic gif generation.

X display servers can be broadly categorized into three groups

1. X display server from the OS Vendor
2. "Headless" X display server without video hardware (Xvfb and VNC )
3. Desktop X display server


Oracle software requires specific X display server settings. Oracle Toolkit, an internal component of Tools 6i, and the Installer orainst , require the following critical parameters to be set for all X display server software:

Option 2: Headless X display server - Xvfb or VNC

"Headless" X display servers provide the same services as the software in Options 1 & 3, however, these servers do not require video adapter hardware nor a monitor. These servers require the same settings for the default visual class, dpi and depth parameters as described in the introduction.



How to install and run Xvfb (X Virtual FrameBuffer)
Get the Xvfb binary. Some URLs are given below; alternatively, Xvfb can also compiled from the Xvfb source code available at http://www.x.org. As of April 2002, Xvfb binaries can be downloaded from these locations:
Solaris - Include with Solaris 9 and later. See Oracle TechNet for Solaris 2.6, 7 and 8
Linux - Included with most Linux distributions. Xvfb is also available as an RPM for RedHat and SUSE or from Xfree86.org
HPUX - HP patch PHSS_25277
AIX - Included with the operating system.
Tru64 - Included with the operating system; usually in /usr/bin/X11
Win32 - Not applicable.

On Solaris, verify that the all dynamically linked libraries can be resolved using the ldd command. On other platforms Xvfb is included with the OS and should already be properly configured:
% ldd Xvfb
This should display a list of resolved libraries as follows:
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1

Get a security policy file
A sample security policy file is included at the end of this document. The file is named SecurityPolicy.
If you have an existing file then add this line to the end of the policy file:
property WM_CHANGE_STATE WM_NAME ar

To run Xvfb use a command with the following format

Xvfb :x -screen 0 6x6x8 -pn -fp /lib/X11/fonts/misc -sp /tmp/SecurityPolicy
where
x is the desired display number. For instance 1 or 2.
fp points to the directory of the fixed font
sp points to the directory and filename of the security policy file
6x6x8 screen size works well for Reports and Graphics and minimizes the memory required by Xvfb

Set the DISPLAY environment variable to the value :x.0 or your_hostname:x.0 where x is the display number chosen when starting Xvfb. For example in Bourne shell:

DISPLAY=Xvfb_hostname:x.0; export DISPLAY

Start a window manager on the Xvfb display to automatically position windows.
twm &









Opatch (utility to apply RDBMS patches)

Opatch Application Steps :

1) Read the patch readme thoroughly and make sure everything is fine. Remember database patches are applied using opatch.

2) Check the invalids and take the object name and count of invalids.
col owner format a15
col object_name format a40
col object_type format a15
select owner,object_type,object_name from dba_objects where status = 'INVALID' order by owner,object_type;

3) Make sure you have the right opatch utility version.
Recent db patches require opatch version is 1.0.0.0.55 or higher

opatch version

Also make sure opatch executable used to apply the patch is in the PATH

export PATH=$PATH:$ORACLE_HOME/OPatch

4) Make sure opatch lsinventory is working for the opatch. If lsinventory is not working then you should not go ahead with opatch. This is the most important step, as most of Opatch issues are related to bad inventory etc.

opatch lsinventory

The possible causes could be inventory is not pointing correctly.(especially in dev and test servers, where you have more than one db sharing the same inventory) then make make sure inventory is pointing to the right path. Inventory location is mentioned in oraInst.loc under db home.
eg /opt/oracle/product/appl/9.2.0/oraInst.loc

ex Oracle Installer Location File

Location#inventory_loc=/opt/oracle/product/9iAS/oraInventory#inventory_loc=/opt/oracle/product/appl/oraInventoryinventory_loc=/opt/oracle/product/appl/oraInventoryinst_group=dba

Note :The OraInventory dir would be in one dir below db home

dir /opt/oracle/product/appl/oraInventory (]$ ls -rlttotal 10drwxr-xr-x 2 oramgr dba 96 Nov 16 2005 ContentsXMLdrwxr-xr-x 2 oramgr dba 1024 Nov 16 2005 Contentsdrwxr-xr-x 2 oramgr dba 3072 Dec 09 20:10 logs-rwxr-xr-x 1 oramgr dba 38 Dec 09 20:10 install.platform/opt/oracle/product/appl/oraInventory (]$<> and make sure the entries in files under ContentsXML has correct db entry.Also note these day's inventory are also known as XML inventory. )

5) Ensure that the $PATH has the following executables:
make, ar, ld, and nm and make sure they are working with the below commands and also
Check whether the java and jar executables are present in your Oracle home.
which make
which ar
which ld
which nm
6) Before applying the opatch, database and db (9i) listener should be down. This is a must.
7) For applying opatch go the database patch directory where the patch is downloaded and unzipped and now give the following command :
opatch apply

8) After opatch is done, confirm the inventory is updated with the current patch.This is a confirmation step.
opatch lsinventory
9) Make sure there are no errors and also verify the log file.log file is located in
eg : /opt/oracle/product/appl/9.2.0/.patch_storage//

10) start the database and db listener and do the post steps like executing catcpu and other steps as mentioned in the patch readme, take the invalids again and compile them.
Note:
syntax for applying opatch on RAC instances is little different.
On each node you might have to apply with the following syntax
opatch apply -local
============================================================
OraInventory in Oracle
======================
What to do if Inventory is corrupted , What is global / Local Inventory

oraInventory :
=============

oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format &
called as binary Inventory.
There are basically two kind of Inventory Global Inventory (also called as Central Inventory) and Local Inventory also called as Oracle Home Inventory.

Global Inventory :
=============
Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc (on Linux/AIX) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventory
(Please note if you have multiple global Inventory on machine check all oraInventory directories)

Local Inventory:
============
Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only.

Can We have multiple Global Inventory on a machine :
=======================================
Can we have multiple global Inventory and the answer is YES you can have multiple global Inventory but if your upgrading or applying patch then make sure you change Inventory Pointer oraInst.loc to respective location. If you are following single global Inventory and if you wish to uninstall any software then remove it from Global Inventory as well.

If Global Inventory is corrupted
=======================
If global Inventory is corrupted, we can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option-attachHome

." DIV < cluster_nodes="{}" oracle_home_name="Oracle_Home_Name">
Optach failures are generally due to Inventory problem, above i have provided some info. about the Oracle Inventory (Global/Local).This will help us in understanding & resolving the issues in future.

]$<> and make sure the entries in files under ContentsXML has correct db entry.Also note these day's inventory are also known as XML inventory. )
5) Ensure that the $PATH has the following executables:
make, ar, ld, and nm and make sure they are working with the below commands and also
Check whether the java and jar executables are present in your Oracle home.
which make
which ar
which ld
which nm
6) Before applying the opatch, database and db (9i) listener should be down. This is a must.
7) For applying opatch go the database patch directory where the patch is downloaded and unzipped and now give the following command :
opatch apply

8) After opatch is done, confirm the inventory is updated with the current patch.This is a confirmation step.
opatch lsinventory
9) Make sure there are no errors and also verify the log file.log file is located in
eg : /opt/oracle/product/appl/9.2.0/.patch_storage//

10) start the database and db listener and do the post steps like executing catcpu and other steps as mentioned in the patch readme, take the invalids again and compile them.
Note:
syntax for applying opatch on RAC instances is little different.
On each node you might have to apply with the following syntax
opatch apply -local
============================================================
OraInventory in Oracle
======================
What to do if Inventory is corrupted , What is global / Local Inventory

oraInventory :
=============

oraInventory is repository (directory) which store/records oracle software products & their oracle_homes location on a machine. This Inventory now a days in XML format and called as XML Inventory where as in past it used to be in binary format &
called as binary Inventory.
There are basically two kind of Inventory Global Inventory (also called as Central Inventory) and Local Inventory also called as Oracle Home Inventory.






Global Inventory :
=============
Global Inventory holds information about Oracle Products on a Machine. These products can be various oracle components like database, oracle application server, collaboration suite, soa suite, forms & reports or discoverer server . This global Inventory location will be determined by file oraInst.loc in /etc (on Linux/AIX) or /var/opt/oracle (solaris). If you want to see list of oracle products on machine check for file inventory.xml under ContentsXML in oraInventory
(Please note if you have multiple global Inventory on machine check all oraInventory directories)







Local Inventory:
============
Inventory inside each Oracle Home is called as local Inventory or oracle_home Inventory. This Inventory holds information to that oracle_home only.








Can We have multiple Global Inventory on a machine :
=======================================
Can we have multiple global Inventory and the answer is YES you can have multiple global Inventory but if your upgrading or applying patch then make sure you change Inventory Pointer oraInst.loc to respective location. If you are following single global Inventory and if you wish to uninstall any software then remove it from Global Inventory as well.





If Global Inventory is corrupted
=======================
If global Inventory is corrupted, we can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option-attachHome





." DIV < cluster_nodes="{}" oracle_home_name="Oracle_Home_Name">

4 comments:

  1. I would like to thank you for the efforts you have put in writing this blog. I am hoping to check out the same high-grade content from you later on as well. In fact, your creative writing abilities has encouraged me to get my very own site now
    create iphone barcode

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete