1. 程式人生 > >EBS中odf檔案和xdf檔案解釋

EBS中odf檔案和xdf檔案解釋

原地址:https://blog.csdn.net/cymm_liu/article/details/47947991

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用法

[[email protected] odf]$ cd $INV_TOP/patch/115/odf/
[[email protected] 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 ?


--------------------- 
作者:長煙慢慢 
來源:CSDN 
原文:https://blog.csdn.net/cymm_liu/article/details/47947991?utm_source=copy