Linux下DB29.7.0.5升級9.7.0.7測試
當前資料庫版本:
[db2inst2@localhost ~]$ db2level
DB21085I Instance "db2inst2" uses "32" bits and DB2 code release "SQL09075"
with level identifier "08060107".
Informational tokens are "DB2 v9.7.0.5", "s111017", "IP23291", and Fix Pack
"5".
Product is installed at "/opt/ibm/db2/V9.7_01".
例項中只存在一個示例資料庫:
[db2inst2@localhost ~]$ db2 list db directory
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/db2inst2
Database release level = d.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
資料庫中表空間:
[db2inst2@localhost SAMPLE]$ db2 list tablespaces
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 1
Name = TEMPSPACE1
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 2
Name = USERSPACE1
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 3
Name = IBMDB2SAMPLEREL
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 4
Name = IBMDB2SAMPLEXML
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 5
Name = SYSTOOLSPACE
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 6
Name = SYSTOOLSTMPSPACE
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 7
Name = TEST
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
表空間TEST有表:
[db2inst2@localhost ~]$ db2 "select tabname,tbspaceid,tbspace from syscat.table
s where tbspace='TEST'"
TABNAME TBSPACEID TBSPACE -------------------------------------
T1 7 TEST
1 record(s) selected.
表t1中有資料:
[db2inst2@localhost ~]$ db2 "select * from t1"
ID NAME
----------- ----------
1 a
2 b
3 c
4 d
4 record(s) selected.
下面打補丁:
解壓後的補丁包如下:
[db2inst2@localhost db2pack]$ ls
server v9.7fp7_linuxia32_server.tar.gz
停止例項:
[db2inst2@localhost ~]$ db2 force applications all
DB20000I The FORCE APPLICATION command completed successfully.
DB21024I This command is asynchronous and may not be effective immediately.
[db2inst2@localhost ~]$ db2stop
2012-12-25 15:30:33 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
DAS不屬於要更新的DB2副本:
[root@localhost bin]# ./db2daslevel
DB21089I DB2 Administration Server "dasusr" uses DB2 code release "DB2 v9.7.0.7" with level identifier "08080107". Informational tokens are "s121002", "IP23373", and Fix Pack "7". Product is installed at "/opt/ibm/db2/V9.7/das".
安裝修訂包:
[root@localhost server]# ./installFixPack -b /opt/ibm/db2/V9.7_01/
安裝後檢查:
[root@localhost server]# su - db2inst2
[db2inst2@localhost ~]$ db2level
DB21085I This instance or install (instance name, where applicable:
"db2inst2") uses "32" bits and DB2 code release "SQL09077" with level
identifier "08080107".
Informational tokens are "DB2 v9.7.0.7", "s121002", "IP23373", and Fix Pack
"7".
Product is installed at "/opt/ibm/db2/V9.7_01".
[db2inst2@localhost ~]$ db2start
12/25/2012 16:34:31 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
[db2inst2@localhost ~]$ db2 list db directory
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/db2inst2
Database release level = d.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
[db2inst2@localhost ~]$ db2 connect to sample
Database Connection Information
Database server = DB2/LINUX 9.7.7
SQL authorization ID = DB2INST2
Local database alias = SAMPLE
[db2inst2@localhost ~]$ db2 list tablespaces
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 1
Name = TEMPSPACE1
Type = System managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 2
Name = USERSPACE1
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 3
Name = IBMDB2SAMPLEREL
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 4
Name = IBMDB2SAMPLEXML
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 5
Name = SYSTOOLSPACE
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 6
Name = SYSTOOLSTMPSPACE
Type = System managed space
Contents = User Temporary data
State = 0x0000
Detailed explanation:
Normal
Tablespace ID = 7
Name = TEST
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
[db2inst2@localhost ~]$ db2 "select * from t1"
ID NAME
----------- ----------
1 a
2 b
3 c
4 d
4 record(s) selected.
[db2inst2@localhost ~]$ db2 "delete from t1 where id=4"
DB20000I The SQL command completed successfully.
[db2inst2@localhost ~]$ db2 "select * from t1"
ID NAME
----------- ----------
1 a
2 b
3 c
3 record(s) selected.
[db2inst2@localhost ~]$ db2 "insert into t1 values(4,'d')"
DB20000I The SQL command completed successfully.
[db2inst2@localhost ~]$ db2 "select * from t1"
ID NAME
----------- ----------
1 a
2 b
3 c
4 d
4 record(s) selected.
[db2inst2@localhost ~]$ db2 "update t1 set name='e' "
DB20000I The SQL command completed successfully.
[db2inst2@localhost ~]$ db2 " select * from t1"
ID NAME
----------- ----------
1 e
2 e
3 e
4 e
4 record(s) selected.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25744374/viewspace-751614/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 遷移式升級的測試
- Linux下平滑升級nginxLinuxNginx
- linux下node升級(apt)LinuxAPT
- oracle upgrade 升級前測試,升級後穩定計劃Oracle
- 遷移式升級的測試(二)
- 遷移式升級的測試(三)
- 【版本升級】PerfDog新增多維度測試報告對比功能、iOS電量測試功能升級測試報告iOS
- 淺談測試生涯如何轉型升級
- 執行database replay進行升級測試Database
- iOS10 beta測試版升級方法iOS
- Linux環境下如何升級openssl?Linux
- 11g SPA SQL Performance Analyzer升級測試SQLORM
- 手工測試如何打破壁障轉型升級
- Linux環境下CRS升級到10.2.0.4.2 Database升級到10.2.0.4.3LinuxDatabase
- iOS12測試版升級常見問題 iOS12值得升級嗎?iOS
- PR效能測試工具升級到全鏈路效能測試與分析平臺
- 本地測試Http升級到Https(證書信任)HTTP
- Windows 硬體徽標認證測試要求升級Windows
- linux 核心升級步驟,kernel升級Linux
- iOS12最新測試版升級教程 iOS12 beta2怎麼升級?iOS
- Linux下磁碟I/O測試Linux
- Linux升級GCCLinuxGC
- Linux核心升級Linux
- Windows下升級JDKWindowsJDK
- 測試物件和測試級別物件
- JB的測試之旅-Linux下配置Linux
- Linux下使用Speedtest測試網速Linux
- Linux測試上行和下載速率Linux
- 測試環境的遷移式升級和資料整合
- Linux openssh升級8.0Linux
- Linux升級PythonLinuxPython
- LINUX核心升級 (轉)Linux
- LINUX核心升級(轉)Linux
- kali linux升級記Linux
- linux下oracle RAC10.2.0.1升級到10.2.0.4LinuxOracle
- windows下升級nodejsWindowsNodeJS
- Linux下使用壓力測試工具stressLinux
- 在Linux下測試磁碟的I/OLinux