文/A.Lang (alang[dot]hsu[at]gmail[dot]com) *轉貼時請註明作者*
工作說明:在 Linux 上建立一個全新的 Database 後,需作更新與 Production DB 相同。
系統環境說明:
Original DB> DB2 v7.1.0.93, s031208 on AIX 5.2
New DB> DB2 v7.1.0.40, s010415 on SuSE Linux Enterprise Server 9
步驟一:檢查 DB2 版本資訊
#su - <instance-user>
#db2level
For original DB :
DB21085I Instance "db2dev1" uses DB2 code release "SQL07029" with level
identifier "030A0105" and informational tokens "DB2 v7.1.0.93", "s031208" and
"U495913".
For New DB :
DB21085I Instance "db2dev" uses DB2 code release "SQL07020" with level
identifier "03010105" and informational tokens "DB2 v7.1.0.40", "s010415" and
"U475381".
步驟二:前往 IBM 官網,並依上述藍粗體的關鍵字及作業平台選擇下載需要的更新檔。
http://www-306.ibm.com/software/data/db2/udb/support/
步驟三:從下載的檔案中,請先閱讀 ReadMe 安裝說明檔,尤其更新的 level 差很多版本時,需注意先後的順序。例如這一段
2.1 Prerequisites
You must have:
a Korn shell installed before installing DB2 on Linux.
ncurses version 4 installed before installing DB2 for Linux. Contact your
Linux vendor for more information.
DB2 UDB Version 7.2 or DB2 UDB Version 7.1 with FixPak 3 or greater already
installed before installing this FixPak
To determine if the required prerequisites are installed, issue the following
command:
rpm -qa | grep db2
The output of the command should include the following:
db2cliv71-7.1.0-x
where "x" is the fix level, and is 40 or higher.
步驟四:安裝前的事項
$su - <iname>
$db2 force applications all
$db2 terminate
$db2stop
$exit
步驟五:開始安裝
#su - root
#cd <patchspath>
#./installFixPak
where <patchspath> is the top directory in which the FixPak image is located
步驟六: 安裝後的事項
Updating instance
#/usr/IBMdb2/V7.1/instance/db2iupdt <iname>
Rebinding to DB2 Database
$db2 terminate
$db2 connect to <dbname>
cd ~/sqllib/bnd
$db2 bind @db2ubind.lst BLOCKING ALL GRANT PUBLIC
$db2 bind @db2cli.lst BLOCKING ALL GRANT PUBLIC
$db2 terminate
步驟完成