創(chuàng)建 DB2 目標數(shù)據(jù)庫
運行此工具需要連接目標數(shù)據(jù)庫,所以必須首先創(chuàng)建這個數(shù)據(jù)庫。在 DB2 V9.7上,建議使用默認的自動存儲并選擇 32KB 頁面大小。在 DB2 V9.7上啟用應用程序時,實例和數(shù)據(jù)庫必須處于兼容模式。還建議調(diào)整舍入行為以匹配 Oracle。通過把重新驗證語義(revalidationsemantics)設(shè)置為 deferred_force,可以不按依賴次序部署對象。
在 UNIX 系統(tǒng)上 $ db2set DB2_COMPATIBILITY_VECTOR=ORA $ db2set DB2_DEFERRED_PREPARE_SEMANTICS =YES $ db2stop force $ db2start $ db2 "create db testdb automatic storage yes on /db2data1, /db2data2,/db2data3 DBPATH ON /db2system PAGESIZE 32 K" $ db2 update db cfg for testdb using auto_reval deferred_enforce $ db2 update db cfg for testdb using decflt_rounding round_half_up 在 Windows 系統(tǒng)上 C:\> db2set DB2_COMPATIBILITY_VECTOR=ORA C:\> db2set DB2_DEFERRED_PREPARE_SEMANTICS=YES C:\> db2stop force C:\> db2start C:\> db2 "create db testdb automatic storage yes on C:,D: DBPATH ON E: PAGESIZE 32 K" C:\> db2 update db cfg for testdb using auto_reval deferred_enforce C:\> db2 update db cfg for testdb using decflt_rounding round_half_up
提取對象和數(shù)據(jù)
在運行此工具之前,應該準備好源數(shù)據(jù)庫和 DB2 服務器的以下信息: 源數(shù)據(jù)庫和 DB2 服務器的 IP 地址或主機名 要連接的端口號 需要的數(shù)據(jù)庫名、SID、子系統(tǒng)名等等 在源數(shù)據(jù)庫上有 DBA 特權(quán)的用戶 ID 此用戶的密碼 源數(shù)據(jù)庫和 DB2 JDBC 驅(qū)動程序的位置 將存儲數(shù)據(jù)的空間或卷/掛載點信息
在 Windows 上運行 IBMDataMovementTool.cmd,或在 UNIX 上運行 ./IBMDataMovementTool.sh。如果服務器能夠顯示圖形,此工具會啟動一個 GUI。否則,它會切換到交互式命令行模式。
在 Windows 上:IBMDataMovementTool.cmd 在 UNIX 上:
./IBMDataMovementTool.sh 現(xiàn)在會看到一個 GUI 窗口。shell 窗口中還應該出現(xiàn)一些消息。在開始使用 GUI 之前,請看一下這些消息,確認沒有錯誤。
如果沒有設(shè)置 DB2_COMPATIBILITY_VECTOR,此工具會報告一個警告。請按以下步驟設(shè)置兼容向量(如果還沒有這么做的話)。
[2009-05-15 12.48.59.218] INPUT Directory = . [2009-05-15 12.48.59.218] Configuration file loaded: 'jdbcdriver.properties' [2009-05-15 12.48.59.218] Configuration file loaded: 'IBMExtract.properties' [2009-05-15 12.48.59.218] appJar : 'C:\Vikram\Prospects\DB2Cobra\IBMDataMovementTool.jar' [2009-05-15 12.49.01.000] * WARNING *. I did not detect DB2_COMPATIBILITY_VECTOR set for compatibility mode. [2009-05-15 12.49.01.000] To set compatibility mode, discontinue this program and run the following commands [2009-05-15 12.49.01.000] db2set DB2_COMPATIBILITY_VECTOR =ORA [2009-05-15 12.49.01.000] db2stop force
以上的相關(guān)內(nèi)容就是對把應用程序輕松地從 Oracle 遷移到 DB2 V9.7的介紹。
本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報。