EBS中odf文件和xdf文件解释

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://llovewxm1314.blog.csdn.net/article/details/47947991

参考文档:http://blog.csdn.net/pan_tian/article/details/7814422          http://blog.csdn.net/pan_tian/article/details/8643501

1、ODF

odf(Object Descriptor File),里边含有数据库对象的描述,用于创建数据库表,视图,索引等等。

除了打patch可以打odf文件,我们还有个手工打odf的工具叫做ADODFCM($AD_TOP/bin下),名字拆开比较好记,AD表示Admin,ODF表示Object Descriptor File,CM表示Compilation。

应用场景,比如发现数据库某张表没有被创建,但odf文件其实是有定义的,这个时候打patch比较麻烦,可以考虑使用ADODFCM


odf文件的位置

$PROD_TOP/patch/115/xxx.odf


adodfcmp用法

[oracle@bej301441 odf]$ cd $INV_TOP/patch/115/odf/
[oracle@bej301441 odf]$ adodfcmp odffile=invslig.odf userid=inv/inv changedb=yes priv_schema=system/manager mode=indexes touser=apps/apps logfile=invtab.log


adodfcmp parameters

parameters are required: mode, touser, priv_schema, odffile, userid
mode (required) :Determines the type of objects to compare against the ODF.Example tables,indexes
touser (required) : Specifies the Oracle username/password of the Oracle Applications product to grant to. In Release 11i/R12 this is usually APPS schema.
priv_schema (required) :Specify a schema having DBA privileges, along with its password. You may specify the SYSTEM schema
odffile (required) : The name of the object descriptor file (file extension .odf) to compare.
userid (required) :The Oracle username/password for the product’s base schema. This is the schema where the product tables, indexes and sequences are located for example inv/inv
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 anychanges only produce a log file indicating what changes need to be made.


Sample Log

************* Start of ODF Comparison Utility session *************
ODF Comparison Utility version: 12.0.0
ODF Comparison Utility started at: Tue Jul 31 2012 00:21:00

Connecting to SYSTEM......Connected successfully.

Connecting to APPS......Connected successfully.

Reading objects from ODF file

Reading table MTL_CLIENT_PARAMETERS ...
Reading table MTL_TXNS_HISTORY ...
Reading table MTL_BILLING_SOURCES_B ...
Reading table MTL_BILLING_SOURCES_TL ...
Reading table MTL_BILLING_RULE_HEADERS_B ...
Reading table MTL_BILLING_RULE_HEADERS_TL ...
Reading table MTL_BILLING_RULE_LINES ...
Reading table MTL_3PL_LOCATOR_OCCUPANCY ...
Reading table MTL_ADJUSTMENT_SYNC_TEMP ...
Reading table MTL_LSP_ONHAND_BALANCE_TMP ...

....

....

...

Start time for statement below is: Tue Jul 31 2012 00:21:03

ALTER TABLE INV.MTL_LSP_ONHAND_BALANCE_TMP STORAGE (FREELISTS 4)

Statement executed.


ODF Comparison Utility is complete.

You should check the file
/u01/oracle/instance/apps/apps_st/appl/inv/12.0.0/patch/115/odf/invtab.log
for errors.


2、xdf

关于odf文件,写过一篇笔记,见:Oracle Apps ADODFCMP Utility, xdf和odf类似,都是数据库对象的描述文件,用于数据库表,视图,索引等等在不同数据库间的移植。根据NOTE:551325.1的说法,xdf将会逐步取代过去的odf,毕竟xdf的xml格式还是要比文本格式的odf有方便处理些。


xdf对应的执行文件是$JAVA_TOP/oracle/apps/fnd/odf2/FndXdfCmp(一java文件)

odf对应的执行文件是$AD_TOP/bin/adodfcmp(脚本语言)


xdf文件放在一般在patch/115/xdf目录下

而odf一般在patch/115/odf/下


xdf包含两个组件:FndXdfGen从源头数据库,生成对应的xdf对象;FndXdfCmp在目标数据库中执行xdf文件。


FndXdfCmp命令的使用

Usage of the Java Utility FndXdfCmp :

adjava -mx512m -nojit oracle.apps.fnd.odf2.FndXdfCmp <Oracle_Schema> <Oracle_Password> \
<apps_schema> <apps_password> <jdbc protocol> <JDBC_Connect_String> <Object Type> \
<full path to xdf file> <full path of $FND_TOP/patch/115/xdf/xsl>

possible Object Types are :
table, mview, view, synonym, index, trigger, comment, context, mviewlog, qtable, sequence, type, queue, policy, all

Mandatory Arguments :

  • Oracle_Schema : ORACLE schema name of the EBS module, e.g. FND, AD, GL, MFG.
  • Oracle_Password : ORACLE schema password of EBS module.
  • JDBC_Connect_String : The JDBC connection string to connect to the Database. It must include the <hostname>:<DB_Port>:<SID>

Optional Parameters

  • apps_schema / apps_password : The APPS schema name and APPS shcema password needs to be specified if it is not the default value of apps/apps.
  • ChangeDb : This Parameter inidcates, if the object definitions are written to the Database. Possible values are y / n (Default is y)
  • Logfile : The output is written to standard out. Specify a logfile name if it has to be written to a log file.
  • Data_Sec_Vpd : This is used to specify that a service security synonyms or view has to be created dynamically based on the database version. If the database version is 9 then a synonym is created else a view is created. Permitted values are data_sec_vpd=y
Example :
cd $FND_TOP/patch/115/xdf
adjava -mx512m -nojit oracle.apps.fnd.odf2.FndXdfCmp fnd <Password> apps <Password> thin \
<hostname>:<db_port>:<db_sid> all fnd_usr_roles.xdf $FND_TOP/patch/115/xdf/xsl

Reference:Metalink Note 551325.1 - How to verify or create a Database Object using a odf (adodfcmp) or xdf (FndXdfCmp) file ?





展开阅读全文

没有更多推荐了,返回首页