Monday 19 December 2016

Difference between OEL and RHEL?

A large difference between OEL and RHEL is the licensing terms. 
OEL is free to acquire and use.
RHEL requires a paid license just to obtain.

OEL licenses only support and access to updates. Oracle also has a different
licensing structure from Red Hat, such as licensing by the number of CPU's and
not by the number of cores/instances. In a virtualized environment, this can be a
significant cost difference.


Dead Locks?

A deadlock occurs when two or more sessions are waiting for data locked by each other, resulting in all the sessions being blocked. Oracle automatically detects and resolves deadlocks by rolling back the statement associated with the transaction that detects the deadlock. Typically, deadlocks are caused by poorly implemented locking in application code.

the steps necessary to identify and rectify code causing deadlocks are:
  • Locate the error messages in the alert log.
  • Locate the relevant trace file(s).
  • Identify the SQL statements in both the current session and the waiting session(s).
  • Use these SQL statements to identify the particular piece of code that is having problems.
  • Alter the application code to prevent deadlocks by always locking rows in the tables in the same order.

Types of Locks:-


DML locks (data locks):-DML locks protect data. For example, table locks lock entire tables, row locks lock selected rows.

DDL locks (dictionary locks):-DDL locks protect the structure of schema objects—for example, the definitions of tables and views.

Internal locks and latches:-
Internal locks and latches protect internal database structures such as datafiles.
Internal locks and latches are entirely automatic.

AWR snapshot reports and AWR retention period settings?

The dba_hist_wr_control table shows the AWR snapshot settings, namely the snapshot interval, the retention period and the top-x-sql collection threshold:
SQL> desc dba_hist_wr_control
Name                            Null?    Type
------------------------------- -------- ----------------------------
DBID                            NOT NULL NUMBER
SNAP_INTERVAL NOT               NULL     INTERVAL DAY(5) TO SECOND(1)
RETENTION                       NOT NULL INTERVAL DAY(5) TO SECOND(1)
TOPNSQL                                  VARCHAR2(10)


Scheduling the AWR snapshot collection

Oracle uses the MMON background process to collect AWR statistics. You can disable this job by changing the parameter STATISTICS_LEVEL to BASIC then snapshots will not be taken automatically.

SQL> show parameter statistics_level

NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------------
statistics_level                     string      BASIC

You can re-enable this job by changing the parameter STATISTICS_LEVEL to TYPICAL then snapshots will be taken automatically.
AWR Snapshot Reports
Oracle provides reports that you can run to analyze the data in the AWR.  There are two reports: awrrpt.sql and awrrpti.sql, which are available in the directory $ORACLE_HOME/rdbms/admin.
The output of these reports is essentially the same, except that awrrpti.sqlscript allows you to define a specific instance to report on.
The reports are much like the statspack reports of old, in that you define a beginning and ending snapshot ID, and the output filename of the report. Additionally, you can opt to produce the report in either text format or HTML format.

AWR Retention Period Settings

Setting an appropriate retention interval for your AWR is critical for proper data retention, especially for predictive modeling. You can adjust the AWR retention period according to your analysis needs.
In this example the retention period is specified as 3 years (1,576,800 minutes) and the interval between each snapshot is 60 minutes.
execute dbms_workload_repository.modify_snapshot_settings (
interval => 60,
retention => 1576800);
Oracle has published suggested storage requirements for AWR based on the activity and complexity of your 10g database:
Active Sessionsnumber of
CPU's (num_cpus)
number of
schema objects
Monthly
space required (gig)
Small1025002
Medium2085,0008
Large1003250,00020
Here, we choose out approximate database size and see estimated space for the AWR dba_hist tables. Oracle provides the SYSAUX sizing utility called utlsyxsz.sql (in $ORACLE_HOME/rdbms/admin) for estimating your AWR retention based on disk space consumption.
AWR also supports the creation of "AWR baselines", which are a "named" series of AWR snapshots that are immune from being purged by the AWR retention mechanism. the create_baseline procedure allows you to specify a start_snapshot and end_snapshot and name the baseline:
DBMS_WORKLOAD_REPOSITORY.create_baseline
(1900, 2000, 'EOY_PEAK_LOADS');

The dbms_workload_repository package can be used by Oracle DBAs to configure AWR settings such as snapshot interval, flushing and data retention.
The dbms_workload_repository .modify_snapshot_settings procedure is used to configure AWR data retention in the database. The retention interval determines the length of time that data will be preserved in the AWR. The default setting for retention is 10,080 minutes (one week).
desc dbms_workload_repository

PROCEDURE MODIFY_SNAPSHOT_SETTINGS
Argument Name Type In/Out Default?
------------------------------ ----------- ------ -------- RETENTION NUMBER IN DEFAULT INTERVAL NUMBER IN DEFAULT DBID NUMBER IN DEFAULT
The range of valid values for this parameter ranges from ten minutes to 52,560,000 minutes or 100 years.
The dbms_workload_repository package contains the global variables of min_retention and max_retention. These variables set the lower and upper limits for the retention parameter.

If a zero value is specified for retention, snapshots will be stored for an unlimited amount of time. The following awr_settings.sql script can be used to check the current settings for the AWR interval and retention settings:

Indexes?

Indexes are special lookup tables that the database search engine can use to speed up data retrieval. Simply put, an index is a pointer to data in a table. An index in a database is very similar to an index in the back of a book.Indexes allow the database application to find data fast; without reading the whole table.
For example, if you want to reference all pages in a book that discuss a certain topic, you first refer to the index, which lists all topics alphabetically and are then referred to one or more specific page numbers.
An index helps speed up SELECT queries and WHERE clauses, but it slows down data input, with UPDATE and INSERT statements. Indexes can be created or dropped with no effect on the data.
Creating an index involves the CREATE INDEX statement, which allows you to name the index, to specify the table and which column or columns to index, and to indicate whether the index is in ascending or descending order.
Indexes can also be unique, similar to the UNIQUE constraint, in that the index prevents duplicate entries in the column or combination of columns on which there's an index.

CREATE INDEX Command:


The basic syntax of CREATE INDEX is as follows:
CREATE INDEX index_name ON table_name;

Single-Column Indexes:

A single-column index is one that is created based on only one table column. The basic syntax is as follows:
CREATE INDEX index_name
ON table_name (column_name);

Unique Indexes:

Unique indexes are used not only for performance, but also for data integrity. A unique index does not allow any duplicate values to be inserted into the table. The basic syntax is as follows:
CREATE UNIQUE INDEX index_name
on table_name (column_name);

Composite Indexes:

A composite index is an index on two or more columns of a table. The basic syntax is as follows:
CREATE INDEX index_name
on table_name (column1, column2);
Whether to create a single-column index or a composite index, take into consideration the column(s) that you may use very frequently in a query's WHERE clause as filter conditions.
Should there be only one column used, a single-column index should be the choice. Should there be two or more columns that are frequently used in the WHERE clause as filters, the composite index would be the best choice.

Implicit Indexes:

Implicit indexes are indexes that are automatically created by the database server when an object is created. Indexes are automatically created for primary key constraints and unique constraints.

The DROP INDEX Command:

An index can be dropped using SQL DROP command. Care should be taken when dropping an index because performance may be slowed or improved.
The basic syntax is as follows:
DROP INDEX index_name;
You can check INDEX Constraint chapter to see actual examples on Indexes.

When should indexes be avoided?

Although indexes are intended to enhance a database's performance, there are times when they should be avoided. The following guidelines indicate when the use of an index should be reconsidered:
  • Indexes should not be used on small tables.
  • Tables that have frequent, large batch update or insert operations.
  • Indexes should not be used on columns that contain a high number of NULL values.
  • Columns that are frequently manipulated should not be indexed.

FIND and REPLACE in unix?

Many times we want to find and replace all the occurences of  one word in a file to another word in Unix. Using the power of vi editor, it can be done easily.
Here is the syntax for the same in unix

:1,$s/oldword/newword/g

example
To find and replace all occurences of "erp" with "BERP" in a file, we have to do the following->
Open the file in vi editor, and issue the following command
:1,$s/erp/BERP/g

How to find if module is installed or not in Oracle Apps?

We have 3 ways to find out if a module is installed in oracle apps

1 We can run the following script
cd $AD_TOP/sql/adutconf.sql
In this script, there is a section->"Product Installation Status, Version Info and Patch Level"
In this, status of installed means the product is installed.

2  Through OAM
In oracle apps, navigate to
OAM>Site Map>/License Manager>Reports>Licensed Products
Here filter the products by  using "Licensed". These are the licensed and installed products in oracle apps.

Implementing Parallel Concurrent Processing (PCP) in Oracle Apps?

In oracle apps, by default, concurrent managers are installed on one of the nodes. However, Oracle provides functionality called parallel concurrent processing -PCP where in, we can install concurrent mangers on multiple nodes.  The advantage of PCP is that it provides fail over capability-if one of the nodes having Cm goes down, then CM will run on other nodes. Also, since we can distribute Cm over multiple nodes, so it will take advantage of resources-Ram/CPU of that node and hence processing will be faster.
Steps for Implementing PCP
  • Make sure that the new node is added to the system. We will call the node already having   CM  as primary node and the new node as secondary node.
  • Change the parameter APPLDCP to ON in context file of both nodes. For viewing reports log/output make sure that $APPLSCF should point to same directory on both nodes. We can use NFS for this.
  • ON the secondary node, change the parameter “s_ isConc” to yes and also”s_ isConcDev” to yes
  • Now, shutdown the services and run autoconfig on primary node, then on secondary node and finally on web tier.
  • Ensure that tnsnames.ora on both CM nodes have correct entries.
  • Now define primary and secondary node for ICM. Goto Concurrent >Manager>Define >Internal manager. There should be 2 ICM-one  for each node(say node A and  node B). For ICM for node A-define A as primary node and B as secondary node. For ICM for Node B-define B as primary node and A as secondary node.
  • Similarly for Internal Monitor process define primary and secondary nodes. Goto  Concurrent > Manager > Define. Search “Internal Monitor%”.  There should be 2 Internal Monitor -one for each node(say A and B). For Internal Monitor for node A-define A as primary node and B as secondary node. For Internal Monitor for Node B-define B as primary node and A as secondary node. Also define standard workshift for both Internal Monitors. Activate them.
  • Now define primary and secondary for other concurrent managers the way you want to distribute them.
  • Start the services on all nodes. The cm has to be started on primary node only and not on secondary node.

Concurrent Managers NOT coming up after cloning in 11i/R12?

It is a very common issue that many times concurrent managers (CM) does not come up after apps cloning. Here are the steps to perform to resolve it

1 Query the apps.fnd_nodes tables. Many times,  the CM node entry is not there, or prod node entries are still there in fnd_nodes table. Stop the concurrent manager service and clear the fnd_nodes table by executing the folowing as apps user->


EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;

2 Now Run AutoConfig on all tiers on the target system. Firstly on the DB tier and then on all the apps tier individually. This step will populate the apps.fnd_nodes table. If you query this table, then it will show you the target node entries now.

3 Start the CM services and then check the CM. If CM is up then fine else perform the following

4  Stop the concurrent manager services. Connect to apps user and run cmclean.sql script. This script can be downloaded from metalink. Remember to commit the script after execution. Start the CM services and then check the CM. If CM is up then fine else perform the following

5  Stop the concurrent manager service....and run the following statement on concurrent manager node
Go to cd $FND_TOP/bin
adrelink.sh force=y "fnd FNDLIBR"
adrelink.sh force=y "fnd FNDSM"
adrelink.sh force=y "fnd FNDFS"
adrelink.sh force=y "fnd FNDCRM"

6 Start the CM services and then check the CM.  Concurrent managers  should be up and running fine now.

Friday 16 December 2016

To find the current on-site code level of entities?

SELECT app_short_name, MAX(patch_level) FROM apps.ad_patch_driver_minipks
GROUP BY app_short_name ;

APP_SHORT_NAME,   MAX(PATCH_LEVEL)

MSR,R12.MSR.B.1
CRP,R12.CRP.B.1
BSC,R12.BSC.B.1
WMS,R12.WMS.B.1
QPR,R12.QPR.C.1
PON,R12.PON.B.1
FLM,R12.FLM.B.1
PMI,R12.PMI.B.1
CZ,R12.CZ.B.1
FND,R12.FND.B.1
SQLGL,R12.GL.B.1
AMW,R12.AMW.B.1
QOT,R12.QOT.B.1
AST,R12.AST.B.1
ASP,R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
IMC,R12.IMC.B.1
DDR,R12.DDR.B.1
PRP,R12.PRP.B.1
PA,R12.PA.B.1
WSM,R12.WSM.B.1
GMF,R12.GMF.B.1
OKC,R12.OKC.B.1
AZ,R12.AZ.B.1
SQLAP,R12.AP.B.1
IGW,R12.IGW.B.1
ASG,R12.ASG.B.1
HXT,R12.HXT.B.1
JMF,R12.JMF.B.1
JE,R12.JE.B.1
JA,R12.JA.B.1
WSH,R12.WSH.B.1
CSI,R12.CSI.B.1


Thursday 15 December 2016

How to create the service manager FNDSM on oracle applications?

SQL> select CONCURRENT_QUEUE_NAME from FND_CONCURRENT_QUEUES where CONCURRENT_QUEUE_NAME like 'FNDSM%';

CONCURRENT_QUEUE_NAME
------------------------------
FNDSM_NODE21

if it is not here then from application tier go to cd $FND_TOP/patch/115/sql
[applmgr@node21 sql]$ ls -ltr afdcm037.sql
-rwxr-xr-x 1 applmgr dba 2100 Jan  3  2007 afdcm037.sql

This script will create libraries for FNDSM and create managers for Preexiting nodes.

NOTE:-

Service manager FNDSM cannot be created from form.

concurrent-->manager-->Define under sysadmin responsibility.

Enable Diagnostics in oracle apps

Enable Diagnostics in oracle apps

The Following steps can be followed for enabling Diagnostics at user level
1)Navigate to system administrator responsibility---->profile---->system


2)click find--->

3)save it
4)system administrator->profile-->system


Click find


Here already the diagnostics option in help is disabled so we need to enable it so at user level enter no to hide diagnostics menu entry.




Tuesday 6 December 2016

Oracle Apps R12 Log File Locations?

This post covers the log files locations which are useful in troubleshooting issues in Oracle Applications.
Here is the list of Log file location in Oracle Applications for Startup/Shutdown, Cloning, Patching, DB & Apps Listener and various components in Apps R12/12i:
A. Startup/Shutdown Log files for Application Tier in R12
Instance Top is new TOP added in R12
–Startup/Shutdown error message text files like adapcctl.txtadcmctl.txt
$INST_TOP/logs/appl/admin/log
–Startup/Shutdown error message related to tech stack (10.1.2, 10.1.3 forms/reports/web)
$INST_TOP/logs/ora/ (10.1.2 & 10.1.3)
$INST_TOP/logs/ora/10.1.3/Apache/error_log[timestamp]
$INST_TOP/logs/ora/10.1.3/opmn/ (OC4J~…, oa*, opmn.log)
$INST_TOP/logs/ora/10.1.2/network/ (listener log)
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/conc/log (CM log files)
B. Log files related to cloning in R12
 Preclone log files in source instance
Database Tier – $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/(StageDBTier_MMDDHHMM.log)
Application Tier –
$INST_TOP/apps/$CONTEXT_NAME/admin/log/(StageAppsTier_MMDDHHMM.log)
Clone log files in target instance
Database Tier – $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTier_.log
Apps Tier – $INST_TOP/admin/log/ApplyAppsTier_.log
If your clone on DB Tier fails while running txkConfigDBOcm.pl (Check metalink note – 415020.1)
During clone step on DB Tier it prompts for “Target System base directory for source homes” and during this you have to give like /base_install_dir like ../../r12 and not oracle home like ../../r12/db/tech_st_10.2.0
C. Patching related log files in R12
i) Application Tier adpatch log – $APPL_TOP/admin/$SID/log/
ii) Developer (Developer/Forms & Reports 10.1.2) Patch – $ORACLE_HOME/.patch_storage
iii) Web Server (Apache) patch – $IAS_ORACLE_HOME/.patch_storage
iv) Database Tier opatch log – $ORACLE_HOME/.patch_storage
D. Autoconfig related log files in R12
i) Database Tier Autoconfig log :
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDHHMM/adconfig.log
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDHHMM/NetServiceHandler.log
ii) Application Tier Autoconfig log : $INST_TOP/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log
Autoconfig context file location in R12 – $INST_TOP/apps/$CONTEXT_NAME/appl/admin/$CONTEXT_NAME.xml
E. R12 Installation Logs
 Database Tier Installation
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME/.log
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTechStack_.log
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ohclone.log
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME/make_.log
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME/installdbf.log
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME/adcrdb_.log RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDatabase_.log
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME//adconfig.log
RDBMS_ORACLE_HOME/appsutil/log/$CONTEXT_NAME//NetServiceHandler.log
Application Tier Installation
$INST_TOP/logs/.log
$APPL_TOP/admin/$CONTEXT_NAME/log/ApplyAppsTechStack.log
$INST_TOP/logs/ora/10.1.2/install/make_.log
$INST_TOP/logs/ora/10.1.3/install/make_.log
$INST_TOP/admin/log/ApplyAppsTechStack.log
$INST_TOP/admin/log/ohclone.log
$APPL_TOP/admin/$CONTEXT_NAME/log/installAppl.log
$APPL_TOP/admin/$CONTEXT_NAME/log/ApplyAppltop_.log
$APPL_TOP/admin/$CONTEXT_NAME/log//adconfig.log
$APPL_TOP/admin/$CONTEXT_NAME/log//NetServiceHandler.log
Inventory Registration:
$Global Inventory/logs/cloneActions.log
$Global Inventory/logs/oraInstall.log
$Global Inventory/logs/silentInstall.log
F. Other log files in R12
 1) Database Tier
1.1) Relink Log files :
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME /MMDDHHMM/ make_$MMDDHHMM.log
1.2) Alert Log Files :
$ORACLE_HOME/admin/$CONTEXT_NAME/bdump/alert_$SID.log
1.3) Network Logs :
$ORACLE_HOME/network/admin/$SID.log
1.4) OUI Logs :
OUI Inventory Logs :
$ORACLE_HOME/admin/oui/$CONTEXT_NAME/oraInventory/logs
2) Application Tier
$ORACLE_HOME/j2ee/DevSuite/log
$ORACLE_HOME/opmn/logs
$ORACLE_HOME/network/logs
Tech Stack Patch 10.1.3 (Web/HTTP Server)
$IAS_ORACLE_HOME/j2ee/forms/logs
$IAS_ORACLE_HOME/j2ee/oafm/logs
$IAS_ORACLE_HOME/j2ee/oacore/logs
$IAS_ORACLE_HOME/opmn/logs
$IAS_ORACLE_HOME/network/log
$INST_TOP/logs/ora/10.1.2
$INST_TOP/logs/ora/10.1.3
$INST_TOP/logs/appl/conc/log


$INST_TOP/logs/appl/admin/log

How to apply a patch in between a patch( Interim patch) in apps 11i/R12 or How to restart a failed adpatch in 11i/R12?

adpatch reads the .drv(driver) file in the patch and does the actions accordingly.It creates two Internal tables in APPLSYS account called AD_DEFERRED_JOBS and FND_INSTALL_PROCESSES for controlling adworkers, the workers statuses are controlled in these tables.

Also the Actions of the adpatch are stored in .rf9 file format in $APPL_TOP/admin/$TWO_TASK/restart directory..

when ever an adpatch is restarted from a failed session,it looks in to this folder to do
the restart work from where it has failed!.

Coming to the Actual procedure how to apply an interim ad patch do the following procedures.

1. Login adctrl and choose the option (tell the manager that a worker failed its job) — to stop
the existing patching…

2.login to APPLSYS and create backup of the two tables AD_DEFERRED_JOBS & FND_INSTALL_PROCESSES

3. take a backup of the restart folder(or directory) under $APPL_TOP/admin/$TWO_TASK/

4.Apply the Interim(Intermediate ) patch successfully ,when asked for to continue
with failed session in adpatch say No and to the next question choose Yes
(so that you will erase the failed session and start a fresh patching).

5.After finishing the Intermediate patch , restore the tables AD_DEFERRED_JOBS and
FND_INSTALL_PROCESS and the restart directory under $APPL_TOP/admin/$TWO_TASK.

6.login to adctrl and instruct the manager to restart the jobs.

7.Return to the original patch directory and invoke adpatch and now it will
ask “whether to continue with failed session”.

You have to give “Yes” and proceed with the original or existing patching…

What are .lct and .ldt files in Patch Directory?

The patch metadata LDT files (also called datafiles) are FNDLOAD data files included in the top-level directory of all recent patches. The LDT files contain prerequisite patch information and a manifest of all files in the patch with their version numbers. The Patch Information Bundle metadata also include information about the relationships between patches, such as which minipacks are contained in the recommended.LCT files (also called configfiles) are the configuration files which are used to download/upload data. Without configfiles, datafiles are useless.

Adpatch Modes and Options?

My main focus on this post would be discussing all the options of adpatch and modes of adpatch.

Modes of adpatch:  
  1. Interactive mode
  2. Non-Interactive mode
  3. Test mode
  4. Pre-Install mode
Interactive Mode:  
It is the default mode of adpatch when we don’t use anything. We can apply patch in this mode by going into patch directory and simply type adpatch in command prompt and hit enter.

Non-Interactive:
We can apply in this mode as:
$adpatch Interactive=no
It uses default files to store prompt values and can be applied from patch directory.

Test Mode:
This mode is purposely used to check the what exactly patch is doing and will do everything without actually changing anything.
We can apply patch in this mode as:
$adpatch apply=no
By default apply=yes

PreInstall Mode:
This mode is used to apply adpatch for any upgrade or consolidated update of utilities itself. So, it would be suggested to apply pre-install patch first.
When we apply patch in preinstall mode, it updates all AD utilities befre upgrade or update.
We can apply adpatch in this mode as:
$adpatch preinstall=y

Adpatch Options:

We have multiple adpatch options and based on the requirement we can use specific options. Here, I will try to cover most often used adpatch options.

Noautoconfig:
$adpatch options=noautoconfig
This options is used to skip the autoconfig execution as by default it executes the autoconfig and updates the configuration file if any template file is added. This option is helpful when we apply multiple adpatch and they are not merged.

Nocompiledb(without compiling database):
While we apply adpatch, It may create invalid objects and by default adpatch compiles the invalid objects after patch application. But in case you do not want to compile invalid objects to ensure the minimal autopatch time, you can apply adpatch as below:
$adpatch options=nocompiledb

Nocopyportion:
This option is used to apply adpatch without copying the files present in copy driver. This can be applies as:
$adpatch options=nocopyportion

Nocompilejsp:
Adpatch also compiles the java server pages(JSP) after completion of patch application and can be skipped using the option nocompilejsp as below:
$adpatch options=nocompilejsp

Nodatabaseportion:
Nodatabaseportion option is used to skip the adpatch the activity of database driver. It can be used as:
$adpatch options=nodatabaseportion

Nogenerateportion:
Nogenerateportion option is used to skip the adpatch activity of generate driver portion of the patch  and you can use the option nogenerateportion as below:
$adpatch options=nogenerateportion

Maintenance Mode disabled:
If you want to apply your adpatch without enabling maintenance mode, you can apply using the option as hotpatch as below:
$adpatch options=hotpatch


Nolink:
Nolink option is used to skip the relinking and can be used as:
$adpatch options=nolink

Nogenform:
Nogenform option is used to skip the generate form file and can be used as:
$adpatch options=nogenform

Maintainmrc:
Maintainmrc is used for adpatch to execute the maintain MRC schema as part of patch. By default maintain MRC is done for standard patch and is disabled for documentation and translation patches.
$adpatch options=nomaintainmrc

Noprereq:
This option is used to skip the checking of pre-requisite patches and by default it checks for pre-requisite patch. This option can be used as below:
$adpatch options=noprereq