天天看點

r12.2——adop簡介

機制:

安裝更新檔時,你既可以讓adop提示資訊指導你安裝,也可以直接輸入需要的資訊而不需要adop提示。

——讀取patch中繼資料,擷取更新檔的dependencies和requirements。

——如果這個更新檔可以安裝,從之前的更新檔session裡上傳更新檔資訊到資料庫。

——讀取并驗證更新檔drivers檔案,讀取産品drivers檔案

——從産品庫和已經存在的檔案的版本資訊中,和這個更新檔,對比對象模式的版本号。

——備份所有将要被此更新檔改變的檔案。

——拷貝檔案。(詳細資訊見下文)

——歸檔libraties裡的檔案。

——Relinksexecutables

——生成forms,reports,messages,graphics,和所有java archive(jar)檔案。

——編譯jsp檔案和資料庫無效對象。

——更新資料庫對象

——如果有任何的template檔案被該更新檔引進或者更新,運作autoconfig根性配置檔案。

——儲存更新檔資訊到資料庫

注意以下幾點:

adop永遠是從 run edition file system中運作,他自動設定自己正确的環境。

如果更新檔沒有包含新的更新檔案和資料庫對象,adop不做任何動作

如果adop檢測到一個之前的失敗的更新檔session,他會去嘗試恢複那個session。

我們接續說說上文标紅的拷貝檔案的詳細過程:

1、首先從ebs已安裝的産品的 C library中抽取對應的檔案。

2、把抽取出的檔案對象子產品和更新檔目錄裡的相應的檔案做比較,當然,除了C library檔案還有forms,reports,sql腳本檔案。

3、在更新檔目錄下備份ebs産品裡需要替換的檔案,舉個例子:1234567是更新檔目錄;VIS是applications system名字;/u01/test/apps/fs1/EBSapps/appl/是APPL_TOP;GL是要打更新檔的産品。那麼,這個備份會從:

GL/子目錄/要替換的檔案   to     1234567/backup/VIS/vs022/gl/patch/115/要替換的檔案

<PROD>_TOP/<subdir(s)>/<old_file_name>

to

<patch_dir>/backup/<system_name>/<appl_top_name>/<prod>/<subdir(s)>/<old_file_name>

4、用更新檔目錄裡的新檔案,替換産品目錄下的舊檔案。

5、在C library裡裝載新的對象子產品。

6、relink這個産品到作業系統,oracle server,還有其他oracle 産品庫。

7、如果需要,修改java class檔案,生成JAR檔案。

8、複制指定的HTML和media檔案到指定産品目錄

9、如果JSP檔案被包含在patch檔案裡,編譯過時的JSP檔案。

:資料庫部分:

1、獲得apps schema下的目前所有無效對象的清單。

2、Determines whether the action was performed in a previous patch

3、Runs SQL scripts and EXEC commands, which change Oracle E-Business Suitedatabase objects. By default, adop runs scripts and commands in parallel.

4、 Compiles invalid objects in the database.

5、Assembles a list of current invalid objects in the APPS schema.

Generate Portion of a Unified Driver

Apply the generate portion of a unified driver on all APPL_TOP directories containing

one or more files being generated by the patch. When the generate portion of a driver

runs, adop performs these actions:

• Generates Oracle Forms PL/SQL library files

• Generates Oracle Forms menu files

• Generates Oracle Forms executable files

• Generates Oracle Reports PL/SQL library files

• Generates Oracle Reports files

• Generates message files

• Generates Oracle Workflow resource files

adop的參數:

有必須的,也有可選的,有一些參數能覆寫别的參數,有一些有更高的優先級,所有的參數的格式都是:name=values。

phase——用來告訴adop他該運作那個階段,包括:prepare,apply,cutover,cleanup,finalize,actualize_all,fs_clone,abort。傳參數運作的時候,可以用逗号隔開,指定多個階段,fs_clone和abort這倆階段不能和其他的階段一起。(abort表示退出之前失敗的session,這樣之前session的參數就沒有了,可以進行新的cycle了,我用了一次:adop phase=abort)

cleanup_mode:清除程序的控制,有full和quick兩個參數值,full是最大清理,包括删除被覆寫的對象,沒有用到的列;quick是最小化的清理,占用的時間少,預設值。

finalize_mode:用來指定finalize或者cutover階段應當被設定成full還是quick。full的時候收集統計資訊,以幫助提高性能,如果設定成這個finalize過程至少的用一個小時,quick模式不生成統計資訊,預設值。

patches:指定adop要應用的更新檔,有兩種方式:一種是隻有一串數字的那種目錄;還有一種是有冒号加驅動的,一般是:HRMS Legislative(立法的)data patch、online help 更新檔、語言更新檔。。。如中文更新檔包:patches=10124646_ZHS:u10124646.drv

workers:指定并行workers的數量。

patchtop:預設位置:/u01/test/apps/fs_ne/EBSapps/patch不過你也可以自己指定。

abandon:指定是否重新開機之前運作的adop,如果之前運作的有錯誤(因為如果之前的adop有錯誤,abandon如果沒有被設定為yes,那上次的錯誤的參數會被用到本次運作),那就可以用它。取值:yes/no  。

restart:也是指定是否重新開機之前運作的adop,如果之前運作的有錯誤。restart和abandon的差別是,restart是接着上次失敗的地方往下打,abandon是放棄上次的,這次從頭開始打。

這兩個參數必須同時出現而且必須是一個yes另一個no(mtP85):

abandon=no restart=yes  will retry a patching operation

abandon=yes restart=no   will not retry a patching operation

action:用來指定是否運作資料庫cations,取值:db/nodb 。 action=nodb用來關閉資料庫的actions,如果在多節點環境中,adop已經更新了資料庫,但是你仍然更新檔案系統到别的節點,這就非常有用了。

在多節點環境下,如果設定了allnodes=yes,那action=db也要設定。

autoskip:用來在非互動模式的更新檔下,控制是否提示使用者關于跳過的actions,預設值是yes 。。。。一個腳本叫:ADZDPATCHSTAT.sql在finalize階段,給出更新檔的狀态資訊:SUCCESS,SKIPPED and SUCCESS, SKIPPED, FAILED四種。

Examples:

phase=prepare,apply,finalize,cutover,cleanup

patches=123456

workers=4

相關日志位置:

r12.2——adop簡介
r12.2——adop簡介

其他一些日志如記錄并行workers所有動作的worker log也放在s_ne_base下面:/u01/test/apps/fs_ne/EBSapps/log/adop

ad log 檔案:

adrelink.log   ——used for  Relinking

adlibin.log   —— used for Moving C object files into the C library of a product 

adliboutlog   —— used for Moving C object files out of the C library of a product

adworkxxx.log  —— used for Database operations run in parallel

<language>_<filename>_ldt.log      ——used for loader files

舉例:

一般adop完成一個更新檔需要如下階段:prepare、apply、finalize、cutover、cleanup

比如你目前運作在fs1上,打一個更新檔15955263:

 adop phase=prepare 準備階段

 adop phase=finalize,cutover,cleanup workers=6

這時經過cutover過程後,應用會切換到fs2上。

到下次再進行打更新檔的時候,運作prepare過程會把目前fs2檔案系統(因為在之前patch15955263你打在了fs2上)同步給fs1(這個時候fs1系統上就有patch 15955263了)。

然後你可以繼續apply下一個更新檔。有時候為了友善,我們可以一次apply好多個更新檔,然後再cutover切換檔案系統。這樣節省檔案系統來回切換的過程。

問答:

What are the phases that make up the Online Patching cycle?

The Online Patching cycle consists of the following phases:

Prepare a virtual copy (patch edition) of the running application (run edition).

Apply patches to the patch edition of the application.

Finalize the system in readiness for the cutover phase.

Cutover to the patch edition and make it the new run edition.

Cleanup obsolete definitions or data to recover space

What downtime is required during an Online Patching cycle?

The cutover phase requires a short period of downtime (typically a few minutes) for transition tasks such as a restart of the application tier services

How does Online Patching work on the application tier?

During Release 12.2 installation, Rapid Install will lay down two copies of the application tier file system. One of the copies will be labeled as therun file system, and the other as thepatch file system.Subsequently, when a patch is applied, adop will:

Synchronize the contents of the run file system to the patch file system. This happens during theprepare phase.(在prepare階段,同步run file system 到patch file system)

Perform patching actions on the patch file system. This happens during theapply phase.

Finally, during the cutover phase, the adop utility restarts the application tier services. The patch file system is then promoted to be the new run file system, and the old run file system becomes the patch file system for the next patching cycle.

Note that a third file system, the non-editioned file system (fs_ne), is created to store files containing data that is needed across all file systems,such as log files.

Is it possible to abort an Online Patching session?

Yes. Up to cutover, you can run the abort phase to undo the changes made so far in the patching cycle. It is not possible to back out patches once cutover is complete. 

How does adop work in a multi-node environment?

The adop Online Patching tool uses remote APIs and ssh login to execute patching operations on remote nodes in a multi-node environment. The node that launches adop becomes the ‘master’ node, and the remote nodes are referred to as ‘slaves’. 如果應用層services是down的,那麼adop可以照常運作,adop還可以在有需要的時候啟動這些應用層的services。

Will AutoConfig and adadmin maintenance tasks such as adrelink be performed online?

Yes, these maintenance tasks will be performed online. The relevant operations will be targeted to the patch file system, and should be performed during a patching cycle. They will not have any impact on the run file system.