如果使用 Apache Derby 的 UDDI 資料庫是以 WebSphere® Application Server 6.1 版或更早版本建立,而現在使用 Apache Derby 10.2 版或更新版本,您需要移轉資料庫。
如果 UDDI 資料庫使用其他任何支援的資料庫,包括 Apache Derby 10.2 版以前的 Apache Derby 版本,您不需要執行此程序。
開始之前
移轉 WebSphere Application Server 安裝;確保您選擇要移轉應用程式,以便移轉 UDDI 登錄應用程式。
關於這項作業
如果 UDDI 資料庫目前使用 Apache Derby 10.2 版或更新版本,請使用此程序。在這一版產品中,這類資料庫與 Apache Derby 10.3 版搭配使用。
如果使用 Apache Derby 的 UDDI 資料庫是以 WebSphere Application Server 6.1 版或更早版本建立,而且您將伺服器升級到現行層次的產品,您通常需要移轉資料庫。
如果您不移轉資料庫,當您嘗試將商業實體儲存在現行層次產品上執行的 UDDI 登錄中,而登錄使用 Apache Derby 10.2 版時,將會發生下列錯誤:
處理要求時發生嚴重的技術錯誤。
程序
- 確定任何使用 UDDI 資料庫的伺服器已停止。
- 使用下列指令啟動 Apache Derby 命令提示字元:
WAS_HOME/derby/bin/embedded/ij
- 在命令提示字元下執行下列指令。替換 CONNECT 陳述式中的 UDDI 資料庫位置。
connect 'WAS_HOME/profiles/profileName/databases/com.ibm.uddi/UDDI30';
drop trigger ibmudi30.tr_upd_busallsvc_p;
create trigger ibmudi30.tr_upd_bservice_p
after update of businesskey on ibmudi30.bservice
referencing old as old_real_service
new as new_real_service
for each row mode db2sql update ibmudi30.busallservice
set ibmudi30.busallservice.owningbusinesskey = new_real_service.businesskey
where ibmudi30.busallservice.servicekey = new_real_service.servicekey
and ibmudi30.busallservice.owningbusinesskey != ibmudi30.busallservice.businesskey;
exit;
- 重新啟動使用 UDDI 資料庫的伺服器。