You are on page 1of 6

The ADODFCMP Utility 1.

Definition The ODF Comparison utility is used to compare the data model of a customers data to a standard set of data model files from the current Oracle Application release. It can optionally modify the database to match the standard data model. ODF Compare cannot be used for custom development. Each application consists of certain building blocks. For example, Item Master Entry is one building block for Oracle Inventory. There is an object descriptor file (ODF) describing the tables, views, indexes, sequences and privilege sets for the particular building block. Privilege sets are grants used in earlier releases before the APPS schema was introduced. ODF Comparison compares the building block to the object descriptor file (ODF). A log file is created showing any missing, extra, or incorrectly defined objects. 2. Running ODF Comparison Change to the directory containing the object descriptor files (ODF). UNIX: cd $PROD_TOP/admin/odf NT: c:\ > cd %PROD_TOP%\admin\odf If you have applied patches the ODF may have been superseded by a newer version. In this case the newer files will be located in PROD_TOP/patch/115/odf directory structure. Syntax UNIX: adodfcmp <parameter>=<value> [<parameter>=<value> . . . . . ] NT: c:\ adodfcmp <parameter>=<value> [<parameter>=<value> . . . . . ] Parameters can be specified in any order on the command line. The following parameters are required: mode, touser, priv_schema, odffile, userid The default value applies if you do not specify optional parameters.

Parameter Name Description

Default Value

mode (required) <no default> Determines the type of objects to compare against the ODF.
Mode baseonly tables indexes noindexes sequences views grants Compare Tables? Yes Yes No Yes No No No Compare Indexes? Yes Yes Yes No No No No Compare Sequences? Yes No No No Yes No No Compare Views? No No No No No Yes No Compare Grants? Yes Yes Yes Yes Yes No Yes

Example: use changedb = yes and mode = tables to create tables, indexes and grants touser (required) <no default> Specifies the Oracle username/password of the Oracle Applications product to grant to. In Release 11i this is usually the list of APPS schemas. The touser parameter is a list of comma-separated pairs of usernames/passwords with no spaces between them. You can supply just one username/password pair. You only need multiples if you have a multiple sets of books architecture installation. priv_schema (required) <no default> Specify a schema having DBA privileges, along with its password. You may specify the APPS schema or some other schema with DBA privileges as SYSTEM. odffile (required) <no default> The name of the object descriptor file (file extension .odf) to compare. userid (required) <no default> The Oracle username/password for the products base schema. This is the schema where the product tables, indexes and sequences are located. changedb (opt) No Set to yes to change the database objects to match the definitions in the object descriptor files. Customizations are not affected because the utility does not delete objects not found in the ODF. Using the default, No, will not make any changes only produce a log file indicating what changes need to be made. alternext (opt) No Specifies whether to alter the next extent (No, Yes, Force). Yes changes the next extent size of a table if current next extent size is less than that specified in the ODF. Force changes the next extent size regardless of the current value.

defer (opt) <no default> Provides a list of indexes to change later. Delays index creation when mode=tables. You must run adodfcmp again later with mode=indexes to create the deferred indexes. logfile (opt) adodfcmp.log Specifies the name of the log files containing the comparison results. Reused log files are appended not overwritten. The log file resides in the directory where you start the utility if a specific directory patch is not specified. You must have write permission for the directory. sizingfactor (opt) 100 Sets the sizing factor at which the utility creates missing objects. See: Sizing Factor, Oracle Applications Concepts. tspace (opt) SYSTEM Sets the tablespace for tables created by the utility. indextspace (opt) SYSTEM Sets the tablespace for indexes created by the utility. listextra (opt) No Set listextra=yes to report extra objects. listmatch (opt) Yes Specify listmatch=no to prevent the utility from reporting objects that match their descriptions. listmissing (opt) Yes Specify listmissing=no to make the utility ignore missing objects. batchsize (opt) 1000 Determines the number of rows to update at a time when populating new columns. oldviews (opt) replace Use to rename, drop, replace views that do not match their descriptions. oldviews=rename to change the names of non-matching views to R115_<view name> and create new views from the ODF. oldviews=drop to delete nonmatching views and recreate them according to the ODF. oldviews=replace works the same as oldviews=drop except the existing grants and synonyms are preserved when re-creating the views.

Typing adodfcmp without any parameters produces the following parameter listing:
Copyright (c) 1998 Oracle Corporation Redwood Shores, California, USA ODF (Object Description File) Comparison Utility Version 11.5.0 NOTE: You may not use this utility for custom development unless you have written permission from Oracle Corporation. Usage: adodfcmp keyword=value [,keyword=value,...] Valid Keywords: userid mode odffile touser priv_schema logfile changedb listmissing listmatch listextra sizingfactor tspace indextspace alternext batchsize oldviews defer rel106mode parfile -------------------ORACLE username/password to be compared with ODF file Type of objects to compare File name of ODF file to use Userid to grant to [or list of APPS schemas] ORACLE username/password with DBA privileges File name of log file (Default adodfcmp.log) Automatically change the database? (Default No) Report missing objects? (Default Yes) Report matching objects? (Default Yes) Report extra objects? (Default No) Sizing factor to apply (Default 100) Tablespace to store tables Tablespace to store indexes Alter next extent [No, Yes, Force] (Default No) How many rows to update at a time (Default 1000) Replace,rename,or drop existing views (Default replace) List of indexes to process later [if any] Run in 10.6.0 compatible mode (Default No) Filename of a parameter file [if any] (Default NONE)

You can specify command-line parameters either by position or by keywords.

Partial log file example:


************* Start of ODF Comparison Utility session ************* ODF Comparison Utility version: 11.5.0 ODF Comparison Utility started at: Fri Feb 23 2001 09:52:43 Connecting to APPS......Connected successfully. Reading objects from ODF file Reading Reading Reading Reading Reading view view view view view MTL_SYSTEM_ITEMS_FKEYS_V ... MTL_ITEM_ATTRIBUTE_VALUES_V ... MTL_SYSTEM_ITEMS_FVL ... MTL_SYSTEM_ITEMS_VL ... MTL_ITEM_ATTR_APPL_INST_V ...

*** Reading views from APPS schema Reading Reading Reading Reading Reading view view view view view MTL_ITEM_ATTRIBUTE_VALUES_V ... MTL_ITEM_ATTR_APPL_INST_V ... MTL_SYSTEM_ITEMS_FKEYS_V ... MTL_SYSTEM_ITEMS_FVL ... MTL_SYSTEM_ITEMS_VL ...

******************************************************* The definition of the view MTL_SYSTEM_ITEMS_FKEYS_V is incorrect. The view text is incorrectly defined as: SELECT MSI.INVENTORY_ITEM_ID , MSI.ORGANIZATION_ID , ORG3.ORGANIZATION_CODE, . . . . . . . . . . . . . . . . . .

--Details left out


Correct it with the statements: Start time for statement below is: Fri Feb 23 2001 09:53:15 CREATE OR REPLACE FORCE VIEW APPS.MTL_SYSTEM_ITEMS_FKEYS_V ("INVENTORY_ITEM_ID", "ORGANIZATION_ID", "ORGANIZATION_CODE", . . . . . . . . . . . . . . . . . . . . . . . . .

--Details left out


ODF Comparison Utility is complete. You should check the file /path/of/log/file for errors.

The changedb parameter set to yes will create the missing objects automatically. When set, the message in the log file after the CREATE . . . . will be:
Statement Executed.

EXAMPLES: General Syntax: adodfcmp odffile=<filename> userid=<username>/<password> \ mode=<mode> priv_schema=<DBA schema username>/<DBA schema password> \ touser=<APPS schema name>/<APPS schema password> \ [,<second APPS schema name>/<second APPS schema password>,] \ changedb=yes 1. Make a comparison of the views in invit1g.odf for the APPS and APPS2 schemas. Do not change the database. Create a log file called mylogfile.log in the users home directory. adodfcmp odffile=invit1g.odf userid=inv/inv changedb=no \ priv_schema=system/manager mode=views touser=apps/apps,apps2/apps \ logfile=$HOME/mylogfile.log 2. Make a comparison of the tables and grants in invite1.odf. Do not compare the indexes. Make changes to the database. Create the default log file (adodfcmp.log) in the current directory. adodfcmp odffile=invite1.odf userid=inv/inv changedb=yes \ priv_schema=system/manager mode=noindexes touser=apps/apps 3. Make a comparison of the indexes in wshtab.odf. Make changes to the database. Create a log file called wshtab.log in the current directory. adodfcmp odffile=wshtab.odf userid=wsh/wsh changedb=yes \ priv_schema=system/manager mode=indexes touser=apps/apps \ logfile=wshtab.log

You might also like