db2 9.5 linux, unix windowspublic.dhe.ibm.com/ps/products/db2/info/vr95/pdf/... · bourne (sh),...
TRANSCRIPT
DB2 �� 9.5Linux, UNIX � Windows�
DB2 Servers� �� ��
�� 9 ��� 5
GA30-3481-00
���
DB2 �� 9.5Linux, UNIX � Windows�
DB2 Servers� �� ��
�� 9 ��� 5
GA30-3481-00
���
�!
� ��� � ��� ���� ��� ���� ��, 301 ���� �� C ������� �� ��� �� ����.
��� ����
� ���� IBM� �� ��� �� ����. � ��� ���� ��� �� ����, �� �� ��� ����. � �
� ��� ��� ��� �� ��� ���� ��� � ����� ���� ��� ��� �� �� ���� ����.
IBM �� �� �� �� IBM ���� �� ��� � ����.
v �� �� �� �����, IBM Publications Center(www.ibm.com/shop/publications/order)� ������.
v �� IBM ���� ����, IBM Directory of Worldwide Contacts(www.ibm.com/planetwide)� ������.
�� �� ���� DB2 Marketing and Sales�� DB2 �� ����� 1-800-IBM-4YOU(426-4968)� ������.
IBM� ��� ���, IBM� ��� ��� ���� �� �� ��� ���� ���� ���� ��� ��� ��� ��
��� ��� � ����.
© Copyright International Business Machines Corporation 1993, 2007. All rights reserved.
��
� 1 � DB2 �� �� . . . . . . . . 1
� 1 � ���� �� . . . . . . . . . . . 3
DB2 � IBM ��� � ����� . . . . 3
DB2 �� ��� . . . . . . . . . . . . . 3
���� DB ���� �� . . . . . . . . 6
���� DB2 �� ��� �(Linux UNIX) 6
�� ��� DB2 �� ���� ��� � ��
� �� ID . . . . . . . . . . . . . . 6
DB2 �� ���� �� ��(Windows) . . . 7
DB2 ���� �� ��(Linux UNIX) . . 8
� 2 � �� ���� . . . . . . . . . . 11
�� �� ���� . . . . . . . . . 11
DB2 ��� �� Java ����� �� . . . . 12
DB2 � IBM ��� � ������ ��
�� ����(Windows) . . . . . . . . . . 14
DB2 � IBM ��� � ������ ��
�� ����(AIX) . . . . . . . . . . . 16
DB2 � IBM ��� � ������ ��
�� ����(HP-UX) . . . . . . . . . . 17
DB2 � IBM ��� � ������ ��
�� ����(Linux) . . . . . . . . . . . 21
DB2 � IBM ��� � ������ ��
�� ����(Solaris ��) . . . . . . . 24
� 3 � �� �� . . . . . . . . . . . . 27
� 4 � �� Windows ���� . . . . . . . 29
����� � � DB2 ��� �(Windows) 29
DB2 � �� ��� �� �� ��� ��
(Windows) . . . . . . . . . . . . . . 29
DB2 ��� ���� �� Windows� �� ��
��(Windows) . . . . . . . . . . . . . 33
���� DB2 �� �� ��(Windows) . . . 35
��� �� ��(Windows). . . . . . . . . 37
DB2 ��� �� �� ����(Windows) . . . 38
FCM(Fast Communications Manager) (Windows) 38
LDAP ��� ���� �� ��� ��� �
�(Windows) . . . . . . . . . . . . . . 39
�� � ��� �� �� �� ��� �
(Windows) . . . . . . . . . . . . . . 40
� 5 � �� Linux � UNIX ���� . . . . 41
� � ��� �� DB2 ��(Linux UNIX) 41
FCM(Fast Communications Manager)(Linux
UNIX) . . . . . . . . . . . . . . . . 42
DB2 ��� ��(Linux UNIX) . . . . . 42
�� �� ��� � ����(Linux UNIX) 44
Linux on zSeries� DB2 �� �� . . . . . . 44
DB2 ������ ��� �� �� ��� ID
�(Linux UNIX) . . . . . . . . . . 45
OS ��� �� ����(Linux UNIX) . . . 47
�� ����(Linux UNIX) . . . . . . . 48
�� ���� ��(HP-UX). . . . . . . . 48
�� �� �� ����(HP-UX) . . . . . . 49
�� ���� ��(Linux) . . . . . . . . 49
�� ���� ��(Solaris) . . . . . . . . 51
�� ���� ������ �� ���� ���
(Linux UNIX) . . . . . . . . . . . . 51
���� DB2 ��� �� �� �� ��(AIX) 51
ESE ������� �� ���� ��
� � ��(AIX) . . . . . . . . . . . 54
�� � ��� �� �� �� ��� �
(Linux UNIX) . . . . . . . . . . . 54
���� ������ ��� �� DB2 � ��
��� � . . . . . . . . . . . . . 56
NFS� � � � � (Linux UNIX). . . 65
� 6 � Linux �� UNIX�� �� CD ��
DVD ��� . . . . . . . . . . . . . . 67
CD �� DVD ��(AIX) . . . . . . . . 67
CD �� DVD ��(HP-UX) . . . . . . . 68
CD �� DVD ��(Linux) . . . . . . . . 68
CD �� DVD ��(Solaris ��) . . . . 69
� 7 � Windows �� . . . . . . . . . . 71
DB2 � �� �� ��(Windows). . . . . . 71
DB2 � ��(Windows) . . . . . . . . . 72
� � �� �� DB2 ��(Windows) . . . . 74
� 8 � Linux � UNIX �� . . . . . . . 81
DB2 � �� �� ��(Linux UNIX) . . . 81
�� ���� �� . . . . . . . . . . . . 82
DB2 �� ���� ���� DB2 � ��
(Linux UNIX) . . . . . . . . . . . 82
© Copyright IBM Corp. 1993, 2007 iii
��� ���� �� . . . . . . . . . . . 85
��� �� ��(Linux UNIX) . . . . . 85
�� ��� ��� �� � ���. . . . . 86
��� ��� �� . . . . . . . . . . . 87
DB2 ��� ��� ���� �� . . . . . 90
db2rfe� ���� ��� ���� �� �� �
� �� . . . . . . . . . . . . . . 91
� 9 � ���� ������ �� �� . . . . 95
���� ������ �� �� . . . . . . . 95
� ��� ���� �� � �� ������
��� � ��(Windows) . . . . . . . . . 97
�� �� � �� ������ �� ��
� (Windows) . . . . . . . . . . . . . 99
� 10 � �� �� �� . . . . . . . . . 101
� �� �� �� . . . . . . . . . . . 101
� �� ���� . . . . . . . . . . . 101
DB2 �� ���� ��� � �� � . . . 102
DB2 ��� � �� ��(Linux UNIX) 103
�� � ��� ���� � �� �
(Linux UNIX) . . . . . . . . . . 104
� ��� ���� DB2 �� ��(Linux
UNIX) . . . . . . . . . . . . . . 105
� ��� ���� ��� ��� � ��
������ ��� � ��(Linux
UNIX) . . . . . . . . . . . . . . 106
� �� � ��(Linux UNIX). . . . 107
DB2 ��� � �� ��(Windows) . . . . 108
DB2 �� ��� � �� ��� �� ��
�� ���(Windows) . . . . . . . . . 108
���� �� �� �� ��(Windows) 109
� �� �(Windows) . . . . . . . . 109
� ��� ���� DB2 �� ��
(Windows) . . . . . . . . . . . . . 110
Microsoft Systems Management Server(SMS)
� ���� DB2 �� �� . . . . . . . 111
� �� �� ���(Windows) . . . . . 118
� �� � ��(Windows) . . . . . . 119
���� ��� ���� � �� ��
(Windows) . . . . . . . . . . . . . 120
�� ��� �� � �� . . . . . . . . 120
� �� ��� . . . . . . . . . . . . 120
DB2 �� ��� ���(Linux UNIX) . . . 132
���� ���� ��� . . . . . . . . 133
��� �� �� DB2 ��� ��(Windows) 133
� �� �� �� DB2 ��� ��
(Windows) . . . . . . . . . . . . . . 134
� 11 � DB2 �� ��� �� . . . . . . 135
DB2 �� ��� �����(Linux UNIX) 135
DB2 �� ��� �����(Windows) . . . . 136
� 2 � �� ��� ��� �� ��
(Linux � UNIX) . . . . . . . . . . 139
� 12 � db2_install �� doce_install ���
���� DB2 �� ��(Linux � UNIX) . . . 141
� 13 � ���� ��� ���� DB2 �� �
�(Linux � UNIX) . . . . . . . . . . . 145
� 14 � �� � DB2 ��� ���� �� . . 149
DB2 ������ ��� �� �� ��� ID
�(Linux UNIX) . . . . . . . . . . 149
���� ������ ��� �� ��� ID
� . . . . . . . . . . . . . . . . 151
���� ������ ���� DB2 � ��
� �� �� ��� �(AIX) . . . . . . 151
���� ������ ���� DB2 � ��
� �� ��� �(HP-UX) . . . . . . . 153
���� ������ ���� DB2 � ��
� �� ��� �(Linux) . . . . . . . 154
���� ������ ���� DB2 � ��
� �� ��� �(Solaris ��) . . . 155
DB2 Administration Server(DAS) � . . . . 157
db2icrt� ���� �� � . . . . . . 158
DB2 ��� �� � . . . . . . . . . . 159
DB2 ��� �� TCP/IP �� �� . . . . 160
� 3 � DB2 �� �� �� � . . . . 163
� 15 � �� � . . . . . . . . . . . 165
� �� ���� DB2 � �� � (Linux
Windows) . . . . . . . . . . . . . . 165
� ���(CLP)� ��� �� � . . . . 166
���� ������ �� �� � (Windows) 167
���� ������ � �� � (Linux
UNIX) . . . . . . . . . . . . . . . 168
��� DB2 ������ ��� ��� �
(Windows) . . . . . . . . . . . . . . 169
��� DB2 ������ ��� ��� �
(Linux) . . . . . . . . . . . . . . . 173
iv DB2 Servers� �� �
� 16 � �� �� ��� . . . . . . . . 177
���� ���� �� DB2 �� �(Linux
UNIX) . . . . . . . . . . . . . . . 177
� � ���� . . . . . . . . . . . 178
Firefox �� Netscape � � ���� �� 180
��� ID� DB2ADMNS DB2USERS ��
� ��� ��(Windows) . . . . . . . . . 181
32�� DB2 ��� 64�� ��� ���
��(Windows) . . . . . . . . . . . . 182
�� ��� � �� . . . . . . . . . 182
�� � � DB2 � IBM ������
����� ���� �� ��(Windows) . . . 183
�� ��� ���� IBM ��� � ����
� ��� . . . . . . . . . . . . . . 195
�� DB2 ��� �� � . . . . . . . . 197
FixPack � . . . . . . . . . . . . . 197
��� ��� FixPack � . . . . . . . . 200
���� ������ �� . . . . . . . . 201
DB2 �� �� �� �� . . . . . . . . 201
�� �� �� ��(Linux UNIX) . . . . 207
������ ��� � �� �� ��
(Linux UNIX) . . . . . . . . . . 209
�� � � ��(Linux UNIX) . . . 211
�� �� � ��(Linux) . . . . . . . 213
� 4 � DB2 �� �� �� . . . . . 215
� 17 � DB2 �� �� �� �� . . . . . 217
� 18 � �� ��� . . . . . . . . . . 219
DB2 �� ���� ���� DB2 �� �� ��
(Windows) . . . . . . . . . . . . . . 219
DB2 �� ���� ���� DB2 �� �� ��
(Linux) . . . . . . . . . . . . . . . 221
db2_install �� doce_install �� ����
DB2 �� ��(Linux UNIX) . . . . . . 223
� 19 � �� �� ��� . . . . . . . . 227
�� �� � � �� ��(Linux ) . . . . 227
� � �� ��� �� ��� DB2 �� �
� �� . . . . . . . . . . . . . . . 228
� 5 � DB2 ������ . . . . . 231
� 20 � DB2 WebServices ������ . . . 233
DB2WebServices ����� �� �� . . 233
DB2WebServices ����� �� . . . . . 234
� 21 � DB2 ���� ������ ��(EAS) 237
DB2 ��� ����� �(EAS) ��
�� . . . . . . . . . . . . . . . . 237
DB2 ��� ����� �(EAS) ��. . . 238
DB2 ��� ����� �(EAS) � ��
�� . . . . . . . . . . . . . . . . 240
� 6 � �� . . . . . . . . . . . . 243
� 22 � �� ��� ��� DB2 �� �� �
� . . . . . . . . . . . . . . . . . 245
�� DB2 ��� �� �� ���� �� 245
�� DB2 ��� �� �� ���� �� 246
�� ��� ��� DB2 � �� �� . . . . 247
� 23 � DB2 ���� �� �� ���� �
� . . . . . . . . . . . . . . . . . 249
� 24 � DB2 �� �� ��(TCP/IP) . . . . 251
DB2 ��� �� TCP/IP �� �� . . . . 251
TCP/IP ��� ��� ������ � ���
�� �� �� . . . . . . . . . . . 252
TCP/IP ��� ��� ��� �� �� . . . 253
� 25 � DB2 ���� ��. . . . . . . . 255
DB2 ���� � . . . . . . . . . . . 256
�� � �� ���� ����� . . . . . . 257
���� ��� ���� DB2 �� �� �� �
��� � �� . . . . . . . . . . . . . 257
db2licm �� ���� DB2 �� �� �� �
��� � �� . . . . . . . . . . . . . 258
db2licm �� ���� DB2 ���� �� �� 258
���� ��� ���� DB2 ���� �� �
� . . . . . . . . . . . . . . . . . 259
DB2 ���� �� �� . . . . . . . . . 259
� 7 � �� �� . . . . . . . . . . 261
� 26 � DB2 �� �� ��(Windows) . . . 263
DB2 �� �� ��(Windows) . . . . . . . 263
� ��� ���� DB2 �� �� ��
(Windows) . . . . . . . . . . . . . . 264
� 27 � DB2 �� �� ��(Linux � UNIX) 265
DB2 Administration Server ��(Linux
UNIX) . . . . . . . . . . . . . . . 265
DB2 Administration Server ��(Linux
UNIX) . . . . . . . . . . . . . . . 266
� v
�� �� ��(Linux UNIX) . . . . . 266
DB2 �� ��(Linux UNIX) . . . . . 267
db2_deinstall �� doce_deinstall �� ����
DB2 �� ��(Linux UNIX) . . . . . . 268
� 28 � ��� DB2 �� �� ��(Linux �
UNIX) . . . . . . . . . . . . . . . 271
��� �� ��(Linux UNIX) . . . . 271
db2_deinstall� ���� ��� DB2 �� ��
(Linux UNIX) . . . . . . . . . . . 272
� 29 � DB2 �� � IBM ������ ���
�� ���� �� �� �� . . . . . . . 273
� 30 � DB2 FixPack �� . . . . . . . 281
FixPack �� �� . . . . . . . . . . . 281
� 31 � DB2 ������ �� �� . . . 283
DB2WebServices ����� �� �� . . . 283
DB2 ��� ����� �(EAS) �� �� 283
� 8 � �� . . . . . . . . . . . . 287
�� A. DB2 �� 9 �� � ��� �� . . . 289
�� B. DB2 �� �� �� . . . . . . . . 291
DB2 � ����(��� �� PDF ��) 292
�� DB2 � �� . . . . . . . . . . 294
� ����� SQL �� ��� �. . . . 295
DB2 �� ��� �� �� �� . . . . . 295
DB2 �� ���� ��� ��� � � . . 295
� � �� ��� �� ��� DB2 �� �
� �� . . . . . . . . . . . . . . . 296
DB2 ���. . . . . . . . . . . . . . 298
DB2 ��� �� �� . . . . . . . . . . 299
� . . . . . . . . . . . . . . . . 299
�� C. ���� . . . . . . . . . . . . 301
� . . . . . . . . . . . . . . . . 305
vi DB2 Servers� �� �
� 1 � DB2 �� ��
© Copyright IBM Corp. 1993, 2007 1
2 DB2 Servers� �� �
� 1 � ���� ��
DB2 �� � IBM ��� �� �����
DB2® ������ ���� DB2 � IBM® Data Server Clients� ����
�.
DB2 �� �� IBM Data Server Clients� ���� ���� �� �����
� � ���(RDBMS)���. � � �� �� �� ������� ����� DB2
�� ��� ���. DB2 �� �� �� ��� ���
http://www-306.ibm.com/software/data/db2/9/editions.html� �����.
IBM Data Server Client� DB2 �� �� ���� � SQL�� �� �
�� �� DB2 �� ���� �� ������� ��� � �� �����
���. ��� ��� � �� IBM Data Server Clients �����.
v IBM Data Server Client
v IBM Data Server Runtime Client
v IBM Data Server Driver for ODBC, CLI, and .NET
DB2 �� ���
� ����� DB2 �� ���� �� ��� �����. �� � ���
�� ��� �� �����.
1. �� �� ��
�� �� Windows® Linux™ �� UNIX®
DB2 �� ��� � �
� �� �� � �
db2_install � �� �
����(Payload) �� �� �� �
�� ���� DB2 �� ��� �� ����.
DB2 �� ���
DB2 �� ���� Linux, UNIX Windows ���� �� ���
GUI �� ������. DB2 �� ���� DB2 ��� ���� �� �
� �� ���� ��� � ��� ���� ����� ���
��.
© Copyright IBM Corp. 1993, 2007 3
DB2 �� ���� � ��� �� ��� ���� � ��� � �� DB2
�� � ��� �� �� ����.
�: Linux UNIX ���� ��� ��� � , ��� DB2 �
��� ��� � ����. DB2 �� ���� ��� ��� ��� �
���.
Linux UNIX ����� DB2 �� ���� ���� X �� �
����.
�� �� ��
� ��� �� �� �� �� �� ��� �����. DB2 �� ��
� � ��� ��� ��� ��� �� �� ��� ����.
� �� ��� � ��� �� �� ����.
� �� ��� �� � ��� ��� ��� ��� � ��� ��
� ����. � ��� DB2 ��� ���� � ��� ��� ��� �
��� � ����. � ��� ��� ���� ��� ��� ��� ��
DB2 ��� ���� � ��� � ����.
� ��� ���� � ��� ��� DB2 �� ���� ���� ���
� �� ����� �� ��� ����� ����.
Linux UNIX ����, �� ������ DB2 �� ���� �
��� � , �������� � ��� �� ��� ���� �� ��
��� �� � �� � ��� ��� � ����. � �
INTERACTIVE � �� ���� �� �����.
��� �� �� �� ���� � ��� �� � ����.
�� �� �� ���� ��(Windows ���)
Windows��� � �� �� ���� ���� ��� ���
���� � ��� �� � ����. �� ��, IBM Data
Server Client� ���� ������ ��� ��� ��, � �
�� ���� ������ �� ��� �� � �� ��� �
����.
DB2 �� ��� ��
DB2 �� ���� DB2 �� ���� ��� �� ���� �
��� ����� ���� � ��� �� � ����. ���
�� ���� ��� ��� � �� � ��� �����. ���
� ������ ��� ��� � , � �� � ��( �� �
� � �� ��� �� � �� ��)� �����.
db2cfexp �� ���� ����� �� � ����� ����
�� ����� �� � ��� ��� �� db2cfimp �� �
4 DB2 Servers� �� �
��� ����� � ���� � ����. db2cfexp ��� �
���� ����� �� � �����
CLIENT_IMPORT_PROFILE ���� ���� � �� �� �
� ���� �� ����.
��� ��� ��� ��� ���� � ����� �� �
����� ����� ���.
� DB2 ��� ���� �� �� �� ��� ��
� �� �� ��� �� DB2 �� ���� ���� � �
�� ��� �� ��� �� � ��� ��� �� ����.
�� � ��� DB2 �� DVD� �����. �� � ���
� ��� �� � ���� �� ���� �����.
db2_install ��(Linux � UNIX ��� ��)
db2_install �� � ���� ��� ���� ��� DB2 ���
� ����� �����. -L ����� ���� ��� �� ��� ��
� � ����. ����� ����� �� ��� � ����.
db2_install �� ���� ��� DB2 ��� �� � ����� ��
�� � , ��� �� �, �� � �� ��� ��� ���
�. � �� ���� �� �� ��� ���� � � ���� �����.
DB2 ��� �� �� ����� � DB2 �� ���� ������.
Linux UNIX ����, �� ������ DB2 �� ���� �
��� � , �������� � ��� �� ��� ���� �� ��
��� �� � �� � ��� ��� � ����.
� �� ������ �� �� �� �� � ��� �����.
����(Payload) �� ��(Linux � UNIX ��)
� ���� ���� ����� ����� ��� ��� �� �����
�. ���� � ����(payload) ��� ��� ���. ����(payload)
��� �� ��� ����� �� � �� ������ ����
� tarball���.
� �� ������ �� �� �� �� � ��� �����.
�: DB2 �� ��� � �� Linux UNIX ���� �� ���� �
�� ���� ��� �� �� ��� � ����. DB2 ��� ���
��� ���� � ���� � ��� ����� ��� ���.
� 1 � ���� �� 5
���� DB ����� ��
DB2 ����� �� DB2 �� ��� � �� �� ����� �� ��
� �� � ����. � �� ��� ���� ���, ��� DB2 ���
���� ��� �����. ����� �� ��� ���� ��� �� ���
��� ��� IBM Data Server Runtime Client ����� �����.
� �� ���� �����, ���, ����, ����, ����, ���, � �
�, ���, ���, �����, ���, ���, ���, �� �, ����
���� ����.
����� �� ���� ��, ����, ����, �����, ����, �
��, ����, �����, ����, �����, ����� ���� �
���.
DB2 ���� ���� ��� DB2 ������ ���� ��� �� ��
��. DB2 ���� ���� ��� ��� � �� ��� �����. ��� ��
� DB2 ������ ���� ��� ������.
���� DB2 �� ��� ��(Linux � UNIX)
db2setup �� �� �� ���� ��� �� ��� �����. �
�� �� ���� db2setup� ���� DB2 �� ���� �� � �� ���
�����.
���� �� �� ���� ����� DB2 ������ ���� �� ��
��� ��� ��� � , �� �� ���� LANG �� ��� �� ���
������ ��� db2setup� � ����.
bourne (sh), korn (ksh) � bash �:
LANG=<locale>export LANG
C �:
setenv LANG <locale>
��� locale� DB2 ����� �� ���� ������.
�� ��� DB2 �� ���� ���� � ��� �� ID
� �� � ��� �� ��� DB2 �� ���� ���� �� ID� ��
�� ��� DB2 �� ���� �� � ����. � ��� ��� ��� �
��� �� ��� ���.
6 DB2 Servers� �� �
Windows ���� -i ����� �� setup.exe� ��� ��� ��� �
�� � �� �� ��� ��� � ����.
Linux UNIX ��� � LANG �� ��� ���� ���� DB2 ��
���� ��� �� ����.
2. �� ID
�� �� ID
��(Windows ����� �� ��) ar
�� ����� br
���� bg
��� cn
��� tw
���� hr
��� cz
���� dk
����� nl
� en
���� fi
���� fr
��� de
���� el
���� hu
� �� it
��� jp
��� kr
����� no
��� pl
����� pt
���� ro
��� ru
����� sk
����� sl
�� � es
���� se
��� tr
DB2 �� ����� �� ��(Windows)
DB2� ���� ��� ���, ��� ��� �� ����� ��� �
����. DB2� ��� � �� ��� �� ��� ���� ��� �����. �
� � �� � ��� ��� �� ���� �� � ��� DB2 ���� �
�� ��� � , � ���� �� �� �����.
� 1 � ���� �� 7
DB2 ���� ���� ��� DB2 ������ ���� ��� �� ��
��. DB2 ���� ���� ��� ���� ��� � �� ��� �����. �
�� ��� DB2 ������ ���� ��� ������.
��� DB2 ���� ��� ���� ���� �� ���. DB2 �� ���
� ���� DB2 ��� ��� � DB2 �� ���� ��� ���� ����
�. DB2 ��� ���� ��� ����� �� ���� �� �� ��
�� ��� ��� � , DB2 �� ���� ��� ��� �� ���
�, �� ��� ���� �� � �� ����.
Windows�� DB2 ��� ���� ��� ����� Windows ���
� �� ���� ��� ���.
Windows ���� DB2 �� ���� ��� ����� ��� ����
�.
1. ���� �� �� � �� ��� ������.
2. �� � � �� �� �� ��� �� ��� ������. Windows Vista
��� � �� � �� ������.
3. � �� �� �� ��� �� ��� ���� ��� ������.
4. ����� ����� �� �� �� ��� �� ��� ������.
Windows Vista� � ����� ����� �� �� �� ��� �� �
�� ��� �� �� ��� ������. �� ��� �� ��� �
�� ����.
5. �� ��� ���� �� �� �� ��� �� ��� � ��� ����
� ��� ��� ����� �� ��� ������. Windows Vista� �
�� ���� �� �� ��� �� ����� ��� �� �� ��
� ����� ��� ������.
6. �� ����� �� �� �� �� ��� �� ����.
� ��� �� ��� �� �� ��� �� ���� �����.
DB2 ����� �� ��(Linux � UNIX)
DB2 ��� ���� ��� ���, ��� ��� �� ����� ���
�����. DB2 ��� ��� � �� �� �� ��� ���� ��� ����
�. �� � ���� ��� ���� �� �� ���� ��� ��� � , �
���� ��� �� �� �����.
DB2 ���� ���� ��� DB2 ������ ���� ��� �� ��
��. DB2 ���� ���� ��, � ���� ��� � �� ��� DB2 ��
���� ���� ��� ������.
8 DB2 Servers� �� �
��� DB2 ���� ��� �� ��� ���� ���� �� ���. DB2
�� ���� ���� DB2� ��� � DB2 ���� �� ��� ���� �
�� � ����. DB2 ��� ���� ��� ����� �� ���� �
� �� ���� ��� ��� � DB2 ���� ��� ��� �
� �����. �� ��� ���� �� � �� DB2 ���� ���
�����.
DB2 �� ���� ����� ��� ���� ���� DB2 ��� ��� � DB2
���� �� ��� ���� ��� � ����.
����� �� ��� �� ���� � ��� $ locale -a �� �����.
DB2 ���� ��� ����� LANG �� ��� ��� ���� �����
�.
bourne(sh), korn(ksh) bash :
LANG=<locale>export LANG
C :
setenv LANG <locale>
�� ��, DB2 ��� ���� ������� ��� �� ��� ���� ��
LANG �� ��� ���(�: ko_KR)� ��� ���.
� 1 � ���� �� 9
10 DB2 Servers� �� �
� 2 � �� ����
��� � ��� ����
��� ����
��� ��� �� ����� ���� ���� �� �� ���� ����
�� ��� ��� �� ����. DB2 �� ���� �� ��, �� �� �
�� �� �� �� ��� ����� ���� �� ���� �����.
�� ������, ����� �� ��� ��� �� ����� ��� �
��.
Linux UNIX ��� � /tmp ���� 2GB� �� � � �� ��
����.
��� ����
DB2 ������ ����� ��� 256MB� RAM� �����. DB2 DB2
GUI ��� ��� ���� � , �� 512MB� RAM� �����. ��� �
�� ������ 1GB� RAM� �����. � ������ ����� � �
�� ������ �� �� �� ����� ���� ����.
�� ����� �� ��� �� ��� �� �� ���.
v Itanium �� ���� HP-UX � 11i�� � � DB2 ���� ��
512MB� RAM� �����.
v IBM Data Server Client ��� � , ��(� 5�� � ����� ��)
�� �������. 5�� ����� ���� ��� 16MB� RAM� ��
���.
v �� ����� ������ � �� ���� ���� ������
�� ������ ���� �� ����� �� ����.
DB2 �� � , �� �� � ��� �� �� �� ����� �� �
�� ������ �� �� ���� ����. �� ��� � , ��
� ���� �� ��� �� ��� �� ��, ��� ��, � �
� �� ��� �� �� ����� �����.
v Linux ����� SWAP ����� ��� RAM� � �� �� ���
(�����).
© Copyright IBM Corp. 1993, 2007 11
DB2 ��� �� Java ����� ��
Java �� ��� ���� ���� ���� ��� �� ��(UDF)� ���
Java™ ������ ��� ���� �� ��� �� ��� Java� IBM
SDK(Software Development Kit)� �����.
�� � ����� Java� IBM SDK� ����� �� ��� ���� �
� �� � DB2 �� ��� �� � ��� ���� ��� ���� Java�
SDK� �����.
Java� SDK� IBM Data Server Runtime Client �� IBM Data Server Driver
for ODBC, CLI, and .NET� �� ���� ����.
�� � �� ��� �� ���� DB2 ��� Java� SDK ��� ��
�� ����.
� �� ��� Java� SDK ��
AIX® 5 SDK 5 ��� ��� 5
Itanium �� ���� HP-UXJ2SE HP-UX 11i ��� HP SDK(IBM Software, � 5 �
�� ��� 5� ��� IBM�� �)
Linux on x86 SDK 5 ��� ��� 5
Linux on AMD64/EM64T SDK 5 ��� ��� 5
Linux on zSeries® SDK 5 ��� ��� 5
Linux on POWER™ SDK 5 ��� ��� 5
Solaris �� SDK 5 ��� ��� 5
Windows x86 SDK 5 ��� ��� 5
Windows x64 SDK 5 ��� ��� 5
�:
1. ���� Java� SDK ��� �� ��� ���� ��� SDK 1.4.2 - SDK
5� �����. Java� SDK ��� http://www.ibm.com/developerworks/java/
jdk/index.html � ���� developerWorks® � ����� ���� � ��
��. Java� SDK� ���� �� �� ���� Java� SDK� Linux, UNIX
Windows� DB2 ������ �� � �� �� ��� �����.
�: Windows �� ��� � , Eclipse� IBM Development Package
���� ������.
2. DB2 GUI ��� Linux on x86, Linux on AMD64/EM64T, Windows x86
Windows x64��� ����.
3. Windows x86 Linux on x86:
v 32�� SDK� ���� ��
12 DB2 Servers� �� �
v 32�� ����� Java �� ��� ���
4. ���� ����(Windows x86 Linux on x86):
v 32�� ������ ���
v 32�� Java �� ��� ���� ��
v 64�� ����� Java �� ��� ���
���� Java ������ �� �����
�� � Java� SDK� ���� ��� �����. ��� �� ��
��� �� �� �� ��� �� �����.
Java� SDK� ����� ����� �� ���� � ��� ��
����� ���. ������ ������ Java� SDK� �� �
��� �� � �� ��� ���� Java� SDK� �� ��� �� �
� ��� ����.
Java� SDK� �IBM �� ��� Java ����� �� �� �
��� �����. Java ���� ���� ��� �� ��� ����
��� � , Linux, UNIX Windows� DB2 ������ ��� �
�� Java� IBM SDK�� �����.
3. Java� SDK� Linux, UNIX Windows� DB2 ������ ��
� �� Java� SDK� ���� ��
AIX 1.4.2�� 5�
Itanium �� ���� HP-UX 1.4.2�� 51�
Linux on POWER 1.4.2�� 5�
Linux on x86 1.4.2�� 52�
Linux on AMD04 Intel® EM64T ��� 1.4.2�� 52�
Linux on zSeries 1.4.2�� 5�
Solaris �� 1.4.2�� 52�
Windows on x86 1.4.2�� 52�
Windows on x64, AMD64 Intel EM64T ���� � 1.4.2�� 52�
�:
1. Hewlett-Packard�� �� � �� Java� SDK� � ��� IBM Data Server Driver for JDBC and SQLJ ��� �
�� ��� ����� ������ ���� ��� ��� �����.
2. Sun Microsystems�� �� � �� Java� SDK� � ��� IBM Data Server Driver for JDBC and SQLJ ��� �
�� ��� ����� ������ ���� ��� ��� �����.
�� � DB2 ������ ��� �� �� ��� IBM Data Server
Driver for JDBC and SQLJ �� �����.
� 2 � �� ���� 13
4. IBM Data Server Driver for JDBC and SQLJ Linux, UNIX Windows� DB2 ����
�� FixPack ��� �
DB2 �� � FixPack ��
IBM Data Server Driver for JDBC and SQLJ
��
DB2 � 9.1 3.1
DB2 � 9.1 FixPack 1 3.2
DB2 � 9.1 FixPack 2 3.3
DB2 � 9.1 FixPack 3 3.4
DB2 � 9.5 3.50, 4.0
DB2 �� � IBM ��� �� ������ �� �� ����(Windows)
DB2 ��� �����, �� ��, ����� ���� ���� ���
���.
5. Windows ����� ��
� �� ��� ���� ��
Windows XP
Professional(32��
x64)
Windows Vista
Ultimate(32�� x64)
Windows Vista
Business(32�� x64)
Windows Vista
Enterprise(32�� x64)
Windows XP �
�� � 2 ��
IBM Data Server
P r o v i d e r f o r
.NET �����
�����
CLR � ��
���� .NET
1 . 1 S P 1 � �
.NET 2.0 ���
�� ���� �
����.
64�� IBM data
server provider
for .NET ���
��� ����
�.
���� Windows �
�(32�� x64 �� �
��)� �� � ��
� Intel AMD ���
14 DB2 Servers� �� �
6. Windows � ��
� �� ��� ���� ��
Windows 2003 Standard
Edition(32�� x64)
Windows 2003 Enterprise
Edition(32�� x64)
Windows 2003 Datacenter
Edition(32�� x64)
��� � 1 ��
R2 �� �����.
IBM data server provider
for .NET ����� ��
��� CLR �
������ .NET 1.1
SP1 �� .NET 2.0 ���
�� ���� �����.
64�� IBM data server
provider for .NET ���
��� �����.
� � � �
Windows �
�� �� � �
� � Intel
AMD ���
�� ����� ����
v Windows �� ��� 3.0� �����. ��� �� � �� �� �
��� �� �����.
v IBM Data Server Provider for .NET ����� ����� CLR
� ������ .NET 1.1 SP1 �� .NET 2.0 ����� ����
�����. x64 ����� 32�� IBM data server provider for .NET
������ WOW64 ����� ��� ����.
v MDAC 2.8� �����. DB2 �� ���� MDAC 2.8� ���� �
� �� � �� �����.
�: �� �� MDAC(�: 2.7)� �� ���� �� � , DB2 ���
MDAC� 2.8� ��������. �� ��� � , MDAC 2.8� ��
���. ��� ��� � , MDAC 2.8� ���� �� �� ���
���� �� � �� �����. ��� ��� ��� MDAC� ��
��� � �� ���� ����.
v LDAP(Lightweight Directory Access Protocol)� �����, Microsoft®
LDAP ����� �� IBM Tivoli® Directory Server v6 �����(DB2
��� ��� IBM LDAP ������� ���)� ��� ���.
Microsoft Active Directory� ���� ��, db2₩Windows₩utilities �
�� �� �� ��� �� db2schex ����� ���� ��� �
��� ��� ���.
Microsoft LDAP ������ Windows XP Windows Server 2003�
��� ���� ����.
v �� ���� ��� TCP/IP ��� �� ��� ���.
� 2 � �� ���� 15
v �� ���� �� DB2 �� ����(setup.exe)� ��� � �
(db2fs)� ���� �� � � � ��� �����.
– Internet Explorer 6 ��
– Mozilla 1.4 ��
– Firefox 1.0 ��
– Netscape 7.0 ��
DB2 �� � IBM ��� �� ������ �� �� ����(AIX)
DB2 ��� �����, �� ��, ���� �� ���� ��� ��
�.
7. AIX �� ����
� �� ����
AIX � 5.3
v 64�� AIX ��� ���
v TL5 SP3(��)
v �� C++ ��� ��� xlC.rte 8.0.0.8
xlC.aix50.rte 8.0.0.8�
�� � �����.
v eServer™ pSeries®
v IBM System p™
v IBM System p5™
����� ����
v (����� ��) Kerberos �� �����, IBM Network Authentication
Service ����� v1.4 ��� �����. NAS ������
https://www6.software.ibm.com/dl/dm/dm-nas-p�� ���� � ����.
v 64�� ��� ����� bosboot �� �����.
64�� ��� ����� �� ��� ���� �� �� ��� ���.
ln -sf /usr/lib/boot/unix_64 /unixln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unixbosboot -ashutdown -Fr
v DB2 � 9.5�� xlC.rte 8.0.0.4� ���� AIX� �IBM C++ Runtime
Environment ������ �����. IBM AIX �� � ����� �� ���
��.
v �� ���� �� � �(db2fs)� ���� �� � � � ��� ��
���.
– Mozilla 1.4 ��
– Firefox 1.0 ��
– Netscape 7.0 ��
16 DB2 Servers� �� �
NFS(Network File System)� DB2 �� ��
NFS(Network File System)� DB2 ��� ���� �� ���� ����. NFS
�� DB2 ��� ����(�� ��, /opt/IBM/db2/V9.5� NFS ��� � �
�� �� ���� ���� �� ��� ���) �� � �� �����. �
� DB2 �� �� NFS� ���� �� �� �� ���� ����. ����
��� ��� ���� �� � ����.
v ��(���� ��� �� ��)
v �� ���(� �� ��� ���)
v ���� ��(���� ��� ��� ��)
v NFS � �� ��� � ��
��� �� NFS� �� ���� �� �� � �� ���� ���.
v �� ��� �� ��� ����� �
v �� ��� ���� �(�� ��, �� ���� �� �� ��� ����
� �)
v DB2 ������ ��� ���� �� � � ���� ������
�
v DB2 �� ��� �� � �� ��� DB2 �� ��� ���� db2ls
�� ���� �� ����� �
v DB2 �� �� ��� � � �� ��� ���
v ���� �� �� �� ��� �� �� ���
�� ��� http://www.ibm.com/developerworks/db2/library/long/dm-0609lee��
″Setting up DB2 for UNIX and Linux on NFS mounted file systems” ��� �
����.
DB2 �� � IBM ��� �� ������ �� �� ����(HP-UX)
DB2 ��� �����, �� ��, ���� �� ���� ��� ��
�.
8. HP-UX �� ����
� �� ����
���� DB2 ��� �����.
v ��� ���� HP-UX 11iv2(11.23.0505)
– May 2005 Base Quality(QPKBASE) ��
– May 2005 Applications Quality(QPAPPS) ��
v HP-UX 11iv3(11.31)
Itanium® �� HP Integrity Series
Systems
� 2 � �� ���� 17
�� �� ����
�� �� ����� ��� � ��� ��� �����. �� �� �����
/etc/system� ���� ����. �� �� ���� �� �� � 9 Client ��
DB2 � ��� ���� �� �� �� ���� � � �� ��� � �� �
���. �� � �� ����� �� ���� �� � /etc/system ���
�� ���� ���� �� � ���.
����� ����
v IBM Data Server Client� �����, SQL ���� ����� ��� C ��
��� �� ���.
v �� ���� �� � �(db2fs)� ���� �� � � � ��� ��
���.
– Mozilla 1.4 ��
– Firefox 1.0 ��
– Netscape 7.0 ��
NFS(Network File System)� DB2 �� ��
NFS(Network File System)� DB2 ��� ���� �� ���� ����. NFS
�� DB2 ��� ����(�� ��, /opt/IBM/db2/V9.5� NFS ��� � �
�� �� ���� ���� �� ��� ���) �� � �� �����. �
� DB2� �� NFS� ���� �� �� �� ���� ����. ���� ��
� ��� ���� �� � ����.
v ��(���� ��� �� ��)
v �� ���(� �� ��� ���)
v ���� ��(���� ��� ��� ��)
v NFS � �� ��� � ��
��� �� NFS� �� ���� �� �� � �� ���� ���.
v �� ��� �� ��� ����� �
v �� ��� ���� �(�� ��, �� ���� �� �� ��� ����
� �)
v DB2 ������ ��� ���� �� � � ���� ������
�
v DB2 �� ��� �� �� � ��� DB2 �� ��� ���� db2ls
�� ���� �� ������ �
v DB2 �� �� ��� � � �� ��� ���
18 DB2 Servers� �� �
v ���� �� �� �� ��� �� �� ���
�� ��� http://www.ibm.com/developerworks/db2/library/long/dm-0609lee��
“Setting up DB2 for UNIX and Linux on NFS mounted file systems” ��� �
����.
DB2 �� � IBM ��� �� ������ �� �� ����(Linux)
���� Linux ��� �� �� ��� ��� � �� http://www.ibm.com/
software/data/db2/linux/validate/� ������.
DB2 ��� ����� �� ����, ���� �� ���� ��� ��
�.
�� ������ DB2 ��� �����.
v x86(Intel Pentium®, Intel Xeon® AMD) 32�� Intel AMD ���
v x64(64�� AMD64 Intel EM64T ���)
v POWER(Linux� ���� IBM eServer OpenPower™, System i™ �� pSeries
���)
v eServer System z™ �� System z9™
Linux� ���� ��� ��� ����.
v Red Hat Enterprise Linux(RHEL) 4 �� 4
v Red Hat Enterprise Linux(RHEL) 5
v SUSE Linux Enterprise Server(SLES) 9 ��� � 3
v SUSE Linux Enterprise Server(SLES) 10 ��� � 1
�: POWER�� �� SLES 10 ���� 1 �� RHEL 5� �����.
multithreaded ���� ��
DB2 � 9.5 32�� ������ ��� Linux ��� ���� � �� 64
�� ��� ������� �� DB2 � 9.5 64�� ������ ��� �
�� �� ������. ���� multithreaded ���� �� ��� ��
����. ��� �� 32�� DB2 �� �� ��� �� � � ����. �
� ��, ��� ����.
v ���� ���� � ��� �� � ��� ��� �����. ����
�� ����� �� � � �� ��� �� � ��� �� ��
���� �� �� �� ����.
v � ������� � ������ �� �� ���� � �����
����� �� ������ ��� �����. � ������� �� ��
� 2 � �� ���� 19
��� ���� �� ������� �� ���� ��� �� ����. �
����� � ��� ��� �� � �� ����. � �� ��� ��
��� ��� �� � ������� ����� ����. ��
� � ��� ���� ���� ��� ��� ��� �����.
�� ����
Linux ��� �� ��� �� �� ����� ��� ���. DB2 ������
���� �� �� �� �� ����� ��� ���� �� � ����.
Linux ��� ��� ��� �� �� �� �� ������ �� �� ���
�. Linux ��� � �� ��� �� �� �� ����� ��� ���.
�� �� ����� /etc/sysctl.conf� ���� ����.
sysctl �� ���� � ����� �� ����� ��� �� ���
�� ���� �����.
��� ����(�� ��)
�� � DB2 � 9.5� SLES RHEL ��� �� ��� ����� ���
� ����.
v �� ����� libaio.so.1� �����.
v DB2 ��� libstdc++so.5� �����.
SLES� �� ��� ����
��� �� ��
libaio DB2 �� ��� �� ����� �����.
compat-libstdc++ libstdc++so.5� �����.
RHEL� �� ��� ����
��� ��� �� ��
/System Environment/Libraries libaio DB2 �� ��� �� ����� ��
���.
/System Environment/Libraries compat-libstdc++ libstdc++so.5� �����.
�� � DB2 � 9.5 ���� �� SUSE Linux Red Hat ��� �� �
�� ����� ���� ����.
v pdksh Korn Shell ���� � DB2 ���� �����.
v ���� ������ ����� �� ����� �����. DB2� ��
� �� �� ����� �����.
– rsh
– ssh
20 DB2 Servers� �� �
�� DB2� �� DB2 ���� �� �� � rsh� �����(�� �
�, �� DB2 ������ ���� �� �). DB2 ��� �����
rsh-server ���� ���� �� ���(� �). rsh ssh� �� ��
��� DB2 �� ���� �� �����.
rsh �� ����� ����� ��� � inetd(�� xinetd)� ���� �
��� ���. ssh �� ����� ����� ��� � , DB2 ��
� ��� �� DB2RSHCMD �� ��� ��� ���. � ����� ��
� ���� ��� rsh� �����.
v nfs-utils NFS(Network File System)� ���� ������ ���� ��� �
��� �����.
DB2 ��� ����� � �� ���� �� ���� �� ���. ��
Linux ��� ��� Linux �� ��� �����.
SUSE Linux� �� ��� ����
��� �� ��
pdksh Korn . ���� ������ ���� � ���� �����.
openssh � ����� �� � �� �� � ���(�� �� � ���
�) �� �� � �� �� � ��� �� ���� ����.
rsh� �� DB2� � ��� ��� � �� � ���� ����
����.
rsh-server � ����� ���� �� � ��� �� ��� �� � ��
�� �� � � � ��� ��� � ��� �� � ����
�� ���� ����(rsh, rexec, rlogin rcp). ssh� ����� DB2
� ��� � �� � ���� ���� ����.
nfs-utils ���� �� ��� �� ���. � ���� ���� �� � ��
�� �� ��� ��� � ����.
Red Hat� �� ��� ����
��� ��� �� ��
/System Environment/Shell pdksh Korn . ���� ������ ���� �
���� �����.
/Applications/Internet openssh � ����� �� � �� �� � �
�� �� �� � �� �� �����
��� �� ���� ����. rsh� �
� DB2� � ��� ��� � �� �
���� ���� ����.
/System Environment/Daemons openssh-server � ����� �� � �� �� � �
�� �� �� � �� �� � ���
�� ���� ����. rsh� �� DB2
� � ��� ��� � �� � ���
� ���� ����.
� 2 � �� ���� 21
Red Hat� �� ��� ����
��� ��� �� ��
/System Environment/Daemons rsh-server � ����� ���� �� � ���
�� �� � ��� �� ��� ��
���� ����. ���� ������ ��
� �����. ssh� ����� DB2� ��
� � �� � ���� ���� ����.
/System Environment/Daemons nfs-utils ���� �� ��� �� ���. � ���
� ���� �� � ���� �� ���
��� � ����.
����� ����
v (����� ��) Kerberos �� �����, IBM Network Authentication
Service ����� v1.4 ��� �����. NAS ������
https://www6.software.ibm.com/dl/dm/dm-nas-p�� ���� � ����.
v �� ���� �� � �(db2fs)� ���� �� � � � ��� ��
���.
– Mozilla 1.4 ��
– Firefox 1.0 ��
– Netscape 7.0 ��
v ��� � �� ��� ��� ���� ��� ��� �� X Window System
������ �����.
– Linux �� UNIX ���� DB2 �� ���� ���� DB2 ��� �
���� � , ��
– x86� Linux AMD 64/EM64T� Linux�� � DB2 ��� ��� ��
�� �
NFS(Network File System)� DB2 �� ��
NFS(Network File System)� DB2 ��� ���� �� ���� ����. NFS
�� DB2 ��� ����(�� ��, /opt/IBM/db2/V9.5� NFS ��� � �
�� �� ���� ���� �� ��� ���) �� � �� �����. �
� DB2� �� NFS� ���� �� �� �� ���� ����. ���� ��
� ��� ���� �� � ����.
v ��(���� ��� �� ��)
v �� ���(� �� ��� ���)
v ���� ��(���� ��� ��� ��)
v NFS � �� ��� � ��
��� �� NFS� �� ���� �� �� � �� ���� ���.
22 DB2 Servers� �� �
v �� ��� �� ��� ����� �
v �� ��� ���� �(�� ��, �� ���� �� �� ��� ����
� �)
v DB2 ������ ��� ���� �� � � ���� ������
�
v DB2 �� ��� �� �� � ��� DB2 �� ��� ���� db2ls
�� ���� �� ������ �
v DB2 �� �� ��� � � �� ��� ���
v ���� �� �� �� ��� �� �� ���
�� ��� http://www.ibm.com/developerworks/db2/library/long/dm-0609lee��
“Setting up DB2 for UNIX and Linux on NFS mounted file systems” ��� �
����.
��� ��� Linux ����
RHEL 4 RHEL 5 ����� ��� ��� Linux(SELinux)� �� ����
� �� �� � SELinux ���� ��� �� ���� ��� � ����.
SELinux� ������� � �� ��� ��� ���� �� � ��� �
����.
v /etc/sysconfig/selinux �� ��
v sestatus � �
v /var/log/messages ���� SELinux ���� ��(���� ��� RHEL 4�
RHEL 5� �� � ����.)
SELinux� �� ����� ��� �� � ��� �����.
v �� �� ��� � superuser ��� setenforce 0 � �
v /etc/sysconfig/selinux �� � ��� ��
DB2 ��� RHEL 4 �� RHEL 5 ���� ��� � DB2 ���� ���
� �� �� �� ����. DB2 ���� �� �� � ����� ��� �
�����. sqllib/samples ���� �� SELinux ��� ���� ����.
� 2 � �� ���� 23
DB2 �� � IBM ��� �� ������ �� �� ����(Solaris ��
��)
DB2 ��� �����, �� ��, ���� �� ���� ��� ��
�.
9. Solaris �� �� ����
� �� ����
Solaris 9
v 64�� ��
v �� 111711-12 111712-12
v �� ���(raw device)� ���� � Solaris 9�
122300-11 �� Solaris 10� 125100-07� ������.
v 64�� Fujitsu PRIMEPOWER �� 912041-01� �
� ����� ���� �� Solaris 9 �� �� ��
112233-01 ��
Solaris 10
v 64�� ��
v �� ���(raw device)� ���� � 125101-07�
������.
UltraSPARC
�� �� ����
�� �� ����� /etc/system� ���� ����. �� � �� �����
�� ���� �� � /etc/system ����� ���� ���� �� � �
��. ��� ����� IBM Data Server Client� ���� �� ��� ���.
����� ����
v (����� ��) Kerberos �� ����� IBM Network Authentication
Service(NAS) ����� v1.4 ��� Solaris �� 9 ��� �����. NAS
������ https://www6.software.ibm.com/dl/dm/dm-nas-p � ����� �
��� � ����.
v IBM Data Server Client� �����, SQL ���� ����� ��� C ��
��� �� ���.
v �� ���� �� � �(db2fs)� ���� �� � � � ��� ��
���.
– Mozilla 1.4 ��
– Firefox 1.0 ��
– Netscape 7.0 ��
24 DB2 Servers� �� �
�� ��� http://sunsolve.sun.com � ����� �� � ����. SunSolve �
� � ����� �� ��� �� ″��″ �� � � ����.
Java2 Standard Edition(J2SE) Solaris �� �� ���� SUNWlibC ��
���� ���� http://sunsolve.sun.com � ����� �� � ����.
64�� Fujitsu PRIMEPOWER ���� DB2� � , ��� �����.
v �� 912041-01� �� ����� ���� �� Solaris 9 �� �� ��
112233-01 ��
Solaris ��� Fujitsu PRIMEPOWER ��� http://download.ftsi.fujitsu.com/�
FTSI�� ���� � ����.
NFS(Network File System)� DB2 �� ��
NFS(Network File System)� DB2 ��� ���� �� ���� ����. NFS
�� DB2 ��� ����(�� ��, /opt/IBM/db2/V9.5� NFS ��� � �
�� �� ���� ���� �� ��� ���) �� � �� �����. �
� DB2� �� NFS� ���� �� �� �� ���� ����. ���� ��
� ��� ���� �� � ����.
v ��(���� ��� �� ��)
v �� ���(� �� ��� ���)
v ���� ��(���� ��� ��� ��)
v NFS � �� ��� � ��
��� �� NFS� �� ���� �� �� � �� ���� ���.
v �� ��� �� ��� ����� �
v �� ��� ���� �(�� ��, �� ���� �� �� ��� ����
� �)
v DB2 ������ ��� ���� �� � � ���� ������
�
v DB2 �� ��� �� �� � ��� DB2 �� ��� ���� db2ls
�� ���� �� ������ �
v DB2 �� �� ��� � � �� ��� ���
v ���� �� �� �� ��� �� �� ���
�� ��� http://www.ibm.com/developerworks/db2/library/long/dm-0609lee��
“Setting up DB2 for UNIX and Linux on NFS mounted file systems” ��� �
����.
� 2 � �� ���� 25
26 DB2 Servers� �� �
� 3 � �� ��
��� ��� � ��� ������.
v Linux UNIX ��� � , ��� �� 8�� ��� � ����.
v Windows ��� � , ��� �� 14��� ��� � ����.
�� ��� � , �� �� �� �� �� � � � � � ���
�. �� �� ��� �����.
© IBM Corporation 1993, 2007 27
28 DB2 Servers� �� �
� 4 � �� Windows ����
����� �� �� DB2 ��� ��(Windows)
�� � DB2 ��� ���� �� � ����� ��� DB2 ��� �� �
��� ����.
10. DB2 ���
��� �� �� ��� �� ��
DB2 - (DB2 copy name) -
<instance name>
[<-nodenum>]
��� <-nodenum>� DB2
ESE ��� �����.
<instance name>[<-nodenum>] ������ DB2 �������
�, ��, �� �� � ��
���.
DB2 ��(DB2 �� ��) DB2GOVERNOR
_db2copyname
DB2 ������� ��� ���
��� �� ��� ����.
DB2 �� �� � V9.5 DB2ICSERVER_V95 DB2 ��� �� ��� ����
�.
DB2 ���� �(DB2 �
� ��)
DB2LICD _db2copyname DB2 ���� ��� �����.
DB2 � ���(DB2 ��
��)
DB2MGMTSVC _db2copyname � ���� �� DB2 ���
DB2 ����� � � ����.
DB2 Query Patroller(DB2 �
� ��)
DB2QP _db2copyname DB2 Query Patroller
DB2 �� � �(DB2
�� ��) DB2REMOTECMD
_db2copyname
�� DB2 � �� ����
�.
DB2DAS - DB2DASXX DB2DASXX(XX� 00-99�) �� �� ������ �
�� �����.
DB2� ��� ���� -
<instance name>
kudcma_<instance name> DB2 �� ������� �� �
��� �����.
DB2 �� �� ��� �� �� ��� ��(Windows)
Windows� DB2 � ��� ��� � ��� �� ��� ��� ����
�.
v �� ��� ��
v ���� - �� ��� ��� ��� �����. �� �� ��� ��
� �� � ����.
– DAS(DB2 Administration Server) ��� ��
© Copyright IBM Corp. 1993, 2007 29
– DB2 �� ��� ��. DB2 Enterprise Server Edition ��� ��
� �� ��� ��� ��� � � ����.
�� ��� ��� ��� ��� ���� �����. �� ��� �
�� DB2 �� ���� ��� �� ���� ���. �� �� �� ���
��� ����� DB2 �� ���� ���� �� �� � ����.
� ��� �� ��� ��� �� �� � DB2 �� �� � � ��
���.
Windows��� �� ��
DB2 ��� ��� Windows ��� �����. �� �� ��� ��� � DB2
��� ���� ��� ���� DB2ADMNS �� DB2USERS ��� ���
���.
DB2 �� ���� � �� � ��� ����. �� �� � ��� ����
� � ��� � � � ����.
� �� ��� ����� DB2� ���� �� DB2 ��� � �� �� �
� ���� � �� �� �� ���� ������. DB2 �� �� ��
DB2 ��� �� ��� ��� � ����. � �� ��� DB2ADMNS
DB2USERS���. �� �� ��� ��� �� � , �� ��� �����
� �����. ��� � ��� �� ��� � ����.
DB2 �� ��� ����
��� ���� ��
��� ���� �� �� �� ��� ��� �����. ���
� ��� ��� ��� �� � �� �� ��� �� ���.
��� �� � , ��� ��� �� ��� � ����. � ��
��� Windows �� �� ���� �� ��� ��� ��� �
�� �� � �� � �� Windows� �� �� ���� ��� �
��.
Windows Vista�� ���� ��� �� � ��� DB2 �� ���
� �� � ��� ��� � ��� ����.
�� ��� ���� ″������� � � �� ��″ ��� ��
� �����.
��� � �� � ��� �� ��� ��� � , �� ��� ID
� ��� �� � �� �� ��� �� ���.
��� �� ��� ��� � ��� ��� ��� ��� ���
�� � DB2 Enterprise Server Edition� ������.
30 DB2 Servers� �� �
DB2 �� ����� ���� ��� ��
DB2 �� ���� ��� � ��� ��� ���� ����. DB2
�� ���� ��� �� ��� ��� �����.
v ��� ��� �
v �� ��� �
v ��� ��� �
v ����� ���
v ��� ��
v ��� �� �� ���
DAS(DB2 Administration Server) ��� ����
DAS(DB2 Administration Server)�� �� �� �� ��� ���
�����.
� �� ��� �� � , � ��� �� ��� ��� ��� �
� ����. �� ��� db2₩windows₩samples ���� �� �� �
��� �����.
�� ��� ��� DB2 Enterprise Server Edition� ��� � ��
� ��� DB2 �� ���� �� ��� � ����.
DAS� �� �� DB2 ��� GUI �� � ���� ����
� ���� �� DB2 � ������. DAS�� DAS ���� �
� DAS ���� � �� ����� �� ���� ��� ��� �
�� ����.
DB2� ���� �� DAS ��� ��� ���� DB2 �� ���
� ���� �� �� �� ����. DB2 �� ���� ���� � �
� ��� ��� ���� ��� �� � ���� ��� �
�� �� ��� ��� �� ��� �� ���. ��� �
�� ��� �� � �� �� ��� �� ���. � ����
��� �� ��� ��� �����.
v ��� ��� �
v ��� �
v �� ��� �
v ��� ��� �
v ����� ���
v ���� �����(Windows XP Windows Server 2003 ��
�� ���� �� �� ���� �����).
v ��� �� �� ���
� 4 � �� Windows ���� 31
�� ��� ���� DB2ADMNS ��� � ��� �� ���. �
�� ��� ���� ���� ��� ��� ��� ���� �� �
��. ��� ���� �� �� �� ��� ����� ���.
″��� �″ ��� DB2 �� ���� ��� �� ��� �
���� ��� � �� �����.
��� ��� �� ����� ��� � � ��� ���� �
�� ��� ����, ��� ��� �� ���� � �� � �
�� ��� ��� �����. ��� ��� �� � , ��� ��� �
�� ��� �� ������ �� � � �� ����.
��� � �� ��� � �� ��� � ��� DAS ���� �
� �� � DB2 ���� �� SYSADM ��� �� �� �� ����.
��, �� ��� �� ���� SYSADM ��� ���.
DB2 ��� ��� ����
��� ��� ��� �� � �� �� ��� �� ���.
DB2 ���� �� �� �� ��� ��� �����. � DB2
���� ��� �� � ��� ��� ���� ����. DB2�
��� � � � ��� ��� ���� ������. �� ���
�� �� LocalSystem ��� ���� �� DB2 ����
������ �� �� ������ � ��� �� �� ���
��� ���� �� ����. ���� DB2 ��� ���� �
� ��� ��� ��� �� �� � �� �� ��� �
�� ���� ��� �� ���.
��� �� ��� ��� ���� DB2 Enterprise Server Edition�
��� � ��� �� ��� �� �� ����.
DB2� ���� �� DB2 �� ��� ��� ���� DB2 �
� ���� ���� �� �� �� ����. DB2 �� ���� ���
� � �� ��� ��� ���� ��� �� � ���� ��
� ��� �� ��� ��� �� ��� �� ���. � �
��� ��� �� ��� ��� �����.
v ��� ��� �
v ��� �
v �� ��� �
v ��� ��
v ��� ��� �
v ����� ���
v ��� �� �� ���
32 DB2 Servers� �� �
�� ��� ���� DB2ADMNS ��� � ��� �� ���. �
�� ��� ���� ���� ��� ��� ��� ���� �� �
��. ��� ���� �� �� �� ��� ����� ���.
″��� �″ ��� DB2 �� ���� ��� �� ��� �
���� ��� � �� �����.
��� ��� �� ����� ��� � � ��� ���� �
�� ��� ����, ��� ��� �� ���� � �� � �
�� ��� ��� �����. ��� ��� �� � , ��� ��� �
�� ��� �� ������ �� � � �� ����.
DB2 ��� ���� �� Windows� ��� �� ��(Windows)
Windows� DB2 ��� ���� �� ���� �� ��� ��� ��
�� ����. ��� DB2 ��� ��� ��� ���� ��� � ���
�. ��� ���, Windows ��� Windows� �� �� ��� ��� �
��.
� ���� Windows ��� ��� ��� ��� ���� ��� � �
� �� ���� � �� ���� ��� �� ����. ��� �����
DB2 � ��� ���� � ���� ���� ����.
���� Windows ��� �� ��� �� �� ���� DB2 ��� �
�� � ��� �� � ���� ��� ���. � ���� ��� DB2 ���
���� ����� � ������ DB2 ��� ��� �� �� � ���
�.
� ����� ��� �� �� ��� ���� ��� ��� �� �� ��
��� ������.
v ��� ���� FixPack, �� ��� ����� ��� ���� �� ��
�� ������ �� � �� �� DB2� ������ � ����.
v ��� ���� DB2 ��� �� ��� � ����. Windows Vista( � �
�) ����� ��� � ���� DB2 ��� �� ��� � ���
�.
� ����� Windows Group Policy Editor� �����.
1. �� -> ��� �� gpedit.msc� ������. � �� �� ����.
2. � � �� –> � ���� –> Windows ���� –> Windows �� ���
� ����.
3. �� �� �� ��� �� ���� ����.
v �� �� ���� �����(��).
� 4 � �� Windows ���� 33
v ���� ��� ���� ���(��).
v Windows �� ���� �� ����� ���. �� �� �� � ��
�� �����.
v ���� �� �� ��� ��� � �� ���(����).
v ��� � ���� �� ��� ���� ���(����).
v ��� � ���� ��� ��� ����(����).
4. ��� �� ��� ��� �� ��� ������.
a. ��� �� –> �� ��� –> Windows ���� –> Windows �� �
���� ����.
b. �� �� ��� �����(��). �� �� ��� �� ���� ��
��.
5. DB2 ��� ��� ��� ��� �� ��� �����.
v DB2 ��� ��� ��� ��� �����. ��� � �� �
�� �����.
v ��� ���� �� �� �� �� �� ��� ������.
6. ����: FixPack ��� � ��� �� �� ������.
v sqllib₩cfg ���� �� �� �� ��� ������.
v FixPack ��� ����� ��� ������ ���� allowlockdownpatch
� �� ���� � ����(Windows Installer SDK ���� �� ��).
7. �� �� � ��� ���� � �� �� ��� �� �����.
v PC� �� ����.
v ��� gpupdate.exe� ������.
� ����� �� �� ���� � �� ���� DB2 � ��, �����
FixPack� ��� � �� ��� ��� �����.
Windows � �� �� ��� regedit ��
Windows �� �� �� ��� ��� regedit� ���� ����.
1. ����� ��
HKEY_LOCAL_MACHINE₩SOFTWARE₩Policies₩Microsoft₩Windows
�� � �� ���� ������.
2. �� ��� � ������ �����.
v AlwaysInstallElevated� � REG_DWORD=1� ������.
v AllowLockdownBrowse� � REG_DWORD=1� ������.
v AllowLockdownMedia� � REG_DWORD=1� ������.
v AllowLockdownPatch� � REG_DWORD=1� ������.
34 DB2 Servers� �� �
v DisableMSI� � REG_DWORD=0� ������.
v EnableUserControl� � REG_DWORD=1� ������.
3. ����� ��
HKEY_CURRENT_USER₩SOFTWARE₩Policies₩Microsoft₩Windows
�� � �� ���� ������.
4. �� ��� � ������ �����.
v AlwaysInstallElevated� � REG_DWORD=1� ������.
�� � ��
�� ��� ���� � , � �� ��� � ����. ��� ���
HKEY_LOCAL_MACHINE₩SOFTWARE₩Policies₩Microsoft₩Windows
��� ����� � �� ���� ������.
���� ����� DB2 �� �� ��
� �, Windows �� ��� ����� DB2 � ��� ��� ���.
Windows ��� DB2 ��� ��� ��� ����� SYSADM,
SYSMAINT �� SYSCTRL� �� �� ��� DB2 ��� ��� � �
���.
���� DB2 ��� �� ��(Windows)� ����� DB2 ��� ���� ��� ��� Windows ��� ���� � �
�� �� �� ����.
� �� � �� �� ��� �� ���.
��� ��� Windows ��� ����� ��� �����.
1. �� � � �� � �� �� Windows �� � ���� � ����.
���� �� ��� � �� ��� �� �� �� ��� ���� � ��
��� �� � � ����.
2. �� � �� �� � �� � �� ���� ����� � ����. �
�� ���� � � �� GMT � �� 1� ��� ���.
����� �� ��� ��/� �� �� �� ��� ���� ��� ��
� � ��� � ����. � ����� ����� max_time_diff �� �
���� ������. ��� max_time_diff = 60��, �� 60� ���
��� �����.
3. ���� ������ ��� ���� � � � ���� ″��� �� �
� ��″ ��� ��� ��� ��� � ����. �� ��� ���
� � ���� � � �� �� �� �� �� ��� �� ��� ″��
� �� � � ��″ ���� ���� ��� � � � ����.
� 4 � �� Windows ���� 35
4. � � �� TCP/IP� ���� �� ��� � ��� � ����.
a. � �� � ��� � �� ��� ��� ���� hostname �� ��
����.
b. �� �� � ��� �� �� ������.
ping hostname
��� hostname� �� � �� ��� �����. ��� ���� ��
� �� ��� �����.
Pinging ServerA.ibm.com [9.21.27.230] with 32 bytes of data:
Reply from 9.21.27.230: bytes=32 time<10ms TTL=128Reply from 9.21.27.230: bytes=32 time<10ms TTL=128Reply from 9.21.27.230: bytes=32 time<10ms TTL=128
� �� � �� TCP/IP� ���� �� ��� � ��� � � ��
� �� ������. � � ��� � IP ��� �� ���.
�� ���� ���� ��� ����� ������ ��� � � �
�� ��� ���� ��� � ����. �� �� � db2nchg �� ��
�� db2nodes.cfg ��� ���� ��� ������.
5. �� �� DB2 Administration Server ��� ��� ��� ���. ��
DAS(DB2 Administration Server)� ��� �� �� �� ��� ���
��. DAS� GUI ��� ���� � ���� ���� �� ���� �
������. � � ���� ����� DB2 �� ���� ���� ��
� ����. DB2 �� ���� ���� � �� ���� �� � , ��
� ��� � ���� ��� �� ���� �� ��� �� ��
�.
6. �� �� ���� ��� �� � ��� ���� �� �� ��� �
�� �� ��� ��� �� ���. DB2� ��� � � ���� �
�����. � �� � �� �� Administrators ��� �� ��� ��
� ��� ���. � ���� ��� ��� ��� ��� ���
�� ���.
7. ��� � � �� �� �� ��� ��� ������ ����
�� ��� � ����. GET DATABASE CONFIGURATION �� �
�� DFTDBPATH DBM �� ����� �� � �� � �� � � �
����.
8. �� �� DB2 ��� � �� ��� ��� ��� ���.
� DB2 ���� ��� ���� �����. DB2� ��� � �
� ��� ��� ���� ������. � ���� ����� DB2 �� �
��� ���� � �� ���� �� � ����.
36 DB2 Servers� �� �
���� ��� � ��� ��� �, DB2 �� ��� � � ��� ��
���.
DB2 �� ���� ���� � �� ���� �� � , ��� ���
� ���� ��� �� ���� �� ��� �� ���. ��
��� �� ��� � �� � �� �� Administrators ��� ��
�� ��� �� ��� ��� �� ����.
v ��� ��� �
v �� ��� �
v ��� ��� �
v ����� ���
v ��� ��
v ��� �� �� ���
�� ��� ��� � , ��� DB2ADMNS ��� ����� ���.
DB2ADMNS ���� �� ��� ��� ���� ���� ��� �
�� ��� ��� ��� ����.
��� �� ��(Windows)� ����� Windows ���� ����� ��� ���� � ��� �
� �� ����. DB2� �� ���� � ��� ��� ��� ����
�� ��� ��� ��� ���.
Windows�� �� ��� ��� ����� �� ��� ���� ���.
1. �� -> ��� �� secpol.msc� ������. Windows Vista��, ���
�� � ��� secpol.msc� ������. �� ����.
2. �� �� ��� ������.
3. �� ���� �� �� ���� ��� �� ��� �� �� �����
�.
4. ��� ���� ��� ��� ��� ������.
5. ���� �� —> ��...� ������.
6. ��� �� ��� ��� ���� ��� ��� �� ��� ����.
7. �� ����.
� �� Windows �� � �� � , �� ��� �� ��� ���� ���
� ����. �� � , ���� ��� ��� ��� ��� ���.
� 4 � �� Windows ���� 37
DB2 ��� ��� �� ����(Windows)��, ��� ��� � �� �� ��� ��� �� DB2 ��� �
��� ��� �(SYSADM) ��� �����. ��� �� ��� �
, �� �� ��� �� ���. ��� �� �� � , �� �
��� �� �� �� �� �� �� ��� �� ���. ����� ��
DB2_GRP_LOOKUP=local� ��� �� �� ��(�� �� ��)� ��
��� ���� �� � ��� DB2 ������ �� �� �� ���� �
��� �� �� � ����.
�� ��, � ���� �� ��� �� � �� DB2 ������� �
���� �� DB2 ������ �� �� ���� ��� ��(�� ��
��)� �����.
�� ���� SYSADM ��� ����, �� �� �� �� �� ����
�� ��� �� ���. DB2 ������ �� �� ��� ��� �
��� �� ��� ����, �� �� �� ��� �� ���� ����
DB2_GRP_LOOKUP=local� ���� �� � �� ����� � ��� ��
SYSADM ��� ����� ����.
�� ����� �� ��� �� ���� ���� ��� ���, �� ��
� ��� � ��� SYSADM ��� ��� �� ���� ������. ��
� DB2 �� ���� SYSADM_GROUP� �� �� ���� ������.
DB2 �� ����� ����� �� �� ������.
db2 update dbm cfg using sysadm_group global_groupdb2stopdb2start
FCM(Fast Communications Manager) (Windows)
FCM(Fast Communications Manager)� �� ��� ��� DB2 � ��
� �� ��� �����. � ������ ��� ��� ��� FCM ���
��� FCM ��� �� ��� ������ ��� � � ��� ����
���� �� ���� ��� �� �����. FCM �� ���� ��
� �� � ����.
������ ��� � � ��� �����, ��� ����� � �� FCM
���� ��(������ ��� ��� ��� � ��)� ���� �� �
(�: ��� ����� ��)� ���� ���. FCM �� ���� ��� �
����� ��� ��� ���� ��� ���.
38 DB2 Servers� �� �
fcm_num_buffers ������ � ��� �� ����� FCM ��� � �
� ���� fcm_num_channels ������ � ��� �� ����� FCM �
� �� ��� � ����. fcm_num_buffers fcm_num_channels ������
� ��� �� ����� ���� AUTOMATIC�� �����. FCM�
� ����� ��� ���� �� � �� ��� ���� ���� ��
� �����. ��� ����� AUTOMATIC�� ��� ��� ���� �� �
���.
LDAP ���� ���� �� ���� ��� ��(Windows)Windows Server 2003�� LDAP(Lightweight Directory Access Protocol) ��
� � ��� ����� DB2 ��� ��� �� ��� ����� Active
Directory ���� ��� ���. DB2 ��� ���� �� � ���� ��
���.
��� ���� ���� ��� �� ���.
v �� ��� ID� Active Directory� � ��� ��� �� �� � , �� �
� �� � DB2 ��� Active Directory� DB2 ���� ���
��.
v �� �� �� � ������� ��� Active Directory� ����
�.
��� ���� ���� �� DB2 ��� ���� ������� ���� �
�� ��� ���� ������� ��� ���.
Windows ��� �� ��� � ��� �� �� ���.
��� ���� ����� ��� �����.
1. �� ���� �������.
2. ��� � ��� �� ��� ��� ���� �� DVD���
db2schex.exe ���� �����. ��� �� ������� �� ���
�� ��� � ���� �� � ����.
runas /user:MyDomain₩Administrator x:₩db2₩Windows₩utilities₩db2schex.exe
��� x:� DVD ��� ��� ����.
db2schex.exe� ���� DB2 �� ��� �� �� � ����.
� 4 � �� Windows ���� 39
�� ����� �� �� �� ��� ��(Windows)� ������ �� � �� �� �� �� ���� � �� � ��� ��
����. �� ��� FCM(Fast Communication Manager)�� �����. FCM
� ������ ��� � � ��� ��� DB2 �����.
�� �� ������ ��� �� �� ���� ��� � , DB2� ���
� ������ ��� ���� ��� ������ ��� � �� �� �� �
�� �����. � ��� � �� �����. ������ ��� �� �
� � �� ���� �� � DB2 �� ���� �� �� ��� ��� �
�� ���. �� ��� ��� ������ ��� ��� �� ��� ���
�� ���.
� ���� �� �� ������ ��� �� ��� ��, ��� ����
������ ��� �� ���� �� �� ���.
�� � ���� �� �� �� ���� � ��� ��� �����.
1. services ��� ����. services ��� � ��� %SystemRoot
%₩system32₩drivers₩etc ���� ����. ��� %SystemRoot%� Windows
�� ������.
2. DB2 FCM(Fast Communications Manager)��� ��� ��� �����. �
� ��� � ���.
DB2_DB2 60000/tcpDB2_DB2_1 60001/tcpDB2_DB2_2 60002/tcpDB2_DB2_END 60003/tcp
DB2� 60000 ��� �� ��� �� � ��� �����.
3. � �� � ��� services ��� �� �� � �� service ���� DB2 FCM
��� ��� ��� �� �� �� � ����.
4. �� � ��� ��� ��� �� � � , � � �� �� ��� ��
��� ��� �� � �� ��� ��� ���� � ��� ��� ���
���.
40 DB2 Servers� �� �
� 5 � �� Linux � UNIX ����
� ����� �� DB2 ��(Linux � UNIX)DB2 ��� ��� �� ��� ��� � ����. DB2 ��� � ��� �� �
� ��� �� ����. � DB2 ��� �� �� �� �� �� �� ��� �
����.
�� ����� ��� ���� �� DB2 ��� ���� � � ����.
v ��� ��� �� DB2 ��� ���� ����.
v ���� ��� DB2 Administration Server(DAS)�� �� � ����.
v �� ��� DB2 �� � ��� ���.
v DB2 ��� �� DB2 ���� �� ��� ���� �� ����. ��
� db2iupdt �� ��� ���� ��� DB2 ���� �� ���� �
�� � ����.
v db2ln �� ���� ��� DB2 ��� �� ��� ��� �� ���
�� �� ��� ������. �� DB2 ��� ���� � �� ���
��� ����.
v Linux 32�� ���� Linux x64 �� ��� ��� � ����.
v DB2 �� ��� �� ���� � ���� �� �� � ��� ����
����.
DB2 ��� �� ��� ��� �� ��� ��� � ����. �� ���� �
� � � �� ��� ��� ����.
v AIX, HP-UX �� Solaris ��� � , /opt/IBM/db2/V9.5
v Linux ��� � , /opt/ibm/db2/V9.5
DB2 �� ���� �� � � � �� ��� �� �� � � DB2 ��
� ����� ���� � ��� ��� �� ���.
v AIX, HP-UX �� Solaris� � , /opt/IBM/db2/V9.5_##
v Linux� � /opt/ibm/db2/V9.5_##
��� ##� 01 - 99 ��� 0� ���� ��� � �����. � ��� �
��� � �� ����� _01���. �� ��, DB2 ��� �� ��� ����
�� DB2 �� ���� ���� ����� � �� �� /opt/ibm/db2/V9.5�
�� �� ���, DB2 ��� � � �� /opt/ibm/db2/V9.5_01� �����.
© Copyright IBM Corp. 1993, 2007 41
DB2 �� ��� ��� �� ���� ���� DB2 ��� ���� � �� �
� ��� ��� ���. � ��� � � ��� DB2 �� ���� �
��� DB2 ��� ���� � �� ����.
���� DB2 ��� �� ��� ��� � �� ��� DB2 ��� ��� � �
� ��� ��� ��� � �� ��� �� � , db2ls �� ���� ���
���� ��� �� �� ��� � ����. db2ls �� ��� ���� �
�� DB2 ��� �����.
FCM(Fast Communications Manager)(Linux � UNIX)FCM(Fast Communications Manager)� DPF(Database Partitioning Feature)� �
��� DB2 � ��� �� ��� �����.
�� ��� ��� � , � ������ ��� ��� ��� FCM ���
� ��� FCM ��� �� ��� ������ ��� � � ��� �
��� ���� �� ���� ��� �� �����. FCM �� ���� �
� ��� ��� �� � ����.
������ ��� � � ��� �����, ��� ����� � �� FCM
�� ��� �����. ������ ��� ��� ���� � ��� ��
� ����. FCM �� �� �� �� ������ ���. �� �� �
� � �� ����� �����. FCM �� ���� ��� ������ ��
� ��� ���� ��� ���.
fcm_num_buffers ������ � ��� �� ����� FCM ��� � �
� ��� � ����. ��, fcm_num_channels ������ � ��� �� �
���� FCM �� �� ��� �� ����. fcm_num_buffers
fcm_num_channels ������ � ��� �� ����� ����
AUTOMATIC�� �����. FCM� � ����� ��� ���� �� �
�� ��� � � �� � ��� ��� � � � � � . ��� ��� � �
AUTOMATIC�� ��� ��� ���� �� ����.
DB2 ��� � ��(Linux � UNIX)DB2 �� ���� DB2 �� �� �� ��� ��� ��� ����(��
� � ).
�: � ��� ��� ��� ��� ����.
��� DB2 �� ���� ��� � �� �� ��� ��� ��� ��
��� ����. Linux UNIX ���� DB2� �� �� � ���
� �� ��� �����.
42 DB2 Servers� �� �
��� ���
DB2 ��� �� ��� � ���� ����. � ��� ID�
� DB2 ���� ���� ��� ��� ������� ����
� �� ��� ���� �����. � ���� db2inst1��
� ��� db2iadm1���.
DB2 �� ���� ��� � � �� DB2 ��� �� � ��
�� ��� ����. � ��� db2inst1���. �� ��� ���
��� DB2 �� ���� ��� ��(db2inst2, db2inst3 �)� ���
� ����. �� � �� ��� ID�� ���� �� ���
� �� ��� ��� �� �� �����. ���� ��� � , �
���� DB2 �� ����� ����. ��� �� ���� �� �
��� ����� ��� �� ����.
��� �� �� �� � ���� �� ��� DB2 Administration
Server ��� ��� ����.
� ���
�� ���� DB2 ������� ���� ���� ���� ���� �
�� �� ��(UDF) ���� ����� ��� � �����.
� ���� db2fenc1�� � ��� db2fadm1���. ��� �� �
�� ���� ���(�: �� ����) �� ���� �� ����
��� � ����.
DB2 Administration Server ���
DB2 Administration Server(DAS) ���� ID� ����� DB2
Administration Server� ��� � �����. � ���� dasusr1
�� � ��� dasadm1���. � ��� ID� DB2 GUI ��� ��
� ������ �� ������� �� � ���� �� �
�� �����.
� �� ��� DAS� ����. �� �� ��� ��� ������
��� ���� �� ��� ������ ��� ��� DAS ���
� ����. DAS� ��� ��� DAS� ��� �� �� ������
��� ��� � ����. ��� ��� ��� DAS� ��� ���
� �� ������ ��� � �� DAS� �� ��� ��� �
��. DAS ��� ��� DAS�� ���� ������ ��� ��
� �� ���� ���.
��� ID ����
��� ID� ���� ����� ��� ����.
v guests, admins, users local ��� �� ��� �� �
v ��� ��(a–z), ��(0–9) �� ��(_)� ��� � ��
� 5 � �� Linux UNIX ���� 43
v 8��� � � ��
v IBM, SYS, SQL �� ��� �� � ��
v DB2 ���(USERS, ADMINS, GUESTS, PUBLIC �� LOCAL) �� SQL
���� � ��
v � ��� ��� � ��
v NIS �� NIS+�� ��� ID� �
v � ��� ID� ��� �� �� ��� ID� ��� � �� ��� ID��
�� ��� � ����.
– �� �� ���
– ��� ��� �� ���
�� ��� ��� �� ����(Linux � UNIX)�� ������ ��� ��� � , � �� �� ����� ����.
DB2 ��� �� ���� ���� ���� ��� ����� �� � �
���. �� ��, LDAP� �� ��� �� ���� ��� ���� � �
�� � ����.
�� ���� �� �� ��, �� ���� �� �� DAS� ��
� ������ � �(DAS) ��� 1� ��� �� ����� �����.
�� � ���� � �� ��� ��� � �� � , �� � ��� �
����. �� ���� � ��� ��� ��� �����.
��� ����� �� �� ���� DB2 �� �� �� � ���� �
�� �� ��� ���� �� ��� ����.
Linux on zSeries� DB2 �� ��
Linux� � � IBM zSeries� DB2 ��� ����� Linux ��� �
� ��� �� ���� �� ���. FTP� ���� �� ���� ��
� ���� NFS ��� ���� ���� �� DVD� ��� � �� �
�� ���.
�� �
�� DB2 �� �� ���� ������.
FTP� ���� �� ��� ��
Linux� � � IBM zSeries � ��� ��� �����.
1. �� �� ������.
ftp yourserver.com
44 DB2 Servers� �� �
��� yourserver.com� DB2 �� �� ���� �� FTP �� �
���.
2. ��� ID� ��� ������.
3. �� �� ������.
binget product file
��� product file� �� �� ��� ��� ����.
NFS� �� DB2 �� DVD� ���� �� ���� ��
Linux ���� �� DVD� ����� ��� �����.
1. �� �� DVD� ������.
2. DVD� ��� ���� ��������. �� ��, DVD�
/db2dvd� ��� � /db2dvd ���� ��������.
3. Linux� � � IBM zSeries � ��� �� �� ���� �
���� NFS ������.
mount -t nfs -o ro nfsservername:/db2dvd /local_directory_name
��� nfsservername� NFS �� ��� ��� ���� db2dvd�
NFS ��� ���� � ��� ��� ����
local_directory_name� �� ���� ��� ����.
4. Linux� � � IBM zSeries � ��� DVD� ���� ��
���� ������. cd /local_directory_name �� ���� �
�� �� � ����. ��� local_directory_name� �� DVD� �
� ��� ����.
DB2 ������ ��� �� �� � ��� ID �(Linux � UNIX)� ���� ���� ��� ��� �� � �� �� ��� �� ���.
�� ��� ��� �����.
DB2 �� ���� �� ��� � ���� �� �� ��� ��� ��
��. �� � �� ��� ��� �� �� � ����.
�� ���� ���� ��� �� ��� �� � ����� ����.
��� �� �� � � DB2 �� �� � � �� ��� �� ��� ���
� ����.
� 5 � �� Linux UNIX ���� 45
��� ��� ID� �� �� ���� ���� �� �����.
11. � ��� ��
��� ��� �� � ��
�� ��� db2inst1 db2iadm1
�� ��� db2fenc1 db2fadm1
DB2 Administration Server ��
�
dasusr1 dasadm1
v �� ��� � ���� DB2 ��� � �����.
v �� ���� DB2 ������� ���� ���� ���� ���� ���
�� ��(UDF) ���� ����� ��� � �����.
v DB2 Administration Server ���� ��� ID� ����� DB2 Administration
Server� ��� � �����.
DB2� �� �� ��� ��� ID� ���� ��� �����.
1. �� ��� �� ���� �� ����.
2. ��� ���� �� ������.
�: �� � �� ��� ���� ����. � �� ����. ���
passwd username �� ���� ��� ��� � ����.
AIX � ��
AIX�� ��� ���� �� �� ������.
mkgroup id=999 db2iadm1mkgroup id=998 db2fadm1mkgroup id=997 dasadm1
��� ��� �� ���� �����.
mkuser id=1004 pgrp=db2iadm1 groups=db2iadm1home=/home/db2inst1 db2inst1
mkuser id=1003 pgrp=db2fadm1 groups=db2fadm1home=/home/db2fenc1 db2fenc1
mkuser id=1002 pgrp=dasadm1 groups=dasadm1home=/home/dasusr1 dasusr1
HP-UX � ��
HP-UX�� ��� ���� �� �� ������.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
��� ��� �� ���� �����.
useradd -g db2iadm1 -d /home/db2instl -m db2inst1useradd -g db2fadm1 -d /home/db2fenc1 -m db2fenc1useradd -g dbasgrp -d /home/dasusr1 -m dasusr1
46 DB2 Servers� �� �
Linux � ��
Linux ���� ��� ���� �� �� ������.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
��� ��� �� ���� �����.
useradd -u 1004 -g db2iadm1 -m -d /home/db2inst1 db2inst1useradd -u 1003 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1
Solaris � ��
Solaris�� ��� ���� �� �� ������.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
��� ��� �� ���� �����.
useradd -g db2iadm1 -u 1004 -d /export/home/db2inst1 -m db2inst1useradd -g db2fadm1 -u 1003 -d /export/home/db2fenc1 -m db2fenc1useradd -g dasadm1 -u 1002 -d /export/home/dasusr1 -m dasusr1
OS ��� �� ����(Linux � UNIX)� ����� Linux UNIX ���� ���� �� ��� ���
�� ��(ulimits)� �����.
��� �� DB2 ��� ulimits� ��� ��� ��� ���.
v �� ��� � DB2 ��� DB2 ������ ���� ��� �� ��� �
��� ulimits� ���.
v ��� ��� � DB2 ��� �� ���� data, nofiles fsize ulimits�
��� ��� ���� �� ��� � � ����.
� � � ���� �� ��� � ���� �� ����. �� ��� ���
� data, nofiles fsize ulimit �� �� �� ��� ��� ��� ��
�.
��� ��� �� ���� ulimit �
��� ��� ��� �� �� ���� data, nofiles fsize ��� ��
�� ulimits� � � ���. ���� �� �� � ��� ����.
12. ��� ��� � ���� ulimit �
�� ulimit �� �� �� � �� � � �� ��
data ���� ���
�� � ��
� ��� �� �
�� ���
��� ulimit –Hd
� 5 � �� Linux UNIX ���� 47
12. ��� ��� � ���� ulimit � (��)
�� ulimit �� �� �� � �� � � �� ��
nofiles ���� ���
�� �� �� �
��� ��
� �������
�� MAXFILOP
������ ��
���� ��� �
65536 �� ��� ulimit –Hn
fsize ��� � � ��
��
��� ��� ulimit –Hf
�� ulimit �� ���� ��� DB2 ���� ��� �� �� �� ��
�� �� � ����. ��� �� DB2 ��� ��� � ����.
��� ��� �� ulimit �� ��� �� � �� �� ���� ��� ��
�� ������. db2rfe �� ��� ulimit� ���� ��� �� AIX
��� ���� ulimit �� ��� ��� ���.
�� ����(Linux � UNIX)
�� ���� ��(HP-UX)
HP-UX�� DB2 ��� ��� ���� ���� �� �� ����� ���
���. �� �� ���� �� ��� � � �� ��� ���.
�� ����� ����� �� ��� �� ���.
�� ����� ����� ��� �����.
1. sam �� ���� ��� � ���(SAM)� �����.
2. � �� ��� �� ������.
3. �� ���� ��� �� ������.
4. ����� ����� �� ���� �/� ��� � �� ������.
5. �� ����.
6. ����� � �� �� ����� �� � �� ������.
7. � �� �� ���� ��� ���� � �� ���� �� --> ���
� ���� ������.
���� �� �� ���� �� ����, HP-UX ��� ��� ���
��.
48 DB2 Servers� �� �
�� �� �� ����(HP-UX)
DB2 64�� ������ ���� � � HP-UX ���� � , db2osconf
�� ��� ���� �� �� �� ���� �� ��� � ����. db2osconf
����� $DB2DIR/bin��� �� � ����. ��� $DB2DIR� DB2 ���
���� �� ������.
�� ���� ��(Linux)
DB2 ������ ���� ���� �� Linux �� ����� ��� ���.
Linux� � , DB2 ������ ���� � ��� �� �� ����� �
�� ���� ����.
�� ����� ����� �� ��� �� ���.
Red Hat SUSE Linux�� �� ����� ����� ��� �� ����
�.
1. ipcs -l �� �����.
2. ��� ���� ���� �� ����� ���� ��� �����. ���
� ��� ��� �� // ��� ��� �������.
# ipcs -l
------ �� ��� �� --------�� ���� � = 4096 // SHMMNI�� ���� ��(�����) = 32768 // SHMMAX�� � �� ���(�����) = 8388608 // SHMALL�� ���� ��(���) = 1
------ ���� �� --------�� �� � = 1024 // SEMMNI��� �� ���� = 250 // SEMMSL�� ���� ��� �� = 256000 // SEMMNS���� ��� �� �� � = 32 // SEMOPM���� ��� = 32767
------ ���: �� --------�� � ��� �� = 1024 // MSGMNI�� ��� ��(���) = 65536 // MSGMAX��� �� � ��(���) = 65536 // MSGMNB
v �� �� ��� � �� ���� ��� SHMMAX SHMALL� �
� ��� �������. SHMMAX� Linux ���� �� �� ��
���� �� �����. ��� SHMALL� ���� �� �� �� �
��� �� �����.
– SHMMAX �� ���� �� ���� ��� ���� �� ���
�. ��� x86 ���� ��� ���� 268435456(256MB)�� 64��
���� � �� 1073741824(1GB)���.
� 5 � �� Linux UNIX ���� 49
– SHMALL� �� 8GB(8388608KB = 8GB)� ���� ����. �
� ��� ��� �� � DB2� �����, � �� �� ��� �
90%� � ����� �� ���. ��� � , � � ���� DB2
� �� ���� 16GB� ��� � �� � , 3774873(16GB� 90%�
14.4GB�� �� 4KB(�� ��� ��)� �� �)�� ��� ���.
ipcs ��� SHMALL� ������ �����. ����� � �� �
�� �� ����.
v �� ����� ��� �� ��� ��� �� �� ����. ��
���� sem� � �� ��(SEMMSL, SEMMNS, SEMOPM SEMMNI)
�� �����. SEMMNS� SEMMSL� SEMMNI� �� �����. �
����� � ������ ��� �� ��� �(SEMMNI)� �� �
��. ���� SEMMNI� ��� � � �� �� ��� �� ���
������ � � �� �� ����� �� �� �� ����� ��
�� �� ���� �� � �� ���.
v �� ����� ���� �� ���� �� ����.
– MSGMNI� �� � �� ���� �, MSGMAX� ��� �� �
�� ���� ��, MSGMNB� �� ��� �� ����.
– MSGMAX� 64KB(� 65535���)� ���� MSGMNB� 65535� �
� ���.
3. � �� ����� ����� /etc/sysctl.conf ��� �����. � ��� �
��� ��� ��� �����. �� � ��� �� � ����� �
� ����.
kernel.sem=250 256000 32 1024#Example shmmax for a 64-bit systemkernel.shmmax=1073741824#Example shmall for 90 percent of 16GB memorykernel.shmall=3774873kernel.msgmax=65535kernel.msgmnb=65535
4. -p ����� �� sysctl� ��� � �� /etc/sysctl.conf��� sysctl
��� ������.
sysctl -p
5. �� � ��� ����� ���� ��� �����.
v (SUSE Linux) boot.sysctl� �������.
v (Red Hat) rc.sysinit ���� ����� ��� /etc/sysctl.conf ��� �
���.
50 DB2 Servers� �� �
�� ���� ��(Solaris)
DB2 ������ ���� ��� �� ��� ���� �� �� �����
���� �� ����. db2osconf ����� ���� �� �� ����� ��
� � ����. ���� �� ��(/etc/project)� ����� � ��� Solaris �
�� �� ���.
�� ����� ����� �� ��� �� ���.
db2osconf �� ����� �� DB2 ������ ���� ��� ���.
db2osconf ����� $DB2DIR/bin��� �� � ����. ��� $DB2DIR� DB2
��� ���� �� ������.
�� ����� ��� ��� ���� ��� ���.
�� ����� �����, ��� �� /etc/system ��� �� � ������
set parameter_name = value
�� ��, msgsys:msginfo_msgmax ���� �� ����� �� � /etc/system
�� �� ������.
set msgsys:msginfo_msgmax = 65535
/etc/system ��� ��� � ���� ������.
�� ���� ������ �� ���� ���(Linux � UNIX)
���� DB2 ��� �� �� �� ��(AIX)
� ����� ���� ������ ���� ��� � � ��� ��� �� �
� ���� ����.
AIX �� ��� ����� ��� �����.
1. �� ��� �� ���� � �� �� ����.
2. �� �� ���� AIX maxuproc(���� �� ��� �) ��� ��
� 4096�� ������.
chdev -l sys0 -a maxuproc=’4096’
�: �� ���� � � � bosboot/reboot� 64�� ��� ��� �
� ����.
3. ���� ������ ���� ���� � ������ TCP/IP ���� �
���� �� ��� ������. ��� �� � ����� �� �����
�. ���� � ����� �� � � ��� ���� �� � �� ��
�� ����.
� 5 � �� Linux UNIX ���� 51
thewall = 65536sb_max = 1310720rfc1323 = 1tcp_sendspace = 221184tcp_recvspace = 221184udp_sendspace = 65536udp_recvspace = 65536ipqmaxlen = 250somaxconn = 1024
� ���� � ����� �� ���� ����� �� �� �����
�.
no -a | more
����� ����� �� �� ������.
no -o parameter_name=value
� ��� �� �� ��� ����.
v parameter_name� ��� �������.
v value� � ����� ��� ����.
�� ��, tcp_sendspace ����� 221184� ����� �� �� ���
���.
no -o tcp_sendspace=221184
4. �� �� ��� �� ���� css0� �� spoolsize rpoolsize� �� ��
� ��� ���.
spoolsize 16777216rpoolsize 16777216
� ����� �� ���� ����� �� �� ������.
lsattr -l css0 -E
� ����� ����� �� �� ������.
/usr/lpp/ssp/css/chgcss -l css0 -a spoolsize=16777216/usr/lpp/ssp/css/chgcss -l css0 -a rpoolsize=16777216
���� �� � /tftpboot/tuning.cst ��� ���� �� � , DB2DIR/misc/
rc.local.sample �� ���� ��� ���� �� � ���� � �����
��� � ����. ��� DB2DIR� DB2 ��� ��� �����. �� �
� �� ���� ��� ���� ���� � ����� ����� ��
�� �����.
a. �� �� ����, � ���� ��� /etc ���� ���� root� �
� � ��� �����.
52 DB2 Servers� �� �
cp /usr/opt/db2_09_01/misc/rc.local.sample /etc/rc.localchown root:sys /etc/rc.localchmod 744 /etc/rc.local
b. /etc/rc.local ��� ���� ����� �� ������.
c. ��� �� ��� /etc/rc.local ����� ���� /etc/inittab ���
� � ������. mkitab �� ���� /etc/inittab ��� � � ��
� � ����. � � � ����� �� �� ������.
mkitab "rclocal:2:wait:/etc/rc.local > /dev/console 2>&1"
d. �� �� ���� /etc/inittab ��� /etc/rc.nfs � � ���� ��� �
����.
lsitab rcnfs
e. �� �� ���� ���� �� �� �� ���� ����� ����
��.
/etc/rc.local
5. DB2 ESE� ���� ��� ���� ��� ��� ����� ��� � �
���. ��� ����� ���� �� � , ��� �� �� �� �
�� ���� ���� �����(� DB2 ��� � ��� ���� �).
����� ��� ����� � ��� �� �� ������.
lsps -a
� �� ��� ��� ��� ����.
Page Space Physical Volume Volume Group Size %Used Active Auto Typepaging00 hdisk1 rootvg 60MB 19 yes yes lvhd6 hdisk0 rootvg 60MB 21 yes yes lvhd6 hdisk2 rootvg 64MB 21 yes yes lv
� �� ��� �� �� �� � � ��� ��� � �� ��� ��
�.
6. ���� � �� ��� ���� ������ ���� �� � �� �
� �� � �� ���� �� ��� �(NFSD) �� ��� �� �
��.
��� �� biod � × ���� �� ��� �
�����, � � ��� 10�� biod ���� �� ���. �� ��
� �� 10�� biod ���� �� � �� � � ������ 40�� NFSD
� �����.
�� ���� ��� � �� � ��� �� 120�� NFSD� �� � ��
��.
NFS� �� �� ��� �� NFS ��� �����.
� 5 � �� Linux UNIX ���� 53
ESE �������� ��� ���� � � � ��(AIX)
AIX� ���� ������ ����, ���� ������ ���� ����
RS/6000® SP™ ����� �� �� ���� �� � �� ��� � �
���. dsh ��� �� ������ ��� � ����.
� ��� ���� AIX�� ���� ������ ���� �� �� �� � �
�� �� ��� ��� � � ��� �� �� ���� �� � �
���.
� �� ������ � � �� ��� ��� � ���.
�� ��� �� ���� CWS(Control Workstation)� ���� ���.
���� ������ ���� ���� � RS/6000 SP ������ �� �
�� ��� ���� ��� ����. ����� �� �� �� �����
� � �� ����� ��� �� �����.
1. � �� ��� � ������ �� ��� ��� ���� eeelist.txt
��� �����.
�� ��, workstation1 workstation2�� � �� SP ��� ����
� �� ���� ������. eeelist.txt� ��� ��� �� ����.
workstation1workstation2
2. � � �� ��� ������. � �� ����� �� �� ����
��.
export WCOLL=path/eeelist.txt
��� path� eeelist.txt� �� ���� eeelist.txt� ���� �� �� �
���� � � �� RS/6000SP ������ �����.
3. �� �� ���� � ��� ��� ��� ������ ��� � �
���.
dsh -q
��� ��� ��� ����.
Working collective file /eeelist.txt:workstation1workstation2Fanout: 64
�� ���� �� � �� ��� ��(Linux � UNIX)
� ������ �� � �� �� �� �� ���� � �� � ��� ��
����. �� ��� FCM(Fast Communication Manager)�� �����. FCM
� ������ ��� � � ��� ��� DB2 �����.
54 DB2 Servers� �� �
�� � � �� �� �� ��� � � �� �� ������ ��� ��
��� ��, ��� ���� ������ ��� �� ���� �� �� �
��.
�� �� ������ ��� �� �� � �� ��� � , DB2� ���
� ������ ��� ���� ��� �� ������ ��� � �� ��
�� ��� �����. � ��� � �� �����. ���� ������ �
�� ���� � �� � , FCM ��� �� /etc/services ��� ��� ��
� ���. FCM ��� ��� ���� � ��� ��� �� ��� �� �
� ����. �� � �� � DB2_<instance> DB2_<instance>_END� �
����. �� � �� ���� FCM ��� �� ����� ��� ����.
v � �� ��� �� � �� � �� ��� ��� ���.
v �� ��� ��� ��� ���� ���.
v ��� �� ��� �� ��� ���.
services ��� ����� �� ��� �����.
�� � ���� �� �� �� ���� � ��� ��� �����.
1. /etc/services ���� �� services ��� ����.
2. DB2 FCM(Fast Communications Manager)��� ��� ��� �����. �
� ��� � ���.
DB2_db2inst1 60000/tcpDB2_db2inst1_1 60001/tcpDB2_db2inst1_2 60002/tcp
DB2_db2inst1_END 60003/tcp
DB2� 60000 ��� �� ��� �� � ��� �����.
3. � �� � ��� services ��� �� �� � �� service ���� DB2 FCM
��� ��� ��� �� �� �� � ����.
4. �� � ��� ��� ��� �� � � , � � �� �� ��� ��
��� ��� �� � �� ��� ��� ���� � ��� ��� ���
���.
�� �� ������ ��� �� �� � �� ��� � �� �����
� ��� �� DB2 ��� ��� ��� ���. ���� �� �� ��
� � ��(� ��� db2ese_addpart.rsp)� ���� FCM ��� ��
/etc/services ��� ��� ��� ���. FCM ��� ��� �� ���� �
�� �� ��� �� �� ����. �� � � ���� �� ��� �� ��
� �� DB2_ DB2__END� � � � ���. ���� � ���� ����
FCM �� ���� �� � �� ��� �� �� �� ��� ��� �
�� ��� ���.
� 5 � �� Linux UNIX ���� 55
���� ������ ��� �� DB2 � �� ��� �
DB2 Enterprise Server Edition �� ���� ������ ��� ����
� ���� ��� � �� �� ���� �� ���. � �� ���� ��
� ���� �����. �� DB2 ������ �� CD ���� �� ����
��� � ����.
���� ������ ���� �� DB2 � �� ��� �(AIX)
� ���� ���� ������ ���� ���� �� �����. � ���
��� �� �� ��� ��� �� ����.
v DB2 � �� ��� �
v � �� ��� NFS ����
v ���� � � ���� � �� ��� NFS ��
DB2 �� DVD� ���� ��� �� � �� ���� ��� �� ����.
�� �� ���� ��� ��� � ����(KB �� ��).
du -sk <DVD mounting point>
DB2 ���� � 50MB� ����� �����. ��� �� � � �� �
, ��� ��� ���� �� ���� � � ���� DB2 �� DVD� �
�� � ����.
�� ��� �� ���.
v �� ���� ��� �� �� ��
v ���� �� ���� ���� ���� �� � ��
DB2 � �� ���� �, NFS ���� NFS ����� �� �� �
����.
DB2 � �� �� ��
root ��� �� ���� ���� ������ ���� �� � �
(ServerA)� ����� ���� ������ ���� �� � �� ���
/db2home� �����.
1. smit jfs �� ������.
2. �� �� �� �� ��� ����.
3. �� �� �� �� �� ��� ����.
4. � �� ���� ���� ��� �� � ��� �� � ��
��� ������.
5. �� ���� ��(�� ��� ��(512��� ��)(Num.) ��)� �
�����. � ��� 512��� ��� ����� �� � ��
56 DB2 Servers� �� �
�� �� ���� ��� �� � , � 90MB 180,000� ���
� ����. ��� ��� �� �� DVD ��� ��� ��� �
� , � 1GB 20,000,000 ��� �� � ����.
6. ��� � ��� � �� ���� �� �� ��� ������. �
�� �� ��� /db2home���.
7. �� ���� ���� ����� ���? ��� �� ������.
��� ��� ���� ����� ���.
8. �� ����.
DB2 � �� �� ����
1. ���� ������ ���� ��� � � ��� /db2home� �
� ���� ��� � ��� �� ���� NFS ��������.
a. smit nfs �� ������.
b. ���� ����(NFS) ��� ����.
c. �� ���� ��� �� ��� ����.
d. �� ���� �� �� ��� ����� �� �� ��
�(�: /db2home)� ������.
e. root� ��� ��� ��� ��� ���� ������ ���
� ��� � ����� ��� ������. � �� � ���
��� �(,)� ������(�: ServerA, ServerB, ServerC). �
�� �� ��� ��� � , � ��� � ������� �� �
� �� ��� ���� �� �� ���. ��� ��� ���
� ����� ���.
f. �� ����.
2. �������.
���� � ����� DB2 � �� �� ���
���� � � �(ServerB, ServerC, ServerD)� ���� � �� ��
��� ����� �� ���� NFS ������.
1. smit nfs �� ������.
2. ���� ����(NFS) ��� ����.
3. ��� ���� �� ��� ����.
4. ��� �� �� ��(��) ��� �� ��� �� ��� ���
���.
�� ��� �� ��� DB2 � ���� �� �� ����
�. �� ��, /db2home���.
� 5 � �� Linux UNIX ���� 57
5. ��� ���� �� �� ��� �� ���� �� ��� �
�����.
� ���� ��� �� �� ��(��) ��� ���� �� ��
�� ��� ���.
6. ��� ���� �� ��� ��� ���� �� ���� ����
� ��� ��� ��� ������.
� �� ��� �� ���� �� ��� ��� �����.
��� ���� �� ���� �� �� ���� �� �� ���
�� NFS ��� �� ����. �� �� ��� ���� � ��
���� ����� ��� ���� �� ��� ��� ���� �
�� ��� ���.
� �� ��� �� �� ��� ��� � �� � � , ���� �
����� ���� ��� � ������ DB2 � ���� �
� �� ��� �����.
7. �� ���, /etc/filesystems� � �� �� ��? ��� ��� �
�����.
8. �� ���� /etc/filesystems� ���� ���� ������. �
�� �� ������.
9. � NFS ����� �� ��� �� ��� ������.
10. ����� ��� �� ��� ��� ��� ���� ������.
��� ��� � ��� ��� ���� ����� ����
� ���� ��� �����. �� ��� ��� ��� ��� �
�� ��� ���� ��� �� �����. ��� �� ��� �
���� � � ����. � ��� ���� ���� �� �
� ���.
��� ��� ���� ����� ���.
11. � �� ���� � �� ���� SUID� sgid ����� ���
���� ���? ��� �� ���� ������ � ����. �
�� � �����.
12. �� ����.
13. �������.
58 DB2 Servers� �� �
���� ������ ���� �� DB2 � �� ��� �(HP-UX)
� ���� ���� ������ ���� ���� �� �����. � ���
��� �� �� ��� ��� �� ����.
v DB2 � �� ��� �
v � �� ��� NFS ����
v ���� � � ���� � �� ��� NFS ��
DB2 �� DVD� ���� ��� �� � �� ���� ��� �� ����.
�� �� ���� ��� ��� � ����(KB �� ��).
du -sk <DVD mounting point>
DB2 ���� � 50MB� ����� �����. ��� �� � � �� �
, ��� ��� ���� �� ���� � � ���� DB2 �� DVD� �
�� � ����.
�� ���� ���� �� ��� �� ���.
DB2 � �� ���� �, NFS ���� NFS ����� �� �� �
����.
DB2 � �� �� ��
�:
1. �� ��� �� �� �� ���� newfs �� ����� ��
�� � �� ���� �����. �� ��� ��� man newfs
�� ������.
2. � �� ���� ��� ����, ���� �� ��� � ��
���� ����� /etc/fstab ��� � � ������.
SAM ��:
1. sam �� ������.
2. ��� � �� �� ��� ����.
3. �� �� ��� ����.
4. �� —> �� �� �� ��� ������.
5. �� � � ���� ��� � � ���� �� � � ���
� ����. �� � � ���� ���� �� ����.
DB2 � �� �� ����
HP-UX ��� ����� DB2 ESE� ��� � , /etc/exports ��� �
� ���� NFS� ���� SAM� ���� � �� ���� ����
� � ����.
� 5 � �� Linux UNIX ���� 59
SAM� ���� �� ���� ������� ��� �� �����.
1. sam �� ������.
2. ��� � ��� ����.
3. ���� �� �� ��� ����.
4. ������ �� �� �� ��� ����.
5. �� ��� � � ����� �� �� ��� ������.
6. �� ��� �� ��� ����� �� �� ���
(�: /db2home)� ������.
7. ��� �� �� �� ��� �� ���� �� � ��
�� ��/�� ��� ������.
8. �� ��� �� �� �� ��� �� ���� �� �
�� �� ��� ������.
9. �� ����.
10. �������.
���� � ����� DB2 � �� �� ���
� �� ���� ����� �, � �� � ��� � �� ���� �
�� ���.
� �� � ��� ��� �����.
1. sam �� ������.
2. ��� � ��� ����.
3. ���� �� �� ��� ����.
4. ����� ��� �� �� ��� ����.
5. �� ��� � � NFS �� ��� �� �� ��� �����
�.
6. �� ��� �� ��� ��� �� ���(�: /db2home)� �
� ��� ������.
7. ��� �� �� ��� �� �(�: ServerA)� ��� �����
�.
8. ��� ��� �� ��� �� ���� �� �� ���
(�: /db2home)� ������.
9. �� �� � ��� ��� ���� ������.
10. NFS ��� �� �� �� ��� �� ��� ��� � SetUID
�� �� ��� ���� ���� ����.
��� ��� � ��� ��� ���� ����� ����
� ���� ��� �����. �� ��� ��� ��� ��� �
60 DB2 Servers� �� �
�� ��� ���� ��� �� �����. ��� �� ��� �
���� � � ����. � ��� ���� ���� �� �
� ���.
��� ��� ���� ����� ���.
11. �� ����.
12. �������.
���� DB2 ��� �� �� ��� �(Linux)
� ���� ���� ������ ���� ���� �� �����. � ���
��� �� �� ��� ��� �� ����.
v DB2 � �� ��� �
v � �� ��� NFS ����
v ���� � � ���� � �� ��� NFS ��
���� ������ ���� ��� � ���� ��� � �� �� ����
�� ���. � �� ���� �� � ���� �����.
� ������ ��� �� � ��� ��� ���� ��� � , NFS(�
��� �� ���)� � �� ���� ���� � �����. ����, ���
�� � ��� NFS� ���� �� ���� ������ � ����, �����
��� ��� � ���� NFS �� ���� �����. �� ���� ����
�� ���� ��� ��� �� ���� ����.
�� � ��� Linux �� ��� �����.
�� ���� ���� ��� �� �����.
1. � ����, �� ���� ����� fdisk� ���� �� ���� �
����.
2. mkfs� �� ����� ���� � ����� �� ���� �����. �
� ���� �� DB2 ��� ��� ������� ��� �� �����
��� � ��� ��� � ���.
3. �� �� ���� ��� ����, ���� �� ��� � �� ��
�� ����� /etc/fstab ��� � � ������. �� ��, ��� ��
��.
/dev/hda1 /db2home ext3 defaults 1 2
4. ��� Linux�� NFS �� ���� ��� ������� � � /etc/exports
��� ������. ����� ���� � ��� ��� ��� �� � �
� � ��� ���� ���. �� ″root″ ��� ���� ����� � �
�� ����� �� ���� �� �� ��� ���� ���.
� 5 � �� Linux UNIX ���� 61
/etc/exports ��� ��� �� �� ��� ��� ASCII �����.
/db2home machine1_name(rw) machine2_name(rw)
NFS ���� ������� �� �� �����.
/usr/sbin/exports -r
5. ����� ��� � ����, /etc/fstab ��� � � ���� ��� �� �
��� ��� NFS ������. �� �� ��, �� �� ��� ��
� � �� ���� ��� ���� ��/����, �� ����, bg(��
��) ��� ����, setuid ���� ��� � � �� ���.
fusion-en:/db2home /db2home nfs rw,timeo=7,hard,intr,bg,suid,lock
���, fusion-en� �� ��� ����.
6. �� �� ���� ����� ��� � ���� ����� �� ���� NFS
�����.
mount /db2home
mount �� ����, showmount �� ���� NFS �� ��� ���
���. �� ��, ��� ����.
showmount -e fusion-en
���, fusion-en� �� ��� ����.
� showmount �� fusion-en��� ���� ����� �� ���� �
�� ���. � �� ���� NFS �� ��� �� � ����. �
� ��� ���� NFS ��� ��� �� �� �����.
/etc/rc.d/init.d/nfs restart
�� � ��� 3��� ���� /etc/rc.d/rc3.d ����� K20nfs� S20nfs
� ��� ��� ��� ��� � �� ��� � � ����.
7. �� �� ����� � ����.
a. ����� � ����, �� � ���� �� �� ����
�����.
b. � ������ ��� �� � ��� ��� ���� ��� � ,
NFS� ���� � �� ���� ��������.
c. ����� ��� � ���� ����� �� ���� ������.
���� DB2 ��� �� �� ��� �(Solaris � ��)
� ���� ���� ������ ���� ���� �� �����. � ���
��� �� �� ��� ��� �� ����.
62 DB2 Servers� �� �
v DB2 � �� ��� �
v � �� ��� NFS ����
v ���� � � ���� � �� ��� NFS ��
DB2 �� DVD� ���� ��� �� � �� ���� ��� �� ����.
�� �� ���� ��� ��� � ����(KB �� ��).
du -sk <DVD mounting point>
DB2 ���� � 50MB� ����� �����. ��� �� � � �� �
, ��� ��� ���� �� ���� � � ���� DB2 �� DVD� �
�� � ����.
Solaris ���� �� �� ���� ��� ��� �� �� ��� ���
�. Veritas� �� ��� ���� �� ���� �� � , �� ��� ��
���.
�� ���� ���� �� ��� �� ���.
DB2 � �� ���� �, NFS ���� NFS ����� �� �� �
����.
DB2 � �� �� ��
1. �� � �(ServerA)�� �� ���� ����� format �� �
��� �� ���� ������. format �� ��� � , ���
� �� �� ���� ���� ��� ����. ���� ���� �
��� ��� �� ���� ��� � ����. �� ���� ���
���� �� � �� ��� ���� �� ����� � ���
�.
2. newfs �� mkfs� �� ����� ���� � ���� �� ����
�����. �� ���� �� DB2 �� �� �DB2 ��� ��
� � ��� ��� � ���. �� 300MB� �����.
3. �� �� ���� ��� ����, ���� �� ��� � �
� ���� ����� /etc/vfstab ��� � � ������. �� �
�, ��� ����.
/dev/dsk/c1t0d2s2 /dev/rdsk/c1t0d2s2 /db2home ufs 2 yes -
DB2 � �� �� ����
1. ��� Solaris�� NFS �� ���� ��� �������,
/etc/dfs/dfstab ��� � � ������. ��� � �� ��� �
��� �� �� � �� � ��� ��� ������. �� ″��″
��� ���� � � �� ����� �� ���� �� �� ���
���� � ����.
� 5 � �� Linux UNIX ���� 63
�� ���� � �� � � ���� ������ ���� �� �
� /etc/dfs/dfstab ��� �����. �� � � ServerB, ServerC
ServerD�� DB2 � �� ����� ��� �� ��� /db2home�
��� � �� ��� �����.
share -F nfs -o ₩
rw=ServerB.torolab.ibm.com,₩root=ServerB.torolab.ibm.com ₩
rw=ServerC.torolab.ibm.com, ₩
root=ServerC.torolab.ibm.com₩
rw=ServerD.torolab.ibm.com,₩root=ServerD.torolab.ibm.com ₩
-d "homes" /db2home
� �� � ��� ��� ���� ��� �� � , � �
/etc/dfs/dfstab ��� ���� ��� . �� �� ServerB�
ServerB-tokenring��� ����� ��� � ServerB� ��
/etc/dfs/dfstab� � � ��� �� ����.
rw=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com,₩root=ServerB.torolab.ibm.com:ServerB-tokenring.torolab.ibm.com ₩
2. � �� � ��� /etc/vfstab ��� � � ���� �� � �� �
��� ��� NFS ������. �� �� ��, �� �� ��
� ��� � �� ���� ��� ���� ��/����, �� �
���, bg(����) ��� ����, suid ���� ��� � �
�� ���.
ServerA:/db2home - /db2home nfs - yes rw,hard,intr,bg,suid
���� � ����� DB2 � �� �� ���
1. �� �� ���� ���� ������ ���� ���� � � �
�� ���� �� ���� ��� NFS �����.
mkdir /db2homemount /db2home
mount �� ����, showmount �� ���� NFS �� ���
������. �� ��, ��� ����.
showmount -e ServerA
� showmount �� ServerA�� � ��� ����� �� ����
��� ���. � �� ���� NFS �� ��� �� � ��
��. � �� ��� ����, NFS ��� root� �� ��
�����.
/usr/lib/nfs/mountd/usr/lib/nfs/nfsd -a 16
64 DB2 Servers� �� �
��� �� /etc/dfs/dfstab ��� � � �� � � ��� ���
����. NFS �� �� �� �� �� ��� NFS �� �
��� �� ��������.
sh /etc/dfs/dfstab
�� �� ��� ���.
1. ���� ������ ��� � � ��� �� � ���� ��
�� ���� �����.
2. NFS� �� � �� ���� ��������.
3. ����� �� ���� � �� � ��� ������.
NFS� �� ��� ��(Linux � UNIX)
������ ��� ��� ���� �� ���� ������ ���� ��� �
� ��� NFS(Network File System)� ��� ��� � � ���.
� � ��� NFS� � ��� ���.
� � ��� NFS� � � � � ��� ��� �����.
AIX � ��
� � ��� �� �� ������.
lssrc -g nfs
NFS ���� Status ��� active� ��� ���.
� ����� NFS� � � � � ��� DB2 ��� ��� �� NFS
���� ������. �� ���� ��� ����.
rpc.lockdrpc.statd
HP-UX � Solaris � ��
� � ��� �� �� ������.
showmount -e hostname
�� ���� ����� hostname ���� �� showmount �� ��
����.
NFS� ����� �� �� � , ��� �� ���� �� ���.
showmount: ServerA: RPC: Program not registered
� ����� NFS� � � � � ��� DB2 ��� ��� �� NFS
���� ������.
rpc.lockdrpc.statd
� 5 � �� Linux UNIX ���� 65
�� �� ���� ��� ���� ��� � ����.
ps -ef | grep rpc.lockdps -ef | grep rpc.statd
Linux � ��
� � ��� �� �� ������.
showmount -e hostname
�� ���� ����� hostname ���� �� showmount �� ��
����.
NFS� ����� �� �� � , ��� �� ���� �� ���.
showmount: ServerA: RPC: Program not registered
� ����� NFS� � � � � ��� DB2 ��� ��� �� NFS
���� ������. �� ���� rpc.statd���.
ps -ef | grep rpc.statd �� ���� � ���� �� ��� � ��
��.
� � ���� � ��� �� � , �� ��� ������.
66 DB2 Servers� �� �
� 6 � Linux �� UNIX�� �� CD �� DVD ���
CD �� DVD ���(AIX)
��� ��� �� ��� ���� �� ��� �� � � �� ����.
SMIT(System Management Interface Tool)� ���� AIX� CD �� DVD� �
���� �� �� �����.
1. ���� ��� ����.
2. mkdir -p /disc �� ���� �� �� ��� �����. ���, disc
� CD �� DVD �� �� ���� ����.
3. smit storage �� ������ SMIT� ���� �� �� ���� ��
����.
4. SMIT� ��� �� �� —> �� �� �� / �� / �� / �� —>
CDROM �� �� —> CDROM �� �� ��� ������.
5. �� ��� �� ��� ��� �����.
v �� �� ��� CD �� DVD �� ���� �� ��� ������. CD
�� DVD �� ���� �� �� ��� ��� ���. ���� �� �
�� �� � �� ��� ��� CD �� DVD �� ���� �����
���� �� �� ��� ��� ���. � ���� /dev/cd0� ��
���� �����.
v ��� � ��� �� �� �� ���� ������. ��� �
� �� ���� /disc���.
v �� ���� ���� ����� ���? ���� �� ���� �� �
��� � ��� �� ���� ����.
v �� ��� �� �� �� ��� � ��� SMIT� ������.
6. � ��� smit mountfs �� ���� CD �� DVD �� ���� ��
����.
7. �� ��� �� ��� ��� �����.
v �� �� �� ��� � CD �� DVD �� ���� �� ��� ���
���. ��� ��� ��� /dev/cd0���.
v ��� ��� ��� �� �� ��� ������. ��� �� �
�� /disc���.
v �� ��� � ��� cdrfs� ������. ��� � �� �� �
� �� ���� ��� ���� ����.
© Copyright IBM Corp. 1993, 2007 67
v �� �� ���� ����� ���? ���� �� ������.
v ��� ��� � �� � � ��� �� �����.
CD �� DVD �� ���� �������. CD �� DVD� ��� ��� �
��� ��� � cd /disc �� ������. ���, disc� �� ��
�� ������.
CD �� DVD ���(HP-UX)� ����� HP-UX� DB2 �� CD �� DVD� ���� ��� ����.
��� ��� �� ��� ���� �� ��� �� � � �� ����.
HP-UX� DB2 �� CD �� DVD� ����� ��� �����.
1. ���� CD �� DVD� ����.
2. ���� CD �� DVD ���� �� �� ���� � ���� ���
���. mkdir /cdrom �� ���� /cdrom� �� ���� ������.
3. ���� ioscan -fnC disk �� ���� ��� ��� ��� ����
�. � �� �� � CD �� DVD ��� �� �� ��� �
�� �����. �� ��� /dev/dsk/c1t2d0� ��� �����.
4. �� �� ���� CD �� DVD ���� ������.
mount -F cdfs -o rr /dev/dsk/c1t2d0 /cdrom
5. ls /cdrom �� ���� ��� ���� �� �� �� ������.
6. �������.
CD �� DVD �� ���� �������. ���� CD �� DVD� �
��� � �� cd /disc �� ������. ���, cdrom� �� �� ���
���.
CD �� DVD ���(Linux)
��� ��� �� ��� ���� �� ��� �� � � �� ����.
Linux ���� CD �� DVD� ����� ��� �����.
1. ���� CD �� DVD� � �� �� ������.
mount -t iso9660 -o ro /dev/cdrom /cdrom
��� /cdrom� CD �� DVD� �� �����.
2. �������.
68 DB2 Servers� �� �
CD �� DVD �� ���� �������. ���� ��� � CD ��
DVD� ��� � �� cd /disc �� ������. ���, cdrom� �� ��
������.
CD �� DVD ���(Solaris �� ��)
NFS� ���� �� ����� CD �� DVD���� ����� �� �
�� CD �� DVD �� ���� �� �� ���� ����� ���.
�� ��� ��� �� �� � ��� �� ��� ��� �� ����.
Solaris ���� CD �� DVD� ����� ��� �����.
1. ���� CD �� DVD� ����.
2. � � ���(vold)� ����� � � � , ��� /cdrom/cd_label
�� ��� �����(CD �� DVD ���� /cdrom/unnamed_cdrom �
�� ���� �� � ).
� � ���� ��� ����� ��� �� ��� �� �� ��
�� CD �� DVD� ������.
a. �� �� ���� ���� ��� �����.
ls -al /dev/sr* |awk ’{print "/" $11}’
� �� CD �� DVD ���� ��� ����. � ��� ��
/dev/dsk/c0t6d0s2 ���� ����.
b. �� �� ���� CD �� DVD� ������.
mkdir -p /cdrom/unnamed_cdrommount -F hsfs -o ro /dev/dsk/c0t6d0s2 /cdrom/unnamed_cdrom
���, /dev/dsk/c0t6d0s2� �� ��� �� ���� ��� �
�� /cdrom/unnamed_cdrom� CD �� DVD �� ���� ���
�.
�: NFS� ���� �� ����� CD �� DVD���� ����
� �� ���� CD �� DVD �� ���� �� �� ���� ��
��� ���. ��, �� ����� �� �� ���� �� �� ��
�� ��� ���.
3. �������.
CD �� DVD �� ���� �������. ���� ��� � CD ��
DVD� ��� � �� cd /disc �� ������. ���, cdrom� �� ��
������.
� 6 � Linux �� UNIX�� �� CD �� DVD �� 69
70 DB2 Servers� �� �
� 7 � Windows ��
DB2 �� �� �� ��(Windows)� ���� Windows� DB2 � ��� ���� �� ���� ����.
DB2 � ��� ����� ��� �����.
1. DB2 �� ���� ������.
2. � ��� � DB2 �� ��� ������.
3. �� �� ��:
�� DVD
DB2 �� DVD� DVD-ROM ���� �����.
�� ���
�� ���� ���� � ��� � ����.
4. ��� ���� DB2 ��� ������.
v DB2 �� ���
v � ��� ���� � ��
DB2 �� ���� ���� ��� �� �� �� ���� �� � ��
��.
v DB2 �� ��(��, �� �� ��� ��) ��
v DB2 �� �� �� ��
v ��� �� ���� ���� � ��� ��� � �� �� ��
v DB2 �� �� ��
v DB2 �� ��( �� ��� �� ��. �� �� DAS ����
����).
v DB2 Administration Server ��(DAS ��� �� �)
v DB2 ��� � � ��
v � ��� Health Monitor �� ��
v �� �� ��( �� ��� �� ��)
v DB2 �� �� ��
v DB2 �� �� �� ��
v � �� �
v �� �� ��
© Copyright IBM Corp. 1993, 2007 71
DB2 �� ��(Windows)� ������ Windows�� DB2 �� ���� ��� ��� �� ����.
DB2 �� ���� ���� ��� ���� ���� DB2 ��� �����.
���
DB2 �� ���� ��� �� ��� �����.
v ���� ������ ��� ����� ″���� ������ �� �
�″� �����.
v ���� ��, �� �� ����� ��� � ����.
v Windows�� LDAP� ���� DB2 �� Active Directory� ���
�� ���� �� ��� ���� ��� ���.
v ��� ���� ���� ��� ��� �� �� �� ��� �
�� �� ���. LocalSystem� DAS DB2 �� ���� �
�� � �� DB2 ��� ������ ��� ��� ���� �� �
� ��� �� �� ��� ���� ��� �� � ����.
v ��� ���, �� ����� �� �� �� � ��� ��� �
�� � ��� � ���� �� �� �����.
����
v DB2 �� �� �� ��� �� ��� �� � ����.
v DB2 �� �� �� ��� � DB2 �� ���� ��� �
��.
v XML ��� ��� ��� ������ ���� �� ������� �
����.
v �� � ��� �� ��� � �� �� DB2 ��� �� ��� ��
� � ����.
– IBM Data Server Runtime Client
– IBM Data Server Driver for ODBC, CLI, and .NET
– DB2 �� ��
v DB2 �� ��� ���� �� � ��� ��� � ����.
v Windows Vista�� ��� ��� ��� � �� � �� ���
�� ��� �� ��� ���� �� �� ��(��� �� ��)
�� � �� DB2 � ������ ���� ����
DB2ADMNS �� DB2USERS ��� �� �� ���. ���� �
�� �� � ��� �� �� ��� �� DB2 �� ����� �
��� �� �� �� ��� ��� � ����.
DB2 �� ���� ���� ��� �����.
72 DB2 Servers� �� �
1. DB2 ��� ��� �� �� ��� ���� �������.
2. DB2 �� DVD� �� � �� ���� ����. �� ��� � , �
� ��� ��� DB2 �� ����� ����. � �� ��
���, Windows Explorer� ���� DB2 �� DVD� ��� �� ��
� �� ���� DB2 �� ���� �����.
3. DB2 ��� Passport Advantage�� ���� � , � ��� ��� DB2
�� �� ��� ������. Windows Explorer� ���� DB2 �� ���
��� �� ��� �� ���� DB2 �� ����� �����.
4. DB2 �� ������ �� ���� ��� ��� ��� � ��� �
� � ����. �� ��� �� ��� ��� �� ����� ��� � ��
��.
5. �� �� �� �� �� �� ��� � �� ��� ����.
� �� �� DB2 ��� ���� �� ��� �� ��� �� �����
� �����. DB2 �� ���� � ��� �� ��� �����.
� �� ��� ��� �� DB2 ��� ���� ��� ��� �� � ��
��.
v �� ��� �� � DB2 ��� �� � ����.
v � ���� ��� �� �� DB2 ��� �������� �� DB2 ��
� ��� ����� DB2 � 8 �� � 9.1 ��� ����� �� ��
� ��� � ����.
6. DB2 �� ���� ��� ��� �� � �� ��� �� �� ����
����. �� ���� ��� ��� �� �� � ����. ��
���� ����� �� ��� F1� ����. ��� �� ����
��� �� � ����.
�� DB2 ��� <Program Files>₩IBM₩sqllib ���� �����. ���
<Program Files>� ��� �� ���� ��� ����.
� ���� �� ���� �� ���� ��� � , DB2 �� �� ���� _xx
� �����. ���, _xx� 01�� ��� ���� ��� DB2 �� �� ��
�����.
�� DB2 �� �� ��� ��� � ����.
�� �� �� �� �� ��� My Documents₩DB2LOG₩ ���� ��
�� �� ��� ������ . �� ��� ��� DB2-ProductAbrrev-
DateTime.log���. ��� DB2-ESE-Tue Apr 04 17_04_45 2006.log� ����.
� 7 � Windows �� 73
DB2 ��� �� � � �� ����� �� � �� �� DB2 ��� ���
� �� ��� DB2 �� ��� ��� ���. DB2 �� ���� DB2 ���
��� ��� DB2 � ��� �� ��� ���� ����. �� DB2
��� DB2 �� ��� ��� ���� �� � ��� �����.
DB2 Express � DB2 Workgroup Server Edition ��� ��
DB2 Express Edition� ���� � ��� ���� �� ���
4GB���.
DB2 Workgroup Server Edition� ���� � ��� ���� ��
��� 16GB���.
��� ���� �� �� INSTANCE_MEMORY ������
� ��� �� ����� �� ����.
�� 9.1�� ��� � �� ��
v � 9.1 DB2 ��� �� ��� ��� ��� ���� �
�� DB2 ��� �� ��� ��� �� ��� �� ��
����.
v �� � �� ��� �� �� �� ��� ����
�� ��� ���� ����� ����.
� ���� �� DB2 ��(Windows)�� � ��� �� DB2 ��� ��� � ����. � DB2 ��� �� ��
�� �� �� �� ��� � ����. �� ��� �� ��� ��� ���
�.
v �� ���� �� �� �� DB2 �� ��� �� ������ �
�� ��
v �� �� ��� �� DB2 ��� ��� ��� ��� ��
v ���� ������� DB2 ��� �� ��� ��� �� �� � �
�� ���� ��
v �� ����� ��� � , DB2 � ��� �� ��� ����� DB2 �
������ ������ ��� ��
DB2 ���� �� ��� �� DB2 ��� ��� � ����. �� �� ��
� ���� DB2 �� ��� �����.
��� DB2 ���� ��� �� ���
v �� � ��� � DB2 �� ��� �����. DB2 �� ���� ��
� � DB2 ��� ��� ��� � ����. ��� ��� ��� DB2 �
� ��� ��� � ����.
74 DB2 Servers� �� �
v ������ DB2 � 8 ��� ��� ���� � DB2 ��� ����
�.
�� DB2 ��� ��� ��� ���� �� �� ���
v DB2 � 8� DB2 � 9.1 DB2 � 9.5� ��� � ��� �����
�� ��� ����.
v DB2 � 9.1 �� � 9.5� �� ��� ���� DB2 � 8 ��� �
���� ���. � � ��� ��� � ����. DB2 � 8� �� �
�� � Global Switcher� ���� � ��� DB2 � 9.1 �� � 9.5
���� ��� � ����.
v ����: � DB2 ��� �� �� DB2 �� ��� ����� ��� � ��
��.
�: � ����� �� ��� ��� DB2 �� �� ��� ��� ��
� � ����. �� ��� � 8, � 9.1 � 9.5 DB2 �� ���
�� ���� �� � ���, �� ���� DB2 �� �� � 9 FixPack 1
� � 9 FixPack 2� �� �� � ����. ��� DB2 ������ ��
��� DB2 �� ��� ��� ����� ��� � ����.
v � IBM ������ ����� ���� ��� IBM Data Server Provider
for .NET�� �� ���� ��� �����. � 8� � 9� �� ��� �
�� � 9� IBM Data Server Provider for .NET 2.0 Provider �� ��
���� ��� �����. � 8�� 2.0 .NET provider� ����.
v � DB2 ��� �� ��� ��� ���. NO_CONFIG=YES � �
� ��� � � ��� ��� ����. ��� �� � ���
��� � � � ��� ��� ���. � ��� ��� �DB2�
� ���. �DB2��� �� ��� �� ���� ��� �� ��� ���
� ��� �����. �DB2�� ��� ��� � � �� �� ��� ��
� ��� �����. �, ���� �� �� ��� �DB2_01�, �DB2_02�
����. ���� ���, DB2 �� ��� � ���� � �� � DB2 ��
��� ��� ���.
Microsoft COM+ ������ � IBM Data Server Runtime Client ��� �
����� �� IBM Data Server Driver for ODBC, CLI, and .NET(�� ��
�) �� IBM Data Server Driver for ODBC and CLI(zip)� ���� ����
�� ����. � �� ��� Data Server Runtime Client�� COM+ ���
���� �� � �� �����. IBM Data Server Driver for ODBC, CLI,
and .NET (�� ���) �� IBM Data Server Driver for ODBC and CLI(zip)
�� � ��� ��� ����. DB2 ��� ��� ���� Microsoft COM+
������� � DB2 ��� �� �����. �� DB2 ��� ����
COM+ ������ � ��� ���� ����. DB2 Universal Database(UDB)
� 7 � Windows �� 75
� 8� ��� � , ��� ������ ��� � DB2 UDB � 8� ��
� � ����. DB2 � 9 ��� ��� � � DB2 �� �� ���� �
��� � DB2 ��� ��� � ��� �� �� ��� �� ����.
� DB2 �� ��� ��� �
� 9.1��� �� �� DB2 ��� ���� ����� �����. (� ����
DB2COPY1, DB2COPY2, DB2COPYn� �����.) ���� �� DB2 �� �
��� � DB2 ���� �����. ���� DB2COPY1� � DB2 ��
�� �������.
� 9.5 ��� DB2 ��(DB2COPY1)� �� ��� �� ����� �� � �
���. DB2COPY1� � DB2 �� � IBM ������ �����
���� �����.
76 DB2 Servers� �� �
�� �� � DB2 ��(DB2COPY2)� DB2 ��� ������. � DB2 ��
(DB2COPY2) �� � � DB2 ��� � DB2 ���� � � � �� ���
�����. �No�� ��� � DB2COPY1� � DB2 ���� �����.
(�� � IBM ������ ����� ���� �����.)
��� � DB2 ��� � DB2 ���� � � � �� ��� �Yes�� �
�� ����� ��� ����.
� 7 � Windows �� 77
���� DB2COPY2� � � DB2 ��( � IBM ������ ����
� ���� ��)� ���.
�� 8 �
DB2 � 8 DB2 � 9� DB2 � 8� � DB2 ���� ���
�� ����� �� ��� � ����. � �� DB2 � 8� � DB2
���� ���� ���� �� DB2 ��� DB2 � 9� ��� �
� DB2 ��� ������.
��� ��� DAS ��� �� � ��� �� ��� �� �
�� ����.
v DAS� � 9� ��� �� � 8 � 9 ��� �� � �
���.
v DAS� � 8� ��� �� � 8 ���� �� � ����.
� 8 DAS� ����� �� ���� � � 9 DAS� ��� �
8 � 9 ��� �� � ����. �� �� ��� ����
��� ���� � �� �����.
�� 8 � �� 9 � � DB2 .NET Data Provider
DB2 � 9�� DB2 .NET Data Provider�� System.Transaction ���
��� � ��� � IBM ������ ����� ���� ����
� �� �����. DB2 .NET Data Provider � 9� ���� �� �
DB2 .NET Data Provider � 8� ��� � ����. DB2 � 8�
78 DB2 Servers� �� �
��� � �� ���� ��� ��� .NET Data Provider � 1.1� DB2
� 8�� ��� ��� 2.0 provider� DB2 � 9�� ����.
����� ���� �� ������
�� DB2 DLL� �� � ��� �� ������(�� ��,
db2api.lib� ���) �� PATH�� DB2 DLL� ����. � �� �
��� ���� �� �� ������ � DB2 ��� ����� �
����. � ��� ���� �� ������ DB2 ����� ���
� �� db2SelectDB2Copy API� ��� � ����. �� ��� Call
Level Interface Guide and Reference, Volume 1� �����.
Win x64�� 32�� � 64�� ��
DB2� Windows� ��� �� DB2 32�� 64�� �� ���� �
���. DB2 64�� �� ���� � �� ����� 32�� �� �
����. �� DB2 32�� 64�� ������ �� ��� ���� �
����.
LDAP � CLI ��
DB2 � 8� ��� � ������ �� LDAP ��� ��� � �
� LDAP ���� ��� ���. ��� ��� CLI ��� LDAP ��
�� ��� ���� �� � DB2 ��� �� ����.
�� ���
�� �� � �� ��� DB2 ���� �� � ��� ��� DB2
��� �� ���� ��� � ����. � DB2 ��� ���
� DB2 �� ���� �� �� � DB2 ��� �� ������
�� �� �� ��� � �� �����.
WMI(Windows Management Instrumentation)
��� � � WMI ����� � ��� ��� � ����.
����� ���
�� ����� ��� DB2 ���� ��� � ����. �� ��
� 195 ���� ��� ��� ���� IBM ��� � ����� ��
��� �����.
DB2 DLL� ���� ��� ������
DB2 DLL� � ����� ��
LOAD_WITH_ALTERED_SEARCH_PATH ����� �� LoadLibraryEx
��� LoadLibrary� ���� ������ �� �� ����� ��
� ������ � � ���. �� ��� �� ��� ��� �� �
�� ����� ������ ��� �� db2envar.bat ��� ����
��� ����� ������ ��� �� � �� db2SelectDB2Copy
API� ��� � ����.
� 7 � Windows �� 79
Visual Studio 2003 ���
�� � �� �� ��� ��� ��� ��� � ����. �� �
�� � �� � DB2 ��� �� ���� ����.
���� ��
� DB2 ���� ����� ��� ���. ��� ��� ��� ����� �
���. �� �� �� ���� �� ����� ��� � �� ��� ��� �
� DB2 �� �� �� DB2 ��� �� ���� ��� � ����.
NT Services
DB2 NT ���� <servicename_installationname>� �����.
(�: DB2NETSECSERVER_MYCOPY1). � ���� ��� �� �� ��� ����
����(�: DB2 Security Server(MYCOPY1)). ���� �� � ���
DB2–DB2 �� ��>– �� ��>–�� ��>� �����. �� ��� ���
���� ����. �� ��� ��� ��� � ����.
�� DB2 ��� ��� � API
db2SelectDB2Copy API� ���� ������ ��� DB2 ��� ��� �
����. � API�� DLL� ���� ����. �� ������ ��� ��
�� ����. DB2 ����� ��� ���� �� DB2 API� ���� ��
�� � API� ��� � ����. ��� ��� ���� �� � � �� ��
� � ����. �, ���� � DB2 ���� �� ���� ��� � ����.
db2SelectDB2Copy API� DB2 �� �� �� ��� ��� ���� �� ��
���� ��� ��� �����. ��� �� ��� DB2 ��� �� ����
�� � � API� ��� ��� ����. ��� �� DB2 ��� ��� �
� � �� ��� ��� DB2 DLL� ���� �� � API� ��� ���.
� ��� ���� � �� � � ����.
� �� ��� �� ������ ���
� �� ���� � � ��� �� DB2 �� ��� ��� ���.
MSCS � � DB2 �� ��
� DB2 ��� �� �� ���� ���� ��� ���.
80 DB2 Servers� �� �
� 8 � Linux � UNIX ��
DB2 �� �� �� ��(Linux � UNIX)� ���� AIX, HP-UX, Linux Solaris� DB2 � ��� ���� ��
���� ����.
DB2 � ��� ����� ��� �����.
1. DB2 �� ���� ������.
2. � ��� � DB2 �� ��� ������.
3. HP-UX, Linux Solaris�� �� ����� ������. ��� ���� �
� x86_32� Linux� ��� � ��� 64�� ��� ��� ���. �
�� ��� ��� �����.
4. �� �� ��:
�� DVD
DB2 �� DVD� � ���� ��� DB2 �� DVD� ���
���.
�� ���
�� ���� ���� � ��� � ����.
5. �� ��� ��� � ��� ���� DB2 ��� ������.
v DB2 �� ���
v db2_install �
v � ��� ���� � ��
v ����(Payload) �� ��
DB2� � DB2 �� ���� ���� ��� �� �� �� ���� �
� � ����.
v DB2 �� ��(��, �� �� ��� ��) ��
v DB2 �� �� �� ��
v ��� �� ���� ���� � ��� ��� � �� �� ��
v IBM Tivoli System Automation for Multiplatforms Base Component ��
�� ����� (Linux AIX)
v DB2 �� ��
v DB2 Administration Server ��(DAS ��� �� �)
v DB2 ��� � � ��
© Copyright IBM Corp. 1993, 2007 81
v � ��� Health Monitor �� ��
v �� �� ��( �� ��� �� ��)
v Informix® ��� �� �� ��
v DB2 �� �� ��
v DB2 �� �� �� ��
v � �� �
6. DB2 �� ��� ��� ���� DB2 �� ��� � �� � �� ��
�����.
�� ���� ��
DB2 �� ���� ���� DB2 �� ��(Linux � UNIX)
� ������ Linux UNIX ����� DB2 �� ���� ��� ��� �
� ����. DB2 �� ���� ���� �� �� ��� ���� DB2 ���
���� � �����.
DB2 �� ���� ��� �� ��� �����.
v ���� ������ ��� ����� � ��� � �� �� � ��� �
� �� ��� ��� �����.
v ���� ��, �� �� ����� ��� � ����.
v �� �� ��� ��� ���� DB2 �� ��� � ����. ��� �
�� � �� ��� � ��� �����.
v DB2 �� ���� ��� � �� ���. �� DB2 �� DVD� �����
Passport Advantage�� �� ���� ����� DB2 �� ���� ��� �
����.
v �� � �� DB2 ������ ��� ��� � , �� ��� ���
� �� ���.
v DB2 �� ���� ��� �� ������. ���� DB2 �� ���� �
��� ��� ��� ����� ���� � �� X �� �� ���. X
Windows �� � � � � ����. � ��� ��� �������
� ����. �� ��, export DISPLAY=9.26.163.144:0.���.
v �� ������ ���� ����� DB2 �� ���� ��� �� ��
� �� DB2 ���� �� ���.
�:
v XML ��� ��� �� � UTF-8� ���� �� ��� ������ ��
�� �� ������� �����.
82 DB2 Servers� �� �
v DB2 �� ��� ���� �� � ��� ��� � ����.
DB2 �� ���� ���� ��� �����.
1. �� DB2 �� DVD� �� � , �� �� ���� DB2 �� DVD� �
��� �� ���� ������.
cd /dvdrom
��� dvdrom� DB2 �� DVD� �� ��� ����.
2. DB2 �� ���� ���� � , �� ��� � � �� untar� ��
�.
a. �� ��� � ����.
gzip -d product.tar.gz
���, product� ���� ��� �����.
b. �� ��� Untar����.
Linux � ��
tar -xvf product.tar
AIX, HP-UX � Solaris � ��
gnutar -xvf product.tar
���, product� ���� ��� �����.
c. ���� ������.
cd ./product
���, product� ���� ��� �����.
�: ��� ���� ���� � �� �� �� ���� � ���
�. ��� �� ���� ����(�: ./nlpack/disk1)� ��� �� �
��� � �� �� ��� �� ���� �� � ����.
3. �� ���� �� ����� ./db2setup �� ���� DB2 �� ����
�����.
4. IBM DB2 �� ����� ����. � ��� �� ���� ��� ���
��� �� ��� �� � ����. �� ��� �� ��� ��� �� �
���� ��� � ����.
5. �� �� �� �� �� �� ��� � �� ��� ����.
�� ��� �� ��� �����. DB2 �� ���� � ��� �� ��
� �����.
� 8 � Linux UNIX �� 83
��� �� � DB2 �� ���� � �� ���� � � ������. �
� ���� ���� ��� �� �� � ����. �� ���� ����
� �� ��� F1� ����. ��� �� ���� ��� �� �
����.
��� ��� � DB2 ��� �� $HOME/sqllib ���� ���� ���
�. ��� $HOME� ��� ���� � ���� ����.
�� ��� � , �� DB2 ��� �� ��� � ��� �����.
AIX, HP-UX � Solaris
/opt/IBM/db2/V9.5
Linux /opt/ibm/db2/V9.5
� ���� �� ���� �� ���� ��� � , DB2 �� �� ���
� _xx� �����. ���, _xx� 01�� ��� ���� ��� DB2 ��
�� �� �����.
�� DB2 �� �� ��� ��� � ����.
DB2 �� ��� � � ��� ����.
v ��� ��(a–z), ��� ��(A–Z) �� ��(_)� ��� � ��
v 128�� �� � ��
v ����� ��� � ��
v �� � ��� ��� � ��
��� �� DB2 ������ ��� ��� �� ��� �� �� �����
./db2setup �� ��� ��� �� ����.
�� �� ��� ��� ����.
v DB2 �� �� ��. � ��� �� ��� � DB2 �� ��� ����.
– �� ��� � , DB2 �� �� �� ��� db2setup.log���.
– ��� ��� � , DB2 �� �� �� ��� db2setup_username.log���.
��� username� �� �� ��� ��� ��� ID���.
v DB2 � �� ��. � ��� Java�� ��� � � ��(�: �� �
� ��)� ����.
– �� ��� � , DB2 � �� �� ��� db2setup.err���.
– ��� ��� � , DB2 � �� �� ��� db2setup_username.err���.
��� username� �� �� ��� ��� ��� ID���.
�� ��� �� ��� /tmp ���� ����. �� ��� ��� ���
� ����.
84 DB2 Servers� �� �
� �� db2setup.his ��� ���� ����. �� DB2 �� ����
DB2 �� �� ��� ��� DB2_DIR/install/logs/ ���� ��� �
db2install.history� ��� ����. ��� �� ��� � , DB2 �� ���
�
db2install.history.xxxx� ��� ����. ��� xxxx� 0000-9999� ����, �
� ��� ���� �� �� �� �� �� ����.
� �� ���� �� ��� �� �� �� ����. �� ��� ����,
� �� �� �� ��� ��� �����. � �� �� ��� �� ���
� ��� ���, �� �� ���� �� �� � � ��� ���
��� ����.
Linux x86�� DB2 ��� �� � � �� ����� �� � �� �� DB2
��� ��� � �� ��� DB2 �� ��� ��� ���. DB2 �� ��
�� DB2 ������ ��� DB2 � ��� �� ��� ���� ����.
DB2 Express � DB2 Workgroup Server Edition ��� ��
DB2 Express Edition� ���� � ��� ���� �� ���
4GB���.
DB2 Workgroup Server Edition� ���� � ��� ���� ��
��� 16GB���.
��� ���� �� �� INSTANCE_MEMORY ������
� ��� �� ����� �� ����.
�� 9.1�� �� � � �� ��
v � 9.1 DB2 ��� �� ��� ��� ��� ���� �
�� DB2 ��� �� ��� ��� �� ��� �� ��
����.
v �� � �� ��� �� �� �� ��� ����
�� ��� ���� ����� ����.
��� ���� ��
��� �� ��(Linux � UNIX)
� 9.5 ���� �� ��� �� � �� ��� ���� FixPack� � �
���, ��� ����, ��� ����� �� ��� � �����. �� �
�� ��� � �� ��� ���� Linux UNIX ���� �� � ��
��.
� 8 � Linux UNIX �� 85
DB2 �� ���� ��� �� �� ��� ��� ��� ��� ���
��. ��� ���� �� �� ��� ��� ��� ��� ��� � ���
�. �� �� �� ��� DB2 ��� ���� ����� �� ����.
DB2 ��� ��� ���� �� ���� ��� �� ���� ��� ���
DB2 ��� ����.
��� ��� ��� �� �� ��� �����.
v ��� ��� � � ���� �� DB2 ��� ����� � ��� ���
�� ���� �� ������
v ���� ��� ��� ��� ������ � �� �� DB2 ��� �
��� ����� � �
v �� ��� ���� ��� DB2 ��� ����� ������ � �� ��
����� ��(ISV)
��� ���� ���� �� �� ��� ��� ��� ���� ��� ����.
�� ���� db2rfe �� ��� �� ��� ��� �� � ����.
�� �� ��� �� � ���
�� �� ��� ��� ��� ��� �� �� ��� ��� �� �
����.
�� �� �� DB2 ��� ���� ��� �� ���� ��� ���
� ����.
�� ����� ��, ��� ���� DB2 ��� ��� ��� ��� � ���
�. ��� ��� �� $HOME/sqllib ���� �����. ��� $HOME� �
�� ���� � ���� ����. ���� sqllib ��� ��� ���
�� ���� �� ��� ���� �����.
�� ��� � �� ��� �� � ����. �� ���� ��
�� ��� ��� ID� ����.
��� ���� ��� DB2 ��� �� � ����. ��� �� ���
�� ��� ��� �� � DB2 �� �� �� ��� �����.
�� � �� ��� ��� �� � ���� �����.
13. �� ��� ��� �� � ���
�� �� �� ��� ��
���� �� ���� ���
� ��
� ��. DB2 ��� ���� �
��� �� �����.
�� DB2 ��� ��� �� ��
86 DB2 Servers� �� �
13. �� ��� ��� �� � ��� (��)
�� �� �� ��� ��
�� �� �� �� ��� �� ��. ��� �
� �� ��� ���.
��� �� �� ��.
DB2 ��� �� �� �� ��
�����.
��� ��� ��
�� ��� ��� �� � ��� ��� ��� ��� �� ��� � �� ��
��. � ����� ��� ��� ���� ��� ���� � �� �� ���
�� ����.
�� ��
��� �� �� DB2 ��� ��� ����� ���� ����.
v ��� � � � ��
v DB2 ��� ����� �(DB2 EAS)
v DB2 Query Patroller
v DB2 Net Search Extender
v ��� ��� DB2 �� ��
�: ��� ��� DB2 �� ��� �� ���� �� ��� ��
��� ��� ����� ���� ����. ��� ��� �� DB2
��� �� � �� ��� � ��� ��� DB2 �� ��� �
���� ��� � ����.
�� � � ��
�� �� ��� ��� ����� ��� � ����.
v DB2 Administration Server(DAS) � �(dascrt, dasdrop, daslist,
dasmigr dasupdt)
v �� �� ���
v �� ��
v db2governor� � �� �� ��� ���� ����.
v Work Load Manager(WLM)�� ��� DB2 ��� DB2 ��� �
���� ���� � �� ����� ��� �����. ��� ��
�� � �� ���� �� SQLCODE �� ��� ����.
v ��� �� � ��� DB2 ��� � �� ���� ����.
Health Monitor ��
��� �� Health Monitor ��� ��� ����� ���� ����.
v �� �� ���� �� ��� � �
v �� �� ���
� 8 � Linux UNIX �� 87
���� ������ ��
� ��� �������� ��� ���� �����. ������ ��
�� � ��� � ����.
DB2 �� ��
��� ����� �� � db2ls �� ���� ��� �� �����
�� � ���� ��� ����. �� ��� db2ls � ��� �
����.
DB2 ��
� ��� ���� ��� DB2 �� ��� ��� � ����.
DB2 ��� ��
��� ����� �� �� ��� DB2 ��� ����. ��
��� �� � ����.
DB2 ��� ��� ��� ����� �� � ����.
�� �� ��� ��� �� � ��� �� �� ��� ��� � �
���. ��� ��� ��� ��� ��� ���� ��� ���
� ���� ����� �� � ����(db2_deinstall � ��).
�� ��� �� ���� ��� DB2 ��� �� ��� �� ��
��� ����� ��� � ����.
DB2 ��� ��
�� DB2 �� �� ��� ����� ��� � ����.
db2icrt
DB2 ��� ��� ���� ���� � , � ��� ��
� ��� �����. �� ��� ��� ���� �� �
����. ��� ��� �� ��� ��� �� � ��
��� �� �� � db2nrcfg� ��� � ����.
db2iupdt
db2iupdt �� ��� ���� ��� � ����. �� ��
� DB2 ��� ����� ��� �� �� �(db2nrcfg)� �
�����. ��� ��� ��� ���� �� ���� ��
� ���. �� DB2 ��� ��� � ��� ���� ���
��.
db2idrop
��� �� �� ��� ��� ��� ��� � ����.
DB2 ��� ����� DB2 ��� �� ��� ���.
db2imigr
��� ��� ���� ���� ����.
88 DB2 Servers� �� �
�� ��
�� ��� ��� ��� ��� � ����.
�� �� ��� DB2 ��� ����� �� � ����.
�� �� ��� ��� �� � �� ��� � ����. ��� DB2
��� ��� �� ��� ����� ��� �� �� �� �� � ��
��.
v FixPack �
v �� ��
v �� �� �� ��
ulimit � ��
UNIX Linux�� ulimit �� ��� �� ��� �� ��� ��
��� ���� �����. �� ��� � ������ �� �
��� ���� �� ��� ulimit ��� �� �����. ��� ��
� ��� � ulimit ��� �� ��� ��� � ����. ��� �
�� � �� ���� ����. ulimit ��� ����� �� ���
�����.
db2rfe� ���� ��� � �� ��
��� ���� db2rfe �� ��� ��� � �� �� ��� ����.
�� ��� ��� ����� ���� ��� � ����.
v �� �� �
v ����(HA) ��
v /etc/services ���� ��� ��� ���� ��
v ��� ��� ��(ulimits)� ��� ��. � ��� AIX�� ����. ��
����� ��� ��� ��� ��� �� ���.
��� ���� �� �� �� �(db2rfe)� ��� ��� ��� �� ���
� ����. db2rfe � �� ������� �� ��� �� ���� ��
���.
��� ���� �� �
�� �� �� DB2 ��� �� � �����. ��� ��� ��
�� �� ���� ���� DB2 ��� ��� ����� ��� �� db2rfe
�� ���� ���� �� � �� � ��� ��� ��� ���. �
����� � ��� ��(dbm cfg) ���� �� ����� ���� �� �
� � ����.
v clnt_pw_plugin(����� ��� ID-�� ��� �� ����)
� 8 � Linux UNIX �� 89
v group_plugin(�� ��� �� ����)
v srvcon_pw_plugin(� �� ������ ���� ��� �� ��� ID-�� �
�� )
DB2 ��� ��� ���� ��
���� DB2 ��� ��� ����� ��� � ����.
DB2 ��� ��� ����� ���� �� �� ��� ��� ��� ���� �
� ��� ��� ��� � ���. ���� � ��� ���� �� � �
�� �����.
��� ����� DB2 ��� ���� �� ���� ��� ����.
v �� DVD� ��� � �� ��� �� ��� �� DVD� �� ��
�.
v DB2 ��� ���� ��� � �� �� ��� ID� �� ���.
��� ID� ���� ����� ��� ����.
– guests, admins, users local ��� �� ��� �� �
– ��� ��(a–z), ��(0–9) �� ��(_)� ��� � ��
– 8��� � � ��
– IBM, SYS, SQL �� ��� �� � ��
– DB2 ���(USERS, ADMINS, GUESTS, PUBLIC �� LOCAL) �� SQL
���� � ��
– � ��� ��� � ��
– NIS �� NIS+�� ��� ID� �
– � ��� ID� ��� �� �� ��� ID� ��� � �� ��� ID�
� �� ��� � ����.
- �� �� ���
- ��� ��� �� ���
v �� � ��� ���� ���� ����� ���� �� ���� ��
��� ��� ����� ����.
v AIX � 5.3�� �� ���(AIO)� �� ��� ���.
v � ���� �� DB2 ��� ���.
DB2 �� ��� � � ��� ����.
– ��� ��(a–z), ��� ��(A–Z) �� ��(_)� ��� � ��
– 128�� �� � ��
– ����� ��� � ��
90 DB2 Servers� �� �
– �� � ��� ��� � ��
DB2 ��� ��� ����� ���� �� ��� ����� �� ���. �,
��� ���� ��� ����� �� �� � ��� DB2 ��� ���� ��
� �� �� �� ����. ��� ��� ���� ��� �����.
1. ��� ���� �� ����.
2. �� ��� ���� ���� DB2 ��� ������. ��� ��� ���
�.
v DB2 �� ���(GUI ��)
v db2_install �
v � ��� �� db2setup �(� ��)
�: ��� ���� DB2 ��� ��� ���� ��� � ���� �
���� FILE ���� �����.
���� � ��� ���� �� � ��� �����.
3. DB2 ��� ��� �� ��� DB2 ��� ����� � �� �� �
� ���. �� DB2 �� ��� $HOME/sqllib/db2profile(Bourne shell
Korn shell ����) �� $HOME/sqllib/db2chsrc(C shell ����)� ��
�� � �� �� �� �� ��� �� ����. ��� $HOME� ��
� ���� � ������.
DB2 ��� ��� �� �� ��� ��� �� ��(ulimits)� � �
���. �� ulimit �� ���� ��� DB2 ���� ��� �� �� �
� �� �� � ����. ��� �� DB2 ��� ��� � ����.
db2rfe� ���� ��� ���� �� �� �� ��
��� ���� ���� �� ������ db2rfe �� ��� �� ����
�� �� ��� ����.
� ���� �� ��� �����.
��� ���� ���� �� ���� ��� �� ���� ��� ��� ��
���.
1. �� �� ��� �����. � �� �� �� ��� �����.
v $HOME/sqllib/instance/db2rfe.cfg� ��� DB2 ��� �� ���
� �� ���� ����.
v $HOME/sqllib/cfg/db2rfe.cfg.sample� ���� �����.
��� $HOME� ��� ���� � ������.
� 8 � Linux UNIX �� 91
2. �� ��� ���� ��� �� �� �� � ��� �� ��� �����
�.
3. ��� �� ��� ��� �� ������. � �� ��� db2rfe �� �
����. ��� �� ��� ����.
INSTANCENAME=db2inst2SET_ULIMIT=NOENABLE_HA=NOENABLE_OS_AUTHENTICATION=NORESERVE_REMOTE_CONNECTION=NO
**SVCENAME=db2c_db2inst2**SVCEPORT=48000
RESERVE_TEXT_SEARCH_CONNECTION=NO**SVCENAME_TEXT_SEARCH=db2j_db2inst2**SVCEPORT_TEXT_SEARCH=55000
�:
v INSTANCENAME ����� �� ��� DB2 �� ���� �� �
���.
v SET_ULIMIT ����� AIX��� ��� � ����. �� ���
� �� ��� �� ���� ulimit �� � ��� ���.
v �� ���� ��� NO���.
v �� ����(�: SVCENAME)� �� �� �����. ��� **�
����.
v ����� YES� ���� �� ����� ��� �� ����� �� �
��� �� �� ���� �� ����. ���� � �� �� ���
�. ���� ��� �� �� �� ���� � ����.
�� ��� �� ���� �� �� �� ��� ��� �� �� ��
���� ����.
v ����
v �� �� �
v DB2 ��� �, ��� �� db2j_db2inst2 55000 �� �
��� ��� �� ���� ��� �� ��� ��� �� �����.
INSTANCENAME=db2inst2SET_ULIMIT=NOENABLE_HA=YESENABLE_OS_AUTHENTICATION=YESRESERVE_REMOTE_CONNECTION=NO
**SVCENAME=db2c_db2inst2**SVCEPORT=48000
RESERVE_TEXT_SEARCH_CONNECTION=YESSVCENAME_TEXT_SEARCH=db2j_db2inst2SVCEPORT_TEXT_SEARCH=55000
4. �� ��� �� ����� �� ����.
92 DB2 Servers� �� �
5. $HOME/sqllib/instance ���� �����. ��� $HOME� ��� ��
�� � ���� ����.
6. �� ��� ���� db2rfe �� �����.
db2rfe -f config_file
��� config_file� 92 ���� 3��� �� �� �����.
��� ���� �� �� ��� �� ���� ����� FixPack� �� ��
db2rfe �� ��� ���.
� 8 � Linux UNIX �� 93
94 DB2 Servers� �� �
� 9 � ���� ������ �� ��
���� ������ �� ��
� ����� DPF(Database Partitioning Feature)� ���� ���� �����
� ��� ���� ��� �� ����. DB2 �� ���� ���� ��
�� ������ �� ���� ���� ������ �� ��� � ���
� � ��� �� � ����.
DB2 ESE(Enterprise Server Edition)� ��� � ���� ��� �� �
����. � ��� DPF�� ���.
�: DPF� ��� ���� ���� ����.
������ ���� �� ���, ��, �� �� ���� ��� ��� �
������ �����. ���� ������� � ��� ���� �� ����
�����.
ESE� DPF� ����� ESE ���� �� �� DPF ���� �� �� ��
�. ��� ���� �� ��� ����� DB2 �� ���� ��� �� �
� ���� db2 ��� �� license ����� ���� �� ��� �
��.
���
v DPF ��� ��� � � ��� �� �� �� ��� �� �� �
� ���. �� ��, DPF ��� � �� � �� ���� � ��
� � ��� �� � �� �� ��� �� �� �� ���. �
� � ��, �� �� �� ��� �� �� �� �� Linux
UNIX�� /etc/services� ���� Windows��� %SystemRoot
%₩system32₩drivers₩etc₩services� �����. � ��� FCM(Fast
Communication Manager) ����� �����. ��� ��� ���
��� �� ���.
DB2_InstanceNameDB2_InstanceName_1DB2_InstanceName_2DB2_InstanceName_END
�� � � �(DB2_InstanceName) ��(DB2_InstanceName_END)
�����. �� � � ��� ��� ���� ���� �� � ���
� ��� ���� ����.
© Copyright IBM Corp. 1993, 2007 95
v ��� �� DB2 ������ �� ����� DB2� ��� � ��
�� ��� �� � �� �� ���. ��� � �� �� � �
� �� ���� � � �� �� ���� ��� � ����.
v Linux UNIX ���� � , ���� ������ ����� ��
����� �����. DB2� ��� �� �� ����� ��
���.
– rsh
– ssh
�� DB2� �� DB2 ���� �� �� � rsh� ����
�(�� ��, �� DB2 ������ ���� �� �). DB2 �
�� ����� rsh-server ���� ���� �� ���. DB2 ���
��� � �� ��� �� �� ��� � ��� �����.
rsh �� ����� ����� ��� � inetd(�� xinetd)� �
��� � ��� ���. ssh �� ����� ����� ���
� , DB2 ��� ��� �� DB2RSHCMD� ��� ���. � �
���� ��� ���� ��� rsh� �����.
v Linux UNIX ����, IP ��� ��� ��� ��� ���
���� � etc ��� �� hosts ��� �127.0.0.2� � � ��
�� �� ��� � ����.
�: XML �� ��� �� DPF(Database Partitioning Feature)� ���� ���
���.
���� ������ ��� ����� ��� �����.
1. DB2 �� ���� ���� �� �� �� ������. �� ��
� ��� ��� ��� ���� “DB2 � ��”� �����.
v �� �, �� �� �� �� � � ��� �� ��� � �� ��
�� ��� ������. ��� ���� � �� ��� DB2 �� ����
��� ���(PROD_ESE.rsp PROD_ESE_addpart.rsp)� �����.
PROD_ESE.rsp ��� �� �� ������ �� � �����.
PROD_ESE_addpart.rsp ��� ��� ������ �� � �����.
v DB2 ���� ��� �� �� ��� � ��� ���� ��� � �
� �� ��� �� ������.
2. ���� ������ ���� ��� � � �� DB2 �� ���� ���
� �� �����.
3. ��� ������ � � ��(PROD_ESE_addpart.rsp)� ������.
4. db2setup �(Linux UNIX) �� setup � (Windows)� ���� ���
� � � ��� DB2 ������ �� ������.
96 DB2 Servers� �� �
Linux � UNIX
DB2 �� ��� �� ��� ���� ��� �� �� ���
��.
./db2setup -r /responsefile_directory/response_file_name
Windows
setup -u x:₩responsefile_directory₩response_file_name
�� ��, PROD_ESE_addpart.rsp� � ��� ���� �� ����.
Linux � UNIX
DB2 �� ��� �� ��� ���� ��� �� �� ���
��.
./db2setup -r /db2home/PROD_ESE_addpart.rsp
���, /db2home� � ��� ��� ������.
Windows
setup -u c:₩resp_files₩PROD_ESE_addpart.rsp
���, c:₩resp_files₩� � ��� ��� ������.
5. (Linux UNIX ��) db2nodes.cfg ��� ������. DB2 ��� �� �
�� ��� �� ���� �� ��� ���� db2nodes.cfg ��� ��
��� ����. db2nodes.cfg ��� ���� �� � �� ��� ���
� ���� �����.
6. ��� ��� services ��� ���� DB2 ��� ���� FCM ��
� ������. ��� ��� �� ��� ����.
v /etc/services(Linux UNIX)
v %SystemRoot%₩system32₩drivers₩etc₩services(Windows)
�� �� ���� �� ���� ������ ��� �� ��(Windows)� ������ DB2 �� ���� ���� �� � ��� ���� �� �
�� ������ ��� �� �����.
���
v DB2 ��� DB2 �� ���� ���� �� � �� ������.
v �� � �� ���� �� � ��� ��� �� �� � �� �
�����.
v �� � �� �� �� ��� �����.
v DB2 �� DVD� ��� �� � �� ��� ���.
� 9 � ���� ������ �� �� 97
� ��� ���� �� ������ ��� �� ����� ��� �� �
����.
1. DB2 ��� ��� �� �� ��� � �� �������.
2. DB2 �� DVD� ��� ��� ���� ������. �� ��, ��� �
���.
cd c:₩db2dvd
��� db2dvd� DB2 �� DVD� ��� ��� ���� ��� ���
�.
3. � � ���� ��� �� setup �� ������.
setup -u responsefile_directory₩response_file_name
�� ���� Addpart.file � ��� c:₩responsefile ����� �� � �
���. ��� � ��� �� ��� ����.
setup -u c:₩reponsefile₩Addpart.file
4. �� ��� �� ��� ���� ������. My Documents₩DB2LOG₩
����� �� ��� �� � ����. �� �� ��� ��� ��� ��
� ��� ���.
=== Logging stopped: 5/9/2007 10:41:32 ===MSI (c) (C0:A8) [10:41:32:984]: Product: DB2Enterprise Server Edition - DB2COPY1 -- Installationoperation completed successfully.
5. �� �� ������ ��� �� �� � �� ��� � , DB2 ��
� ���� ������ ��� ���� ��� �� ������ ��� �
�� �� �� ��� �����. � ��� � �� �����. ���
� ������ ��� ���� � �� � , FCM ��� �� /etc/services
��� ��� ��� ���. FCM ��� ��� ���� � ��� ��
� �� ��� �� �� ����. �� � �� � DB2_<instance>
DB2_<instance>_END� �����. �� � �� ���� FCM ��� ��
����� ��� ����.
v � �� ��� �� � �� � �� ��� ��� ���.
v �� ��� ��� ��� ���� ���.
v ��� �� ��� �� ��� ���.
� �� � �� ����� �� �� ������.
DB2 ��� �� � � �� ����� �� � �� �� DB2 ��� ���
� �� ��� DB2 �� ��� ��� ���. DB2 �� ���� DB2 ���
��� ��� DB2 � ��� �� ��� ���� ����.
98 DB2 Servers� �� �
���� �� ���� ������ �� ��� ��(Windows)
� �� ���� ������ ��� ��� � �� �����.
��� � �� DB2� ��� � �� �� � �� ������ �� ��
��� ��� � � ���. � �� �� ���� � � ��� ��
���.
DB2� ���� �� ���.
�� �� � �� ������ �� ��� � ��� ��� �����.
1. � � ���� regedit �� ������. ����� �� �� ����.
2. ����� �� � � ����.
3. ���� ����� ��� ������.
4. �� �� ��� �� �� � �� ��� ������.
��� ��� �� �� � �� ������ �� ��� ��� ��� �
� ���� � � ����.
� 9 � ���� ������ �� �� 99
100 DB2 Servers� �� �
� 10 � �� � ��
�� � �� ��
DB2 �� ����� �� DB2 � �� ��� ���� ��� �� ��� DB2
��� ��� � ����.
� ��� �� �� ��� �� �� � �� ��� �����. � ��
� �� �� ����� ��� �� ����� �����.
� ���� DB2 ��� �� ��� ���� �� �� ��� ��� ��
�� ���� ���� ��� DB2 �� ���� ����� � �� ���
��.
�� ��� � ��� ���� � ��� �� � ����.
v ���� �� � �� � ��� �����. �� � ��� �� ���
�� DB2 �� DVD� ����.
db2/platform/samples
��� platform� �� ���� ��� ����.
v DB2 �� ���� ���� ��� ��� �� �� �� ���� ����
�. DB2 �� ����� � ��� �� ��� ����, �� � �
�(�� ��� ��� ��� � �� �� ��, ���� �� ��)� � �
�� �����. ��� � ��� name1 name2���.
v � �� �� ���� ���� ��� ���� ��� DB2 ���� �
��� ����(Windows �� ��).
� �� ��� � ��� �� �� ����.
�� � ����
� �� ��� ��� �� ��� ����� ���� �� ���.
v � 8�� �� � �� � 9�� �� � �� ��� ��� �
�� � ��� ��� � �� � ��� ����. �� ��, DB2 � 9�
� ��� � ��� DB2 � 9(�� � 9.5) ��� ���� �� ���
� ����. DB2 � 9� ���� � ��� � ����. DB2 � 8�� �
�� � ��� DB2 � 9� ���� � ��� �� ����. ��� � �
�� � 9� �� �� �� ���� � �����.
© Copyright IBM Corp. 1993, 2007 101
v Linux �� UNIX ���� �� ����� �� � ��� ��� ���
� ��� � ����. �� � �� ���� �� ������ ����.
���� � �� ���� �����.
v DB2 �� ���� ����� ��� �����.
– DB2 �� ���� �� �� � ���� �� � � ��� ��� �
�� � ����.
– � � ���� ���� �� � ��� ����. � ���� �
� ��� ���� ��� ��� ��� ��� � ��� ���� �
� � � �����.
– � ��� �� ���� ��� � �� ���� ���� � �� �
����. � ��� ����� ��� ���� � �� � ��� ���
����.
v � ��� ���� ����� � ������ �� �� ��� ���
�� DB2 ��� �� ��� ��� � ����. �� �, � ��� ��� �
���� � ������� ��� � ����.
v � �� �� ���(Windows �� ��)� ���� � , �� ��� �
��� � ��� ����. � ���� ��� ���, �� ��� ���
���� �� � � �����. � ��� ��� �� � �� �� ���
� ��� � , ��� �� ��� ��� � �� ����.
DB2 �� ���� ��� �� � �
� � ��� ���� DB2 �� ���� ���� � ��� �� � ��
��. � � ��� DB2 �� ��� ����� ���� �����. ��� �
��� ���� � ���� ���� � ��� �� � ����.
DB2 �� ���� ���� � ��� ���� ��� �����.
1. DB2 �� ������, ��� ��� �� �� ��� ����� � ���
� ��� ���� ���� DB2 ��� ������.
2. ����� �� �� DB2 ��� ��� � ��� �� DB2 �� ���� �
����.
3. � ����� ��� �� ���� �� �� �����.
4. �� � � ��� �� ��, �� �� �� ��� �� ��� �����
�.
5. ��, �� �� �� �� �� � ��� �� ��� � �� �� ��
�� �� � ��� ��� ��� � �� ��� � �� �� ��� ���
102 DB2 Servers� �� �
���. �� � �� �� �� ��� DB2 �� ���� ��� � ���
��� ��� ������. �� � ��� name1�� directory1� ��
���.
�:
a. �� ��� � �� �� �� ��� ����, � �� ������ ��
�� ��� � ���� �� �� �� ��� ��� ���� ���
�.
b. ���� ������ ��� ��� � , � �� � ��� �����(
�� �� � �� ��� �� � �� ��). �� � � � �� �
�� �� �� � � ��� ���� �����. �� ��� �
�� ��� name2�� directory2� �����.
6. ��� ��� ���� ��� �� ��� �� �����.
7. �� �� �� � �� �� �� ��� ��� ��� ������.
8. ��� ����� � � ����.
9. ��� ����, DB2 �� ���� ��� ��� ��� � ��� ����
�. DB2 �� ���� � ��� ��� � ����, �� ���
ENCRYPTED� � ��� �����. �� ��, ��� ����.
DAS_PASSWORD = 07774020164457377565346654170244883126985535505156353ENCRYPTED = DAS_PASSWORD
ENCRYPTED ���� ��� �� �� �� ��� �� ��� �� �
���.
DB2 ��� �� � ��(Linux � UNIX)� ���� Linux �� UNIX�� � �� �� � ��� ����. � �
�� ���� �� �� � �� ���� �� ��� ��� � ����. � �
� ��� � �� �� � ����� ���.
����
DB2� Linux �� UNIX ��� ���� �� � �� ���� ��� ��
� �� ����� �� �� ���.
v �� �� �� ���� ����� ���� BLANK(� ″BLANK″)� �
��� � ���� �� ��� ��� ��� �����.
v ���� �� �� ����� ���� � ����. ��� ��� ��� �
�� � �� � ��� �� � �� ����.
� 10 � � �� �� 103
v �� ��� � ���� �� DVD�� DB2� �� � � �� DVD ��
�� �� ���� �� ����� ���� �� ����. ���� �� �
���� ���� ��� ��� � ���� � � �� �����.
v �� ������ ��� ���� ��� ���� �� �� �� ��� �
� ���� ��� ���.
���
��� ��� �� ��� � ����.
v ���� DB2 ��� ���� �� � ��, ���� ����� ���
�� �����.
v � DB2 ���� �������. DB2 ��� � ��� �� DB2 �� �
� ���� � �� � DB2 �����, DB2 ������ � ���
� DB2 ��� DB2 ��� �� DB2 ��� �� DB2 DAS
� ��� ���.
� �� ��� ���� ��� �����.
1. DB2 �� DVD� ����� �� ���� ���� �� �� ���� �
�����.
2. �� � ��� ���� � �� �
� ���� .rsp �� ��� ����. (�: ese.rsp)
3. � ��� ���� DB2 ��
� �� ��� ���� �� �� �(Linux � UNIX)
� ��� �� ��� ���� ������ ������� � ��� ���
� �� ����.
�� ���� � ��� ��� ���.
v �� � ��(db2/platform/samples� ��. ��� platform� �� ����
��� ���)� ���� � ��� ��� ����.
v DB2 �� ���(��� ����)� ���� � ��� ��� �� ���
� ���.
DVD�� � ���� � ��� �� � ��� � �� �� ���� ��
� ���.
�� ���� ��� � ��� ��� � ����. � ���� ���
� �� � DB2� ���� � ���� ����.
� ��� ���� ��� �����.
104 DB2 Servers� �� �
1. �� � ��� �� � � �� � ��� �� �� ����� ���
� �� � �� ��� ��� ��� �����.
2. �� � ��� ��� ������.
� ���� � � ������ ��� ��� (*)� ������. �� �
� � ���� �� ��� � ���� �����. ��� ��� �� ���
� ���� ����.
�� �� � ���� �� ��� �� �� ���� ����. �� ��
�� � � ��� ��� ����� ����.
��� ��� ����� � �� �� �� � ��� ���� ����.
3. ��� ����� � ��� ��� � �� ����� �� ���� ���
���.
�� ��� ���� DB2 �� ��(Linux � UNIX)
��� ��� �� ��� � ����.
v �� ��� � �� ��� �� ��� ID� ���� �������. ���
��� � DB2 ��� ��� ��� ID� �������.
v ���� DB2 ��� ���� �� � ��, ���� ����� ���
�� �����.
v �� �� ��� ��� �� � ��� ���� DB2 ��� ��� � �
���. ��� ��� � �� ��� � ��� �����.
v � � DB2 ��� �� � DB2 ���� �����.
� �� ��� ���� ��� �����.
1. db2setup �� ��� �� ������.
dvd/db2setup -r responsefile_directory/response_file
� ��� �� �� ��� ����.
v dvd� DB2 �� ��� ���� ��� ����.
v responsefile_directory� ��� ��� � ��� �� ���� �
���.
v response_file� � ��� ��� ����.
2. �� ��� �� ��� ���� ������. �� ��� �� /tmp �
��� ����.
v db2setup.log(��� ��� � db2setup_username.log, ��� username�
�� �� ��� ��� ��� ID�)
� 10 � � �� �� 105
v db2setup.err(��� ��� � db2setup_username.err, ��� username� �
� �� ��� ��� ��� ID�)
�� ��� ��� ��� � ����. �� ��� �� db2install.history�
DB2DIR/install/logs� ����. ��� DB2DIR� DB2 ��� ��� ��� �
����. � �� ���� ��� ����.
v AIX, HP-UX �� Solaris: /opt/IBM/db2/V9.5
v Linux: /opt/ibm/db2/V9.5
�� ��� �� ��� DB2 ��� ��� � , db2install.history.xxxx� �
����. ��� xxxx� 0001�� ��� ���� ��� DB2 �� ��
�� �����.
DB2 ��� �� � � �� ����� �� � �� �� DB2 ��� ���
� �� ��� DB2 �� ��� ��� ���. DB2 �� ���� DB2 ���
��� � ��� �� ��� ���� ����.
�� ��� ���� ��� ��� ��� ������ ��� �� ��
(Linux � UNIX)
� ������ DB2 �� ���� ���� �� � ��� ���� �� �
�� ������ ��� �� �����.
���
v DB2 �� ���� ���� �� � �� DB2� ���� �� � �
� ��� ��� � ��� ��� ���.
v �� � �� �� �� ��� �����.
� ��� ���� �� ������ ��� �� ����� ��� �� �
����.
1. ���� ������ ��� ��� � �� root� �������.
2. DB2 �� DVD� ��� ��� ���� ������. �� ��, ��� �
���.
cd /db2home/db2dvd
3. db2setup �� ��� �� ������.
./db2setup -r /responsefile_directory/response_file_name
� ���, � �� AddPartitionResponse.file� /db2home ���� ���
����. ��� � ��� �� ��� ����.
./db2setup -r /db2home/AddPartitionResponse.file
4. �� ��� �� ��� ���� ������.
106 DB2 Servers� �� �
� �� � �� ����� � �� ��� �� ���.
DB2 ��� �� � � �� ����� �� � �� �� DB2 ��� ���
� �� ��� DB2 �� ��� ��� ���. DB2 �� ���� DB2 ���
��� ��� DB2 � ��� �� ��� ���� ����.
�� �� �� ��(Linux � UNIX)
�� � � �� �� �� �� � �� � � ��(�� 2�)� �
���.
14. �� � �� �� � ��
� �� � ��
0 �� ���� �������.
1 �� ��� ����.
67 �� � ��� �� �����.
15. � � �� �� � ��
� �� � ��
3 ��� �� � ����.
5 ��� �������.
10 �� �� �����.
13 ���� ��� ����.
16 DAS �� ������.
17 �� �� ������.
18 ������ �� ������.
19 FixPack ���� ��� ��� ���� �� �����.
20 FixPack ���� ��� ��� ��� �� �����. ��� ��� ��
��.
21 ��� ��� ��� DB2 ��� ����. ��� ��� ����.
22 �� ��� DB2 ��� ����� db2setup � ��� installFixPack �
� ������.
87 ���� � ��� ��� ����.
66 ��� ���� �� �������.
74 �� ���� �������. �� ����� ������.
76 � ��� �� ��� ��� � ����. ��� ������ ��� ��
� � ��� � ����.
82 � �� ��� �� � ����. � ��� ��� �� �� �� ���
������.
86 �� �� ��� �� � �� �����. ��� �� �� ��� ���
��� ��� ��� ���� � ����.
97 � �� ���� � ����� ���� ����.
102 � ��� � �� �� �� �������. � �� ��� ��� � �
���.
� 10 � � �� �� 107
15. � � �� �� � �� (��)
� �� � ��
103 ��� �� � ����.
143 ���� ��� ���� � ��� ��� �� � � ����.
DB2 ��� �� � ��(Windows)Windows� � � ��� �� �� ����� DB2 ��� � �� ���
�� � ����. � �� ��� � �� �� � ����� ���.
��� ��� �� ��� � ����.
v ���� DB2 ��� ���� �� � ��, ���� ����� ���
�� �����.
v ��� ��� � ��� � ��� ��� ����.
v � DB2 ���� ������ � ���.
v � ����� DB2 ��� � �� ��� ���� ��� �����.
1. �� ��� � ��� ���� � ��� � ��� ��� � ���
�.
– �� � ��� ������. �� � ��� (db2₩Windows₩samples)
� ����.
– DB2 �� ���� ���� � ��� ������.
– � �� �� ���� ������.
2. setup -u �� ��� ��� ��� � ��� �����. �� �� �
� �� �� ��� �� � ��.
setup -u my.rsp
v �� ����� DB2 ��� � �� ��� ���� ��� �����.
1. ���� �� �� �� ��
2. �� � ��� ���� � �� �
3. � ��� ���� DB2 �� ��
DB2 �� ��� �� �� ��� �� ��� ��(Windows)
DB2 �� ��� ��� �� ���� ��� �� �� ���� DB2 ��� �
�� ��� ��� ���� �����.
DB2 �� ��� � �� ��� �� ���� ���� �� DVD�� �� �
��� �� ��� ��� ���.
�� ��� �� DVD�� �� ���� ����� ��� �����.
108 DB2 Servers� �� �
1. �� DB2 �� DVD� DVD ���� �����.
2. ���� �����(�: c:₩db2prods).
3. DB2 �� ��� ������.
����� �� � ��� ��(Windows)
���� �� �� �� ��� �� ����� DB2 ��� � �� ���
��� �� ���� �����. �� ���� ���� ������� ��
�� ���� �� ��� ��� � ����.
�� ��� ���� �� �� ��� ����� ��� �����.
1. DB2 �� ��� ���� ������(�: c:₩db2prods).
2. Windows ��� ����.
3. ����� �� �� ���� ������.
4. �� ���� �� —> �� ��� ������. ���� �� �� ��
�� ����.
5. �� �� ������.
6. Windows 2003� � � �� �� �� ������.
7. Windows Vista� � �� �� �� ����. � �� �� ���� �
� ���� ����.
8. �� �� ��� �� ��� ������. (�: db2win).
9. � ���� �� ��� ����� ��� �����.
a. �� � �� ����. <share name>� �� �� �� ����.
b. � �� ��� �� ��� �� �� ��� ���� ��� � ���
�.
c. �� ���� �� ���� �� �� ��� �� ���� � ����. �
�� �� �� ��� ���� ����.
d. �� ����. �� ��� ��� ���� �� �� ��� ��
� ���.
e. �� ����.
�� �� ��(Windows)
� ��� �� ��� ���� ������ ������� � ��� ���
� �� ����.
�� ���� � ��� ��� ���.
v �� � ��(db2₩Windows₩samples� ��)� ���� � ��� ���
���.
� 10 � � �� �� 109
v DB2 �� ���(��� ����)� ���� � ��� ��� �� ���
� ���.
v �� DB2 ��� ���� ���� � ��� ��� � �� �� ����
��� � ��� ���� ���� ��� ���� ���. � ��� ��
� �� � �� �� ���� ��� � , ��� �� ��� ���
� �� ����.
�� ������ �� ����� DB2 ��� ��� ���. ��� ��
�� ���� ��� ��� ��� �� � ����.
� ��� ���� ��� �����.
1. �� � ��� �� � � �� ��� ��� �� ��� ���� ��
��. DB2 �� ���� �� � ��� ���� � , � ��� ���
���� ����.
2. � ��� ��� ������.
� ���� � � ������ ��� ��� (*)� ������. �� �
� � ���� �� ��� � ���� �����. ��� ��� �� ���
� ���� ����.
�� �� � ���� �� ��� �� �� ���� ����. �� ��
�� � � ��� ��� ����� ����.
��� ��� ����� � �� �� �� � ��� ���� ����.
3. ��� �� �� ��� � ��� �� ���� ���� ������. �
�� � �� ��� � �� ���� ���� �� �� � ��� ����
��. �� DVD�� � ���� � �� ��� �� � ��� � ��
���� ��� ���.
�� ��� ���� DB2 �� ��(Windows)
��� ��� �� ��� � ����.
v ���� DB2 ��� ���� �� � ��, ���� ����� ���
�� �����.
DB2 ��� �� ������� ��� ���� ��� �����.
1. � � ���� �� �� ���� ���� ��� �� DB2 �� ��
� �� �� DVD ���� �� ���� ������.
net use x: ₩₩computer_name₩directory_sharename /USER:domain₩username
� ��� �� �� ��� ����.
v x:� �� ���� �� ���� ����.
110 DB2 Servers� �� �
v computer_name� DB2 �� ��� �� �� ��� � � ��� ��
��.
v directory_sharename� ���� ��� �� DB2 �� ��� �� DVD
����� ���� �� ��� ����.
v domain� ��� ��� �� � ����.
v username� � ���� �� ��� �� ���� ����.
�� ��, db2nt�� ���� �� � codesrv� �� �� db2prods
���� �� x: ���� ����� �� �� ������.
net use x: ₩₩Server₩DB2_Installation_Images
����� ��� ���� ��� �� /USER ����� ��� � �� �
���.
2. setup �� ��� �� ������.
setup -u response_file
��� response_file� ��� � ��� �� �� �� ��� ���
�.
� �� �� ���� ���� �� � ��� ���� � �� �
�� ����� ���� ��� � ��� � ��� ���� �
�� � ����.
3. �� ��� �� ��� ���� ������. �� �� �� �� �� �
�� My Documents₩DB2LOG₩ ���� �� �� �� ��� �����
�. �� ��� ��� DB2-ProductAbrrev-DateTime.log���.
�: DB2-ESE-Tue Apr 04 17_04_45 2007.log
DB2 ��� �� � � �� ����� �� � �� �� DB2 ��� ���
� �� ��� DB2 �� ��� ��� ���.
Microsoft Systems Management Server(SMS)� ���� DB2 ��
��
Microsoft Systems Management Server(SMS)� ���� ����� DB2 ���
���� �� ���� ��� ��� � ����. SMS ��� ���� ��
�� ��� ���� ���. � �� ���� ��� ������ �� ���
���� �� ��� ��� �� � �����.
������ SMS � SMS ����� � �� �� SMS � 2.0 ��
� ���� ���� �� ���. ��� ��� ��� �� �� ��� �
� ��� Microsoft’s Systems Management Server Administrator’s Guide� �
����.
� 10 � � �� �� 111
v SMS� �����(�� � ��� �� ��)
v SMS ���� ������ �����.
v ������ �� ���� �����.
SMS� ��� � ��� � ��� ��� � ����. �� �� �� ����
�� �� � ��� ����. SMS �� ���� ��� ��� ��� � �
�� ��� � ����.
SMS� ���� DB2 ��� ����� ��� �����.
1. DB2 �� ��� SMS� ���
2. SMS �� SMS ��� �
3. ����� DB2 �� ��� ��
DB2 �� ��� SMS� ���
DB2 �� ��� SMS� ����� �� SMS� ���� DB2 ��� ���� �
� ���� �����.
SMS� �� ���� ����� �� SMS ��� �� �� ��� ��� �
�� �� ����� ������. �� SMS �� ���
db2<product_abbreviation>.pdf���(�: db2ese.pdf). � �� �� ����
���� �� � ��� ���� � �� � �� ����� ����
��� � ��� �� ��� ���� ��� � � ���.
SMS� DB2 �� ��� ������ ��� �����.
1. DB2 �� DVD� ���� ����.
2. Microsoft SMS ���� �����. Microsoft SMS ��� ��� �� �
���.
3. ��� ID� ��� ���� �� ����. SMS �� �� ����.
4. ��� � ��� ���� �� ����. ��� �� ����.
5. �� ���� �� —> �� ��� ������. ��� �� �� �� ��
��.
6. ��� � �� ����. �� ����� ����.
x:₩db2₩Windows₩samples� �� SMS ��� �� ��� �����. ��� x:
� DVD ���� ����. ���� pdf ��� ���� �� ��� �
�� ���. x:₩db2₩Windows₩samples�� �� ���� �� ��� ��
�� ��� ��� � ��� ��� ���� � ����.
7. �� ����.
112 DB2 Servers� �� �
SMS ��� SMS ��� �
SMS �� SMS ���� ��� �� SMS� ���� DB2 ��� ���� �
� ���� �����.
SMS ���� SMS ��� SMS ������ ��� �� �����. ����
����� ������� �� � �� � �� ���� ����. ���
�� ��� ����, ����� �� ���� �� �� ����� ���� �
����.
SMS ���� ���� ��� �� �����.
1. ��� �� �� ��� ��� �� � �� ����. ��� ��� �
�� �� �� ��� ���� � ��� �� ����� ��� ���
���� ����.
2. �� ��� ��� ��� DB2 ��� �� �� ���� ��� ����
��. �� ��, x:₩db2prods��, ��� x:� DVD ���� ����.
3. ��� �� ��� ��� ��� �� ��� ������.
4. �� � ��� ���� ��� �� � �� �� � �� ����.
��� �� �� �� ����. ��� ����� �� � � �� �� �
�� ����� ������. � �� �� ���� ���� �� �
��� ���� � �� � �� ����� ���� ��� � ���
� ��� ���� ��� � ����.
5. �� ����.
6. � � �� ����.
7. �� �� ���� �� ����. ��� �� � SMS ���� ���
����.
����� DB2 �� ��� ��
����� DB2 �� ���� ���� �� SMS� ���� DB2 ��� ���
� � � ���� �����.
�� ���� ���� �� �� ��� ����.
v SMS ���� ��� �� ����� ������ ��� ����� ����
�� � ����. � ����� ��� ��� � ��� ��� ���
��� ���� �� �� �� ��� �� ���.
v SMS ���� ��� �� ����� ������ ��� ����� ���
� �� � ����. � ����� ��� ��� � ��� ��� ��
� �� � ��� �� ���.
v � �� ��� ���� SMS ���� ��� � ����.
� 10 � � �� �� 113
�� 1� 2� ��� � ��� ���� ��� � �� 3� �����. ��� �
�� ��� �����.
SMS ���� ����� ������ ��� ��� ����� ������
� � ��� ���� SMS ��� �� ��� ��� �� �����.
v ��� ����� ������ ����� ��� �����.
1. ��� �� ����.
2. ��� �� ����.
3. ��� ��� �� ���� ���� �� ��� ��� �����
� ����. �� ��� �� ����. � �� ����� ��(�� �
�)�� �� ���� ������� � �� �����.
4. ��� �� �� �� ���� ���� ��� �� ���� ������.
5. �� ��� �� � �� ���� �� ��� �� ���� ����
��. � �� ��� �� ����� ���� �����. ��� ��
��� �����.
6. �� ���� ��� �� ���� �� ������. � ��� ��� �
����� ���� � � �����. �� ���� ��� ����
��� ��� �� �� ����. �� ��, ��� ��� �� ���� �
���� ������ � ��� ��� �� � � ������. ��
��� �� �� �� ��� �� ��� Microsoft’s Systems
Management Server Administrator’s Guide� �����.
7. � �� ��� ���� �� ����. �� �� �� ��� ��
���.
8. �� ��� �� ��� ��� ������(�: Install IBM Data
Server Client).
9. ��� � �� �� �� ��� �� ����. � �� � ��
� �� �����. �� � �� �� � ��� �� �� ��
����. � �� � � �� ���� �� ����. �� �
� � � ��� �� ����.
10. �� ��� �� ���� �� ����.
11. �� ����.
�� ��� ���� SMS ����� ������� �����.
v SMS ������� ��� ���� �� �� �����.
1. SMS ����� ������� ��� ���� �� �� ��
��� ��� ��� ��� ���� ������ ��� ����. �
�� ��� ��� ��� ��� �� ��� ���� � �� ���
�����.
114 DB2 Servers� �� �
2. ��� ���� ����� �����. ��� �� �� ���� �� �
���.
3. SMS ����� ������ SMS ���� ���� ��� �� ��
��� �� ��� �����. ���� ���� �� � �� ���
�. ��� ��� ����.
4. �� �� DB2� ���� �� SMS ����� ������ �� �
���. �: � ���� REBOOT = YES� ��� � �� SMS ��
���� ��� �� ���.
5. ��� � � ���� —> SMS ����� —> ��� �� �� ���
�� ������. ��� �� �� ���� �� ����.
6. Executed Commands �� �� ���� �� � ����. �� �
���, �� ��� � �� � � �� ���� ��� ������ �
�� SMS ��� ��� � � � ����.
SMS ������� ��� � � ���� �� ����. ���� ��
� ������ �� ���� Executed Commands �� ���� ��� �
�� ����.
Microsoft Systems Management Server(SMS)� ���� DB2 �
� ��� ��
� ����� Microsoft Systems Management Server(SMS)� ���� DB2 ��
���� ���� ��� ����.
SMS� ���� DB2 �� ���� ����� ��� � ����.
v SMS ��� �� ���� ���
v DB2 �� ��� �� ��� ��� �� � �� ��� ���� ���
�: SMS �� �� ��� �� �� ��� �� ��� ��� �����.
SMS� ���� DB2 �� ���� ����� ��� �����.
1. �� DB2 �� ��� �� DB2 �� ��� �� �� � ��� ��
� � �� . � � � ��� d b 2 * . r s p�� D B 2 � � � ��
db2₩windows₩samples ���� ����.
2. SMS ��� SMS �� �� � ��� SMS � ��� ����. ��� �
����� � � ��� �� ���� � � ��� �� ����.
3. � —> ��� ��� ������. ��� �� � ���� ����.
4. ��� ����. ��� �� �� ����. DB2 �� ��� ��
db2₩windows₩samples ����� ��� ��� ��� �����. � �
�� ��� db2*.pdf ���� �� ����. ��� ����.
� 10 � � �� �� 115
5. �� ��� �� ��� ��� ������. ��� ����. �� ��
�� ����.
6. ��� �� �� �� � �� �� ���� ��� ����. ��
��� �� ����.
7. DB2 �� ��� �� ��� ���� ���� ��� ����.
8. SMS ��� �� ����� � � ����.
9. SMS �� �� ���� ��� ������ � � ��� �� ���
—> �� ��� —> ����� � ������. ����� �� �� �
���.
10. ��� ����. ��� �� ����.
11. � ��� � �� �� ���� �� ��� ��� �� �
��� ������. ��� ����. �� �� �� ����. ��� ��
���� �� �� ��� �� ��� ������.
12. ��� ����. ��� �� �� ����.
13. ���� ���� ���� ��� ��� � �� �� ���� �
� ��� �� ���� ������. ��� ����. �� �� ��
����.
14. ��� ���� ���� ��� �� � � ���� ����� � � �
���� ���� ������. ��� ����. �� �� �� ����.
15. � ��� ��� ��� ��� ������. ��� ����. �����
�� �� ����.
16. SMS ���� SMS � �� �� ��� ��� � DB2 ���� �
��� ������. ��� ����. �� ��� �� ����.
17. ��� ��� � � ����� DB2 ���� �� �� � � ���
���. ���� �� �� � � ��� �� ����. ��� ����.
��� �� �� ����.
18. DB2 ���� ��� ���� �� � ��� �� ������� ��� �
��� ���� ��� � �� � � ������. ���
����.
19. ����� �� ���� ����� � � ����.
�� ������� �� �� ��� ��
DB2 ��� ��� ��� �� �� ��� �� � ���� ���� � �
���� ������� �� ������� ��� ����� ��� �
�� � ����.
DB2� CATALOG �� ���� �� ������ �� ��� ���
���.
116 DB2 Servers� �� �
v CATALOG NODE �� ���� �� ���� ��� �� ���� ��
� �����.
v CATALOG DATABASE �� �� ������ ��� ����� ��
� �� � �����.
v CATALOG DCS �� �� ������� ������ OS/400® ����
���� �����. (� �� DB2 Connect™ Personal �� Enterprise Edition
�� �����).
v CATALOG ODBC DATA SOURCE �� ODBC ��� ��� ��� �
�� ���� DB2 ������� �����.
�� ��� ���� �� IBM Data Server Clients ��� ��� ���� �
�� ��� ����� �� ���� ��� �� � ����. �� ��, ��
�� ��� ��� � ��� �� �� ���� �� myscript.bat� ��� ��
��.
@echo offclsdb2cmd catmvs.bat
DB2CMD �� DB2 ��� ����� catmvs.bat ��� �� ��� ����
�� �����. ��� ������� DB2 Connect Personal Edition ����
�� ���� � ��� � �� �� �� ���� �� catmvs.bat���.
db2 catalog tcpip node tcptst1 remote mvshost server 446db2 catalog database mvsdb at node tcptst1 authentication dcsdb2 catalog dcs database mvsdb as mvs_locatordb2 catalog system odbc data source mvsdbdb2 terminateexit
��� ��� ����� ������ ��� ���� SMS� ���� ���
�� �� �� � ��� �� ��� ���� � � ����.
�� ����� ���� � �� SMS ���� ���� �� �� ��
���.
1. SMS ���� �����. SMS �� �� ����.
2. ��� � ��� ���� �� ����. ��� �� ����.
3. �� ���� �� —> �� ��� ������. ��� �� �� �� �
���.
4. � ���� ��� ������. (�: batchpack).
5. ���� �� ��� ������. (�: Package for batch file).
6. ��� �� � �� ����. ��� ��� ��� �� �� ����.
� 10 � � �� �� 117
7. �� ���� ������. �� ���� �� ������ ��� �
�� �� �� ����� ������� �� ���� ��� �� ��
� � ����.
8. ��� �� ��� �� ��� �� ��� ����. ��� �� �� �
� ����.
9. � ��� ������.
10. �� ������.
11. ���� ��� �� ��� ���� �� ��� ���� ����.
12. �� ����.
13. �� ����.
14. �� ����.
� ���� �� ���� �� ���� ������.
�� �� ��� � db2cli.ini ��
db2cli.ini ��� DB2 CLI ��� ����� ASCII �����. � ��� ���
� ��� � ��� �� �� ������ x:₩sqllib ���� ����. ���
x:₩sqllib� DB2 ��� �� ��� ����.
�� CLI �� ��� CLI ����� ��� �� � �� ���� IBM Data
Server Client ������ ��� ��� db2cli.ini ��� ��� � ����. �
� ��� ���� db2cli.ini ��� � IBM Data Server Client ������
DB2 �� ���(�: c:₩Program Files₩IBM₩SQLLIB)� ������.
�� �� �� ����(Windows)
Windows ���� ��� � �� � �� �� ���� ��� ����
��� DB2 ���� � ��� ����. ��� � ��� ���� �� �
��� ��� ��� �� �� � ����.
�� ��, ������ ��� ������� ���� �� IBM Data Server Client
� ���� ��� � ����. � IBM Data Server Client� ���� ����
��� �� � ������� ����� ��� ��� � �� �� ��
�� ��� � DB2 ��� �� � �� �� ����� �� �
����.
� �� �� ���� ���� ���� � ��� �� �� ���
�� �� � ��� ����. �� �� � ��� ���� ������
�� ������ �� � ����.
118 DB2 Servers� �� �
� �� �� ���� �� ���� �� �� � ��� ��� ��
� ����� ���. � ��� ���� �� �� ��� ��� ������
� ��� �� � ����.
�� DB2 ��� ���� �� ���� �� �� ��� � �� �� ���
� �� ��(���� db2rspgn ����� ��� ��)� �� � ���� �
����.
�� �� �� ��(Windows)
�� � � �� �� �� �� �� �� �� � �� � � ��(��
2�)� ����.
16. �� � �� �� � ��
� �� � ��
0 �� ���� �������.
1 �� ��� ����.
1603 ��� �� �����.
3010 � �� �� �� ��� ����� ���� ���� ���� �� �
���. ���� ForceReboot �� ��� ��� ���� ����. � �
��� Windows Installer � 1.0��� ��� � ����.
17. � � �� �� � ��
� �� � ��
3 ��� �� � ����.
5 ��� �������.
10 �� �� �����.
13 ���� ��� ����.
87 ���� � ��� ��� ����.
1602 ��� ���� �� �������.
1610 �� ���� �������. �� ����� ������.
1612 � ��� �� ��� ��� � ����. ��� ������ ��� ��
� � ��� � ����.
1618 � �� ��� �� � ����. � ��� ��� �� �� �� ���
������.
1622 �� �� ��� �� � �� �����. ��� �� �� ��� ���
��� ��� ��� ���� � ����.
1632 Temp �� �� ��� ��� � ����. Temp �� ������ �
�� � � ��� � ����.
1633 � �� ���� � ����� ���� ����.
1638 � ��� � �� �� �� �������. � �� ��� ��� � �
���.
1639 ��� �� � ����.
� 10 � � �� �� 119
� �� � ��� �� �� ��� Microsoft � ���� �����.
� �� ��� ���� �� �� ��(Windows)
���� ��� ���� � �� ��� �� � ����.
���� ��� ���� � ��� ��� ���� ��� �����.
1. � ��� � �� �����.
2. ��� ��� ���� ���� ��� �����. �� ��, �� ���
� ese.bat�� ���� ��� ��� DB2 Enterprise Server Edition� ��
����.
c:₩db2ese₩setup /U c:₩PROD_ESE.rspecho %ERRORLEVEL%
��� /U� � ��� ��� ���� echo %ERRORLEVEL%� ���� ��
�� �� � ��� ��� ��� � �����.
3. � � ���� � ese.bat �� ���� ���� ��� �����.
�� ��� � �� �
DB2 DVD�� � � � �� �� ��� �� � ��� �����.
�� � ��� ��� ����.
db2/platform/samples
��� platform� �� ���� ��� ����.
Windows��� IBM Data Server Runtime Client IBM Data Server Driver for
ODBC, CLI, and .NET� �� � ��� �� ��� ����.
₩samples
�� � ��� ���� DB2 ��� ���� ������ ��� � ����.
�� � ��
� �� ��� �� � ���� ���� ���. � ��� ���� �� �
�� ���� �� �� � �� ���� �� ��� ��� � ����. ��
� �� ���� �� � ��� �� ��� ����. �� �� �� �
��� �� ���� ��� �� ���� �� ����� ���� ���� �
� �� �����.
Linux �� UNIX ���� �� � �� ���� �� ������ ���
�.
120 DB2 Servers� �� �
PROD
��� ��� �����. � �� ��� DB2 ���� ��� � ���
�. ���� � ���� ���� ��� ��� ��� � ����.
�: � �� ��� ������ �� ����� �� ����
PROD ���� �� ���� ����.
FILE DB2 ��� �� ���� �����.
Windows
Windows ���� � ���� 110�� ���� ����.
Linux �� UNIX
Linux �� UNIX ���� � ���� �� ��� � ��
�����.
DB2 �� ��� � � ��� ����.
v ��� ��(a–z), ��� ��(A–Z) �� ��(_)� ��� �
��
v 128�� �� � ��
v ����� ��� � ��
v �� � ��� ��� � ��
INSTALL_OPTION
Windows �� �� DB2 Enterprise Server Edition ��. � ����
��� �����. ��� SINGLE_PARTITION���.
��� ��� ����.
v INSTANCE_OWNING
v NEW_NODE
v SINGLE_PARTITION
LIC_AGREEMENT
DB2 �� DVD� db2/license ����� ���� �� ��� ��
���� ����. ��� DECLINE���.
��� ��� ����.
v DECLINE
v ACCEPT
�: ��� �� ���� DB2 ���� ��� �� �� ��� ��
� ���� ACCEPT� ��� ���.
� 10 � � �� �� 121
INTERACTIVE
Linux �� UNIX �� ��. ��� �� ���(DVD �� �� � �
�)� ��� �� � ��� � ���� ����� ��� ����.
��� ��� ����.
v NONE
v YES
v MACHINE
�:
1. NONE� ��� � �� ���� ����. PACKAGE_LOCATION
���� �� ���� �� �� ��� �� ���� ���.
2. YES� ��� � �� � �� � �� ��� ��� ����.
�� �� � DVD� ���� ��� �� � ��� ����.
3. � �� � �� ��� �� ���� � �� ���� ����
���� MACHINE� ������. �� ��� �� �����. DB2
�� ��� ���(Linux UNIX)� �����.
CONFIG_ONLY
Linux �� UNIX �� ��. � � ��� �� ��� ���� ��
���. �� ��, db2isetup �� ���� � ��� ����.
��� ��� ����.
v YES
v NO
INSTALL_TYPE
�� ��� �����.
��� ��� ����.
v COMPACT
v TYPICAL
v CUSTOM
�� �� �� �� �� ��� ��� �� ���(COMP)� �����.
DB2_COPY_NAME
Windows �� ��. �� ��� ��� DB2 �� �� ��� �
���� ��� ����. � ��� 64�� ���� ����.
DEFAULT_COPY
Windows �� ��. �� ���� �� � ��� DB2 ������
���� � DB2 ���� ��� ��� ��� �����. ��
��� ��� ��� DB2 ��� � � NO���.
122 DB2 Servers� �� �
��� ��� ����.
v YES
v NO
COPY_NAME
Windows �� ��. ��� IBM Data Server Driver for ODBC, CLI,
and .NET� ��� � ���� ��� ����. PROD ����
IBM_DATA_SERVER_DRIVER� ��� � �� ����. � ��� 64
�� ���� ����.
DEFAULT_CLIENT_INTERFACE_COPY
Windows �� ��. ��� DB2 �� �� IBM Data Server Driver for
ODBC, CLI, and .NET� ��� � IBM ������ �����
���� ���� ���� ��� ������. ���� YES� ����
��� �� IBM Data Server Client ����(ODBC/CLI ��� .Net
Data Provider)� ������� ���� � ������. IBM Data
Server Driver� �� ��� ��� NO���(, DB2 �� �� IBM
Data Server Driver for ODBC, CLI, and .NET� ���� �� � ). �
� ��� ���� � �� �� DEFAULT_COPY ���� ����.
��� ��� ����.
v YES
v NO
INSTALL_TSAMP
AIX Linux �� ��. IBM Tivoli System Automation for
Multiplatforms Base Component� ��� �����. ��� YES��
�.
��� ��� ����.
v YES
v NO
INSTALL_ITMA
IBM Tivoli Monitoring for Databases: DB2 Agent� DB2 �� ���
�� ����� �����. ��� YES���.
��� ��� ����.
v YES
v NO
MIGRATE_PRIOR_VERSIONS
Windows �� ��. DB2 ��� �� �� ���� ��� �����.
��� NO���.
� 10 � � �� �� 123
��� ��� ����.
v YES
v NO
PACKAGE_LOCATION
Linux �� UNIX �� ��. � ���� ����� ″nlpack″� ���
� ��� NL ��� ��� � �� �����. � ���� nlpack� �
�� �����. ��� �� DVD� �� �� DVD� ��� ��� ��
� � ����.
�� � ��� ���� �� �� ���� � �� �����.
�� ��, DB2 �� DVD� ��� �� ����� ��� � ��
�.
/db2images/ese/dvd/db2images/nlpack/dvd
����� � ����� ���� �� ��� ����.
PACKAGE_LOCATION=/db2images/ese/disk1
���� ��� DVD� ���� �� �����.
DB2 �� DVD� ��� �� �� �� ���� ���� ��� � �
��� ��� �� �� �� ��� � ����. �� ��, ��� ���
�.
PACKAGE_LOCATION=/db2images1/dvdPACKAGE_LOCATION=/db2images2/nlpack/dvd
COMP
��� ����� �����. �� ���� ��� ��� ����� �
�� �����.
��� ����� ����� ��� ��� ���. �� ��� ��
��� COMP ���� �� ���� �� � ����(�� ���� �
�).
�: � ���� INSTALL_TYPE� CUSTOM� � � �����.
LANG
�� �� �� ���� �����. ����� �� ��� �� ���
���. �� ����� �� ��� ���.
CLIENT_IMPORT_PROFILE
db2cfexp �� ������ ����� �� �� ��� �� �� ��
� �����. ������ �� � ����� ���� ����.
124 DB2 Servers� �� �
REBOOT
Windows �� ��. �� �� �� �� ��� ���� ���� �
�� �����. �� NO���.
��� ��� ����.
v YES
v NO
KILL_PROCESSES
Windows �� ��. DB2� �� �� �� �� � ��� � ���
� YES� ��� � �� � � DB2 ���� � �� �� ���
��.
��� ��� ����.
v YES
v NO
NEW_CONTACT
��� ��� ��� �� � �� ���� �� �� �� � ���
�����. �� �� � ��� ��� �� � ��� ��� ��� �
���. Linux �� UNIX ���� � ���� �� �� ����� �
���.
��� ��� ����.
v YES
v NO
� ���� �������. ���� ���� �� � �� �� ��
�� � ���� ����.
DB2_OLEDB_GUID
Windows �� ��. OLEDB� ���� DB2 ������ ����
GUID� ����� � ���� ������. � ���� ���� ���
���� �����.
CREATE_DAS
Windows �� ��. DAS� ��� ��� �����.
��� ��� ����.
v YES
v NO
REMOVE_DAS
Windows �� ��. DAS� ���� ��� �����. � ����
db2unins -u �� ���� � �� �� ��� ����.
� 10 � � �� �� 125
��� ��� ����.
v YES
v NO
REMOVE_DAS ���� �� ����� �����.
v ���� � ��� DB2 ��� �� �
v DAS� ����� �� �� � DB2 ���� �� �
� � �� �� �� DAS� ��� �� �� DB2 ��� ���
�� ����. ���� ����� dasupdt �� ���� DAS� � �
� DB2 ���� �����.
��� REMOVE_DAS� YES� ����, �� ��� �� ���� �
� ��� �� DB2 ��� ��� � �� DAS� �����. ���
REMOVE_DAS� NO� ����, �� ��� �� ����, �� ��
� �����.
DB2 Administration Server ��
�� DAS ��� �� ���� ��� *� ������(�� ��). � �
�� Windows, Linux UNIX ��� � ����� Linux �� UNIX
���� �� � ���� �� ������ ����.
v Linux �� UNIX ��:
*DAS_USERNAME = dasuser*DAS_PASSWORD = dasp*DAS_GID = 100*DAS_UID = 100*DAS_GROUP_NAME = dasgroup*DAS_SMTP_SERVER = jsmith.torolab.ibm.com
v Windows ��:
*DAS_USERNAME = dasuser*DAS_DOMAIN = domain*DAS_PASSWORD = dasp*DAS_SMTP_SERVER = jsmith.torolab.ibm.com
LOCALSYSTEM� ��� �� �� �� ��� ID�� ��� ��
����. LOCALSYSTEM ��� ID� DB2 Enterprise Server Edition
� ��� � ���� ��� � ����.
� ��� DAS ��� �� �� ��� �����. Linux �� UNIX
���� ��� ��� �� ������ ����. ��� �� �
��� ���� ���� ��� ��� �� ��� ��� ��� ���
���.
*DAS_CONTACT_LIST = LOCAL or REMOTE (DEFAULT = LOCAL)*DAS_CONTACT_LIST_HOSTNAME = hostname*DAS_CONTACT_LIST_USERNAME = username*DAS_CONTACT_LIST_PASSWORD = password
126 DB2 Servers� �� �
� ��� �� ��
���� �� ��� �� �� ��� �����. �� ��
� � ��� ��� ���.
v Windows ��:
– DEFAULT_INSTANCE - � �����.
v Linux �� UNIX ��:
– ��
��� �� ��
�� ��� � , � ��� ���� ��� �� �� �� � �
���. � ��� ��� ���� INSTANCE ���� ����
�� ��� ��� ���. �� �� ��� ���� INSTANCE�
��� �� �� �� ���� �� ��� ����. Windows ��
�� LOCALSYSTEM� ��� �� �� �� ��� ID�� ��� �
� ����. LOCALSYSTEM ��� ID� DB2 Enterprise Server Edition
� ��� � ���� ��� � ����.
��� Windows, Linux UNIX ��� �� �� ��� ����.
v Linux �� UNIX ��:
*INSTANCE=DB2_INSTANCE*DB2_INSTANCE.NAME = db2inst1*DB2_INSTANCE.TYPE = ESE*DB2_INSTANCE.PASSWORD = PASSWORD
(�� ���� ���)*DB2_INSTANCE.UID = 100
(�� ���� ���)*DB2_INSTANCE.GID = 100
(�� ���� ���)*DB2_INSTANCE.GROUP_NAME = db2grp1
(�� ���� ���)*DB2_INSTANCE.HOME_DIRECTORY = /home/db2inst1
(�� ���� ���)*DB2_INSTANCE.SVCENAME = db2cdb2inst1*DB2_INSTANCE.PORT_NUMBER = 50000*DB2_INSTANCE.FCM_PORT_NUMBER = 60000
(�� ���� ���)*DB2_INSTANCE.MAX_LOGICAL_NODES = 4
(�� ���� ���)*DB2_INSTANCE.AUTOSTART = YES*DB2_INSTANCE.START_DURING_INSTALL = YES*DB2_INSTANCE.FENCED_USERNAME = USERNAME
(�� ���� ���)*DB2_INSTANCE.FENCED_PASSWORD = PASSWORD*DB2_INSTANCE.FENCED_UID = 100*DB2_INSTANCE.FENCED_GID = 100*DB2_INSTANCE.FENCED_GROUP_NAME = db2grp1*DB2_INSTANCE.FENCED_HOME_DIRECTORY =/home/db2inst1*DB2_INSTANCE.CONFIGURE_TEXT_SEARCH = YES
� 10 � � �� �� 127
*DB2_INSTANCE.TEXT_SEARCH_HTTP_SERVICE_NAME = db2j_DB2_INSTANCE(�� ���� ���)
*DB2_INSTANCE.TEXT_SEARCH_HTTP_PORT_NUMBER = 55000
v Windows ��:
*INSTANCE = DB2_INSTANCE*DB2_INSTANCE.NAME = db2inst1*DB2_INSTANCE.DEFAULT_INSTANCE = db2inst1*DB2_INSTANCE.TYPE = ESE*DB2_INSTANCE.PASSWORD = PASSWORD*DB2_INSTANCE.AUTOSTART = YES*DB2_INSTANCE.START_DURING_INSTALL = YES*DB2_INSTANCE.SVCENAME = db2cdb2inst1*DB2_INSTANCE.PORT_NUMBER = 50000*DB2_INSTANCE.FCM_PORT_NUMBER = 60000*DB2_INSTANCE.MAX_LOGICAL_NODES = 4*DB2_INSTANCE.CONFIGURE_TEXT_SEARCH = YES*DB2_INSTANCE.TEXT_SEARCH_HTTP_SERVICE_NAME = db2j_DB2_INSTANCE*DB2_INSTANCE.TEXT_SEARCH_HTTP_PORT_NUMBER = 55000
�: ��� START_DURING_INSTALL� �� � ��� ���� �
�� ����. ��� AUTOSTART� ���� �� � � ��� �
�� ���� ��� ����. START_DURING_INSTALL� ��
�� �� � AUTOSTART� �� � ��� � ��� ����.
������ ��
��� ���� �� � ���� ������� ���� ����
� � ��� � ����.
DATABASE = DATABASE_SECTIONDATABASE_SECTION.INSTANCE = db2inst1DATABASE_SECTION.DATABASE_NAME = MYDBDATABASE_SECTION.LOCATION = LOCALDATABASE_SECTION.ALIAS = MYDBDATABASE_SECTION.USERNAME = usernameDATABASE_SECTION.PASSWORD = password
* � ���� ������ ��� ��������������.
DATABASE_SECTION.SYSTEM_NAME = hostnameDATABASE_SECTION.SVCENAME = db2c_db2inst1
TOOLS_CATALOG_DATABASE
Linux �� UNIX ���� � ���� �� �� ����� ����.
� ���� �� ��� ���� � ��� ������� �����.
� ��� �� � ��� ��� ������ �� ��� � ��� �
��.
*TOOLS_CATALOG_DATABASE = DATABASE_SECTION
TOOLS_CATALOG_SCHEMA
�� �� ���� ����� ���� *� ������(�� ��).
*TOOLS_CATALOG_SCHEMA = toolscat_schema
128 DB2 Servers� �� �
Linux �� UNIX ���� � ���� �� �� ����� ����.
� ��
��� ���� �� � �� ���� �� ��� ��� ��
���. ��� ��� Health ��� � ���� �����.
CONTACT = contact_sectioncontact_section.NEW_CONTACT = YEScontact_section.CONTACT_NAME = contact namecontact_section.INSTANCE = DB2_INSTANCEcontact_section.EMAIL = Email addresscontact_section.PAGER = NO
Linux �� UNIX ���� � ���� �� �� ����� ����.
DB2 �� �� �� ��
DB2 ��� ���� �� � ��� IBM � ������. �� �
�� ��� �� �� �� ���� DB2 ��� ����� �
� ���� �����.
� ��� �� �� �� ��� ��� ��� �� �� �� ��
� ���� ���� ��� ��� �� ��� �����.
*DB2_DOCHOST = hostname*DB2_DOCPORT = 1024-65535*DB2_ECLIPSEIC_SVCENAME = db2icv95*DB2_ECLIPSEIC_PORT = 51000
DB2_ECLIPSEIC_SVCENAME DB2_ECLIPSEIC_PORT� DB2 ��
�� ���� ����.
�� �� ��
Windows �� ��. ��� ���� �� ��� �����.
*DB2_EXTSECURITY = YES*DB2_ADMINGROUP_NAME = DB2ADMNS*DB2_USERSGROUP_NAME = DB2USER*DB2_ADMINGROUP_DOMAIN = BLANK*DB2_USERSGROUP_DOMAIN = BLANK
�� �� �
Windows �� ��. � ���� �� ���� ���� DB2 ��� �
��� ��� �����. DB2 ��� ��� �� ���.
��� NO���.
*NO_CONFIG = NO
��� ��� ����.
v YES
v NO
Query Patroller
�� ���� Query Patroller ��� ��� � ����.
� 10 � � �� �� 129
QUERY_PATROLLER_DATABASE = databas1databas1.QP_CONTROL_TABLESPACE = db2qpControlTableSdatabas1.QP_CONTROL_DBPARTITIONGROUP = db2qpControlDBPGrpdatabas1.QP_CONTROL_DBPARTITIONNUM = 0,1,2,...,999databas1.QP_CONTROL_PATH = any valid pathdatabas1.QP_CONTROL_DMS = NOdatabas1.QP_CONTROL_DMS_CONTAINER = FILEdatabas1.QP_CONTROL_DMS_NUMPAGES = any non-negative integerdatabas1.QP_RESULT_TABLESPACE = db2qpResultTableSdatabas1.QP_RESULT_DBPARTITIONGROUP = db2qpResultDBPGrpdatabas1.QP_RESULT_DBPARTITIONNUM = 0,1,2,...,999databas1.QP_RESULT_PATH = any valid pathdatabas1.QP_RESULT_DMS = NOdatabas1.QP_RESULT_DMS_CONTAINER = FILEdatabas1.QP_RESULT_DMS_NUMPAGES = any non-negative integerdatabas1.QP_REPLACE = YES
Windows ��� �� Query Patroller � ��� ����� ��� �
� ���� �����.
*QP_USERNAME*QP_DOMAIN*QP_PASSWORD
db2rfe �� ��
db2rfe �� ��� ���
�� ���� ���� db2rfe �� ��� ��� �� ��� ��� �
�� � ����.
INSTANCENAME
��� �� ��� ���� ��� ��� �����.
�: INSTANCENAME ���� �� ���� ����. �� ��
����.
SET_ULIMIT
AIX ��. �� ��� � �� ��� ����� ��� �
�� �����. AIX�� � ���� YES� ��� � , db2rfe
�� �� ��� ��� ����� ����� ����, ��
��� �� ��� ����� ����, �� ��� �� �
� ����� 65536�� �����.
��� ��� ����.
v YES
v NO
��� NO���.
130 DB2 Servers� �� �
ENABLE_DB2_ACS
AIX, AMD64/EM64T� Linux POWER� Linux �� DB2
Advanced Copy Services(ACS)� �� ���� ���. ���
NO���.
��� ��� ����.
v NO
v YES
ENABLE_HA
IBM Tivoli System Automation for Multiplatform Base Component
� ���� ����� ���� �����. ��� NO���.
��� ��� ����.
v NO
v YES
ENABLE_OS_AUTHENTICATION
������ ��� �� �� ���� �����. ��
� NO���.
��� ��� ����.
v NO
v YES
RESERVE_REMOTE_CONNECTION
�� ��� �� ���� �����. ��� NO���.
��� ��� ����.
v NO
v YES
�:
1. ������ � ��� �� ���� SVCENAME� ��
��, SVCENAME �� SVCEPORT ���� �� ��� �
�� � �� �� � ��� ���.
2. ������ � ��� �� ���� SVCENAME� ��
��, ��� SVCENAME �� SVCEPORT� ���� �� �
��, SVCNAME� port_number �� service_name� �� �
�� service_name �� port_number� �� �����.
3. ������ � ��� �� ���� SVCENAME� ��
�� �� ��� SVCENAME SVCEPORT� ���� ��
� �� � ��� ��� �� ��� ���� �����.
� 10 � � �� �� 131
SVCENAME
RESERVE_REMOTE_CONNECTION ���� �� �����. �
� ��� ��� ��� �����. � ���� 14�� ����
����.
SVCEPORT
RESERVE_REMOTE_CONNECTION ���� �� �����. �
� ��� �� ��� 1024 - 65535 �� �� �����.
RESERVE_TEXT_SEARCH_CONNECTION
DB2 ��� �� ���� ��� ��� � � �����.
��� NO���.
��� ��� ����.
v NO
v YES
SVCENAME_TEXT_SEARCH
RESERVE_REMOTE_CONNECTION ���� �� �����.
DB2 ��� �� ���� ��� ��� � � ��� ��� �
����. � ���� 14�� ���� ����.
SVCEPORT_TEXT_SEARCH
RESERVE_REMOTE_CONNECTION ���� �� �����.
DB2 ��� �� ���� ��� ��� � � �� ��� ��
���.
�� ���� ��� DB2 ����� �� ��� ���� � ��� ��
���.
DB2 �� ��� ��(Linux � UNIX)Linux UNIX ���� DB2 �� ���� ��� ��� ������ ��
���� ���� � ����. ��� ���� ��� � ��� ���� DB2
��� ���� � �� � �� � ��� �� �� � ��� �����
� � �� ��� � �� ���� �����.
DB2 �� ���� ��� ��� ������ ��� ����� ��� ��
���.
1. db2/samples/� �� DB2 �� ���� � ���� ������. ��
���� C Java� �����. C Java ������ �� ���
readme ��� ���� ����.
132 DB2 Servers� �� �
2. ��� makefile �� �� ��� ����� ���� �� ���� ����
��.
3. � ��� ���� INTERACTIVE=MACHINE ���� ������.
4. �� ���� ���� � ����� DB2 ��� �����.
v C �� �� ������� ��� ������.
./InstallTester image -r response_file
v Java �� �� ������� ��� ������.
java InstallTester image -r response_file
���
v image� db2setup � �� db2_install �� �� DB2 �� �� ���
� ��� ����.
v response_file� ��� � ��� �� �� �� ��� �����.
��� ���� � ��
�� ��� � �� DB2 ����� ��� ������� ���� � ��
��. � �� �� ���� �� � ��� ���� DB2 ��� ��� �
�� ����� ���� �� � �� ��� ��� �� � �� ����
��� ���� � ����.
1. �� ����� ���� db2cfexp �� ���� ���� ��� �
�� ��� ������. ��� ��� ������ �� DB2 ������
��� �� �� ��� ���� ����.
2. �� ����� ������ ��� �����.
v db2cfimp �� ������.
v DB2.CLIENT_IMPORT_PROFILE ���� ��� ���� � ��� �
��� filename� ���� ��� ������.
�: �� �� ���(CA)� ���� �� ����� ���� �� ���� �
� ����.
��� �� �� DB2 ���� ��(Windows)
� DB2 ��� �� DB2 �� �� ���� � �� �� ��� �� DB2 �
�� DB2 ���� ���� �� ����. DB2 ���� ���� ���� �
� � ���� �� DB2 ���� ��� ��� � ��� ���.
��� �� ��� ��� ���� � ���� db2stop �� �� ��
����.
� 10 � � �� �� 133
��� DB2 ��� �� ��� �� ����.
1. ��� ��� � � � DB2 ���� ���� ���� setup ��
/F ��� ������. /F ��� � � ���� ���� ���� �
��� ��� ����.
2. �� DB2 ���� ������ � �� �� ��� ��� � ����.
�� � �� �� DB2 ���� ��(Windows)
DB2 �� � � DB2 ���� � ��� ��� ��� ����.
��� �� ���� DB2 ���� ��� ���. DB2 ���� ����
���� �� � ���� �� DB2 ���� ��� ��� � ��� �
��. ��� ��� ��� �� ��� �� ����.
��� �� ��� ��� ���� � ���� db2stop �� �� DB2
���� ���� � ������ �� �� ����.
� �� ��� � , �� ���� ���� �� DB2 ���� ��� � �
���. ��� ��� ���� ��� �� ��� �� �� DB2 ���� �
����.
v setup �� /F ��� ������.
v KILL_PROCESSES ���� YES� ������(�� NO�).
134 DB2 Servers� �� �
� 11 � DB2 �� ��� ��
DB2 �� ��� �����(Linux � UNIX)� DB2 �� ����� �� ����� ������ �, �� DB2 �� ����
� � ��� ���� � �� �� �����. �� �� DB2 Workgroup
Server Edition�� DB2 Enterprise Server Edition�� ������ � , � �
� ����� � �� �� �� FixPack� ��� ���.
db2_deinstall �� ��� ����. � �� � DB2 �� ����� ��
���.
� DB2 �� ��� ��� � ��� �� ��� ����. �� ���
��� �� � �� � � ��� ��� ������:
v db2iupdt(�� ���)
v db2nrupdt(��� ���)
���� ��� DB2 �� ���� ��� ���� ��� ���.
��� ����� �� �� DB2 �� ���� ��� � �� ����.
DB2 �� ���� ����� ��� �����.
1. � ���� �� DB2 �� ��� ������.
2. � �� ���� �� ���� ��� ����� db2licm �� �� �
��.
db2licm -a LicenseFile
���� ��� �� ��� CD� db2/license ���� ����.
3. db2ilist �� ���� ���� � �� �� �� ������.
DB2DIR/db2ilist
��� DB2DIR� �� Linux��� /opt/ibm/db2/V9.5�� UNIX �
���� /opt/IBM/db2/V9.5���.
4. ��� ������ � ���� �� db2iupdt �� �����.
DB2DIR/bin/db2iupdt InstanceName ��� InstanceName� ��� ���
����.
© Copyright IBM Corp. 1993, 2007 135
5. � ��� ������ �� �� ��� �� ��� DB2 ���� �
� �� ��� ��� . DB2 �� CD� db2/PLAT �����
ComponentList.htm ��� �� �� �� �����. PLAT� DB2 ���
��� �����.
DB2 �� ��� �����(Windows)� DB2 �� ����� �� ����� ������ �, �� DB2 �� ����
� � ��� ���� � �� �� �����. �� �� DB2 Workgroup
Server Edition�� DB2 Enterprise Server Edition�� ������ � , � �
� ����� � �� �� �� FixPack� ��� ���.
���� ��� � DB2 �� ���� ��� ���� ��� ���.
FixPack� �� DB2 �� ���� ��� � , DB2 ��� ��� � FixPack�
��� �� ��� �� FixPack ��� ���� ���� � ��� �
��. �� � DB2 FixPack ���� �� �� �� ����� �����.
��� ����� Windows�� �� �� DB2 �� ��� ��� � ��
����.
DB2 �� ���� �������� ��� �����.
1. �� �� ��� �� ���� �������.
2. � DB2 ��� ���� ������.
3. ��� � ���� DB2 �� DVD� ���� ����. IBM DB2 ��
����� ����.
4. DB2 �� �� ���� ��� ��� �� � �� ��� �� �� ���
� ����. DB2 �� �� ���� ��� ���� ��� ���
��.
a. ��� � � �� ��� ������.
b. �� ���� �� �� ������.
x:₩setup /i language
��� x� DVD ���� ��� language � ��� �� �� ID�
��(�: �� � EN).
/i ���� ���� �� � , �� ���� ��� � ���
����.
�� ����.
136 DB2 Servers� �� �
5. � ���� ��� ���� �� ���� � ��� �� ��� ���
�����. �� ���� ���� ��� �� �� � ����. ��
���� ����� �� ��� F1� ����. ��� �� ��
�� ��� �� � ����.
6. � �� ���� �� ���� ��� ����� db2licm �� �� �
��.
db2licm -a LicenseFile
���� ��� �� ��� CD� db2₩license ���� ����.
7. ��/�� ��� �� ���� �� DB2 �� ���� ������.
8. �� DB2 �� ���� ���� �� ���� ���, db2start � �� �
��� ��� �� ���� � � ���� �� �������.
� 11 � DB2 �� ��� �� 137
138 DB2 Servers� �� �
� 2 � �� ��� ��� �� ��(Linux � UNIX)
DB2 �� ��� �� � ��� ���� DB2 �� ��� ��� �� ��
���.
DB2 �� ���� �� ���, ��� �� �, ���� �� ��
�� �� ���� ����� �����.
� �� ��� DB2 �� ���� �� ��� ����� ��� �����
����. �� � ��� ���� � ������ � ��� �� ����
�� �� ���� ����� �� ��� �� �� �� ��� ��� � ���
�.
��� �� ���� �� �� � �� DB2 ��, �� ����� ����
Linux UNIX ���� � ��� ��� �� ���� ���� ���
� ����.
v DB2 ��� � db2_install �� DB2 �� ��� � doce_install �
v ����(Payload) �� ��
��� � � ������ �� ��� ��� �� � ��� �����.
���
��� �� DB2 ��� �� �� ��� �����. �� ��, DB2 Enterprise
Server Edition� ����� � �� ��� �� �� �� ��� ����
� Quick Beginnings for DB2 Servers ��� �����.
����
DB2 �� �� ��� Windows ��� db2_install � �� ���� ��
���� ���� ��� � ����. Windows ��� � , DB2 �� �
�� DB2 �� ��� �� � ��� ����� ��� � ����.
���� Linux �� UNIX ����� DB2 �� �� ��� ��� �
�(native) �� ����(�, rpm, SMIT, swinstall �� pkgadd)� ���� ���
� ����. DB2 ��� ������ ���� � ���� � ��� ����
� ��� ���.
�� ���� ������.
v 141 ���� � 12 � �db2_install �� doce_install �� ���� DB2 �
� ��(Linux UNIX)�
© Copyright IBM Corp. 1993, 2007 139
v 145 ���� � 13 � ����� ��� ���� DB2 �� ��(Linux
UNIX)�
140 DB2 Servers� �� �
� 12 � db2_install �� doce_install ��� ���� DB2 �
� ��(Linux � UNIX)
DB2 �� �� �� DB2 �� ��� ���� �� ��� �����.
v ��� �� DB2 ��� �� �� ��� �� ���. �� ��, DB2
Enterprise Server Edition� ����� � �� ��� �� �� �� �
�� ����� Quick Beginnings for DB2 Servers ��� �����.
v �� �� ��� ��� ���� DB2 ��� ��� � ����. ��� �
�� ���� doce_install� ���� DB2 �� ��� ��� �� ����. �
�� �� ��� �� �� ��� � ��� �����.
v DB2 �� ���� ��� � �� ���. �� DB2 �� DVD� �����
Passport Advantage�� �� ���� ����� DB2 �� ���� ��� �
����.
db2_install �� ���� Linux UNIX ��� DB2 �� ��� ��
���.
doce_install �� DB2 �� ��� ���� Linux UNIX ��� ���
��.
rpm, SMIT, swinstall �� pkgadd� �� ��� ��(NATIVE) �� ���
�� ���� DB2 �� �� ��� ��� ��� � ����. DB2 ���
������ ���� � ���� � ��� ����� ��� ���.
db2_install �� ��� ��� DVD��� ���� ����.
���� �� ���� �� DB2 � �� �� � ��� ��� ��� � ��
��. �� ��� DB2 ��� ��� �� ���� ��� � ����. ����
�� ���� DB2 �� ��� ���� �� ����� DB2 �� ��� ��
� � �� ��� � ��� ���� ��� �� ���.
DB2 �� �� ��� db2_install �� ���� ����� DB2 �� ���
doce_install �� ���� ����� ��� �����.
1. �� DB2 �� DVD� �� � , �� DVD� � ����� �� �
��� ���� �� �� ���� ������.
2. DB2 �� ���� ���� � , �� ��� � � �� untar� ��
�.
a. �� ��� � ����.
gzip -d product.tar.gz
© Copyright IBM Corp. 1993, 2007 141
�� ��, ��� ����.
gzip -d ese.tar.gz
b. �� ��� Untar����.
Linux � ��
tar -xvf product.tar
�� ��, ��� ����.
tar -xvf ese.tar
AIX, HP-UX � Solaris � ��
gnutar -xvf product.tar
�� ��, ��� ����.
gnutar -xvf ese.tar
c. ���� �� ���� ������.
cd product
�� ��, ��� ����.
cd ese
3. ./db2_install �� ./doce_install �� ������.
./db2_install -b DB2DIR -p productShortName -c NLPackLocation -L language... -n
� ��� �� �� ��� ����.
v DB2DIR� DB2 ��� �� ��� �����. ��� ���� ���
� ��� ����� ��� ����� � ��� ����. � ��
��� ��� ����.
– AIX, HP-UX �� Solaris ��: /opt/IBM/db2/V9.5
– Linux ��: /opt/ibm/db2/V9.5
�� ��� ���� � �� �� ��� ��� ���.
DB2 �� ��� � � ��� ����.
– ��� ��(a–z), ��� ��(A–Z) �� ��(_)� ��� � ��
– 128�� �� � ��
– ����� ��� � ��
– �� � ��� ��� � ��
�: DB2 ��� ����� �� �� ���� � ��� ��� �
��. �� DB2 ��� �� ��� ���� ��� �� ����. ��
� ��� ����� �� �� ���� � ��� ��� �� �
��� ���� ���.
142 DB2 Servers� �� �
v productShortName� ��� DB2 ��� �����.
� ����� ����� ���� ��� -n ����� ��� � �� ��
���. �� ��(productShortName)� ���� /db2/plat ����
�� ComponentList.htm ��(�� �� �� �)� ����. ��� plat�
�� �� �� �����. � �� � �� ��� ��� � ����.
v NLPackLocation� National Language Pack(NLPACK) ��� �����.
v language� ��� ��(NLS)� �����. DB2 ��� �� � ��
��� � ����. ��� � �� National Language pack DVD� �
�� DVD�� �� ���.
���� �� �� ����� �� ��� ��� ����. � ���
��� ��� � � ����� �����. �� ��� ���� � ���
�� �� � ������. �� ��, ����� ���� ����� -L FR
-L DE� ������.
v n ����� ���� �� �� ����. � ����� ���� -b
-p� � ��� ���. � ��� � -c -L� ����� �� ��
�.
DB2 �� �� ���, �� �� �� ��� ���� “��� ��� ��
� �� ��”��� ���� ��� � ����. � �� ��� ����
� ����� �� ��� ��� ���� �� ��� � ����.
�� ��� DB2 �� ��� ��� ���. ����� ��� ��
�� ��� �����.
� 12 � db2_install doce_install �� ���� �� 143
144 DB2 Servers� �� �
� 13 � ���� �� ���� DB2 �� ��(Linux �
UNIX)
� ���� DB2 ���� ���� DB2 ��, ���� ��� ���� ���
����. �� ��� ���� ���� ���. DB2 �� ���� � ��
���� ���� �� ����.
���
DB2 ���� ��� ���� �� ��� �����.
v �� ����� ���� ����� ����� � ����.
v DB2 ���� ����� � ����. �� ����� �����, ��� �
� DB2 ��� ��� ����. �� � �� ��� � tar.gz ��� ��
��� tar.gz ��� ������.
v DB2 �� DVD� ��� IBM Passport Advantage(http://www-306.ibm.com/
software/howtobuy/passportadvantage/)�� ���� � �� ���� ��� �
�����.
����
rpm, SMIT, swinstall �� pkgadd� �� ��� ��(NATIVE) �� ���
�� ���� DB2 ��, ���� �� ��� ��� ��� � ����.
DB2 ���� ���� DB2 ��, ���� ��� ����� ��� ���
��.
1. �� ��� � �� ���� �������. ��� ��� � DB2 ��
� ��� ��� ID� �������.
2. �� DVD� � ����� �� ���� ���� �� �� ���
� ������.
3. ��� DB2 ����� �����. � DB2 �� DVD� ��� �� ���
����� ���� ��� �����. ���� �� ComponentList.htm �
�� ��� DVD� /db2/platform ���� ����. ��� platform� �
� �� �����.
4. ���� ��� ������.
�: DB2 ��� ����� �� �� ���� � ��� ��� ��
�. �� DB2 ��� �� ��� ���� ��� �� ����. ��� �
�� ����� �� �� ���� � ��� ��� �� � ���
���� � � � . � ���� �� �� ��� � ���� ��
© Copyright IBM Corp. 1993, 2007 145
DB2DIR/.metadata/COMPONENT/prereqs ���� ���� �� � � �
���. �� ����� ���� �� ��� �� ����.
����(payload) ��� � ����� �� �� �����.
v AIX, HP-UX �� Solaris:
cd DB2DIRgunzip -c /dvd/db2/platform/FILES/filename.tar.gz | tar -xvf -
v Linux:
cd DB2DIRtar xzvf /dvd/db2/platform/FILES/filename.tar.gz
���
v DB2DIR� �� � �� �� �����.
– ��� ��� � DB2DIR� $HOME/sqllib� ���. � ����
�� �� ���.
– �� ��� � � ��� ��� ����.
- /opt/IBM/db2/V9.5(AIX, HP-UX �� Solaris)
- /opt/ibm/db2/V9.5(Linux)
� ��� ���� ���� � �� �� ��� ��� � ���
�.
DB2 �� ��� � � ��� ����.
- ��� ��(a–z), ��� ��(A–Z) �� ��(_)� ��� � ��
- 128�� �� � ��
- ����� ��� � ��
- �� � ��� ��� � ��
v dvd� DB2 DVD� �� ��� ����.
v filename� �� � DB2 ����� �����.
5. � DB2 � �� ���� ���� ���(embedded) ���� �
��� �� ��� ���� ��� �� �� �����.
DB2DIR/install/db2chgpath
��� DB2DIR� �� � �� �� �����.
� �� ��:
v db2chgpath �� �� ��� ��� ��� �� � ���
�.
v ��� �� ��� ��� ��� ���� � , db2stop �� �
� � db2chgpath �� �� �� ���.
146 DB2 Servers� �� �
6. �� ��� db2icrt �� ���� DB2 ��� �� � ����. �
�� �� ��� ��� ��� db2ilist �� �� ���. � �
db2icrt � �� db2ilist �� �� ���, �� �� ��� ��
������ ���� ��� ���� �� �� �� �����.
7. ��� ��� � $HOME/sqllib/db2nrcfg� ��� ��� ��� ��
����.
8. db2ls ����� ������. db2ls ����� ���� ��� DB2 ���
� ��� ��� � ����. db2ls ����� ����� ��� ���
��.
a. �� �� ��� ��� ��� DB2 ��� �����.
db2greg –dump
��� �� ��� ����.
S,DB2,9.1.0.0,/opt/ibm/copy1,-,,0,,,1159464765,0S,DB2,9.1.0.1,/opt/ibm/copy2,,,1,0,,1159466596,0
�� ���� � �� � 9.1.0.1� copy2� copy1(9.1.0.0)�� ��
� �� ����.
b. db2ls� �� ��� ����� ���� /usr/local/bin� � ����. �
�� ���� � �� ���� DB2 ��� � ����.
c. �� � � ���� ��� /usr/local/bin ���� /opt/ibm/<latest_copy>/
install/db2ls� �� ��� �����(��� <latest_copy>� �� �
��� DB2 �����).
v /usr/local/bin/db2ls� ��
v /usr/local/bin/db2ls� ����� ���� �� �� ��� �� ��
�� �� DB2 ��� ���
9. � ��� �� ��� db2fmcu �� ��� /etc/inittab� DB2 ��
��� ������. �� ��, ��� ����.
DB2DIR/bin/db2fmcu –u –p /etc/inittab
��� DB2DIR� �� � �� �� �����.
10. GSKit� ������. GSKit� SOAP �� WebSphere® Information Integrator
� �� � ��� �� �����. GSKit� ����� ��� �����.
a. DB2 � �� ���� db2/<platform>/FILES ������ GSKit �
��� �����.
b. rpm –ivh �� �� ���� GSKit ���� ������.
11. ��� ��� � DB2 ��� ��� �� ��� DB2 ��� ����
� � �� �� �� ���. �� DB2 �� ��� $HOME/sqllib/
db2profile(Bourne shell Korn shell ����) �� $HOME/sqllib/
� 13 � ���� ��� ���� �� 147
db2chsrc(�C shell ����)� ���� � �� �� �� �� ��� �
� ����. ��� $HOME� ��� ���� � ������.
����(payload) �� � � �� ���� ��� �� ���. �� ��
� � ���� �����.
148 DB2 Servers� �� �
� 14 � �� � DB2 ��� ���� ��
� ���� ���� Linux UNIX ���� db2_install � �� ���
� �� �� ���� ���� DB2 �� ��� � �� �� ��� ���
� �� �����.
� ���� DB2 �� ��� �� � ��� ���� ��� DB2 ����
��� ����.
db2_install � �� ���� �� �� ���� ���� ��� DB2 ����
�� �����. � ��� �� �� �� �� ���� ��� �� �
��.
DB2 �� ��� ����� �� �� ������. 1 - 4 �� ��� �
��� ��� ����.
1. DB2 ��� �� �� ��� ID �
2. DB2 Administration Server(DAS) �
3. db2icrt� ���� �� �
4. DB2 ��� �� � (����)
5. DB2 ��� �� TCP/IP �� ��
6. ���� ��� ���� ���� � ��
��� �� �� DB2 Administration Server ���� ��� �� DB2 ��� �
�� ���� DB2 �� ��� ���� �� ����. DB2 �� ���
� DB2 �� ����� �� � ��� ������ ���� ����.
DB2 ������ ��� �� �� � ��� ID �(Linux � UNIX)� ���� ���� ��� ��� �� � �� �� ��� �� ���.
�� ��� ��� �����.
DB2 �� ���� �� ��� � ���� �� �� ��� ��� ��
��. �� � �� ��� ��� �� �� � ����.
�� ���� ���� ��� �� ��� �� � ����� ����.
��� �� �� � � DB2 �� �� � � �� ��� �� ��� ���
� ����.
© Copyright IBM Corp. 1993, 2007 149
��� ��� ID� �� �� ���� ���� �� �����.
18. � ��� ��
��� ��� �� � ��
�� ��� db2inst1 db2iadm1
�� ��� db2fenc1 db2fadm1
DB2 Administration Server ��
�
dasusr1 dasadm1
v �� ��� � ���� DB2 ��� � �����.
v �� ���� DB2 ������� ���� ���� ���� ���� ���
�� ��(UDF) ���� ����� ��� � �����.
v DB2 Administration Server ���� ��� ID� ����� DB2 Administration
Server� ��� � �����.
DB2� �� �� ��� ��� ID� ���� ��� �����.
1. �� ��� �� ���� �� ����.
2. ��� ���� �� ������.
�: �� � �� ��� ���� ����. � �� ����. ���
passwd username �� ���� ��� ��� � ����.
AIX � ��
AIX�� ��� ���� �� �� ������.
mkgroup id=999 db2iadm1mkgroup id=998 db2fadm1mkgroup id=997 dasadm1
��� ��� �� ���� �����.
mkuser id=1004 pgrp=db2iadm1 groups=db2iadm1home=/home/db2inst1 db2inst1
mkuser id=1003 pgrp=db2fadm1 groups=db2fadm1home=/home/db2fenc1 db2fenc1
mkuser id=1002 pgrp=dasadm1 groups=dasadm1home=/home/dasusr1 dasusr1
HP-UX � ��
HP-UX�� ��� ���� �� �� ������.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
��� ��� �� ���� �����.
useradd -g db2iadm1 -d /home/db2instl -m db2inst1useradd -g db2fadm1 -d /home/db2fenc1 -m db2fenc1useradd -g dbasgrp -d /home/dasusr1 -m dasusr1
150 DB2 Servers� �� �
Linux � ��
Linux ���� ��� ���� �� �� ������.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
��� ��� �� ���� �����.
useradd -u 1004 -g db2iadm1 -m -d /home/db2inst1 db2inst1useradd -u 1003 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1
Solaris � ��
Solaris�� ��� ���� �� �� ������.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
��� ��� �� ���� �����.
useradd -g db2iadm1 -u 1004 -d /export/home/db2inst1 -m db2inst1useradd -g db2fadm1 -u 1003 -d /export/home/db2fenc1 -m db2fenc1useradd -g dasadm1 -u 1002 -d /export/home/dasusr1 -m dasusr1
���� ������ ��� �� � ��� ID �
���� ������ ���� DB2 �� ��� � �� ��� �
(AIX)
DB2 ������� ��� �� ���� ��� �����. ��� ��
� ��� �� ��� �� � ����. ��� �� �� � � DB2 ��
�� � � �� ��� �� ��� ��� � ����.
DB2 �� ���� ���� DB2 ��� ��� � , DB2 �� ���� ���
�� ���� ����.
19. �� ��� ��
�� ��� ��� �� � ��
�� ��� db2inst1 db2iadm1
�� ��� db2fenc1 db2fadm1
DB2 Administration Server ��
�
dasusr1 dasadm1
DB2 Administration Server ���� �� ����� � ���� �� ���
� �� � �� ��� ���. DB2 �� ���� ���� �� �� �
��� DB2 Administration Server��� � ���� �� � , �� � �� �
� 14 � �� � DB2 �� � �� 151
��� ���� ��� � ���� ����(��� � ). � ���� �� �
� � �� �� � , ���� �� 1� ��� �� ���.
���
v ��� ��� ���� �� ��� �� ���.
v �� ������ ��� ��� �� � , DB2 ��� ���
��� � �� �� ��� �� ����.
����
���� �� ��� ��� ��� �� �� � � DB2� �� �
� � �� �� ���.
� ��� �� ���� ��� �����.
1. �� � �� �������.
2. �� �� ���� �� ��� ��(�: db2iadm1), UDF �� ����
����� ��� ��(�: db2fadm1) DB2 Administration Server� ��
�� ��(�: dasadm1)� �����.
mkgroup id=999 db2iadm1mkgroup id=998 db2fadm1mkgroup id=997 dasadm1
3. �� �� ���� �� ��� �� � ��� ��� ���� ���
��. � ���� � ���� ��� ��� ��� DB2 � ���
(db2home)� ���.
mkuser id=1004 pgrp=db2iadm1 groups=db2iadm1 home=/db2home/db2inst1core=-1 data=491519 stack=32767 rss=-1 fsize=-1 db2inst1
mkuser id=1003 pgrp=db2fadm1 groups=db2fadm1 home=/db2home/db2fenc1db2fenc1
mkuser id=1002 pgrp=dasadm1 groups=dasadm1 home=/home/dasusr1dasusr1
4. �� � ���� �� �� ��� �� ��� ������.
passwd db2inst1passwd db2fenc1passwd dasusr1
5. �������.
6. �� � ���(db2inst1, db2fenc1 dasusr1)� �� � �� �� ��
��. ���� ���� ���� ���� ���� � ��� ��� ����
� � �����.
7. �������.
8. ���� ������ ��� ��� � � �� ��� �� ��� ��
��� �����.
152 DB2 Servers� �� �
���� ������ ���� DB2 �� ��� �� ��� �(HP-UX)
DB2 ������� ��� �� ���� ��� �����. ��� ��
� ��� �� ��� �� � ����. ��� �� �� � � DB2 ��
�� � � �� ��� �� ��� ��� � ����.
DB2 �� ���� ���� DB2 ��� ��� � , DB2 �� ���� ���
�� ���� ����.
20. �� ��� ��
�� ��� ��� �� � ��
�� ��� db2inst1 db2iadm1
�� ��� db2fenc1 db2fadm1
DB2 Administration Server ��
�
dasusr1 dasadm1
DB2 Administration Server ���� �� ����� � ���� �� ���
� �� � �� ��� ���. DB2 �� ���� ���� �� �� �
��� DB2 Administration Server��� � ���� �� � , �� � �� �
��� ���� ��� � ���� ����(��� � ). � ���� �� �
� � �� �� � , ���� �� 1� ��� �� ���.
���
v ��� ��� ���� �� ��� �� ���.
v �� ������ ��� ��� �� � , DB2 ��� ���
��� � �� �� ��� �� ����.
����
���� �� ��� ��� ��� �� �� � � DB2� �� �
� � �� �� ���.
� ��� �� ���� ��� �����.
1. �� � �� �������.
2. �� �� ���� �� ��� ��(�: db2iadm1), UDF �� ����
����� ��� ��(�: db2fadm1) DB2 Administration Server� ��
�� ��(�: dasadm1)� �����.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
3. �� �� ���� �� ��� �� � ��� ��� ���� ���
��. � ���� � ���� ��� ��� ��� DB2 � ���
(db2home)� ���.
� 14 � �� � DB2 �� � �� 153
useradd -u 1004 db2iadm1 -d /db2home/db2inst1 -m db2inst1useradd -u 1003 db2fadm1 -d /db2home/db2fenc1 -m db2fenc1useradd -u 1002 dbasgrp -d /home/dasusr1 -m dasusr1
4. �� � ���� �� �� ��� �� ��� ������.
passwd db2inst1 passwd db2fenc1 passwd dasusr1
5. �������.
6. �� � ���(db2inst1, db2fenc1 dasusr1)� �� � �� �� ��
��. ���� ���� ���� ���� ���� � ��� ��� ����
� � �����.
7. �������.
8. ���� ������ ��� ��� � � �� ��� �� ��� ��
��� �����.
���� ������ ���� DB2 �� ��� �� ��� �(Linux)
DB2 ������� ��� �� ���� ��� �����. ��� ��
� ��� �� ��� �� � ����. ��� �� �� � � DB2 ��
�� � � �� ��� �� ��� ��� � ����.
DB2 �� ���� ���� DB2 ��� ��� � , DB2 �� ���� ���
�� ���� ����.
21. �� ��� ��
�� ��� ��� �� � ��
�� ��� db2inst1 db2iadm1
�� ��� db2fenc1 db2fadm1
DB2 Administration Server ��
�
dasusr1 dasadm1
DB2 Administration Server ���� �� ����� � ���� �� ���
� �� � �� ��� ���. DB2 �� ���� ���� �� �� �
��� DB2 Administration Server��� � ���� �� � , �� � �� �
��� ���� ��� � ���� ����(��� � ). � ���� �� �
� � �� �� � , ���� �� 1� ��� �� ���.
���
v ��� ��� ���� �� ��� �� ���.
v �� ������ ��� ��� �� � , DB2 ��� ���
��� � �� �� ��� �� ����.
154 DB2 Servers� �� �
����
���� �� ��� ��� ��� �� �� � � DB2� �� �
� � �� �� ���.
� ��� �� ���� ��� �����.
1. �� � �� �������.
2. �� �� ���� �� ��� ��(�: db2iadm1), UDF �� ����
����� ��� ��(�: db2fadm1) DB2 Administration Server� ��
�� ��(�: dasadm1)� �����.
groupadd -g 999 db2iadm1groupadd -g 998 db2fadm1groupadd -g 997 dasadm1
���� �� �� ��� �� � ���� ���� � ���.
3. �� �� ���� �� ��� �� � ��� ��� ���� ���
��. � ���� � ���� ��� ��� ��� DB2 � ���
(db2home)� ���.
useradd -u 1004 -g db2iadm1 -m -d /db2home/db2inst1 db2inst1 -p password1useradd -u 1003 -g db2fadm1 -m -d /db2home/db2fenc1 db2fenc1 -p password2useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1 -p password3
4. �� � ���� �� �� ��� �� ��� ������.
passwd db2inst1 passwd db2fenc1 passwd dasusr1
5. �������.
6. �� � ���(db2inst1, db2fenc1 dasusr1)� �� � �� �� ��
��. ���� ���� ���� ���� ���� � ��� ��� ����
� � �����.
7. �������.
8. ���� ������ ��� ��� � � �� ��� �� ��� ��
��� �����.
���� ������ ���� DB2 �� ��� �� ��� �(Solaris� ��)
DB2 ������� ��� �� ���� ��� �����. ��� ��
� ��� �� ��� �� � ����. ��� �� �� � � DB2 ��
�� � � �� ��� �� ��� ��� � ����.
DB2 �� ���� ���� DB2 ��� ��� � , DB2 �� ���� ���
�� ���� ����.
� 14 � �� � DB2 �� � �� 155
22. �� ��� ��
�� ��� ��� �� � ��
�� ��� db2inst1 db2iadm1
�� ��� db2fenc1 db2fadm1
DB2 Administration Server ��
�
dasusr1 dasadm1
DB2 Administration Server ���� �� ����� � ���� �� ���
� �� � �� ��� ���. DB2 �� ���� ���� �� �� �
��� DB2 Administration Server��� � ���� �� � , �� � �� �
��� ���� ��� � ���� ����(��� � ). � ���� �� �
� � �� �� � , ���� �� 1� ��� �� ���.
���
v ��� ��� ���� �� ��� �� ���.
v �� ������ ��� ��� �� � , DB2 ��� ���
��� � �� �� ��� �� ����.
����
���� �� ��� ��� ��� �� �� � � DB2� �� �
� � �� �� ���.
� ��� �� ���� ��� �����.
1. �� � �� �������.
2. �� �� ���� �� ��� ��(�: db2iadm1), UDF �� ����
����� ��� ��(�: db2fadm1) DB2 Administration Server� ��
�� ��(�: dasadm1)� �����.
groupadd id=999 db2iadm1groupadd id=998 db2fadm1groupadd id=997 dasadm1
3. �� �� ���� � ��� �� ���� �����. � ���� �
���� ��� ��� ��� DB2 � ���(/db2home)� ���.
useradd -u 1004 -g db2iadm1 -d /db2home/db2instl -m db2inst1 passwd mypasswrduseradd -u 1003 -g db2fadm1 -d /db2home/db2fenc1 -m db2fenc1 passwd mypasswrduseradd -u 1002 -g dasadm1 -d /export/home/dasusr1 -m dasusr1 passwd mypasswrd
4. �� � ���� �� �� ��� �� ��� ������.
passwd db2inst1 passwd db2fenc1 passwd dasusr1
5. �������.
6. �� � ���(db2inst1, db2fenc1 dasusr1)� �� � �� �� ��
��. ���� ���� ���� ���� ���� � ��� ��� ����
� � �����.
7. �������.
156 DB2 Servers� �� �
8. ���� ������ ��� ��� � � �� ��� �� ��� ��
��� �����.
DB2 Administration Server(DAS) �
DB2 Administration Server(DAS)� �� �� �� �� ���� �� DB2�
�� ���� �����.
���
DAS� ��� ���� ��� �� ���.
v �� ��
v �� DAS ���
����
��� ID� ���� ����� ��� ����.
v guests, admins, users local ��� �� ��� �� �
v ��� ��(a–z), ��(0–9) �� ��(_)� ��� � ��
v 8��� � � ��
v IBM, SYS, SQL �� ��� �� � ��
v DB2 ���(USERS, ADMINS, GUESTS, PUBLIC �� LOCAL) �� SQL
���� � ��
v � ��� ��� � ��
v NIS �� NIS+�� ��� ID� �
v � ��� ID� ��� �� �� ��� ID� ��� � �� ��� ID��
�� ��� � ����.
– �� �� ���
– ��� ��� �� ���
DAS� ���� ��� �����.
1. �� ��� �� ���� �� ����.
2. �� �� �� DAS� �����.
DB2DIR/instance/dascrt -u DASuser
���,
v DB2DIR� DB2 ��� ����� ��� �����. � �� ����
��� ����.
– AIX, HP-UX �� Solaris ��: /opt/IBM/db2/V9.5
� 14 � �� � DB2 �� � �� 157
– Linux ��: /opt/ibm/db2/V9.5
v –u� ��� ��� �� � ��� DAS ���� �����.
db2icrt� ���� ���� �
DB2 ��� ���� ���� ������ ��� �����. db2icrt
�� ���� ��� �����.
Linux �� UNIX ����� �� ��� �� ���. Windows ��
��� �� ��� ���� ���.
db2icrt� ���� ��� ���� ��� �����.
1. �� ���� �� ����.
2. db2icrt �� �����. �� ��, Linux or UNIX ��:
DB2DIR/instance/db2icrt -a AuthType -u FencedID InstName
Windows ��:
DB2DIR₩bin₩db2icrt -u FencedID InstName
� ��� �� �� ��� ����.
DB2DIR
DB2 �� ������.
v AIX, HP-UX �� Solaris ���� � DB2 �� ���
� /opt/IBM/db2/V9.5���.
v Linux ���� � �� ���� /opt/ibm/db2/V9.5���.
-a AuthType(Linux �� UNIX)
��� � ��� ����. AuthType� SERVER, CLIENT,
DCS, SERVER_ENCRYPT, DCS_ENCRYPT � ��� � ����.
SERVER� �����. � ����� �������.
-u FencedID
��(fenced)� ��� �� ��(UDF) ��� ���� ���� �
� ��� ��� ��� ����. � ���� �������
��� ��� � �� ���� ����. ���� �� �� �
��� ��� ������.
InstName
��� ��� ����. �� ��� ��� ���� ��
�� ��� � ���. ���� �� ��� ���� ���
� ��� ������. ��� ��� ���� ���� �
���� ����.
158 DB2 Servers� �� �
�� ��, � �� ����, �� ���� db2fenc1��, �� �� ���
� db2inst1�� �� �� ���� AIX ���� ��� �����.
/opt/IBM/db2/V9.5/instance/db2icrt -a server -u db2fenc1 db2inst1
(����) ��� �� ��� Health ���� �� ��� ��� � ��
��. � ���� Health Center �� CLP� ���� �� � ����.
DB2 �� � �
�� DB2 � ��� ��� �� /usr/lib ���� �� DB2 ��, /usr/include
���� �� �� ��� ��� �� � ����.
� ���� ���� �� ��� �� ���� ���� ���.
� ���� �� DB2 ��� ���� ����.
�� � � �� ���� � DB2 ��� �� �� �� ��� ���.
v �� � �� ��� DB2 ��� ����.
v ������ � ��� � ��� �� ���� �� ��� �� ��
��� ���� ��� ���.
�� ����� ����.
v ��� DB2 ��� �� ��� ��� �� DB2 ��� �� �� ���
������. ��� ��� ����� ��� DB2 ���� ��� � ��
��.
v �� DB2 �� /usr/lib /usr/include ���� �� �� ��� �� �
�� ��� �����.
v �� DB2 ��� ���� ������ ��� ��� ����.
DB2 ��� �� ��� ���� ��� �����.
1. �� ��� �� ���� �������.
2. db2ln �� �����. �� ��, ��� ����.
DB2DIR/cfg/db2ln
� ��� �� �� ��� ����.
DB2DIR
DB2 �� ������.
v AIX, HP-UX �� Solaris ���� � DB2 �� ���
� /opt/IBM/db2/V9.5���.
v Linux ���� � �� ���� /opt/ibm/db2/V9.5���.
� 14 � �� � DB2 �� � �� 159
�� DB2 �� /usr/lib /usr/include ���� �� �� ��� �� � db2ln
�� ���� ��� ���� � DB2 �� �� ��� ����. ��
�� ����� �� ��� ������ � �� DB2 ��� db2ln ��
��� �� �� DB2 ��� db2rmln �� �� ���.
DB2 ����� �� TCP/IP � ��
� ������ DB2 � ���(CLP)� ���� DB2 ��� TCP/IP ���
���� ��� �� ����. DB2 �� �� DB2 �������� �
� �� ��� ���� DB2 ��� �� ����� ��� ���.
DB2 ��� TCP/IP ��� ���� �� ��� � ����.
v TCP/IP� DB2 ��� ��� � ����. ��� ���� ����
TCP/IP� DB2 �������� ��� ���.
v �� ��� �� �� �� �� �� ���� �����.
�� ��� �� � �� ��
��� ��� ��� ������ � ��� �� ��� ��� �
�(svcename) ����� ���� � �����. �� ��� ��� �
��� ��� ��� �� ��� ��, �� �� ����� ���
� ���. ��� ��� ����� ��� �� ��� ��� �
��. ��� ��� �� �� server1� � ����. ���� ����
DB2 Enterprise Server Edition� ���� � �� �� ��� FCM(Fast
Communications Manager)� ���� �� ��� ���� ��� �
����.
�� ��� ��� �� ��� ��� ���. �� �� �����
�� �� 3700/tcp� � ����.
�� ��
�� �� ������ � ��� �� ���� ��� ��
(svcename) ����� �� ��� �� � ����. � � �� ��
� ��� ��� ��� ����. ���� ���� DB2 Enterprise
Server Edition� ���� � �� �� ��� FCM(Fast
Communications Manager) �� ���� �� ������ ����
�� ��� ���� ��� � ����. �� ��� �� �� 3700�
� ����.
���� ����� DB2 �� ���� ���� DB2� ��� � ��� ��
� �����. ��� � � �� ���� �����.
v DB2 �� ���� ���� DB2 ��� TCP/IP �� ����� �� ��� �
160 DB2 Servers� �� �
v DB2 �� ���� ���� DB2 �� �� ����� TCP/IP �� �����
��� �
v TCP/IP �� ����� DB2 �� ���� �� ��� �� �
v db2_install � �� ����(payload) �� ���� ���� DB2 ��� �
�� �
DB2 ��� TCP/IP ��� ����� ��� �����.
1. �� ��� ��� ������.
2. �� ������ � ��� �� ��� ������.
3. �� �� � ��� ���� �� ����� ������.
v CLP
v �� ��
� 14 � �� � DB2 �� � �� 161
162 DB2 Servers� �� �
� 3 � DB2 �� �� �� �
© Copyright IBM Corp. 1993, 2007 163
164 DB2 Servers� �� �
� 15 � �� ��
� ��� ���� DB2 �� �� ��(Linux � Windows)�� ������� ���� ���� DB2 � ��� ������ � � �
��.
� ���� ���� �� �� � � ����� ���� �� ���.
� �� DB2 �� ����� �� �� �� ��� ����� �����. �
� �� ��� ��� ����� ��� �� �� �� ��� � ����.
�� ��� Linux(x86 AMD64/EM64T ��) Windows(x86
AMD64/EM64T ��)��� �� �����.
1. Linux� � �� ����� ���� �������.
2. � �� �����.
v Windows ��� � , ��� � �� ���� -> IBM DB2 -> [DB2
�� ��] -> �� � > �� ������.
v Linux Windows ��� � db2fs �� ���� � �� �
� � ����.
3. � � ������ ������ ��� ������. ������ � ��
��, �� ������ �� ������ �� �� �� � �� DB2
�� ��� �� ��� ����. �� ������ � �� ���� �
� ������ ��� ����.
4. �� ������ �� ������ ��� ��� � �� ��� ���
��. Windows� � SAMPLE ������� �� � �� ���, Linux
� � SAMPLE ������� �� ���� ��� � ����.
5. � �� ���� ��� 2-3� �� �����. SAMPLE ������� �
����, �� ���� �����. �� ����.
6. �� ��� �����. Windows� � ��� � �� ���� -> IBM
DB2 -> [DB2 �� ��] -> �� �� � —> �� ��� ������. Linux
���� � , db2cc �� ������.
7. �� �� ��� �� �����, ��� ��� �� SAMPLE �������
SAMPLE ������ ���� � ����. �� ���� ���� �
� �� ��� ��� ���� SAMPLE ������ ��� ����. ��
�� ���� � � ��� �� �� ��� ������. � �� �
�� � �� �� ��� ��� �� �� ����.
© Copyright IBM Corp. 1993, 2007 165
��� � ��� SAMPLE ������� ���� �� ����� �� � ��
��. ��� �� ������ ����� �� ������� ��� ���.
db2 drop database sample �� ���� SAMPLE ������� ������.
��� ���(CLP)� ��� �� ��
�� ������� ��� SQL �� ��� �� ���� ��� ���
� � � ����.
���
v �� ��� �� �� ������ ����� ���� ���� ��
�� �� ��� �����.
v SYSADM ��� �� ���� �����.
��� � ��� ��� �����.
1. SYSADM ��� �� ���� ���� �������.
2. db2start �� ���� ������ � ���� �����.
3. db2sampl �� ���� SAMPLE ������� �����.
� �� ���� ��� 2-3� �� �����. �� ���� ���, � �
��� ���, �� ���� �� ����.
SAMPLE ������� � � ��� ������ SAMPLE� ���
� �����.
4. SAMPLE ������� ���� �� 20� ��� � �� �� ��
� ������ ��� �������. � ���(CLP)�� �� �� �
�����.
connect to sample"select * from staff where dept = 20"connect reset
��� ��� �����.
ID NAME DEPT JOB YEARS SALARY COMM---- --------- ------ ----- ------ -------- ---------10 Sanders 20 Mgr 7 98357.50 -20 Pernal 20 Sales 8 78171.25 612.4580 James 20 Clerk - 43504.60 128.20190 Sneider 20 Clerk 8 34252.75 126.50
4 record(s) selected.
��� � ��� SAMPLE ������� ���� �� ����� �� � ��
��. db2 drop database sample �� ���� SAMPLE ������� ����
��.
166 DB2 Servers� �� �
���� ������ �� �� ��(Windows)DB2 � ��� ������ � ���, �� ������� �� � SQL
�� ��� �� ���� ��� ��� � ������ ��� �� ��
�� ������ � ����.
� �� �� ��� ���.
SAMPLE ������� ���� ��� �� �����.
1. SYSADM ��� �� ���� �� � �(ServerA)� �������.
2. db2sampl �� ���� SAMPLE ������� �����.
� �� ���� ��� 2-3� �� �����. � � ��� ���, �
� ���� �� ����.
SAMPLE ������� � � ��� ������ SAMPLE� ���
� �����.
3. db2start �� ���� ������ � ���� �����.
4. DB2 � ��� �� DB2 �� ���� SAMPLE ������� ��� �
� �� 20�� ��� � � �� �����.
db2 connect to sampledb2 "select * from staff where dept = 20"
5. ������ ��� �� ���� ������ � ��� DB2 � ���
�� �� ������.
db2 "select distinct dbpartitionnum(empno) from employee"
employee ���� ���� ������ ���� ��� �����. ��
��� ������� �� ������ ��� �� �� ��� �� �
� ����� �� ���� ������ ��� ��� �� ������ ��
� �� �� ����.
��� � ��� SAMPLE ������� ���� �� ����� �� � ��
��. ��� �� ������� ����� �� ���� ���� �� ����
�.
db2 drop database sample �� ���� SAMPLE ������� ������.
� 15 � �� � 167
���� ������ �� �� ��(Linux � UNIX)DB2 � ��� ������ � ���, �� ������� �� � SQL
�� ��� �� ���� ��� ��� � ������ ��� �� ��
�� ������ � ����.
�� �� ��� �� � �� �� ��� ���.
SAMPLE ������� ���� ��� �� �����.
1. �� �� ���� �� � �(ServerA)� �������. � ����
db2inst1� �� �� ������.
2. db2sampl �� ���� SAMPLE ������� �����. �� �� �
������ �� �� � ���� ����. ���� /db2home/
db2inst1/� �� ���� � ������. �� ���� � ���
� � ������ �����.
� �� ���� ��� 2-3� �� �����. �� ���� ���, � �
��� ���, �� ���� �� ����.
SAMPLE ������� � � ��� ������ SAMPLE� ���
� �����.
3. db2start �� ���� ������ � ���� �����.
4. DB2 � ��� �� DB2 �� ���� SAMPLE ������� ��� �
� �� 20�� ��� � � �� �����.
db2 connect to sampledb2 "select * from staff where dept = 20"
5. ������ ��� �� ���� ������ � ��� DB2 � ���
�� �� ������.
db2 "select distinct dbpartitionnum(empno) from employee"
employee ���� ���� ������ ���� ��� �����. ��
��� ��� �� ����.
v ������� ������ ��� �
v ������ ��� ���� employee ��� �� �� ����� �
��� ������ ��� �
��� � ��� SAMPLE ������� ���� �� ����� �� � ��
��. db2 drop database sample �� ���� SAMPLE ������� ����
��.
168 DB2 Servers� �� �
��� DB2 ������ ��� ���� ��(Windows)
�� � �� ���� DB2 ���� ����. �� �� ��� DB2 �� �
� ��� ��� � �� ��� ��� �� ��� � �� � DB2 ��
�� ��� �����.
23. DB2 ��� ��
DB2 �� �
DAS �� C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1
������ �� �� SQLDBCON C:₩DB2₩NODE0000₩SQL00001
������ ���
��� ��� ��� �� ����.
v � � ��
v ��� ��
v �� �� ��
v ���� �� ��
v �� ���� ��
C:₩DB2₩NODE0000₩SQL00001
������ � ��� �� �� db2systm C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1₩DB2
DB2 � C:₩Program Files₩IBM₩SQLLIB₩BIN
DB2 � ��� �� db2diag.log C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1₩DB2
DB2 �� �� C:₩Program Files₩IBM₩SQLLIB
��� �� ���� ��� C:₩DB2₩NODE0000₩SQL00001₩DB2EVENT
���� �� ��� ��� C:₩DB2₩NODE0000₩SQL00001₩SQLOGDIR
�� �� �� C:₩Documents and Settings₩Administrator₩My
Documents₩DB2LOG
�� C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1₩DB2
�� �� C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1₩DB2
DB2�� ��� �� �� ������ �
��
C:₩DB2₩NODE0000₩SQLDBDIR
�� ��� C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1₩DB2₩SQLNODIR
���� ������ �� �� db2nodes.cfg C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1₩DB2
��� ������ ��� C:₩Documents and Settings₩All Users₩Application
Data₩IBM₩DB2₩DB2COPY1₩DB2₩SQLDBDIR
� 15 � �� � 169
� � � �� � DB2 ��� �� ����. � ��� DB2 MYINST�
��� ��� ����. �� �� ��� ������� ����� �
� �� C: �� DB2 MYINST ���� � ����.
���� �� - ���� ��
1. �� �� ��� DB2� �� C: ����� �� ������ ��
2. �� �� ��� MYINST� �� C: ����� �� ������ �
�
3. �� �� ��� DB2� �� �� �� ��
4. DAS� ��
5. �� �� ��� MYINST� �� �� �� ��
170 DB2 Servers� �� �
���� �� - ���� ��
1. ��� ������ ���
2. �� ���
3. db2diag.log ��� DB2 � ��� ��
4. db2nodes.cfg ��� ���� ������ ���� ���
5. ������ � ��� �� ��
� 15 � �� � 171
���� �� - �� ���� ��
1. �� DB2� �� �� ������ ���
2. �� MYINST� �� �� ������ ���
3. ������ �� ��
���� �� - �� �� �� �
172 DB2 Servers� �� �
��� DB2 ������ ��� ���� ��(Linux)� ��� �� �� � DB2 ��� �� ����. � ��� DB2 �� ��
DB2 �� ��� ��� ��� ������ ���� ����.
�: ��� ��� � , � DB2 ��(��� �� �� ��)�
$HOME/sqllib ���� �� �� �� ����. ��� $HOME� ��� �
��� � ���� ����.
�� � �� ���� DB2 ���� ����. �� ��� � �� �
� � DB2 ���� ��� �����.
24. � �� �� � DB2 ���� ��
DB2 �� �
DAS � ��� home/dasusr1
DAS �� home/dasusr1/das
������ �� �� SQLDBCON home/db2inst1/db2inst1/NODE0000/SQL00001
������ ���
��� ��� ��� �� ����.
v � � ��
v ��� ��
v �� �� ��
v ���� �� ��
v �� ���� ��
home/db2inst1/db2inst1/NODE0000/SQL00001
������ � ��� �� �� db2systm home/db2inst1/sqllib
DB2 � /opt/IBM/db2/V9.5/bin
DB2 � ��� �� db2diag.log home/db2inst1/sqllib/db2dump
DB2 �� �� �� /opt/IBM/db2/V9.5���.
��� �� ���� ��� home/db2inst1/db2inst1/NODE0000/SQL00001/
db2event
���� �� ��� ��� home/db2inst1/db2inst1/NODE0000/SQL00001/
SQLOGDIR
�� �� �� db2install.history /opt/IBM/db2/V9.5/install/logs
�� � ��� home/db2inst1
�� �� home/db2inst1/sqllib
��� �� �� ������ ��� home/db2inst1/db2inst1/NODE0000/sqldbdir
���� ������ �� �� db2nodes.cfg home/db2inst1/sqllib
��� ������ ��� home/db2inst1/sqllib/sqldbdir
�� � � �� �� � DB2 ��� �� ����. � ��� db2inst1
db2inst2� ��� ��� ����.
� 15 � �� � 173
DB2 ���� db2inst1� �� ���� �� - ��� �� ���
��� ���� ��
1. �� ������ ���
2. ������ �� ��
174 DB2 Servers� �� �
DB2 ���� db2inst1� �� ���� �� - ���� ��
1. ��� �� DB2 � ���� db2diag.log ��
2. ��� ������ ���
3. db2nodes.cfg ��� ���� ������ ���� ���
4. ������ � ��� �� ��
dasusr1 ���� DB2 Administration Server(DAS) �� �� DB2 �� �
�� ��� ��� ����.
� 15 � �� � 175
/opt/IBM/db2/V9.5� ��� DB2 ��� �� ���� �� - ��
�� �� �
� � � �� �� ��� ��� ����. �� �� ��� ��� ��� �
� � db2install.history ��� db2install.history.n�� �� ����. ���
n� 0000 �� 0001� �� ��� �����.
DB2 �� ��� /opt/IBM/db2/V9.5� DB2 ��� �����.
176 DB2 Servers� �� �
� 16 � �� �� ���
���� ���� �� DB2 �� ��(Linux � UNIX)
db2ls �� �� �� ��� /usr/local/bin ����� �� ����� ��� �
�� DB2 � 9 ��� �� ���� �� ���.
���� DB2 ��� �� ��� ��� � �� ��� DB2 ��� ��� � �
� ��� ��� ��� � �� ��� �� � , ���� ��� ���� �
�� �� �� ��� � �� ��� �����. ���� Linux UNIX
���� db2ls �� DB2 � 9 HTML ��� ���� ���� ���� ��
DB2 �� ��� �����.
db2ls �� ���� �� ��� ��� � ����.
v ����� DB2 ��� ���� �� ��� DB2 �� ��
v �� �� ��� �� �� �� DB2 �� ��
db2ls �� ���� ��� ��� ID� �� ����.
v db2ls �� �� ���� � ��� �� DB2 ���� �����.
v db2ls �� ��� ID� ���� � ��� �� DB2 �� ���� �
�� ID� ���� ��� ���� �����. �� ��� ID� ���� DB2
��� ���� ����.
db2ls �� DB2 ��� ��� � �� ��� �����. Linux �� UNIX
�� �� ����(�: pkginfo, rpm, SMIT �� swlist)� ���� DB2 ��
� ��� �� ������. DB2 ��� ������ ���� � ���� �
��� ����� ��� ���.
Windows ����� db2ls �� ��� � ����.
DB2 ��� ���� ��� ��� ���� DB2 �� ��� ����� ���
������.
db2ls
�� ���� ��� � DB2 ��� �� ��� �� ��� �����.
v �� ��
v ��
v FixPack
© Copyright IBM Corp. 1993, 2007 177
v �� �� ��. � ��� IBM DB2 ��� �� �����.
v �� ��. � ��� DB2 ��� ����� ��� ��� ����.
v �� ��� UID. � ��� DB2 �� ��� ���� UID� ����.
�� �� ��� �� DB2 �� �� ��� �� ��� �����, q �����
��� ���.
db2ls -q -p -b baseInstallDirectory
� ��� �� �� ��� ����.
v q� �� �� ��� �� ��� �����. � ����� �����. DB2
� 8 ��� ��� � �� �� ����.
v p� �� ��� ���� ��� ��� ���� �����.
v b� �� �� ��� �� ���� �����. � ����� �� ����
� �� ��� �� � �����.
��� ����� �� �� ��� �� ��� �����.
v �� ��. �� � �� ���� � ��� �� ���� �� ���.
v �� ��� ����.
– �� ��� �� � �� ID �� p ��� ��� � �� ��� ���
� �� ID(�: ENTERPRISE_SERVER_EDITION).
– �� �� �� p ��� ��� � �� �� ��.
– �� �, ���, �� ��, FixPack ��(VRMF). �� ��, 9.5.0.0� �
���.
– FixPack(� ��� � ). �� ��, FixPack 1� ���� �� �� 1�
��. ���� FixPack 1a� �� interim FixPack� �����.
v ��� VRMF �� � ��� ���� �� � �� �� �� �� ���
� ����. ���� � FixPack� �����.
� �� �����
� �� DB2 ��� �� ��� � ��, ����� � ������ �
��� ���� ���� DB2 �� �����.
���� ��� �� ���� ����� ��� �� � �� ��� ���� �
�� ���� � ����. � �� ��� DB2 ��� ����. �� �
�, DB2 ������ ���� ��� � � �� ���� �� ��� � �
�� �� � ����.
v �� ������ �� ��� ������ �
v �� � ���(�: ��, ��� �� �� ��)
178 DB2 Servers� �� �
v �� �� ��� �� ������ � ���
v ���� � �� � ��� ���� ����� �
v �� ���� ��� ���� � �� ��
v �� �� ��
������ ��
������ � ���� �� ��� ���� � ���(CLP)
���� �� �� ����� ��� � ���� ����. CLP�
DB2 �, ������ ���� SQL�� ��� � ���� ���
�� �������. �� ��� ������ ���, ������ �
����� ���� ��� �� �� ��� �� � ���� ��
� �������. IBM Data Server Client� �� CLP� �����. �
� ��� 32�� Linux(x86-32), 64�� Linux(x64) Windows� IBM
Data Server Client� �� �����.
CLP �� ��� ���, � �� �� ��� � �� ��� ��
�� ����. � � �� ������ �� ��� �� �� �
��� � �� �� ��� ��� �����. �� ��� ��� �
�� �� � ����� �� � �� �� ��������.
������ ��
� ��� � ��, ����� �� DB2 ����� � � ��
��� �� ��� �� ��� ���� ����. ���� DB2 ����
�� ��� ����� ��(�: ������ ���� DB2 � ���
��� ��� � �� ��� �� ��(UDF) ���� ����)� �
��� ����. � ��� � ���� ���� DB2 ������ ��
��� ������ ���� � ��� �� �� ���� ����.
�� ��
DB2 �� � ����� � ���, ��� ���� IBM ����
� �� ��� �� �� � ��� ����. � ��� ������
�, ����� � ��� ���� � � ��� ���� �
���.
� ��
db2fs �� ���� ��� � �� �� � ����.
$ db2fs
Linux � UNIX � ��
db2fs �� INSTHOME/sqllib/bin ���� ����. ���
INSTHOME� �� � ������. � �� ���� sysadm
��� �����.
� 16 � �� �� ��� 179
Windows � ��
db2fs �� DB2DIR₩bin ���� ����. ��� DB2DIR�
DB2 � 9 ��� ��� ��� �����.
��� ��� � ���� ���� —> IBM DB2 —> [DB2 �
� ��] —> �� � —> �� ���� �� �����
DB2 �� ���� Windows ���� � �� �� �
����.
� ��� ���� ��� ����� ��� ���� DB2 �� ��� ��
�� ��� ���.
Firefox �� Netscape ��� ��� ��
��� ����� ���� JavaScript™� �� �� � ���� ��, JavaScript�
�� �� ��� ����. DB2 �� ��� �� DB2 � �� ����,
��� ����� �� � ���� ��� � JavaScript� ��� ��� ��
� � � ����� ��� � ����.
� � �� Firefox �� Netscape 8� ����, � � ����� ��� �
� ����� ����.
DB2 �� ����
Windows�� �� ���� ���� DB2 ��� ��� � , DB2 ��
����� � ��� ��� DB2_LP �� � � ����� ��
� ����.
DB2 �
DB2 � �� �� �, � � ����� ���� � ��� �
���. ��� � , DB2_FIRSTSTEPS�� � � ����� ��
��.
Netscape 8 �� �� � � ����� ��� ��� ��� ����.
Firefox � � ����� ����� ��� �����.
1. Firefox � �� �� ��� �����.
2. Firefox ���� � ���� ����.
Windows
a. Windows � ��� �� �...� ������.
b. firefox.exe -profilemanager� ��� � �� ����. Firefox
- ��� ���� � �� ��� ����.
Linux � UNIX:
180 DB2 Servers� �� �
a. � � ��� ����.
b. Firefox ���� ������.
c. -profilemanager ���� ���� Firefox� �����. �� ��,
��� ����.
./firefox -profilemanager
3. DB2_LP �� DB2_FIRSTSTEPS ����� ������.
4. ���� ��...� ����.
5. � �� Firefox - ��� ���� � �� ��� �����.
Firefox ����� �� �� ��� http://www.mozilla.org/support/
firefox/profile� ������.
Netscape 8 ����� ����� ��� �����.
1. Netscape 8 � �� ����.
2. � ���� ��....� ������. �� �� ��� ����.
3. ��� �� ��� ����� ������.
4. DB2_LP �� DB2_FIRSTSTEPS ����� ���� ��� ����.
5. �� �� ��� ���� �� ����.
��� ID� DB2ADMNS � DB2USERS ��� ��� ��(Windows)DB2 ��� ��� �� ���� �� DB2 ����� ��� �� ��
���� DB2USERS �� DB2ADMNS ��� ���� ��� ���. DB2 �
� ���� � �� � ��� ����. � ��� ����� � ��� �
� � ����. � �� ��� DB2ADMNS DB2USERS���.
���
v DB2 ��� ���� �� ���.
v DB2 ��� ���� �� DB2 ���� �� �� �� �� �
��� �� �� �� ���� ��� ���.
���� �� ��� ����� ��� �� �����.
1. ��� � � ��� ������.
2. lusrmgr.msc� ��� � �� ����.
3. �� ��� � �� ������.
4. ���� ������.
5. ��� ���� ������.
6. �� ��� ����.
� 16 � �� �� ��� 181
7. ��� �� ����.
8. ��� ����.
9. �� ��� ������.
10. �� ����.
��� ���� � �� ��� ���� ��� ��� � , db2extsec.exe �
� ��� �� �� �� �� � ����. ���� ��� ���� ���
� ��� �� ���� ���� � ���� . �� �� , ��� ID�
DB2ADMNS ��� ���� � � ����� ���� ���� �� ��
�� � ���.
32�� DB2 ����� 64�� ����� �����(Windows)
����
v DB2 32�� 64�� ��� �� ���� ��� � ����.
v �� 32�� DB2 � ��� �� ���� 64�� DB2 � 9 ���
��� �� ����.
v 32�� DB2 � 9.1 ���� 64�� DB2 � 9.5 ���� ��� �
����. DB2 � 9.5 32���� DB2 � 9.5 64���� ��� �
����.
���� � ��� 32�� DB2 � 9 ��� �� � 64��� ��������
�� �� �����.
1. db2iupdt �� ���� ��� DB2 ���� � 32�� ��� ��
���.
2. � 32�� ��� �� ��� ��� 32�� DB2 ��� �� ����
��.
3. 32�� DB2 � 9 ��� 64�� DB2 � 9 ��� ������ DB2
� 9 64��� ������.
� � ��� �� ��
DB2 ���� ��� �� �� ��� ������ ��� � ��� � ���
�� ��� �� ��� ���. DB2 �� �� � �� ��� �� �
��� � �� ��� � ����.
�� ��� �� ����� ��� �����.
1. �� ��� �� SYSADM ��� �� ���� �������.
182 DB2 Servers� �� �
2. �� ��� �� SMTP �� ���� �� � , �� �� ���� �
�� ��� � ����.
db2 update admin cfg using smtp_server host1
���, host1� �� � ��� ���� SMTP �� TCP/IP ��� ���
����. � ����� ��� ������ � ���� ����� Health
Center� �� �� ��� �� ���� ���� � ��� ��� �� ���
�.
3. �� DAS(DB2 Administration Server)� ��� �� ��� �� �� �
��� contact_host ����� ������.
db2 update admin cfg using contact_host host2
��� host2� DAS� � � TCP/IP ��� ��� ����. contact_host
����� ���� �� � , DAS� ��� ��� ����� �����.
4. �� �� ���� ����� ������.
db2 update admin cfg using sched_enable on
5. � ����� ���� �� �� ���� DAS� �� �� ���.
db2admin stopdb2admin start
6. ��� �� �� Health Center��� � ���� ��� �� �
����. �� ��� ��� �� � ��� ����. ��� ���
��� � �� ����.
�� � ��� DB2 � ��� IBM ������ ����� ����� ��
��(Windows)db2swtch �� DB2 ��, IBM ��� � ��� ��, � 9 ���� �
� � ����. �� -db2 -client ��� � 9.5 ����� ��� � ���
�.
���: �� DB2 ��(� 9 ��) �� �� IBM ������ �����
���� ��(� 9.5 ��)� �� � �� ���� ����.
� 16 � �� �� ��� 183
DB2COPY1� ��� ��� �� ��� DB2 ��� � DB2 �� ����
�. � ��� ������ � ��� ��� ��� ���� ���� ��
���� ��� ���.
DB2 ��� ��� ��� ���� � � ���� DB2COPY2, DB2COPY3
�� �����.
IBMDBCL1� ��� ��� �� ��� ��� IBM Data Server Driver for
ODBC, CLI, and .NET(DSDRIVER)� � �����.
DSDRIVER ��� ��� ��� ���� � � ���� IBMDBCL2,
IBMDBCL3 �� �����.
�� � ��� DB2 �� ��(Windows)
� DB2 ������ ����� ���� �� ���� ����
� IBM ��� ����� ��� �����.
1. � DB2 ������ ����� ���� �� ���� ��
��. � ��� �� ���� �� db2swtch �� �����. �
� � ���� ���� –> IBM DB2 –> (DB2 �� ��) –> ��
� -> ��� DB2 � ������ ����� ���� � ���
� ������. � DB2 ������ ����� ���� �
� ���� ����.
2. �� ����� �� �� ��� ������(� DB2 ��).
3. � DB2 �� ����� �� �� ��� ���� ���
� ��� �� �� � DB2 ���� �����.
4. �� ����� ���� ��� ����.
5. dasupdt �� ��� DB2 Administration Server(DAS)� � �
���� �����.
� ����� �� � DB2 ��� � � DB2 ���� ����
������ �� �� ��� ����. DAS� � � DB2 ����
�� �� � � DB2 ��� ���� ����� � � �� �
���. ��� �� � DB2 ��� � ���� �� ���� �
� � DB2 ��� ��� � ����.
�� ���� � DB2 ��� ����� db2swtch �� ����
��.
184 DB2 Servers� �� �
v db2swtch -d <new default copy name> �� � DB2 ��
� IBM ������ ����� ���� ��� � � �� �
��� ���� � �����.
v db2swtch -db2 -d <new default copy name> �� � DB2 ��
� � � �� ���� ���� � �����.
� ����� �� � DB2 ��� ��� ���� ��� DB2 ���
� DB2 ���� �����. �� �����, �� ��, ODBC CLI
��� .NET data provider(DB2 ��� � IBM ������ �
���� ���� ���� ��� � ), WMI �� ��� �� �
��� ���� DAS� ��� � DB2 ���� ����. � �
DB2 ��� ���� ����� � � �� ����.
��� DB2 �� �� � �� 9.1� �� 9.5 ��� ���
� 9.1��� �� DB2 ��� ���� ��� � DB2 ��� ��
�.
DB2 � ��� ��� �� � ������ �� � DB2 ��
� ��� ���� �����.
� 9.1��� � 9.1 ��� �� DB2 ��� ���� ��� � ��
��.
� 16 � �� �� ��� 185
��� ��� DB2 ���� � DB2 ��� ���. ��� �
�� �� � �� ������ �� � DB2 ��� ��� �
��� �����. � DB2 ��(DB2COPY1)� �� �� DB2 ��
(�: � �� DB2COPY2 DB2COPY3)� ��� ���� ����� �
�� DB2 ��� ��� ���� ��� �� ���.
� 9.5��� �� DB2 ��� ���� ��� � DB2 ��
� IBM ������ ����� ���� ��� ���.
186 DB2 Servers� �� �
� 9.5��� � 9.5 ��� �� DB2 ��� ���� ��� � ��
��.
� 16 � �� �� ��� 187
��� ��� DB2 ���� � DB2 �� �� IBM Data Server
Driver ��� ���. � � � �� �� DB2 ��� ��� � � ��
�� �� DB2 ��(DB2COPY1)� ����.
� 9.5��� DB2 ��� � �� ��� � ��� DB2 ��� �
DB2 ��� �� �� �� DB2 ��� � IBM ������ ���
�� ���� ��� �� ��� � ����.
188 DB2 Servers� �� �
� IBM ������ ����� ���� ��(DB2COPY2)� ��
��� ���� �� � ����� ���� ��� ��� �� ���
�� �� ���� �� � �� DB2 ��(DB2COPY1 DB2COPY3)
� ��� ��� �� ���. ��� ��� �� �
� IBM ������ ����� ���� ��� ����� ���� �
�� �����.
�� � ��� IBM ������ ����� ���� �� ��(Windows)
� DB2 ������ ����� ���� �� ���� ����
� IBM ������ ����� ���� ��� ����� ��� �
����.
1. � DB2 ������ ����� ���� �� ���� ��
�. � ����, ���� –> IBM DB2 –> (DB2 �� ��) –> �
� � -> ��� DB2 � ������ ����� ���� � �
� 16 � �� �� ��� 189
��� ������. �� installdir₩bin�� ��� db2swtch �� �
����. � DB2 ������ ����� ���� �� �
��� ����.
2. �� ����� �� �� ��� ������(� IBM �����
� ����� ���� ��).
3. � IBM ������ ����� ���� �� ����� �
� �� DB2 �� �� IBM ��� � ��� ��� ���� �
��� ��� �� �� � IBM ������ ����� �
��� ���� �����. (IBM ������ ����� ���� �
�� ��� DB2 ��� ������ ������.)
4. �� ����� ���� ��� ����.
� ����� �� � IBM ������ ����� ���� ���
� IBM ��� � ��� ���� ���� �� � � IBM ��
���� ����� ���� ���� ����. � ����� �� ��
� �� ������ �����. �� �� � ODBC CLI ���
.NET data provider� � ��� �����. �� ��� ��� ��
� ODBC ����� ��� � ����.
�� ���� � IBM ������ ����� ���� ��� �
���� db2swtch �� ��� � ����.
v db2swtch -d <new default copy name> �� � DB2 ��
� IBM ������ ����� ���� ��� � � �� �
��� ���� � �����.
v db2swtch -client -d <new default copy name> �� � IBM ��
���� ����� ���� ��� � � �� ���� ����
� �����.
� ����� �� � IBM ������ ����� ���� ���
�� ���� ��� ��� IBM ������ ����� ���� ��
�� �����.
��� IBM ������ ����� ���� �� ��
�� DB2 ��� ���� �� ���� IBM Data Server Driver for
ODBC, CLI, and .NET(DSDRIVER)� ������.
190 DB2 Servers� �� �
�� DSDRIVER�� IBMDBCL1��� ��� ����.
�� DB2 � ��(�: Enterprise Server Edition �� Workstation Server
Edition) �� �� DSDRIVER� �� � � DSDRIVER� � IBM
������ ����� ���� �����. ����� ���� ��
� ��� �� � ������ �� � IBM ������ ��
��� ���� ��� ��� ���� �����.
�� IBM Data Server Driver ��� DSDRIVER� ���� ��� � �
���. ��� ��� IBM Data Server Driver ��(�� � �� �
�� �� DB2 ��)�� � IBM ������ ����� ����
�����.
� 16 � �� �� ��� 191
��� ��� �� � ����� �� � IBM �����
� ����� ���� ��� ��� ���� �����. � IBM �
����� ����� ���� ��(IBMDBCL1)� �� ��
DSDRIVER(�: � �� IBMDBCL2 �� IBMDBCL3)� ��� ����
����� � �� DSDRIVER� ��� ���� ��� �� �
��.
�� �� DSDRIVER� ���� ��� � ����. ��� IBM ��
���� ����� ���� ���� ����. �� ���, � ��
�� ���� �� ��� � IBM ������ ����� ����
���� ��� ���.
192 DB2 Servers� �� �
� DB2 �� ������ ����� ���� �� �� �
(db2swtch)� ���� �� � IBM ������ ����� ��
�� ��� �� ��� � ����. � �� db2swtch �� ���
� � DB2 IBM ������ ����� ���� �� ����
����.
IBM ������ ����� ���� �� � DB2 ��� �� ��� ���
�� ��
�� �� DSDRIVER DB2 ��� ��� ��� ���� ��� � �
���. ��� ��� ������ IBMDBCL1� � IBM �����
� ����� ���� ���� DB2COPY1� � DB2 �����.
� 16 � �� �� ��� 193
� � ��� � �� � �� �� � ����� � � ��
db2swtch �(Windows� ��)� ���� � DB2 IBM ����
�� ����� ���� �� ���� �����. �� � ��
� ���� ��� � ��� ����. �� -client �� -db2 ���
�� db2swtch �� ���� ��� �� �� ����.
�� � DB2 �� ���, � ������ DBCOPY2� ��� � �
���.
�� � IBM ������ ����� ���� �� ���, � �
������ IBMDBCL2, DB2COPY1 DB2COPY2� �� ��� �
����. (DB2 ��� ��� ������ ����� ���� ���
� IBM ������ ����� ���� ���� �����.)
194 DB2 Servers� �� �
�� ��� ���� IBM ��� �� ����� ���
������ �� ���� DB2 ������� �����. DB2 ��� ��
DB2 �� �� �� ��� � ��� ��� ���� � ��� ��� ��
� � ����. �� ������ ���� ��� ���. ������� �
��� �� � ��� �� ��� ��� ��� ���� ��� � ���
�.
� ��� Windows ��, Linux UNIX ��� �� ��� �� ����
�� ��� �� �� DB2 ��� �� ���� ��� � ����.
OLE DB
�� � DB2 ��� ����� �� ���� � DB2 ���
IBMDADB ��� ��� IBMDADB2.$DB2_COPY_NAME ���� �
�����. �� ������ �� ����� ��� �� ���� ��
�� ��� �� �� ���� ��� ������ � DB2 ���
�� ���. ������ � ��� id, ibmdadb2 �� �
clsid� ���� � �� �� � DB2 ��� �����.
�� ��� �� ����� ″provider=IBMDADB2″ �� ��� �
��. �� ��, ��� DB2 ��� MY_COPY�� �� ����
″provider=IBMDADB2.MY_COPY″� ������. �� �� GUID�
��� � � � � � � �� � � � � � �� ���
OLEDB_GUID� ���� ���� ��� GUID� ��� � ����. �
�� �� � �� DB2 �� ��� ��� �� ��� ID� �����.
�: ���� IBMDADB2 ���� ��� ���� � �� � DB2
����� ��� ��� ��� � ����.
IBM Data Server Driver for ODBC and CLI
IBM Data Server Driver for ODBC and CLI�� ��� ��� ���
�� ��� ���� ����. � ��� IBM DB2 ODBC DRIVER
� � IBM ������ ����� ���� ���� �����. �
��� ��� ��� ″IBM DB2 ODBC DRIVER - <Copy Name>″�
��.
�:
v �� ODBC ������� �� ��� ��� ��� � ����.
v � ODBC ���� ���� ��� ��� ��� � �� ���
��� ��� � ��� DB2 ��� ����� �����.
v ��� � ���� �� ���� ���� ���� � �� �
�� ��� ���� ���.
� 16 � �� �� ��� 195
IBM Data Server Provider for .NET
IBM Data Server Provider for .NET� �� ���� ��� DB2 ��
� ��� � ����. �� ������ ��� ���� �� ��
�� �� �� � ���� ���� �� �����.
JDBC/SQLJ
JDBC� ��� ���� ���� �� �� �����. �� 2 JDBC
���� ��(native) DLL� �����. ���� ��� ��� �
DB2 ��� ����� ���� ����. ��� DB2 ���� db2envar.bat
� ��� �� ��� PATH CLASSPATH ��� �����.
MMC ��
MMC � � � DB2 ��� DB2 �� ��� ����.
WMI WMI� �� DB2 ��� ���� ����. � �� ��� WMI ���
� ��� � ����. WMI� ����� �� ���� �����.
v WMI ��� ��� �� ������.
v COM ���� �� ������.
v � COM ���� ������.
v MOFCOMP� ���� WMI ���� ������.
WMI� DB2 �� ��� ���� ����. ��� � �� �� �� �
�� ���. WMI� DB2 �� Personal Edition ���� �� ��� �
����. �� �� �� � ��� ��� ���. �� �� ���� �
��� ����.
CLI ������
IBM Data Server Client ����� �� ���� CLI �����
� LoadLibrary �� ��� LOAD_WITH_ALTERED_SEARCH_PATH �
�� �� LoadLibraryEx API� ��� ���. LoadLibraryEx API�
LOAD_WITH_ALTERED_SEARCH_PATH ��� �� ���� �� �
�� ��� DB2 ��� bin ����� db2envar.bat� ��� ��
� db2app.dll� ��� ���. db2apie.lib� ���� ���� ����
��� �� DB2 ��� ����� link ��� /delayload ��� ��
�� db2app.dll ��� ���� DB2 �� �� db2SelectDB2Copy API�
���� ���.
DB2 �� ���
����� ��� ��� ��� � ��� �� ���� ��
� ��� �� � �� � DB2 ���� � ��� ��� ���
� � � � �� ����� ���.
196 DB2 Servers� �� �
�� DB2 ��� �� �
�� � �� �� DB2 ��� ���� �� � ����. � DB2 �� ��
� �� DB2 �� �� �� �� DB2 �� ��� �� � ����.
����
v Linux UNIX�� ��� ��� ���� � �� ��� �����
��� DB2 ���� �����.
v Windows��� �� �� � ��� �� ��� � �� �� DB2 �
�� �� ��� ��� � ����.
– IBM Data Server Runtime Client
– IBM Data Server Driver for ODBC, CLI, and .NET
– DB2 �� ��
DB2 ����� ��� ��� ��� ��� ����.
� DB2 ��� ����� � ���� ��� � � ����. � ���� �
� �� ��� ���� �� DB2 �� �� � �� � ����. ��
� � ��� ����.
v ��
v � �� ��
v �����(Windows ��). � ��� ���� FixPack� �����.
v ��(Windows ��). � ��� ���� DB2 ��� � ���� ������.
v �� ���
�: �� ��� � ���� �� ��� ���� �� �����.
FixPack ��
��� �� ���� �� FixPack ���� DB2 ��� ��� �� �� �
��. FixPack� ��� ����� ��� �� �� �� ���� � ��
���.
DB2 FixPack�� IBM�� ��� � �� ���(APAR(Authorized Program
Analysis Reports))� �� ���� ����� ��� ��� ���� �� �
���� ���� ����. � FixPack�� � ����� �� �� ��
APARLIST.TXT ��� ����.
FixPack� ���. � ��� DB2 �� �� FixPack�� �� DB2 ��
�� FixPack� �� � ����� ���� ����.
� 16 � �� �� ��� 197
�� ��� FixPack ���� ��� ����.
v � � ���
� � ����� � DB2 � �� IBM Data Server Client� ���
�� ��� ��� ���� ����. � ��� � ��� DB2 � ���
��� � �� DB2 � FixPack� � ��� DB2 � ��� ���� �
� ��� ����. Data Server Client FixPack� DB2 � FixPack(�� �
�� � ��� ��� � �� FixPack: Enterprise Server Edition, Workgroup
Server Edition, Express Edition, Personal Edition, Connect Enterprise Edition,
Connect Application Server Edition, zSeries� Connect Unlimited Edition
i5/OS®� Connect Unlimited Edition)� ���� ����. DB2 � FixPack
� ���� Data Server Client� ������ � ����.
�� FixPack ���� DB2 �� � �� ����� �� ���� � �
���� ����� DB2 ������ � ��� ��� � ����.
v ��� �� DB2 ������ ��� �� FixPack
�� � ������ ���� �� ��� ��� � �� � FixPack� �
�����. (�: IBM Data Server Runtime Client �� Query Patroller).
��� DB2 ��� ��� DB2 � ����� Data Server Client � �
��� FixPack� ���� ����. ��, � � ��� FixPack� ����
��.
Windows ��� � , ��� DB2 ��� � ��� DB2 ������ ��
(Data Server Client �� DB2 �� � �� ��� �� ��)� ���� �
�� FixPack ��� ��� �� �� ��� ��� � FixPack� ���
�� ��� ���.
v �� FixPack(Linux �� UNIX �� ��)
�� FixPack ��� ��� � ��� DB2 ������ ��� ���� �� �
� ����.
��� DB2 ��� ��� DB2 � ����� Data Server Client � �
�� FixPack� ���� ����. � � � � ��� FixPack� ���
���.
����
v DB2 � 9.5 FixPack� DB2 � 9.5 �� �� ���(GA) ��
FixPack �� ���� �� � ����.
v FixPack� ���� �� � DB2 ��, DAS �� � DB2 �
�� �� ������ ��� ���.
198 DB2 Servers� �� �
v FixPack� ���� �� ������ ��� ��(DPF)� �� ����
� � ���� ������ � ���� ��� ���. ��
�� ��� �� � ���� ��� FixPack� ��� ���. �
�� ��� � � �� �� FixPack ��� ������� �
��.
v Linux �� UNIX ��:
– ���� �� ���(NFS)� DB2 ��� �� � �� FixPack� �
��� �� � ��, DB2 administration Server(DAS),
IPC(Interprocess Communication) �� NFS� ��� ��� �
��� �� ��� � ������ ��� ����� � � �
��.
– ��� � fuser �� lsof� ��� � �� � �� installFixPack
�� ��� DB2 ��� �� � ����. DB2 ��� ����
���� � �� FixPack� ���� �� �� ��� ������.
UNIX�� fuser �� ��� �� � � �� �����. Linux�
�� fuser � �� lsof �� �����.
�� ��� �� ���� installFixPack �� �����.
v ����� ������� FixPack� �� �� ������
autobind� ���� ����� � � ��� �� ���.
v DB2 FixPack� ��� ��� � �� �� �� ��� � � �
�� ���� ���� ����.
Linux �� UNIX�� ��� ��� � , db2rfe �� ���� �� �� ��
(�: ���� �� �� �)� �� ����� � � ����. �� ��
��� DB2 �� �� �� �� ���� � � �� ��� ��� �� �� �
��� ��� FixPack� �� ��� db2rfe �� �� �� ���. ��
�� �� ��� � ��� �����.
Linux�� UNIX ���� ���� ���� �� � , �� ��� ��
FixPack� �����. ��� FixPack� ��� �� � ����. �� �� �
� FixPack� �� ��� �� �� FixPack ��� �� ���. ��
��, Linux �� UNIX�� �� FixPack� � �� � DB2 ������ �
�� �� � DB2 ������ ��� ����� �� FixPack ���
FixPack �� �� ���.
�� ���� �� �� DB2 ��� �� � ��� ��� �� �� �� �
� FixPack ��� � ����. �� ��� DB2 ��� FixPack� ���� DB2
�� ��� FixPack� ��� ���.
FixPack� ����� ��� �����.
� 16 � �� �� ��� 199
1. http://www.ibm.com/software/data/db2/udb/support.html� DB2 �� � ���
�� FixPack ���� �� ��� ���� �� DB2 FixPack� ��� �
�������.
2. FixPack� ���� �� FixPack ���� ���� �� ���� ����
�. DB2 ������ ��� �� ���� ��� �� DB2 ���� ���
���. �� ��� FixPack ReadMe� �����.
3. FixPack �� ��� ���� FixPack� ������.
�� ���� �� �� � �� � ��� �� �� � ����.
��� ��� FixPack ��
FixPack� ��� ��� ��� ���� ���� �� ��� ����� ��
��� FixPack� ��� �� ����.
FixPack� ��� ��� ��� �� ��� ��� ���� � ���� ���
ID� ���� ���.
db2rfe �� ���� ��� ���� �� ��� �� ���� ��� � ��
db2rfe �� �� � ���� �� ��� � ���. FixPack� �� �
� �� ��� �� �� ���� ��� � �� ��� �����.
��� ��� FixPack� ���� ��� �����.
1. FixPack� FixPack � ��� �� �����.
�: installFixPack �� –b ��� ��� ���� ��� ����.
2. ����: db2rfe �� �����. ��� ���� �� �� ��� �� �
��� �� ��� ��� �� �� ���� �� ��� db2rfe �� ��
�� ���. � �� ��� ���� �� ��� �����.
�: �� ��� ���� �� ���� � � $HOME/sqllib/instance/
db2rfe.cfg� �� � �� db2rfe �� �� � �� ��� �� ���
� ��� FixPack� �� � �� �� ��� ������ ����. ���
$HOME/sqllib/cfg/db2rfe.cfg.sample� � � ���. FixPack� ��� ��
�� �� ��� � �� ��� ��� � $HOME/sqllib/cfg/
db2rfe.cfg.sample� � ��� ����.
200 DB2 Servers� �� �
���� ������ ��
DB2 �� �� �� ��
� ����� �� �� ��(db2nodes.cfg)� ��� �� ��� �����.
db2nodes.cfg ��� DB2 ��� ���� ������ ���� ���� � �
����. db2nodes.cfg ��� ���� ������ ��� � ��� �� ��
�� ��� ����� � �� �� �� IP �� �� ��� ��� ����
�� �����.
Linux UNIX ����� db2nodes.cfg ��� ��� �������.
nodenumber hostname logicalport netname resourcesetname
nodenumber, hostname, logicalport, netname resourcesetname� �� �� ��
�� ����.
Windows ����� db2nodes.cfg ��� ��� �������.
nodenumber hostname computername logicalport netname resourcesetname
Windows ����� db2nodes.cfg� �� ��� � � db2ncrt �� db2 add
db partition �� �� �����. ��� � � ����� � ��� ��
� ����.
nodenumber
0� 999 ��� �� ���� ���� ������ ��� �� ����
�� ��� ����.
���� ������ ���� ��� ���� � ������ ��� �
� �� � � db2nodes.cfg ��� ������. �� ������ ��
� ���� ��� nodenumber �� ��� �� �� �� �� ��
�� �� �� � ����. �� ��� �� ���� � ��� ��
� ���� ������ � nodenumber � ��� �� ��� ���
� ����.
� � � �� � ���.
hostname
FCM(Fast Communication Manager)�� ��� ������ ��� �
� TCP/IP ��� �����.
� � � �� � ���.
� 16 � �� �� ��� 201
logicalport
������ ��� �� �� �� �����. � ��� �� ����
�� ��� �� � � ������� �� ������ ��� �
� ���� � �����.
DB2� �� ��� ��� ��� �� /etc/services ��� �� ��
(60000 - 60003)� �����. db2nodes.cfg� � logicalport ��� ��
�� ��� �� ��� �� ��� ��� �����.
� ��� �� � � �� � ��� 0���. ��� netname ��
� �� � � ��� � �� logicalport ��� ��� ��� ���.
�� ������ ���� ��� � , ��� logicalport �� 0�� �
�� ��� �� ���� ���(�: 0,1,2).
��, ��� ������ ��� �� �� logicalport � � ��� �
, db2nodes.cfg ��� ��� � ������ ��� �� ����
logicalport� ��� ���.
� ��� �� ������ ����� �� �� ��� ���� �� �
�� �������.
netname
FCM ��� �� �� �� ��� ��� �� �� IP ��� �����.
� ��� �� � � ���� ������ ��� � � � ��
(db2start, db2stop db2_all ��� � ��� ��)� �� �� ��
� �� �����.
� ����� ������ ��� ��� �� �� ��� ��� � ��
�����.
resourcesetname
resourcesetname� ��� ��� �� �� ��� �����.
resourcesetname� ��� ��� ��� �� ��� MLN(Multiple Logical
Nodes)� �����. �� ���� quadname�� ��� ��� �� ��
� �� �����.
� ����� AIX, HP-UX Solaris ����� �����.
AIX��� ��� ��� ″�� �″�� �� Solaris ����� ″�
���″�� ���. �� �� �� �� ��� �� ��� �
����.
HP-UX�� resourcename ����� PRM ��� �����. �� ��
� HP�� ���� ″HP-UX ��� �� �� ��� ���
(B8733-90007)″ ��� �����.
202 DB2 Servers� �� �
Windows ���� �� ��� �� ��� ����
DB2PROCESSORS ����� ��� �� ��� � ����.
Linux ���� resourcesetname ��� ���� NUMA(Non-Uniform
Memory Access) ��� ���� ��� �����. ��� ����
numactl� 2.6 ��� �� NUMA �� ����� �� ��� ���.
resourcesetname ����� ��� � netname ����� ��� ��
�.
��
�� �� �� ���� ��� ��� ���� ��� �����.
� �� ��, � �� ������ ��� ��
���� ��� ���� ���� ServerA�� ��� �� ������
� �� ������ ��� �� ����� db2nodes.cfg ��� ���
�� ��� ���.
0 ServerA 01 ServerA 12 ServerA 23 ServerA 3
� �� ��, ��� ��� ������ ��� ��
���� ������ ���� ServerA� ServerB�� � �� �� ��
���� ������ db2nodes.cfg ��� ��� �� ������.
0 ServerA 01 ServerB 0
� �� ��, � ��� �� ������ ���
���� ������ ���� ServerA� ServerB�� � �� �� �
����� ����� ServerA� �� ������ ��� �� �
��� db2nodes.cfg ��� ��� �� ������.
4 ServerA 06 ServerA 18 ServerA 29 ServerB 0
� �� ��, �� � �� �� �� ������ ��� ��
���� ������ ���� ServerA� ServerB��(ServerB� � ��
������ ��� �� � �) � �� � �� ����� switch1
� switch2�� �� �� ��� ��� � , db2nodes.cfg ��� ���
�� ������.
0 ServerA 0 switch11 ServerB 0 switch22 ServerB 1 switch2
� 16 � �� �� ��� 203
resourcename ��
��� ����� ��� �� ����.
v � �� ���� �� ����� �� � � resourcename� ���� ��
��.
v netname� � �� ����, hostname� ��� ��� �� resourcename� �
���� �� �� ��� �� �� ���� . �� �� �����
resourcename���(���� �� � ). �� �� ��� db2nodes.cfg ���
� �� �� ������ ����. �� �� ��� ���� ���� ��
�� ��� ��� �� �����. � �� ��� �� ���� �� ���
����.
v �� ���� ��� �� ����� �� �� � �� hostname(� �� ��
� ��)� ��� ���. �� ���, DB2 ������ � ����
db2nodes.cfg ��� �� �(�� ����)� ���� ����. � �����
�� ��� �� ��� ��� ��� 5�� ��� � ����.
AIX
�� �� AIX ��� �� �� ���� ��� �� ����.
� ��� 32�� ���� 8�� �� ������ ���(MLN)� �� � �
� �� ��� ����. � �� � MLN� ��� ���� ���� ���
�����.
1. /etc/rset� �� �� ������.
DB2/MLN1:owner = db2inst1group = systemperm = rwr-r-resources = sys/cpu.00000,sys/cpu.00001,sys/cpu.00002,sys/cpu.00003
DB2/MLN2:owner = db2inst1group = systemperm = rwr-r-resources = sys/cpu.00004,sys/cpu.00005,sys/cpu.00006,sys/cpu.00007
DB2/MLN3:owner = db2inst1group = systemperm = rwr-r-resources = sys/cpu.00008,sys/cpu.00009,sys/cpu.00010,sys/cpu.00011
DB2/MLN4:owner = db2inst1group = systemperm = rwr-r-resources = sys/cpu.00012,sys/cpu.00013,sys/cpu.00014,sys/cpu.00015
DB2/MLN5:owner = db2inst1group = system
204 DB2 Servers� �� �
perm = rwr-r-resources = sys/cpu.00016,sys/cpu.00017,sys/cpu.00018,sys/cpu.00019
DB2/MLN6:owner = db2inst1group = systemperm = rwr-r-resources = sys/cpu.00020,sys/cpu.00021,sys/cpu.00022,sys/cpu.00023
DB2/MLN7:owner = db2inst1group = systemperm = rwr-r-resources = sys/cpu.00024,sys/cpu.00025,sys/cpu.00026,sys/cpu.00027
DB2/MLN8:owner = db2inst1group = systemperm = rwr-r-resources = sys/cpu.00028,sys/cpu.00029,sys/cpu.00030,sys/cpu.00031
2. �� �� ���� �� ���� �� ���� ����.
vmo -p -o memory_affinity=1
3. �� �� ���� �� �� ��� ������.
chuser capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE,CAP_NUMA_ATTACH db2inst1
4. db2nodes.cfg� �� �� ����� �� � ��� ������.
1 regatta 0 regatta DB2/MLN12 regatta 1 regatta DB2/MLN23 regatta 2 regatta DB2/MLN34 regatta 3 regatta DB2/MLN45 regatta 4 regatta DB2/MLN56 regatta 5 regatta DB2/MLN67 regatta 6 regatta DB2/MLN78 regatta 7 regatta DB2/MLN8
HP-UX
� ���� 4�� CPU 4�� MLN� �� ���� CPU ��� �� PRM �
�� ���� ��� ���, MLN � 24%� CPU ��� ���� 4%� ��
������ �� ����� ���. DB2 �� ��� db2inst1���.
1. /etc/prmconf� GROUP ��� �����.
OTHERS:1:4::db2prm1:50:24::db2prm2:51:24::db2prm3:52:24::
db2prm4:53:24::
2. /etc/prmconf� �� ��� � � ������.
db2inst1::::OTHERS,db2prm1,db2prm2,db2prm3,db2prm4
3. �� �� ���� ��� ����� CPU � ���� �� ���� �
���.
� 16 � �� �� ��� 205
prmconfig -iprmconfig -e CPU
4. �� �� ���� PRM �� ��� db2nodes.cfg� ������.
1 voyager 0 voyager db2prm12 voyager 1 voyager db2prm23 voyager 2 voyager db2prm34 voyager 3 voyager db2prm4
PRM ��(� 1-3)� ��� GUI �� xprm� ���� � � ����.
Linux
Linux ���� resourcesetname ��� ���� NUMA(Non-Uniform Memory
Access) ��� ���� ��� �����. �� ��� ����� 2.6 ���
�� NUMA �� ����� �� ��� ���. Linux ����� NUMA
��� �� �� ��� numact1� man ���� �����.
� ���� NUMA ��� �� � �� ��� �� � �� NUMA �� �
�� ���� ��� �� ����.
1. ���� NUMA ��� ��� � ����.
2. �� �� ����.
$ numactl --hardware
��� ��� ��� ����.
available: 4 nodes (0-3)node 0 size: 1901MBnode 0 free: 1457MBnode 1 size: 1910MBnode 1 free: 1841MBnode 2 size: 1910MBnode 2 free: 1851MBnode 3 size: 1905MBnode 3 free: 1796MB
3. � ���� ���� � �� NUMA ��� ����. ��� �� db2nodes.cfg
��� ��� � MLN� ���� NUMA ��� ������.
0 hostname 0 hostname 01 hostname 1 hostname 12 hostname 2 hostname 23 hostname 3 hostname 3
Solaris
��� Solaris � 9� �� ����� ���� ��� ����.
� ��� 8�� ���� �� ��� �� ��� ����. � ����� �
�� CPU� ���� ����� �� �� CPU� ���� DB2� � ��
CPU� �����. �� ��� db2inst1���.
206 DB2 Servers� �� �
1. ��� ���� �� � �� ��� �����. � ���� ��� pool.db2
��� ���. ��� ��� ����.
create system hostnamecreate pset pset_default (uint pset.min = 1)create pset db0_pset (uint pset.min = 1; uint pset.max = 1)create pset db1_pset (uint pset.min = 1; uint pset.max = 1)create pset db2_pset (uint pset.min = 1; uint pset.max = 1)create pset db3_pset (uint pset.min = 1; uint pset.max = 1)create pset appsrv_pset (uint pset.min = 3; uint pset.max = 3)create pool pool_default (string pool.scheduler="TS";
boolean pool.default = true)create pool db0_pool (string pool.scheduler="TS")create pool db1_pool (string pool.scheduler="TS")create pool db2_pool (string pool.scheduler="TS")create pool db3_pool (string pool.scheduler="TS")create pool appsrv_pool (string pool.scheduler="TS")associate pool pool_default (pset pset_default)associate pool db0_pool (pset db0_pset)associate pool db1_pool (pset db1_pset)associate pool db2_pool (pset db2_pset)associate pool db3_pool (pset db3_pset)associate pool appsrv_pool (pset appsrv_pset)
2. ��� �� /etc/project ��� ��� DB2 ���� appsrv ����� �
�����.
system:0::::user.root:1::::noproject:2::::default:3::::group.staff:10::::appsrv:4000:App Serv project:root::project.pool=appsrv_pooldb2proj0:5000:DB2 Node 0 project:db2inst1,root::project.pool=db0_pooldb2proj1:5001:DB2 Node 1 project:db2inst1,root::project.pool=db1_pooldb2proj2:5002:DB2 Node 2 project:db2inst1,root::project.pool=db2_pooldb2proj3:5003:DB2 Node 3 project:db2inst1,root::project.pool=db3_pool
3. �� �� �����. # poolcfg -f pool.db2.
4. �� �� �������. # pooladm -c
5. db2nodes.cfg ��� �� �� ����� ���� ��� ������.
0 hostname 0 hostname db2proj01 hostname 1 hostname db2proj12 hostname 2 hostname db2proj23 hostname 3 hostname db2proj3
�� �� �� ��(Linux � UNIX)
� ������ �� � �� �� � � ����� �� db2nodes.cfg ��� �
��� �� ����.
�� ���� � ���� �� �� �� ��(db2nodes.cfg)�� �� �
��� ������ �� ��� ���� ��� DB2�� ���� �� ��
� ���� ����. ���� ������ ���� � ��� �� db2nodes.cfg
��� ����.
� 16 � �� �� ��� 207
db2nodes.cfg ���� ��� ��� � �� �� � � �� ���� �
��. �� �� db2nodes.cfg ��� ��� ��� �� �� ��
�� � � �����.
�� ��, DB2 �� ���� ���� ServerA�� �� �� �� DB2
��� ��� ��� �� db2nodes.cfg ��� �����.
0 ServerA 0
�� �
v ���� � � �� DB2 ������ ��� ���.
v �� � �� DB2 ��� �� ���.
v SYSADM ��� �� ���� ���.
v �� � � ���� ��� DB2 �� �� �� �� ���� ��
�� �� �� �� �� �� ������.
– ������ ��� � ��� �� ��� ��� �����.
– ���� ��� �� �� ���� ����.
����
���� ��� ��� ���� hostname� ��� hostname�� ��
�.
db2nodes.cfg ��� ����� ��� �� �����.
1. �� ���� �������(���� db2inst1� �� ����).
2. �� �� ���� DB2 ��� ������ � ����.
INSTHOME/sqllib/adm/db2stop
��� INSTHOME� �� ���� � ������. (db2nodes.cfg ��
� ��� � ��� ����, ��� ����� �� � ����.)
�� ��, �� � ���� /db2home/db2inst1 � , �� �� ��
����.
/db2home/db2inst1/sqllib/adm/db2stop
3. � DB2 ��� �� � � .rhosts ��� ������. ��� ���� �
�� ������.
<hostname> <db2instance>
��� <hostname>� ������ �� TCP/IP ��� ���� <db2instance>
� ������ �� ���� � ���� ��� �����.
4. ���� � �� db2nodes.cfg ��� � � ������. � �� db2nodes.cfg
���� ��� �� � � �� �� ���.
0 ServerA 0
208 DB2 Servers� �� �
� � � ������ ��� � ��(�� ��), ������ ��� ��
�� �� TCP/IP ��� �� ������ ��� �� �� �� �
�� �����.
�� ��, � �� � � �� ������ ��� �� ��� ���� �
�, ���� ��� ���� � ��� db2nodes.cfg� ��� � ���.
0 ServerA 01 ServerB 02 ServerC 03 ServerD 0
5. db2nodes.cfg �� ��� ���� INSTHOME/sqllib/adm/db2start �� ��
����. ��� INSTHOME� �� ���� � ������. �� ��,
�� � ���� /db2home/db2inst1 � , �� �� ������.
/db2home/db2inst1/sqllib/adm/db2start
6. �������.
������ ��� �� � �� ��(Linux � UNIX)
� ������ ���� ������ ���� ���� ������ ��� �
� ��� �� ���� �� ��� �� ����. ������ ��� �
� ��� FCM(Fast Communications Manager)�� �����. FCM� ����
�, ���� ������ ���� � � �� �� /etc/services ���� �� �
� �� ��� ��� ���.
�� ��� �� ��� ID� �� ���.
��� ���� � � ��� � ���� �� ���.
FCM��� ���� �� �� ��� � ��� ������ ���� ��
��� ������ ���� �� �� ����.
�� ��� db2nodes.cfg ��� �� � � ���� ����.
0 server1 01 server1 12 server2 03 server2 14 server2 25 server3 06 server3 17 server3 28 server3 3
FCM ��� 60000�� ��� ��� ����� �����. � ����
v server1� � �� ������ ���� � �� ��(60000, 60001)� ����
�.
� 16 � �� �� ��� 209
v server2� �� ������ ���� �� ��(60000, 60001, 60002)�
�����.
v server3� � �� ������ ���� �� � �� ��(60000, 60001, 60002,
60003)� �����.
� � �� 60000, 60001, 60002 60003� ��� ���, ��� ��
� � � ��� ��� �� �� �� �����.
HACMP™(High Availability Cluster Multi-Processing) �� TSA(Tivoli System
Automation)� �� ���� ���� ��� � ����� �� ����� ��
���� ���� ���� � ��� � �� ��� ��� ���. �� ��
� �� ������ ���� ����� ���� � �� ���� �� � �
� ������ ���� �� ���� �� ���� � � ���� 6�� ��
� ��� ���.
��� �� � , �� � �� �� ��� �����. �� � �� �
� �� � ���� ���. ��� /etc/services ��� ��� �� �� ��� �
�� ��� ���� �� � ��� � � ���� ��� �� ��� ��
� ���.
/etc/services� ���� ���� ������ ���� � � ��� �� ��
�� ��� ��� �����.
1. �� ��� �� ���� �� � �( �� �� � �)� �������.
2. ��� �����.
3. /etc/services ��� ��� � �� ��� � ����. �� ��� ���
� FCM ��� ��� ���� ��� ���.
db2c_db2inst1 50000/tcp#Add FCM port informationDB2_db2inst1 60000/tcpDB2_db2inst1_1 60001/tcpDB2_db2inst1_2 60002/tcpDB2_db2inst1_END 60003/tcp
�� � �� ��� �� ���� ���� �� 60000 ���� �� �
�� �� � �� ��� FCM ����� ���� ����. �� �� �
����� ��� ���� ��� ���, �� � � �� ����� ���
� �� �� ������ ��� ���� �� ��� �����.
�� ���� � END � � ���� ���. � � � �����
��. ��� � �� ����� �� �� ������ �� ��� �
��� ��� �� ��� ����� ������ � ���� �� � �
��� ���� ��� ���.
DB2 �� � � ��� �� ��� �����.
210 DB2 Servers� �� �
DB2_instance_name_suffix port_number/tcp # comment
� ��� �� �� ��� ����.
v instance_name� ���� �� �����.
v suffix� � �� FCM ��� ���� ����. � � � ���� ���
�� ��� � ���. � �� ��� FCM �� ��� � � � �
���� � suffix� � �� ��� �� 1� ���� ��� �����.
�� �� ���� ���� �� � �� ���� 1� ��� ���� �
� ���� 2� ��� ����. � END� ��� � � suffix� ��
� ���.
v port_number� ���� ������ ��� � ����� ��� �� �
����.
v comment� � � ��� �� �����.
4. FCM ��� �� ��� ��� ����� ����. ��� �� ��� ��
�� �� � � � � ��� ������.
5. ��� ���� � � �� �� ���� ����� �� � �
/etc/services ��� ������.
��� �� �� ��(Linux � UNIX)
rsh� ���� �� �� ���� .rhosts ��� ��� ���.
���� ������ ���� � ������ ��� �� ��� ����
�� � ������ ��� �� �� �� �� �� � �� ��� �
� ���. ��� �� � ���� �� .rhosts ��� ���� � ���
�� � ����. ��� � ���� ��� DB2 � �� ���� �� �
�� ��� .rhosts ��� �����.
���
v �� ��� �� ���.
v � �� � �� ��� ��� � ���.
v �� ���� ��� ��� � ���.
� ��� rsh� ���� �� �� ��� ��� ����.
ssh� ���� �� �� �� �� ����. ��� �� ��� �� �
�� �� ssh� ����� ��� �����.
v 95 ���� ����� ������ �� ���
v http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0506finnie/
index.html
� 16 � �� �� ��� 211
rsh� ���� �� �� ���� ��� �� .rhosts ��� ������.
1. �� ��� �� ���� �� � �� �������.
2. �� � ���� .rhosts ��� �����. �� ��, �� �
���� /db2home/db2inst1 � , �� �� ���� ��� ����
.rhosts ��� ��� � ����.
vi /db2home/db2inst1/.rhosts
3. �� � �� ���� � � �� �� .rhosts ��� � � ������.
.rhosts �� ��� ��� ����.
hostname instance_owner_user_name
�� ���� � , ServerA.yourdomain.com� �� � ��� ��� ���
��� . ��� �� � � .rhosts ��� ���� �� /etc/hosts
/etc/resolv.conf ��� ��� ��� ��� � ��� � ����.
INSTHOME/.rhosts ���� ��� �� � � ���� ���.
ServerA.yourdomain.com db2inst1ServerB.yourdomain.com db2inst1ServerC.yourdomain.com db2inst1ServerD.yourdomain.com db2inst1
� ��� ��� ��� ���� �� �� � � .rhosts ��� ��� �
���, ��� ��� ��� � ���� � �� �� ����� ��
���.
+ db2inst1
db2nodes.cfg ��� �� ���(����)� ��� � , � � �� �� �
��� � � .rhosts ��� ��� ���. ���� �� db2nodes.cfg ��
� ��� ��� �����. �� ���(����) � � �� .rhosts ��� �
�� ����.
ServerA.yourdomain.com db2inst1ServerB.yourdomain.com db2inst1ServerC.yourdomain.com db2inst1ServerD.yourdomain.com db2inst1Switch1.yourdomain.com db2inst1Switch2.yourdomain.com db2inst1Switch3.yourdomain.com db2inst1Switch4.yourdomain.com db2inst1
.rhosts ��� ���� �� /etc/hosts.equiv ��� ��� � ���� .
/etc/hosts.equiv ���� .rhosts ��� �� � � ��� � ��� �� �
��.
.rhosts �� �� /etc/hosts.equiv ��� �� �� ��� �� ��� �
����.
212 DB2 Servers� �� �
�� �� �� ��(Linux)
�� ��� ���� ���� ������� ���� �� � � ��� DB2
Administration Server(DAS)� �� ���.
���� ������ ���� �� �� �� �� ����� ��� �� �
����.
1. ��� � � �(ServerA, ServerB, ServerC, ServerD)� DAS ���� ���
����. � ���� dasusr1� DAS ������.
2. DB2 Administration Server� ���� db2admin start �� �����.
� 16 � �� �� ��� 213
214 DB2 Servers� �� �
� 4 � DB2 �� �� ��
© Copyright IBM Corp. 1993, 2007 215
216 DB2 Servers� �� �
� 17 � DB2 �� �� �� ��
���� DB2 �� ��� ��� � ����.
v IBM � ���
v ����� �
v � �� ���� �� ��
�� DB2 ��� IBM � ����� DB2 �� ��� �����. ���
��� � �� ��� � �� DB2 �� ��� ����� �� �� ��
�� DB2 �� �� DVD� ���� DB2 �� ��� ��� ���.
�� � � ��� ���� DB2 �� ��� DB2 �� ��� ��� � �
�� � �� ��� �� ����� ���� ����.
�� �� ��� �� ����
� � IBM � ���� DB2 �� ��� �� �� ���
�� ���� �� DB2 �� ��� ��
� �� IBM � ���� DB2 �� ��� ��
�� � ��� �� ���� �� DB2 �� ��� ��
�� �� �� � �� �� DB2 �� ��� ��
IBM � ���� DB2 �� ��� ���
DB2 �� ��� http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/
index.jsp� ��� ����. �� DB2 ��� ���� DB2 �� �� �� �
�� � , �� DB2 ��� �� �� �� ��� �����.
Windows ��� � IBM � ��� �� � ��� DB2 �� ��� ��
� � ��� � �� ����� ��� ����� db2set� ������. ���
� DB2 GUI ��� ��� � DB2 GUI ��� �� ��� ��� ��� ��
����.
��� DB2 �� ��� ���
DB2 ��� ��� � � � �� �� DB2 ��� ����� DB2 �� ��
� ��� ���. �� �� �� DB2 �� �� DVD� ���� DB2 ��
��� ������.
© IBM Corporation 1993, 2007 217
���� ���� DB2 �� ��� ���
� ���� ��� ���� ��� ���� � ���� DB2 ��� ��
� � �� ��� �� DB2 �� ��� ��� ����� ��� �����.
�� ��� � ��� ���� ��� �� ��� ����� � IBM
Data Server Client� ��� � ����. � ��� ��� ��� DB2 ��
��� ��� �� �� ��� ���� DB2 �� ��� ���� � ���
�� ��� ��� ���.� ��� db2setup �� ���� DB2 � �� IBM
Data Server Client ���� ��� �� ��� ���� �� �� ����.
�� ��� IBM Data Server Client� ��� ���� ���� �� DB2 ��
��� ��� �� ����. � � �� DB2 �� �� ����� ��� ���
�� �� �� � ��� ������.
v db2set �
v DB2 GUI ��� �� �� ���
DB2_DOCHOST� ��� ��� ���� ����� ���� DB2_DOCPORT�
�� ��� ���� ����� �����. � �� DB2 �� ��� ���� �
� ��� �� ��� �� �� ���.
218 DB2 Servers� �� �
� 18 � �� ���
DB2 �� ���� ���� DB2 �� �� ��(Windows)
�� �� ���� DB2 ��� ��� � ����.
v IBM � �����
v ��� ���
v � �� ��� ���
�� DB2 ��� IBM � ���� �� DB2 ��� �����. ��� �
�� �� � ��� DB2 ��� ����� DB2 �� �� DVD� ����
DB2 ��� ��� ���.
DB2 �� ���� ���� Windows ���� �� �� ��� ���� DB2
�� ��� ��� � ����.
���
� ��� Windows�� DB2 �� ��� ���� � ��� ����,
��, ����� �� ����� ���� ����.
� �� ����
�� �� � ��� �����.
v Windows Vista
v Windows XP
v Windows Server 2003
DB2 �� ��� AMD/EMT 64�� Windows Linux�� �
��� 64�� ���� ���� ����.
����� ����
�� � � � ��� �����.
v Firefox 1.0 ��
v Internet Explorer(IE) 6.0 ��
v Mozilla �� � � 1.7 ��
v Safari 1.2
v Konqueror(UI �� � ��). �� �� �� �, ���
�� �� �� �� �� ��� �� ��� �����.
�� ����
TCP/IP ����� �����.
© Copyright IBM Corp. 1993, 2007 219
����
v DB2 �� ��� ����� � ��� �� ��� �����.
v DB2 ��� ��� ��� DB2 �� ��� ��� � ����. ���
�� DB2 �� ��� �� ����� �� �� DB2 �� �� �
� ��� ��� � ����.
v ���� DB2 � �� �� � ��� ��� ��� � ����. ��
��, DB2 �� �� � 9.1 DB2 �� �� � 9.5� ��� ��
���� ��� � ��� DB2 �� �� � 9.5� �� � �� ��
� �� ����.
v ���� �� ���� DB2 �� ��� ���� �� ����� DB2
�� ��� ��� � �� ��� � ��� ���� ��� ��
���.
DB2 �� ���� ���� DB2 �� ��� ����� ��� �����.
1. DB2 �� �� ��� ��� ��� ���� �������.
2. DB2 �� DVD� ���� �����. �� ��� � , � � ���
��� DB2 �� ����� ����. � �� �� ���, Windows
Explorer� ���� DB2 �� DVD� ��� �� ��� �� �����
�.
3. DB2 �� ������ �� ���� ��� ��� ��� � ��� �
� � ����. �� ��� �� �� ���� ��� ��� ��� ��
�.
4. �� ��� �� �� �� �� ����.
5. �� �� ��� � �� �� DB2 �� ��� ���� �� ���, �� �
�� �� ��� �����.
6. DB2 �� ��� �� ��� ��� ����. DB2 �� ���� ���
�� ���� �����. DB2 �� ���� ��� ��� �� � ��
��� �� �� ���� ����. �� ���� ��� ��� �
� �� � ����. �� ���� ����� �� ��� F1� �
���. ��� �� ���� ��� �� � ����.
�� DB2 ��� <Program Files>₩IBM₩DB2 Information Center₩Version 9.5
���� �����. ��� <Program Files>� ��� �� ���� ���
����.
�� �� �� �� �� ��� ���� My Documents₩DB2LOG₩ ��
�� �� �� �� ��� ������. �� ��� ��� ��� � ����. �
� ��� ��� DB2-DOCE-DateTime.log���. ��� DB2-DOCE-Wed Apr 11
08_38_35 2007.log� ����.
220 DB2 Servers� �� �
DB2 �� ���� ���� DB2 �� �� ��(Linux)
�� �� ���� DB2 ��� ��� � ����.
v IBM � �����
v ��� ���
v � �� ��� ���
�� DB2 ��� IBM � ���� �� DB2 ��� �����. ��� �
�� �� � ��� DB2 ��� ����� DB2 �� �� DVD��� ��
� ��� ���.
DB2 �� ���� ���� Linux ���� �� �� ��� ���� DB2
�� ��� ��� � ����.
���
DB2 ����� �� �� �� ����(Linux)� ��� ��� �
�����.
�� ��� ��� ��� http://www.ibm.com/software/data/db2/udb/
sysreqs.html� �����.
����
v DB2 �� ��� ����� �� ��� �� ���� ���� ��
�.
v DB2 ��� ��� ��� DB2 �� ��� ��� � ����. ���
�� DB2 �� ��� �� ����� �� �� DB2 �� �� �
� ��� ��� � ����.
v ���� �� �� DB2 �� �� � ��� ��� ��� � ��
��. �� ��, DB2 �� �� � 9.1 DB2 �� �� � 9.5�
��� �� ���� ��� � ��� DB2 �� �� � 9.5� ��
� �� ��� �� ����.
v ���� �� ���� DB2 �� ��� ���� �� ����� DB2
�� ��� ��� � �� ��� � ��� ���� ��� ��
���.
DB2 �� ���� ���� DB2 �� ��� ����� ��� �����.
1. ���� �������.
2. ���� DB2 �� �� �� DVD� ��� ������.
3. �� �� ���� DVD� ��� ���� ������.
cd /dvd
��� /dvd� DVD� �� �����.
� 18 � �� ��� 221
4. ./db2setup �� ���� DB2 �� ���� �����.
5. DB2 �� ����� ����. ������ �� ���� ��� ��� �
�� � ��� �� � ����. �� ��� �� �� ���� ��
� ��� ��� ���.
6. �� ��� �� �� �� �� ����.
7. �� �� ����� � �� �� DB2 �� ��� ���� �� ���, �
� ��� �� ��� �����.
� �� �� DB2 � 9.5 �� ��� �� ���� ��� � ����
��� �� �� DB2 �� ��� �� �5����.
8. DB2 �� ��� �� ����� ��� ����. DB2 �� ���� ��
� �� ���� �����.
9. ��� �����, ���� ��� � � ���. ����� ���� ��
����� ��� ��� � ��� ����.
10. ��, �� �� �� �� � � ����� � ��� DB2 �� ��
��� ������. ��� � � � �� �� � ��� � ��� ��
�� DB2 �� ��� ����� � ��� DB2 �� �� �� � �� �
�� ��� �� ��� ������. � ��� ��� ��� ��� � �
���. ��� ����.
11. �� �� � ����� ��� DB2 �� ��� ��� ������.
�� DB2 �� ��� /opt/ibm/db2ic/V9.5 ���� �����. ��� �
�� �� ��� ��� � ����. ��� ����.
12. DB2 �� �� �� �� ����� DB2 �� ��� ���� ���� ��
����. ��� ����� ��� ����.
� �� �� �� �� ��� ���� ″��� ��� ��� �� ��″
��� � ���� �� � � �� ��� ����� ����� ��
��� ��� ���� �� ��� � ����.
13. �� �� �� ����� �� ����� ������. ���� ����� �
�� ����. � ��� DB2 �� �� �� ��� ����� � �
����.
�� �� db2setup.log db2setup.err� �� /tmp ���� ����. �
� ��� ��� ��� � ����.
db2setup.log ��� �� ��� � DB2 �� ��� ����. db2setup.err
��� Java�� ��� � � ��(�: �� �� ��)� ����.
� �� db2setup.his ��� ���� ����. �� DB2 �� ����
db2setup.log ��� ��� DB2_DIR/install/logs/ ���� ��� �
222 DB2 Servers� �� �
db2install.history� ��� ����. db2install.history� �� ���, db2setup.log
� ��� db2install.history.xxxx� ��� ����. ���, xxxx� 0000�� �
�� �� �� ����� 1� ���� �����.
db2_install �� doce_install ��� ���� DB2 �� ��(Linux �
UNIX)
DB2 �� �� �� DB2 �� ��� ���� �� ��� �����.
v ��� �� DB2 ��� �� �� ��� �� ���. �� ��, DB2
Enterprise Server Edition� ����� � �� ��� �� �� �� �
�� ����� Quick Beginnings for DB2 Servers ��� �����.
v �� �� ��� ��� ���� DB2 ��� ��� � ����. ��� �
�� ���� doce_install� ���� DB2 �� ��� ��� �� ����. �
�� �� ��� �� �� ��� � ��� �����.
v DB2 �� ���� ��� � �� ���. �� DB2 �� DVD� �����
Passport Advantage�� �� ���� ����� DB2 �� ���� ��� �
����.
db2_install �� ���� Linux UNIX ��� DB2 �� ��� ��
���.
doce_install �� DB2 �� ��� ���� Linux UNIX ��� ���
��.
rpm, SMIT, swinstall �� pkgadd� �� ��� ��(NATIVE) �� ���
�� ���� DB2 �� �� ��� ��� ��� � ����. DB2 ���
������ ���� � ���� � ��� ����� ��� ���.
db2_install �� ��� ��� DVD��� ���� ����.
���� �� ���� �� DB2 � �� �� � ��� ��� ��� � ��
��. �� ��� DB2 ��� ��� �� ���� ��� � ����. ����
�� ���� DB2 �� ��� ���� �� ����� DB2 �� ��� ��
� � �� ��� � ��� ���� ��� �� ���.
DB2 �� �� ��� db2_install �� ���� ����� DB2 �� ���
doce_install �� ���� ����� ��� �����.
1. �� DB2 �� DVD� �� � , �� DVD� � ����� �� �
��� ���� �� �� ���� ������.
2. DB2 �� ���� ���� � , �� ��� � � �� untar� ��
�.
� 18 � �� ��� 223
a. �� ��� � ����.
gzip -d product.tar.gz
�� ��, ��� ����.
gzip -d ese.tar.gz
b. �� ��� Untar����.
Linux � ��
tar -xvf product.tar
�� ��, ��� ����.
tar -xvf ese.tar
AIX, HP-UX � Solaris � ��
gnutar -xvf product.tar
�� ��, ��� ����.
gnutar -xvf ese.tar
c. ���� �� ���� ������.
cd product
�� ��, ��� ����.
cd ese
3. ./db2_install �� ./doce_install �� ������.
./db2_install -b DB2DIR -p productShortName -c NLPackLocation -L language... -n
� ��� �� �� ��� ����.
v DB2DIR� DB2 ��� �� ��� �����. ��� ���� ���
� ��� ����� ��� ����� � ��� ����. � ��
��� ��� ����.
– AIX, HP-UX �� Solaris ��: /opt/IBM/db2/V9.5
– Linux ��: /opt/ibm/db2/V9.5
�� ��� ���� � �� �� ��� ��� ���.
DB2 �� ��� � � ��� ����.
– ��� ��(a–z), ��� ��(A–Z) �� ��(_)� ��� � ��
– 128�� �� � ��
– ����� ��� � ��
– �� � ��� ��� � ��
224 DB2 Servers� �� �
�: DB2 ��� ����� �� �� ���� � ��� ��� �
��. �� DB2 ��� �� ��� ���� ��� �� ����. ��
� ��� ����� �� �� ���� � ��� ��� �� �
��� ���� ���.
v productShortName� ��� DB2 ��� �����.
� ����� ����� ���� ��� -n ����� ��� � �� ��
���. �� ��(productShortName)� ���� /db2/plat ����
�� ComponentList.htm ��(�� �� �� �)� ����. ��� plat�
�� �� �� �����. � �� � �� ��� ��� � ����.
v NLPackLocation� National Language Pack(NLPACK) ��� �����.
v language� ��� ��(NLS)� �����. DB2 ��� �� � ��
��� � ����. ��� � �� National Language pack DVD� �
�� DVD�� �� ���.
���� �� �� ����� �� ��� ��� ����. � ���
��� ��� � � ����� �����. �� ��� ���� � ���
�� �� � ������. �� ��, ����� ���� ����� -L FR
-L DE� ������.
v n ����� ���� �� �� ����. � ����� ���� -b
-p� � ��� ���. � ��� � -c -L� ����� �� ��
�.
DB2 �� �� ���, �� �� �� ��� ���� “��� ��� ��
� �� ��”��� ���� ��� � ����. � �� ��� ����
� ����� �� ��� ��� ���� �� ��� � ����.
�� ��� DB2 �� ��� ��� ���. ����� ��� ��
�� ��� �����.
� 18 � �� ��� 225
226 DB2 Servers� �� �
� 19 � �� �� ���
�� �� � � �� ��(Linux )DB2 �� �� �� Linux�� �� ��� ��� ���� ������.
DB2 �� �� ��� �� �� INST_PATH/doc/bin� �� � �� db2icd
����� ����� ���, INST_PATH� DB2 ��� �� �����.
�� �� ��� ��� � �� �� ��� � �� ��� ���. �
��� �� DB2 �� ��� ��� � �� � ��� �� ��� � �
����.
�� �� �� ��� � ���� ��� �����.
1. �� ��� �� ���� �� ����.
2. �� �� � ��� �� ������. ��� �� �� �����
�.
INIT_DIR/db2icd stop
���, INIT_DIR� �� ��� db2icd ��� �� ������.
3. db2ic.conf ��� ��� �� ��� ������. ��, �� ���� TCP
�� �� �� � �� � ���� �� � ����� ��� ���
� ����.
4. �� �����. ��� �� �� ������.
INIT_DIR/db2icd start
���, INIT_DIR� �� ��� db2icd ��� �� ������.
�� ���� � �� ��� �����.
�� ��� � �� ���� ��� �����. ��� �� �� ���
���.
INIT_DIR/db2icd restart
���, INIT_DIR� �� ��� db2icd ��� �� ������.
���� �� ��� ��� � ����. ��� �� �� ������.
INIT_DIR/db2icd status
���, INIT_DIR� �� ��� db2icd ��� �� ������. �� �� �
�� ���, �� �� � � �� ��� ID� ����.
© Copyright IBM Corp. 1993, 2007 227
��� �� ���� ��� ��� DB2 �� �� �
DB2 �� ��� ��� ��� � , IBM� �� ����� �� ��� ���
�� ��� � ����.
��� ��� DB2 �� ��� ����� ��� �����.
1. � ��� DB2 �� ��� ��� � ��� ��� �� �����. ��
� ��� �� ��� ��� ���� ����� ��� �� ���� �
� ��� ��� � ���� ��� ����� �� � ����.
2. � ��� �� ���� � ��� �� ��� ������. ���� ��
��� �� � , �� ��� ���� ��� ��� � ����.
�: ��� ���� �� ��� DB2 �� �� ����� ���� � ,
��� ��� ��� ���� �� ���� �� �� ���� ��� DB2
�� ��� �����. ���� �� �� ����� ����� ���� �
� � �� �� ���� ��� ����� �� ���� ���� ��� �
�� ��� � � �� ��� � � �� � ����.
�� ���� �� ���� �� ��� ���� ���� �������. �
�� �� ��� ��� ���� ��� � ����.
3. ��� �� ��� ��� � � ��� DB2 �� ��� ������.
�: Windows Vista��� ��� � ��� �� �� ���. �� �
� ���� � � �� �� ��� ��� ���� �� � � ���
�� � � ���� ��� ������.
� � �� ��� �� ��� DB2 �� ��� ����� ��� ����
�.
1. DB2 �� ��� ������.
v Windows��� �� → ��� → �� � → ���� ����. �� ��
DB2 �� �� ���� � � ��� �� � � �� ������.
v Linux��� �� �� ������.
/etc/init.d/db2icdv95 stop
2. ��� ��� �� ��� �����.
v Windows ���:
a. � �� ����.
b. �� ��� ��� ��� �����. DB2 �� ��� <Program
Files>₩IBM₩DB2 Information Center₩Version 9.5 ���� �� �
����. ��� <Program Files>� ��� �� ���� ��� �
���.
228 DB2 Servers� �� �
c. �� ����� doc₩bin ���� �����.
d. ��� �� help_start.bat ��� �����.
help_start.bat
v Linux ���:
a. �� ��� ��� ��� �����. DB2 �� ��� /opt/ibm/
db2ic/V9.5 ���� �� �����.
b. �� ����� doc/bin ���� �����.
c. ��� �� help_start ����� �����.
help_start
��� �� ��� ��� �� ���� �� � � �� ����.
3. �� �( )� ����. �� ��� ��� ���� �� ��� ���
�. �� ��� �� �� ����.
4. ��� ���� ���� ���� ���� ��� � �� ��� �
���.
5. ��� �� ���� ���� ��� ����.
6. ��� �� ��� ������.
v Windows�� �� ���� doc₩bin ���� �� � ��� ��
help_end.bat ��� �����.
help_end.bat
�: help_end ���� ���� help_start ���� ��� �� ����
���� ���� � ��� �� ���� ����. help_start.bat� ��
�� � Ctrl-C �� �� ���� ���� ����.
v Linux�� �� ���� doc/bin ���� �� � ��� �� help_end
����� �����.
help_end
�: help_end ������ help_start ����� �� ���� ����
���� � ��� �� ���� ����. help_start ����� ����
� �� ���� ���� ����.
7. DB2 �� ��� ������.
v Windows��� �� → ��� → �� � → ���� ����. �� ��
DB2 �� �� ���� � � ��� �� � � ��� ������.
v Linux��� �� �� ������.
/etc/init.d/db2icdv95 start
��� DB2 �� ���� �� ��� ��� ����.
� 19 � �� �� ��� 229
230 DB2 Servers� �� �
� 5 � DB2 � �����
© Copyright IBM Corp. 1993, 2007 231
232 DB2 Servers� �� �
� 20 � DB2 WebServices �����
DB2WebServices ����� �� � ��
DB2WebServices� DB2 ��� ����� �(EAS)� �� ���� ���
��� �����. � ������ Microsoft Visual Studio .Net � ���
� DB2 ��� ����� �(EAS)� � ���� ��� ���� � �
�� ���. ��� � ���� � ���� �� � �� �� �� �� �
������ ���� SQL�� ��� � ����. DB2WebServices �����
� ���� � ���� DB2 ��� ����� �(EAS)� ��� �,
� � ��� ���� � ���� ��� � ����. DB2WebServices ����
�� DB2 ��� ����� �(EAS)� �� �� �� DB2 ����
��� ���� ���� ����� �����.
�� ���� DB2WebServices ������ ���� � ��� � ���
������. ��� ��� ����.
v � ���� � � �� ��� � � �����. � ������� Microsoft
Visual Studio IBM Database Developer Add-ins for Visual Studio .NET�
���� ����. � �� ��� DB2WebServices ������ ���� �
���� �����.
v � ���� ��� ��� ����� �. ��� � ���� � ���
���� �� �� �� DB2 ������� ��� � ����. � ��
� �� ����� ���� ����.
– DB2 ��� ����� �(EAS). � ������ � ���� ��� �
�� �����.
– DB2WebServices �����. � ������ � � ������
Microsoft Visual Studio ������ DB2 ��� ����� �(EAS)
� � ��� ��� �����.
– DB2 � ������. � ������� DB2WebServices �����
� ���� ���� ����� ���� ��� � �����. �� �
�, DB2 ��� �� ������� ���� � ���� ���� ��
DB2 JDBC ���� ���� ����.
– ����: ����� ������. � ���� ���� ������� �
� �� �� �� ��� � ����.
v ����� ������� ���� 0� ��� �� DB2 �. �� � ��
�� ���� ���������.
© Copyright IBM Corp. 1993, 2007 233
v �� ��� � ��� ���. �� � ���� ��� ����� �� HTTP
�� ���� � ���� ���� �� ��� �� ������ ���
�.
DB2 ��� ����� �(EAS)� ��� � ���� ��� ��� ��
�� ����.
v ��� �� ��, �� � ���� ��� ����� �� �����.
v � � ������� IBM Database Developer Add-ins for Visual Studio .NET
� ���� � ���� ����.
v � � ������� IBM Database Developer Add-ins for Visual Studio .NET
� ��� ��� ���� � ���� ����� �� �����.
v � ���� ������. �� � � ��� ���� � ���� ��� � �
���.
�� ����:
v DB2WebServices �����:
– DADX � ���� ����� � ��� ������ ���� ����.
– IBM Database Developer Add-ins for Visual Studio .NET�� ���� �
��� ��� �����.
– DB2 ��� ����� �(EAS)�� ���� ���.
v �� ����: DB2WebServices ������ �� ����� �� �� �
� ���� ��� ����.
DB2WebServices ����� ��
� ����� DB2 ��� ����� �(EAS)�� DB2WebServices ���
��� ���� ��� ����. ����� �� ���� ���� ���
�.
�� ��� DB2WebServices ������ ��� �� ����� ��
�� ����.
v DB2WebServices ����� ���� ����� ��� ������� ���
���. �� �� � ������� ���� �� ������� ��� ��
������. �� ��� �����.
– DB2 �� �������.
��� �� �� � DB2WebServices ��� � ��� ������ �
��� ������ �� � ��� �� ������ �� � ���
��� ��� ���.
234 DB2 Servers� �� �
– DB2 ��� ������. UNIX ��� ��� � , � DB2 ��
�� ����� �� ��� ID� � ���.
v DB2 ��� ����� �(EAS)� �������.
v DB2 ��� ����� �(EAS)� ������. �� DB2 ��� �
���� �(EAS)� ��� �� ��� ����.
DB2WebServices ������ ����� ��� �����.
1. UNIX ���� � ��� Windows ��� � ��� ��� �� �
��� �� �������.
2. UNIX ������ �� �� �����.
. /INSTHOME/sqllib/db2profile
��� INSTHOME� DB2WebServices ����� ���� ����� ��
�� � ��� ������� �� �� ��� � ������.
3. �� � � ��� �����.
v UNIX ���:
AppServer_install_path/bin/enable.sh-db db_alias-user db_user-password db_password-db2path path_to_sqllib-instance instance_name-easpath path_to_eas-fencedid fenced_userid
v Windows� � , DB2 CLP�� �� �� �����.
AppServer_install_path₩bin₩enable-db db_alias-user db_user-password db_password-db2path path_to_sqllib-instance instance_name-easpath path_to_eas
� ��� �� �� ��� ����.
v db_alias� DB2WebServices ����� ���� ����� ��� ���
���� ���.
v db_user� ������� ��� � ��� ��� ID���.
v db_password� ������� ���� ��� ID� �� ��� �����.
v path_to_sqllib� DB2 �� SQLLIB ���� �����. � ��� DB2
��� ����� �(EAS)� �� JAR ��� ���� � �����.
v instance_name� ������� �� �� DB2 �� �����.
v path_to_eas� DB2 ���(embedded) ����� �� �� �����.
� 20 � DB2 WebServices ����� 235
v fenced_userid� DB2WebServices ����� ���� ����� ��� �
� ���� ID���. �� UNIX Linux ���� ����.
� ����� ��� ��� DB2WebServices ������ ���� ����.
�� ����� �� �� ����
�� ����� �� �� ����.
v ��� ������� �����.
v Java ���� ����� ����.
v ����� ��� ��� ����.
v DBM CFG ����, JDK_PATH JAVA_HEAP_SZ� �����.
v DB2 ���(embedded) ����� ��� DB2WebServices �����
� �����.
DB2WebServices ������ �� � �� �� �� ����
DB2WebServices� ��� http://hostname:20000/DADXWebServices/
listApps/LIST� �����.
UNIX:
v cd AppServer_install_path/DB2WebServices/bin
v DB2WebServices� ���� db2ws_start.sh �� ����.
v DB2WebServices� ����� db2ws_stop.sh �� ����.
Windows:
v cd AppServer_install_path₩DB2WebServices₩bin
v DB2WebServices� ���� db2ws_start �� ����.
v DB2WebServices� ����� db2ws_stop �� ����.
236 DB2 Servers� �� �
� 21 � DB2 ��� ����� ��(EAS)
DB2 ��� ����� ��(EAS) �� � ��
DB2 ��� ����� �(EAS)� DB2 ��� �� ��� ����� �
���. � ����� DB2 � ��� �� ���� � ������ ��
����� � �� ��� �� � �� ��� ���� �� �������.
��� ������ ��� ����.
v DB2WebServices �����: Microsoft Visual Studio .NET � ���� DB2
��� ����� �(EAS)�� � ��� �� ��� �� �����
���.
�� � �� DB2 ��� ����� �(EAS)� �� � ��� ����
�. ���� � ��� �����.
v � DB2 ����� ��� DB2 ��� ����� �(EAS)� �� ��
� ������ �����.
v ��� ����� �� ���� ���� ������. ��� ���� DB2
��� ����� �(EAS)� ���� �� DB2 � �� IBM Data Server
Client� ��� ��� ��� �����.
v DB2 ��� ����� �(EAS)� ������. ��� �� � ��
���� ��� ��� �����.
v ��� ������ ������. ��� ������ ���� �� ���
�� �����.
DB2 ��� ����� �(EAS)� ��� ��� �� � �� �� ��
�� ��� ���� ����.
�� ����
v DB2 ��� ����� �(EAS)� ��� �� ����� ���
�. �� ���� ���� �� �� ��� �������.
v � ����� DB2WebServices ������ �� ��� � ��� ��� �
��� DB2 ��� �� ���� ������ ��� ���� ��� ��
�����.
v �� ����� DB2 ��� ����� �(EAS)� �� IBM Information
Integrator ��� �� XMR(XML Metadata Registry)� ������. ���
XMR� ���� �� ���� �������. � ��� �� �� ���
© Copyright IBM Corp. 1993, 2007 237
� XMR� �� ��� ���. XMR� �� ����� DB2 � 8 �� �
��� �� XML ����� ����� ��� �����.
v DB2 Embedded Application Server ���� �� �� �� ����� �
��� � ����. https://www14.software.ibm.com/webapp/iwm/web/
preLogin.do?lang=en_US&source=swg-dm-db2eas
DB2 ��� ����� ��(EAS) ��
DB2 ��� ����� �(EAS)� DB2 ��� �� ���� �� ��� �
������ ���� � � ���� �����.
����
DB2 ��� ����� �(EAS)� � ������ �� �����.
���
v DB2 ��� ����� �(EAS)� WebSphere Application Server V6.1 �
� ��� ���� � ��� �����(��� z/OS ��� ��). ��
�� �� ��� �����.
v ���� DB2 ��� ����� �(EAS)� �� ��� � �����
� �� ����. ���� DB2WebServices ������ �� �� ��� �
�����.
DB2 ��� ����� �(EAS)� ����� ��� �����.
1. DB2 ��� ����� �(EAS)� �� ���� �� DVD� �����.
��� �� ���� ����� � ����. Windows� � 32��
64�� �� ����.
2. Linux �� UNIX� DB2 �� ���� ���� � , �� ��� � �
�� untar� ���.
a. �� ��� � ����.
gzip -d product.tar.gz
�� ��, ��� ����.
gzip -d ese.tar.gz
b. �� ��� Untar����.
Linux � ��
tar -xvf product.tar
�� ��, ��� ����.
tar -xvf ese.tar
238 DB2 Servers� �� �
AIX, HP-UX � Solaris � ��
gnutar -xvf product.tar
�� ��, ��� ����.
gnutar -xvf ese.tar
c. ���� �� ���� ������.
cd product
�� ��, ��� ����.
cd ese
3. UNIX ���� � ��� Windows ��� � ��� ��� �� �
��� �� �������.
4. UNIX ������ �� �� �����.
. /INSTHOME/sqllib/db2profile
��� INSTHOME� ��� DB2 ��� � ������. �� �
��� � ����. ������ ��� � �� �� ����� ���
��. ��(.)� ���(/) � ����� ������.
5. �� �� �����.
db2appserverinstall-asroot absolute_path_for_App_Server_install-hostname hostname
���
v absolute_path_for_App_Server_install� DB2 ��� ����� �� �
��� �����. �� ���� �� ��� ���.
v hostname� ��� ��� �����.
�: Windows� � DB2 � ���(CLP) �� DB2 � ��� �
�� �����.
6. ��� ��� � �� ���� ����.
EAS001 installation successful.
DB2 ��� ����� �(EAS)� ��� ���� DB2� �� ��
�� �� ��� � ������ �� ��� �������. ��� ���
� � ���� ����. � ���� ��� �� �� ��� ����.
v UNIX ����� �� ��� /tmp/easInstall.log� ����.
v Windows�� �� ��� TEMP �� ��� ��� ���� ����.
��� �� ��� �� ����
� 21 � DB2 ��� ����� �(EAS) 239
DB2WebServices ������ ���� ���� � ��� ���� ���
�. �� ���� �� ��� ����� DB2 ��� ����� �(EAS)�
���� ����� ��� �� �� �� �����.
1. portdef.props ��� ��� �� ��� ������.
2. ����� ���� DB2 ��� ����� �(EAS)� ������.
DB2 ��� ����� ��(EAS) � �� ��
DB2 ��� ����� �(EAS)� ��� ����� �� � �� �
� ��� ����.
v Linux UNIX ��
v Windows ��
�� ���� ����� �� ��� �� ��� �� startServer�
�� stopServer �� �����.
v Linux �� UNIX ���� DB2 ��� ����� �(EAS)� �
��� ��� �����.
1. �� ��� ID� �� �������. ���� � �� ���� ��
���. DB2 ��� ����� �(EAS)� DB2WebServices ����
�� �� ���� � �� �����. � � �� ��� ID�
DB2WebServices ����� ��� �� �� �� � ��� � �
�����.
2. �� ���� �����.
App_Server_Install_Path/profiles/profile1/bin/
��� App_Server_Install_Path� DB2 ��� ����� �(EAS)� �
�� ������.
3. startServer.bat server1 �� �����.
4. �� ���� �� ��� �� ���� ����.
Server serverName open for e-business; process id is xxxx.
� ���� ��� ���
AppServer_install_path/profiles/profile1/logs/startServer.log� �� ��� �
����.
v Windows�� DB2 ��� ����� �(EAS)� ���� ��� ��
���.
1. Windows�� ��� ��� �� ���� DB2 �� �������.
2. �� ���� �����.
240 DB2 Servers� �� �
App_Server_Install_Path₩profiles₩profile1₩bin₩
��� App_Server_Install_Path� DB2 ��� ����� �(EAS)� �
�� ������.
3. �� startServer.bat �� �����.
4. �� ���� �� ��� �� ���� ����.
Server serverName open for e-business; process id is xxxx.
� ���� ��� ���
AppServer_install_path₩profiles₩profile1₩logs₩startServer.log� �� ��� �
����.
DB2 ���� ������ ��(EAS) � ����
�� ����� � �� �� ����� �����. ��� startServer
��� stopServer� ������.
� 21 � DB2 ��� ����� �(EAS) 241
242 DB2 Servers� �� �
� 6 � ��
© Copyright IBM Corp. 1993, 2007 243
244 DB2 Servers� �� �
� 22 � �� ��� ��� DB2 �� � ��
�� DB2 ����� �� � ���� ��
� ������ �� ��� ��� �� DB2 ��� �� ���� �� ��
� �� ����.
DB2 �� �� DB2 �������� �� �� ��� ���� DB2
��� �� ����� ��� ���.
���� ����� DB2 �� ���� ���� DB2� ��� � ��� ��
� �����. ��� � � ���� �����.
v DB2 �� ���� ���� DB2 �� ��� �� �� ����� �� ��
� �
v DB2 �� ���� ���� DB2 �� �� �� ����� �� ����� �
�� �
v DB2 �� ���� ���� �� � �� �� ����� ���� �� �
v DB2 ��� ��� ��� �
�� ����� � ���(CLP)� ���� ��� �� ���.
�� ����� ����.
v �� ��� ���� ���� DB2 �� �� ����� ��� � ����.
v ��� �� ���� ��� ����� ������� ������ ��
��� ��� ���(����� � � �� ���).
�� ��� �� ����� ����� ��� �����.
1. �� ��� �����.
2. �� �� ����� ��� �� �� [+]� ����.
3. ������ �� ����� �� �� ���� Instances � �� [+]� �
� �� ���� �� �� ������.
4. ��� ��� ���� ��� � � �� ����.
5. �� ���� �� �� ��� ������. �� �� �� ����.
6. �� �� �� ���� ��� ��� �� ����� ��� � ����.
�� ��� F1� �� �� ���� ������.
7. ��� ����� ���� ��� ��� � ��� ���.
© Copyright IBM Corp. 1993, 2007 245
a. ������ � ��� ��� ����� ��� ���� �
� ��� �� � �� �� ���� � ��� ������.
b. ������ � ��� ��� ���� ��� ���� �
� ��� �� � �� �� ���� �� ��� ������.
��� DB2 ����� �� � ���� ��
� ���� �� ��� ���� DB2 ��� �� ��� �� �����
���� ��� ����.
DB2 �� �� �������� �� �� � �� ���� DB2 �
�� �� ����� ��� ���.
���� ����� DB2 �� ���� ���� DB2� ��� � ��� ��
� �����. ��� � � ���� �����.
v DB2 �� ���� ���� DB2 ��� �� �� ����� �� ��� �
v DB2 �� ���� ���� DB2 �� �� ����� �� ����� ���
�
v DB2 �� ���� ���� �� � �� �� ����� ���� �
v db2_install � �� ����(payload) �� ���� ���� DB2 ��� �
�� �
�� ����� ����.
v �� ��� ���� ���� DB2 �� �� ����� ��� � ����.
v ��� �� ���� ��� ����� ������� ������ ��
��� ��� ���(����� � � �� ���).
�� ��� DB2 �� ����� ����� �� �� �����.
1. �� ��� �����.
2. ��� �� ��� ���� ���� ���� ��� �� �� [+] �
�� �� �� �� ������. �� � �� [+]� �� ���
� �� �� ��� �� 247 ���� 13�� �����. ��� �
� ��� �� �� ���� ���� ��� ��� ��� �� �
�� �� ���� ��� 247 ���� 8�� �����.
3. ��� �� ��� ���� ���� ���� ��� �� �� �
��� � � ��� �� �� �� ��� ������. ��� �� �
� ����.
4. �� ��� ���� ����� �� � ��� �����.
246 DB2 Servers� �� �
v ��� ��� �� ��� �� �� ����� �� TCP/IP ��� �
� �����. ���� ���� � � ����. ��� �� �� �
�� ��� ���� ����.
v ��� ��� ���� ��� �� �� ��� �� ������. ��
�� ��� �� �� ��� ��� ���� ����.
�: �� �� TCP/IP ������ ���.
5. �� �� �� ���� ����� ��� ����.
6. �� ����.
7. � ��� ��� �� �� [+] ��� �� �� �� ������.
8. � ���� ��� �� ���� � � ��� �� ����.
9. �� ��� ������. �� �� �� ����.
10. ��� �� �� ��� �� �� ���� ���� �� �� �
� �� �����.
11. ��� ��� ���� �� ����. �� �� �� �� �
� ��� �����.
12. �� ����.
13. ��� ��� ���� ��� � � �� ����.
14. �� ���� �� �� ��� ������. �� �� �� ����.
15. �� �� �� ���� ��� �� ����� ��� � ����. �
� ��� � � �� ����.
16. ��� ����� ���� ��� ��� � ��� ���.
a. ��� ����� ��� ���� � � ��� �� � ��
� ��� ������.
b. ��� ���� ��� ���� � � ��� �� � ��
�� ��� ������.
�� ��� ��� DB2 �� � ��
�� ��� DB2 ������� ��� � ���� ��� �����. �� �
�� �� �� ��� ���� � ��� ����� ��� ����� ��
����� �� � ����. �� ��� ����� ���� �� �����
�� ����� ����� ��� �� ����.
� ���� � ����� �� ��� ���� �� �� ��� � �����
� �� ���� �� ��� �����. ��� �� �� �� � ���
� 22 � �� ��� ��� DB2 � �� �� 247
��� � ����. � ����� �� ����� �� ��� ���� � �
� �� ��� ��� ����� ��� � ��� �� ���� ����
���.
��� �� ����� ��� � ��� �� ��� �� ��� � ����
�� ��� ���.
�� �� ��� DB2 Administration Server(DAS)� � ����� � � �
�� �� � ��� ��� ������ � ��� � ����.
��� ��� �� �� ��� ���� ������� ������ ��
��� ��� � �� ����. �� ��� ��� ��� ����.
v ������� �� �� ���� �����. ����� ������ ���
������. � �� ��� ������ ��� ������. ��� �
�� �� ���� ����.
v ������� � ���� ���� ��� ��� �� �� ���
uncatalog��� � ������.
248 DB2 Servers� �� �
� 23 � DB2 ����� �� � ���� ��
� ���� ���� sysadm ��� �����.
DB2 ��� �� ����� ���� �� DB2 ��� TCP/IP �� SSL
��� ���� �� ���� �����.
DB2COMM ����� ��� ���� �� DB2 ��� �� ����� �
�� � ����. DB2COMM ����� ��� ���� ���� �(null)� ��
� � �� ������ � ���� � � ���� �� � ����
��� ����.
DB2COMM ����� ��� �� ��� � ��� ��� � ����.
tcpip TCP/IP �� �
ssl SSL �� �
��� �� ����� ����� ��� �����.
DB2 � ��� db2set DB2COMM �� ������.
db2set DB2COMM=tcpip
�� ��, ������ � ���� TCP/IP �� ����� �� �� � �
��� ���� ����� �� �� ������.
db2set DB2COMM=tcpipdb2stopdb2start
© Copyright IBM Corp. 1993, 2007 249
250 DB2 Servers� �� �
� 24 � DB2 �� � ��(TCP/IP)
DB2 ����� �� TCP/IP � ��
� ������ DB2 � ���(CLP)� ���� DB2 ��� TCP/IP ���
���� ��� �� ����. DB2 �� �� DB2 �������� �
� �� ��� ���� DB2 ��� �� ����� ��� ���.
DB2 ��� TCP/IP ��� ���� �� ��� � ����.
v TCP/IP� DB2 ��� ��� � ����. ��� ���� ����
TCP/IP� DB2 �������� ��� ���.
v �� ��� �� �� �� �� �� ���� �����.
�� ��� �� � �� ��
��� ��� ��� ������ � ��� �� ��� ��� �
�(svcename) ����� ���� � �����. �� ��� ��� �
��� ��� ��� �� ��� ��, �� �� ����� ���
� ���. ��� ��� ����� ��� �� ��� ��� �
��. ��� ��� �� �� server1� � ����. ���� ����
DB2 Enterprise Server Edition� ���� � �� �� ��� FCM(Fast
Communications Manager)� ���� �� ��� ���� ��� �
����.
�� ��� ��� �� ��� ��� ���. �� �� �����
�� �� 3700/tcp� � ����.
�� ��
�� �� ������ � ��� �� ���� ��� ��
(svcename) ����� �� ��� �� � ����. � � �� ��
� ��� ��� ��� ����. ���� ���� DB2 Enterprise
Server Edition� ���� � �� �� ��� FCM(Fast
Communications Manager) �� ���� �� ������ ����
�� ��� ���� ��� � ����. �� ��� �� �� 3700�
� ����.
���� ����� DB2 �� ���� ���� DB2� ��� � ��� ��
� �����. ��� � � �� ���� �����.
v DB2 �� ���� ���� DB2 ��� TCP/IP �� ����� �� ��� �
© Copyright IBM Corp. 1993, 2007 251
v DB2 �� ���� ���� DB2 �� �� ����� TCP/IP �� �����
��� �
v TCP/IP �� ����� DB2 �� ���� �� ��� �� �
v db2_install � �� ����(payload) �� ���� ���� DB2 ��� �
�� �
DB2 ��� TCP/IP ��� ����� ��� �����.
1. �� ��� ��� ������.
2. �� ������ � ��� �� ��� ������.
3. �� �� � ��� ���� �� ����� ������.
v CLP
v �� ��
TCP/IP �� ���� ������ �� ��� �� � �
� ���� DB2 ��� �� TCP/IP �� ��� �� ��� � �����.
��� ��(svcename) ����� ���� ������ � ��� �� ���
��� ���.
������ � ��� �� ��� ����� ��� �� �����.
1. ��� �(SYSADM) ��� �� ���� ���� �������.
2. UNIX �� ���� � �� �� ��� ��� �� ������.
. INSTHOME/sqllib/db2profile (Bash, Bourne �� Korn �� ��)source INSTHOME/sqllib/db2cshrc (C �� ��)
3. DB2 � ���(CLP)� �����.
4. �� �� ���� ��� ��(svcename) ����� ���� ������
� ��� �� ��� ������.
update database manager configuration using svcename[service_name | port_number]
db2stopdb2start
� ��� �� �� ��� ����.
v service_name� services ��� ��� ��� �����.
v port_number� service_name� ���� �� ����� service_name� �
��� �� � �� �� �� � �� �����.
��� ��� ���� ��� ���� svcename� ��� ��� ��� ��
��� ��� ��� ���.
252 DB2 Servers� �� �
������ � ���� ���� �� �� � ������ � ���
�� ��� �� �� ��� ����� � ����. �� �� ���
� ������ � ��� �� ��� ����.
get database manager configuration
TCP/IP �� ���� ��� � �
� ���� DB2 ��� �� TCP/IP �� ��� �� ��� � �����.
TCP/IP ��� ��� � ������ ����� �� ��� � �� ��
� �����. DBM �� ��� svcename ��� ��� ��� ��� � ��
� ��� ��� �� � �� ��/���� ���� ���� ���. DBM �
� ��� svcename ��� �� ��� ��� � ��� ��� ��� ��� �
���.
services ��� ���� �� ���� ����� �� ����� ��� ��
� ������. services ��� � ��� ���� ����.
Linux � UNIX � ��
/etc/services
Windows � ��
%SystemRoot%₩system32₩drivers₩etc₩services
��� ��� ���� �� � � ��� ��� ������. �� ��, ��
� ����.
db2c_db2inst1 3700/tcp # DB2 connection service port
� ��� �� �� ��� ����.
db2c_db2inst1
�� ��� ��� ����.
3700 �� �� ��� ����.
tcp �� � �� ����� ����.
� 24 � DB2 � �� ��(TCP/IP) 253
254 DB2 Servers� �� �
� 25 � DB2 ���� �
DB2 ��� ���� �� ���� ��� ����. ��� ���� ��� DB2
��� ��� ��� ���� �� ����� ���� �� ���� �� �
����. ����� ���� ���� DB2 �� ���� �� �� � ���
�.
DB2 ��� � ��� ���� � ��� ���� ����. DB2 �� �� �
�� ���� �� ���� �� ��� ���.
���� �(���� �� ����� �)� ���� DB2 ���� � ���
� ���� � ���� � ���� �� ��� �� �� � � ����. ��
���� � ���� ���.
� DB2 �� DB2 ��� ���� �� �� �����. DB2 �� �� ��
���� Passport Advantage�� ���� � , ���� �� ��� CD ���
� ���� ����. Passport Advantage®� ��� ��� � �� ��� �
�� CD ���� �� ���� ���. DB2 ���� ��� IBM����
�� �� ��� �� � ���� �� ��� CD� ����.
�� DB2 ��� ��� � �� �� �� �� ��� ��� ��� �
�� � ��� ���� �� �� ���. � DB2 �� DB2 ���� ��
��� ���� �� ����. ��� DB2 ��� ��� ���� ����� �
����� � � ���. �� ��� DB2 ��� �� DB2 �� ���
�����.
DB2 Personal Edition DB2 Connect Personal Edition� �����. DB2 Personal
Edition �� DB2 Connect Personal Edition� ��� � �� ���� �� ��
��� ���� ��� ����.
DB2 �� �� ��� �� ����� �� ��� �� ����.
v �� �� �� ���� ��
v db2licm ���� � �� �.
���� �� ��� ��� �� ���� �� �� ��� �� DB2 ��� �
� �� ���� ���� ����. ���� ��� ���� ���� ���� �
� �� ���. ��� ���� �� ��� ���� DB2 ��� ����
DB2 �� �� � �� ���� ����� DB2 FixPack �� ���� ����
�� � �� ��� �� �� �� ���. �� � �� DB2 ��� 90��
© Copyright IBM Corp. 1993, 2007 255
�� � ��� � �����. DB2 FixPack �� ���� Passport Advantage
�� �� �� DB2 �� �� ���� � �� FixPack �� ���� ����
�� �� �� ���.
DB2 �� �� � �� ����� �� �� � ����� �� ��� � �
�� �� ��� �����. DB2 �� � �� ���� Trials and demos��
���� � ����.
�� � �� ����� DB2 ��� ����� �� �� ����� ������
�� � , DB2 ��� �� ��� ��� ����. � ����� ������
� ���. ���� DB2 ���� ������ �����.
�: ��� � �(PVU) ���� �� � ��� � ��� ���� ��
�� � �� �����. ����� ���� ���� � ��� ��� � �
�� � � �� �� ���. IBM� ���� ���� ��� � ���
��� ��� ���� ����. �� ��, �� �� ��� � �� ��� �
�� ����. � ����� ����� � � �� �� ����. � �
���� ���� ���� � ��� ��� ���� � � ��� �
� ��� � ��� � � �� ��� ���. PVU ���� ��� ��� �
PVU ��� �����.
DB2 ���� ��
DB2 �� �� ��� �� ���� ���� �� �� �� ���� ���
�. DB2 �� �� ��� ���� �� ���� �� ��(���� � ����
�� �)� �� ���.
��� �� �� �� ���� �� ��� ����� DB2 �� ���� �
�� �� �� ���� /db2/license ���� ���� �� ��� ���.
���� �� DB2 �� �� Passport Advantage�� ���� �� ��� CD
����� �� IBM���� �� �� �� �� �� ��� CD�� �� �
����.
DB2 ��� ����� �� �� ��� ����� ��� �� ���.
v � DB2 �� ���� �� ������.
v �� ���� �� ��� DB2 ��� ������.
256 DB2 Servers� �� �
�� � �� ���� �����
�� � �� ����� DB2 ��� ����� �� �� ����� ������
�� � , �� ���� �� ������ ���.
� DB2 ���� �� ���� ������� �� � ��� ��� � ����.
��� ����� ���� DB2 � ��� ��� ��� ���� �� �
� � FixPack ���� ���� DB2 ������ � ��� ��� � ��
��. � � ���� �� DB2 ��� �� � �� ����� ����.
DB2 ����� �������� ��� �����.
1. ���� �� ������. ���� �� ���� ��� � ����.
v DB2 �� �� Passport Advantage�� ���� �� ��� ��
v IBM���� �� �� �� �� �� ��� CD.
2. ���� �� �� db2licm �� ���� ���� �� ������.
���� ��� ���� DB2 �� �� �� ���� � ��
���� �� DB2 �� �� Passport Advantage�� ���� �� �����
�� IBM���� �� �� �� �� �� ��� CD�� �� � ����.
Linux �� Windows ����� ���� ��� ���� ���� �� ��
� � ����. UNIX ����� db2licm �� ���� ���� �� �
�� � ����.
Linux ����� �� ���� ���� ��� �� ���� �� �
� �� ��� �� ���.
DB2 ���� �� ����� ��� ������.
1. DB2 �� ��� �� � � ���� ���� ��� ������.
2. ����� ���� ���� ������. ��� ����� ��� ���
���. ��� ���� �� ��� ������. ��� �� ���� ���
��� ��� ����.
3. ���� ���� ��� ������.
4. ���� �� ��� ���� ��� ������.
v Windows �� � , x:₩db2₩license₩license_filename.lic
v Linux �� � , /cd/db2/license/license_filename.lic
��� x: �� /cd� DB2 �� �� ��� �� �� CD� �� �� ���
�� �� ��� ����.
� 25 � DB2 ���� 257
5. ���� �� ����� �� ����.
db2licm ��� ���� DB2 �� �� �� ���� � ��
���� �� DB2 �� �� Passport Advantage�� ���� �� �����
�� IBM���� �� �� �� �� �� ��� CD�� �� � ����.
v Windows ����, �� ��� ��� � �� �� �� ����
DB2 ���� �� ������.
db2instance_path₩bin₩db2licm -a filename
��� db2instance_path� DB2 ��� �� ����, filename� ����
��� ��� ���� ���� ��� �� �� �� �� �����.
v Linux �� UNIX ����, ��� ��� � �� �� �� ���
� DB2 ���� �� ������.
DB2DIR/adm/db2licm -a filename
���
– DB2DIR� DB2 ��� ����� ��� �����. � �� ����
��� ����.
- AIX, HP-UX �� Solaris: /opt/IBM/db2/V9.5
- Linux: /opt/ibm/db2/V9.5
– filename� �� �� ��� ���� ���� ��� �� �� �� ��
�����.
v Linux �� UNIX ����� �� ��� �� sysadm ��� ���
� �� �� �� ���� DB2 ���� �� ������.
INSTHOME/sqllib/adm/db2licm -a filename
��� INSTHOME� �� ���� � ����� filename� ���� �
�� ��� ���� ���� ��� �� �� �� �� �����.
db2licm ��� ���� DB2 ���� �� ��
DB2 Connect Enterprise Server Edition� � ���� ��� DB2 Connect �
� �� ��� � �� ��� �� ���� �����.
WebSphere Replication Server �� WebSphere Federation Server� � , ���
� ��� �DB2 ��� ��� ���� ��� �� �� �����.
1. db2licm �� ���� ���� ��� ����� �� ID� �����. �
� ID ��� ����� �� �� ������.
258 DB2 Servers� �� �
db2licm -l
�� ID� �� ID ��� ���� ����.
2. ���� ��� ����� ��� ���� ��� �� �� � ��� ��
���. �� ��, ��� ����.
v WebSphere Replication Server �� WebSphere Federation Server Concurrent
Connector ��� ��� � �� �� �� ������.
db2licm -c wsfs concurrent
��
db2licm -c wsrs concurrent
v DB2 Connect Server Concurrent User ��� ��� � �� �� ��
������.
db2licm -p db2consv concurrent
���� ��� ���� DB2 ���� �� ��
DB2 Connect Enterprise Server Edition� � ���� ��� DB2 Connect �
� �� ��� � �� ��� �� ���� �����. WebSphere
Replication Server �� WebSphere Federation Server� � , ���� ��� �
DB2 ��� ��� ���� ��� �� �� �����.
���� ��� ���� ���� ��� ����� ��� ���� ��� �� �
�� �����.
1. ���� ��� ���� ���� ��� ������.
2. ���� �� ��� ��� ���� ��� ������. �� ��, ��� �
���.
v WebSphere Replication Server �� WebSphere Federation Server Concurrent
Connector ��� ��� � Connector� ���� ��� ��� ����
� �� ������.
v DB2 Connect Server Concurrent User ����� ��� � �� ���
�� �� �� ���� ���� ��� ��� ���� �� ������.
DB2 ���� ��
� DB2 ��� ���� �� ���� �� ���� ����. DB2 �� ��
��� ���� �� � ���� �� ��� ���. ���� ��� �� ��
�� �� ��� �����. ����� ���� �� DB2 ��� �� ����
��� �� ���� ����.
� 25 � DB2 ���� 259
DB2 ��� ���� ��� � �� �� �� ���� ��� � ����. ��
���� �� �� �� ���� �� DB2 ��� �����. � DB2 �� �
�� ��� �� �����.
v ��: �� �� ����� ��� ����� ���
v ��: ����� �� ��� ������ ��
�: �� DB2 ��� DB2 ��� ���� ��� � � ���� ���� ���
� ����.
DB2 �� �� � �� ���� ��� � �� �� � �� ����� �� �
� � ����� �� ��� � ��� �� ��� ���� ����.
���� �� �� db2licm �� ���� �� ���� ��� � ����.
v ���� ���� �� ���� ����� ���� → �� ��� ��� ��
����.
v db2licm �� ���� �� ���� ����� ��� �� �� ��
����.
– Linux UNIX ��:
db2instance_path/adm/db2licm -g filename
– Windows ��� � ,
db2instance_path₩bin₩db2licm -g filename
���
– db2instance_path� DB2 ��� �� �����.
– filename� ��� �� �� ��� �����.
��� ��� DB2 ��� ���� �� �� db2licm �� ���� �� �
��� �� ��� ���. ���� �� �� db2licm �� ���� �� �
�� ����� � �� �� ����. �� ��� � ��� �����.
260 DB2 Servers� �� �
� 7 � �� ��
© Copyright IBM Corp. 1993, 2007 261
262 DB2 Servers� �� �
� 26 � DB2 �� �� ��(Windows)
DB2 �� �� ��(Windows)� ������ Windows ���� DB2 ��� ��� ���� �� ��
���. ��� DB2 �� ������� � �� ���� �� � �� �
���� �� ���.
DB2 � ��� �� �� ��� ���� �� DB2 ��� ���, �� ��
� ��� �� � � ��� ����� db2swtch �� ��� ���. �
�, DAS(Database Administration Server)� ���� �� ���� � ���, �
��� �� �� ���� DAS� ��� ���. ��� �� � , �� ��
� db2admin create �� ���� DAS� ��� �� �� �� ���
DAS� ���� � �� ����.
Windows�� DB2 ��� ����� ��� �����.
1. (����) �� �� �� drop database �� ���� � ������� �
�����. ��� ������� � �� ���� ��� � ����. ���
���� ����, � ���� ����.
2. � DB2 ��� ���� ������. � �� Windows ��� ��
� ����� db2stop �� �� ��� � ����. DB2 ��� ���
� �� DB2 ��� ���� ���� �� ��� ��� DB2 DLL�
�� ��� ��� �� ���� �� �� ���� �����.
3. DB2 ��� ���� �� � �� ��� ����.
���� ��/��
Windows ���� �� ��� � ���, ��� ��/�� �� �
��� DB2 ��� ������. Windows ���� ����� �
�� ���� ��� �� ��� �� ���� �����.
db2unins command
db2unins �� ��� DB2 ��� ��� � ����. � �� �
��� �� /p ����� ���� ��� DB2 ��� �� ��� �
� ����. � ��� ��� DB2 ��� ���� /u ����� �
��� DB2 ��� ��� �� ��� � ����. �� ���
db2unins � ��� �����.
�� ���� ��� ��/�� ��� ����� db2unins /p � �� db2unins
/u �� ���� �� DB2 ��� ��� � �� �� ���. �� ����
��� � �� �� �� �� ��� ��� ���.
© Copyright IBM Corp. 1993, 2007 263
Windows ����� � DB2 ��� ��� ����� db2unins /f �� �
����. � �� ����� � DB2 ��� ������ �����. ��� �
��� ��� � ��(�: DB2 ������)� ��� �����.
�� �� ���� DB2 �� �� ��(Windows)
�� ��� ��� �� ��� � ����.
v �� ��� ��� � ��� � ��� ��� ����.
v � DB2 ���� ������ � ���.
DB2 ���� � �� ��� DB2 ��� ��� �� ����� -u ��� �
� db2unins �� ������.
��� �� ��� DB2 ��� ��� � �� � �� ���� �� � ��
�� ���. �� � �� db2un.rsp� DB2 �� DVD�
db2/windows/samples� �����.
�� ��� ���� ��� �����.
1. db2un.rsp � ��� ��� ������. � ���� � � ������
��� ��� (*)� ������. �� �� � ���� �� ��� � �
��� �����. ��� ��� �� ���� ���� ����.
2. db2unins �� �����(�: db2unins -u c:₩db2un.rsp). db2unins ��
SQLLIB/BIN ��� �� ����.
3. �� �� ��� �� ��� ���� ������.
264 DB2 Servers� �� �
� 27 � DB2 �� �� ��(Linux � UNIX)
� ������ Linux �� UNIX ���� DB2 ��� ���� �� �
����.
DB2 ��� � �� ��� ��� � ���� ���� ����. Linux ��
UNIX� �� DB2 ��� � ��� �� ��� ���� �� � ��� �
�� � ����.
�: � ���� �� ���� ��� DB2 ��� ����. �� ���� ��
� ���� ��� DB2 ��� �� ���� ��� ����.
DB2 ��� ����� ��� �����.
1. ����: ������� � ������. �� �� �� drop database �
� ���� ������� ��� � ����. ������ ��� �� ��
����� ���� �� ��� ���� �� ���� ��� � ���
�.
2. DB2 Administration Server� ������. DB2 Servers� �� � ����
�����.
3. DB2 Administration Server� ����� dasupdt �� ��� DB2
Administration Server� � �� �� ��� ������. DB2 Administration
Server� ����� DB2 Servers� �� � ���� �����.
4. � DB2 ��� ������. DB2 Servers� �� � ���� ��
���.
5. DB2 ��� ����� db2iupdt �� ��� ��� � �� ��
��� ������. DB2 ��� ����� DB2 Servers� �� � ��
�� �����..
6. DB2 ��� ������. DB2 Servers� �� � ���� �����.
DB2 Administration Server ��(Linux � UNIX)DB2 ��� ���� �� DAS(DB2 Administration Server)� ��� ���.
DB2 ��� �� ��� ��� ��� DB2 � 9.5 ��� ��� � DAS�
��� ���. �� DB2 � 9.5 ��� �� � dasupdt �� ��� DAS
� �� DB2 ��� ��� ���. DAS� ����� ��� � �� �� DAS
� ��� ���.
�: � ���� DB2 ��� ��� ��� ��� ����.
© Copyright IBM Corp. 1993, 2007 265
DB2 Administration Server� ����� ��� �� ���.
1. DB2 Administration Server ����� �� ����.
2. db2admin stop �� ���� DB2 Administration Server� ������.
DB2 Administration Server ��(Linux � UNIX)��� DB2 � 9� ���� � , DB2 ��� ���� �� �� DAS(DB2
Administration Server)� ��� ���.
DB2 � 9 ��� ����� �� DB2 � 9 ��� ���� � , DB2 DAS
� ��� DB2 ������ dasupdt �� �� � ����.
�: � ���� �� ���� ��� DB2 ���� ����.
DAS� ����� ��� �����.
1. �� ��� �� ���� �� ����.
2. DAS� ������.
db2admin stop
3. �� �� ���� DAS� ������.
DB2DIR/instance/dasdrop
��� DB2DIR� DB2� ��� � ��� �����. UNIX� � �� �
�� /opt/IBM/db2/V9.5���. Linux� � �� ��� /opt/ibm/db2/V9.5�
��.
�� ���� ��(Linux � UNIX)�� �� � DB2 ��� ��� �� � DB2 ���� ��� ���.
�� DB2 ��� �� ��� �� ��� �� ���� �� �� ���
�.
�: � ���� �� ���� ��� DB2 ��� ����. ��� ����� �
�� DB2 ��� ����� 271 ���� ���� �� ��(Linux
UNIX)�� ��� �����.
DB2 ��� ����� ��� �����.
1. �� ��� �� ���� �� ����.
2. �� �� ���� �� DB2 ��� �� � DB2 �� �� ��
����.
DB2DIR/bin/db2ilist
266 DB2 Servers� �� �
��� DB2DIR� DB2 � 9 �� �� ���� ��� �����. UNIX�
� �� ��� /opt/IBM/db2/V9.5���. Linux� � �� ��� /opt/ibm/
db2/V9.5���.
3. .profile� ���� �� �� � ���� �� �����.
. INSTHOME/sqllib/db2profile (bash, Bourne �� Korn �)source INSTHOME/sqllib/db2cshrc (C �)
��� INSTHOME� ��� � ������.
4. �� ��� ����� �����.
v $HOME/sqllib/db2systm ������ � ��� �� ��
v $HOME/sqllib/db2nodes.cfg �� �� ��
v $HOME/sqllib/function�� ��� �� �� �� ��(fenced)� ���� �
��� �����
5. db2stop force �� ���� DB2 ������ � ���� ������.
6. db2 terminate �� ���� ��� ������ � ����.
7. � ��� �� � �� ������.
DB2 ���� ��(Linux � UNIX)� ���� ����� �� ��� �� �� ��� ���� ��� �� �
���.
�: � ���� ��� ��� ��� ����. ��� ��� ����� DB2
��� �� ��� ���.
�� DB2 � 9 ��� ���� � �� DB2 ��� ���� �� DB2 �
�� ��� � ����. DB2 � 9 ��� ����� �� DB2 � 9 ���
���� � , DB2 ��� ��� DB2 ������ dasupdt �� ��
� ����.
��� ����, �� ���� �� ���� ��� � ���
���� DB2 ������� ��� � ����. ��� ������, ���
���� ��� ���, ������ ��� ��� ���� �� � �� ��
� � ����.
DB2 ��� ��� ��� ��� ��� ��� DB2 ��� �� ��� �
��� �� � �� DB2 ��� ������. ����� �� �� DB2
� �� ���� �� ���. �� DB2 ��� ��� � �� ���
��� � ����.
��� ����� ��� �����.
� 27 � ��� ��� DB2 ��(Linux UNIX) 267
1. �� ��� �� ���� �� ����.
2. ����: �� �������� ���� � �� ���� ��� ���� �
�� ��� ���� �� ����� ������ ��� ����� �
������ ��� � ����.
3. �� �� ���� ��� ������.
DB2DIR/instance/db2idrop InstName
��� DB2DIR� DB2� ��� � ��� �����. UNIX� � �� �
�� /opt/IBM/db2/V9.5���. Linux� � �� ��� /opt/ibm/db2/V9.5�
��.
db2idrop �� �� ��� �� � � ���� INSTHOME/sqllib
���� �����. ���, INSTHOME� ��� � �����,
InstName� ��� �� �����. /sqllib ���� ��� ��� � ,
� ��� � �� �����. � ��� � ��� � , ��� ��
�� �� ��� ���.
4. ����: �� ��� �� ���� �� ���� ��� ID ��� �
�����(�� ��� ���� ��� � ). ��� �� �� ��
��� �� ���� ����.
�: �� ��� �� ��� ��� �� �� �� � ���
� � �� �������.
db2_deinstall �� doce_deinstall ��� ���� DB2 �� ��(Linux� UNIX)
� ������ db2_deinstall �� ���� DB2 ���� DB2 ����� ��
�� �� �����. db2_deinstall �� ����� � DB2 ��� ����
�. doce_deinstall �� doce_deinstall ��� �� �� ��� �� DB2 ��
��� �����. � �� Linux ����� �� �����.
����� DB2 ��� ���� �� 265 ���� � 27 � �DB2 �� �� ��
(Linux UNIX)��� �� � �� ����� � ����.
�:
v � ���� �� ���� ��� DB2 ��� ����. �� �� �� ���
DB2 ��� �� ����� 271 ���� � 28 � ���� DB2 �� �� �
�(Linux UNIX)�� ��� �����.
v rpm �� SMIT� �� �� �� ����� ���� DB2 ��� ���
� ����.
v doce_deinstall �� Linux x32 x64��� �� �����.
268 DB2 Servers� �� �
�� ���� ALL DB2 ��� ����� ��� �����.
1. �� ���� �� ����.
2. DB2 ��� �� ��� ������. ��� DB2 ��� ��� ���� 177
���� ����� ���� �� DB2 �� �(Linux UNIX)�� ��� �
����.
3. �� � � ��� �����.
v �� ���� ��� DB2 ���� ��� ����� DB2DIR/install ��
��� db2_deinstall -F �� �����.
v �� ���� ��� � DB2 ��� ����� DB2DIR/install ����
� db2_deinstall -a �� �����.
v �� ���� DB2 �� ��� ����� DB2DIR/doc/install �����
doce_deinstall -a� �����.
��� DB2DIR� DB2 �� ��� ��� �����.
� 27 � ��� ��� DB2 ��(Linux UNIX) 269
270 DB2 Servers� �� �
� 28 � ��� DB2 �� �� ��(Linux � UNIX)
� ������ Linux �� UNIX ���� ��� DB2 ��� ����
�� �����.
�: � ���� �� �� �� ��� DB2 ��� ����. �� ���� ��
� DB2 ��� �� ����� 265 ���� � 27 � �DB2 �� �� ��(Linux
UNIX)�� ��� �����.
DB2 ��� ��� ��� �� ��� �� ���� �� �����. ��� �
� �� �� �� �� ��� ���� ����.
DB2 ��� ����� ��� �����.
1. ��� �� ��
2. DB2 �� ��
��� ���� ��(Linux � UNIX)DB2 ��� �� ���� �� ��� ��� ��� ���.
�: � ���� ��� ���� ��� DB2 ��� ����. ��� �����
��� DB2 ��� ����� 266 ���� ��� �� ��(Linux
UNIX)�� ��� �����.
DB2 ��� ����� ��� �����.
1. ��� �� ���� �� ����.
2. .profile� ���� �� �� � ���� �� �����.
. $HOME/sqllib/db2profile (bash, Bourne �� Korn )source $HOME/sqllib/db2cshrc (C �)
��� $HOME� � ������.
3. �� ��� ����� � � ����.
v db2systm ������ � ��� �� ��
v db2rfe� ��� �� �� ��� �� ���� �� � ��� �� ��.
v $HOME/sqllib/function�� ��� �� �� �� ��(fenced)� ���� �
��� �����
4. db2stop force �� ���� DB2 ������ � ���� ������.
5. db2 terminate �� ���� ��� ������ � ����.
© Copyright IBM Corp. 1993, 2007 271
db2_deinstall� ���� ��� DB2 �� ��(Linux � UNIX)� ������ db2_deinstall �� ���� ��� DB2 �� �� ����� �
��� �� �����.
db2_deinstall �� ��� �� ��� ��� ��� ���.
�:
v � ���� �� �� �� ��� DB2 ��� ����. �� ���� ���
DB2 ��� �� ���� �� �� ���� ����.
v �� ���� �����, ��� ���� db2_deinstall �� ���� DB2 �
�� �� ��� � ����. ��� ��� �� db2_deinstall ��� �� �
�� �� ��� ��� –f sqllib �� ��� ����.
v db2_deinstall� ��� ����� ��� DB2 ��� �� ���� ���
��� ���� ������. �� db2_deinstall� ��� DB2 ���
��� �� ���� �� ���� ����.
v rpm �� SMIT� �� �� �� ����� ���� DB2 ��� ���
� ����.
��� ���� ��� DB2 ��� �� ����� ��� �����.
1. DB2 ��� ���� � ��� ��� ID� ���� �� ����.
2. $HOME/sqllib/install ���� �����. ��� $HOME� � ����
��.
3. db2_deinstall �� �����.
�:
v db2_deinstall �� –a ��� �� ��� DB2 ��� ��� ����
� �� ��� sqllib_bk�� �� ���� ����.
v db2_deinstall �� –a –f sqllib ��� �� ��� � ����� ��
sqllib ����� �����. sqllib� ���� �� ��� �� � ��
db2_deinstall –a –f sqllib� ��� �� �� �� �� ������.
v �� ����� �����, ��� ��� �� db2_deinstall �� –F ��
� �� ��� ��� ���� �� DB2 ��� ��� � ����. ��
� ��� ����� db2nrupdt �� ��� �� DB2 ��� ��� �
� ����.
272 DB2 Servers� �� �
� 29 � DB2 �� � IBM ������ ����� ����� �
� �� ��
Linux � UNIX � ��
�� � DB2 ���� db2_deinstall �� ������. db2_deinstall
�� db2_deinstall ��� �� �� ��� �� ��� DB2 �� ��
��� �� �����.
�� db2_deinstall �� DB2 �� DVD�� �� �����. �� ��
� �� �� DB2 DVD� �� �� ��� ���. DB2 DVD�
���� db2_deinstall �� �� � -b ����� ���� �� �
�� ��� ����� � ��� ����.
��� DB2 �� �� �� ��� db2ls �� ������. �� �
�� ��� �� DB2 ��� ��� �� � �� �� DB2 ���
�� ��� � ����.
Windows � ��
Windows ���� DB2 ��� �� ����� �� ��� � ��
� ������.
v Windows ��/�� ��� ���� ������.
v ��� DB2 �� ����� db2unins �� �����.
�:
v DB2 ��� �� ��� ���� DB2� �� ��� � ����.
�� ��� � �� DB2 �� ��� �� �� ��� ����
�. ���� �� �, �� �� �� ��� �� ��� �
��.
v �� �� � 9 ��� ��� � �� � DB2 ��� ��� �
����. � DB2 ��� ����� � �� �� �� � DB2
��� �� DB2 ���� ��� ���. � DB2 �� ��� �
� �� ��� db2swtch �� �����.
© Copyright IBM Corp. 1993, 2007 273
�� ��� IBM Data Server Driver ��� �� ��� ��� �� �� DB2
�� �� ��
��� ��� ������� IBMDBCL1� � IBM ������ ��
��� ���� ���� DB2COPY1� � DB2 ���� ��� DB2
��(DB2COPY2)� �����.
274 DB2 Servers� �� �
DB2COPY1� �� DB2 ��� � �� ����� ������.
DB2COPY1 �� ��� DB2 ��� �� ����� � , ��� �
DB2 ���� ��� �� �� �� �����.
� DB2 �� ��� � �� DB2 �� � ��� ��� �� ���
� ��, ���� ��� DB2 ��� ��� � DB2 ���� �� ���
� �� ��� ���.
� 29 � DB2 �� IBM ������ ����� ���� �� �� �� 275
�� ����� � �� db2swtch �� ����(Windows� ��)
� DB2 IBM ������ ����� ���� �� ���� �
����. �� � ��� ���� ��� � ��� ����.
���� DB2COPY2� �� � DB2 ���� ��� � ����.
DB2COPY2� � DB2 ���� ��� � DB2COPY1�� ��� �
�� �� ��� �� � ����.
276 DB2 Servers� �� �
DB2COPY1� � �� � DB2 ��� ��� �� �� �� ��
���.
�� ���� ��� �� �� IBM Data Server Driver �� �� ��
�� �� DSDRIVER� ���� ��� � ����. ��� IBM ��
���� ����� ���� ���� ����. �� ���, �
IBM ������ ����� ���� �� DSDRIVER� �� ���
���.
� 29 � DB2 �� IBM ������ ����� ���� �� �� �� 277
� IBM ������ ����� ���� ��� �� ��� � ��
���� � ���� � �� DSDRIVER ��� ���� �� � �
�� �� � IBM ������ ����� ���� ���� ��
���. �� ��� ��� �� �� ���� �� � ��
�� DSDRIVER� ��� � ����. (��� � �� DSDRIVER
� ��� �� � �� ������ � ���� ��� DSDRIVER
� ����. ��� � �� �� �� DSDRIVER� ���� ��
� �� ������ � ���� ��� DSDRIVER� � � ���
�.)
�� ��� DB2 ��� �� ��� �� �� IBM Data Server Driver �� �
� ��
278 DB2 Servers� �� �
��� ��� ������� DB2COPY1� � DB2 ����
IBMDBCL1� � IBM ������ ����� ���� �����.
IBMDBCL1�� DSDRIVER� �� ��� ������.
DB2COPY1� � DB2 ��� � IBM ������ �����
���� ��� ��� �� �� �� ���, ������ � ���
� �� ��� � IBM ������ ����� ���� ��� �
����. (�� ��� DB2 ��� � �� �� � �� ����.)
� 29 � DB2 �� IBM ������ ����� ���� �� �� �� 279
280 DB2 Servers� �� �
� 30 � DB2 FixPack ��
FixPack� ��� ���� ��� DB2 ��� �����.
Windows ���� FixPack� �� ��� �� FixPack� �� ��� �
�� FixPack� ���� �� � �� FixPack�� �� � ����.
Linux �� UNIX ����, FixPack� �� �� �� FixPack� �� ��
�� ��� �� FixPack�� �� � ����.
FixPack� ����� FixPack� ��� ID� ���� ���.
DB2 FixPack ��� �� ��� �� DB2 FixPack readme� �����.
http://www.ibm.com/software/data/db2/udb/support.html� DB2 �� � ���� �
��� �� DB2 FixPack� ���� � ����.
FixPack �� ��
Linux UNIX ����� �� ��� FixPack� ����� �� ���
FixPack�� �� � ����. Windows ���� FixPack� �� ���
�� FixPack� �� ��� � �� FixPack� ���� �� � �� FixPack��
�� � ����.
1. Linux �� UNIX ���� FixPack� �� ����� �� ��� �!�
�� �� ��(-f)� �� installFixPack �� �����. �� �� ��
� FixPack ������� �� ���. �� ��, ��� ����.
./installFixPack -f level -b DB2DIR
���
v level� �� ��� FixPack���.
v DB2DIR� � �� ��� FixPack ���� ��� ����� DB2 ���
�� �����.
2. Windows ���� FixPack� �� ����� Windows ���� �� �
�� � �� ��� ��/�� �� ������. Windows ����
����� ��� ���� ��� �� ��� �� ���� �����.
© Copyright IBM Corp. 1993, 2007 281
282 DB2 Servers� �� �
� 31 � DB2 � ����� �� ��
DB2WebServices ����� �� �
DB2WebServices ������ �� ����� �� �� ������.
v Linux UNIX ��:
db2ws_undeploy.sh -user db_user -password db_password
v Windows ��:
db2ws_undeploy.bat -user db_user -password db_password
� ��� �� �� ��� ����.
v db_user� ������� ��� � ��� ��� ID���.
v db_password� ������� ���� ��� ID� �� ��� �����.
DB2WebServices ������ ���� �� ����
DB2WebServices ������ �� ����� �� �� ��� �� � ��
�� �� �����.
1. �� ���� �����.
v Linux UNIX: AppServer_install_path/DB2WebServices/bin
v Windows: AppServer_install_path₩DB2WebServices₩bin
2. �� �� ����.
v Linux UNIX: db2ws_deploy.sh -db dbname -dbuser dbuser -dbpassword
dbpassword
v Windows: db2ws_deploy -db dbname -dbuser dbuser -dbpassword dbpassword
DB2 ��� ����� ��(EAS) �� ��
����� �� � �� ���� �� � �� ����� ��� � ����.
����� �� �� �� ���� DB2 ��� ����, ����� �
� �� ���� �� DB2 � �� ������ �� ���� ����.
v Linux �� UNIX ���� DB2 ��� ����� �(EAS)� ��
����� ��� �����.
1. ��� DB2 �� �������.
2. �� �� �����.
© Copyright IBM Corp. 1993, 2007 283
. /INSTHOME/sqllib/db2profile
��� INSTHOME� DB2 ��� ����� �(EAS)� ��� � �
�� ��� � ������.
3. �� ���� �����.
APPSERVER_INSTALL_PATH/uninstall/db2appserveruninstall
��� APPSERVER_INSTALL_PATH� DB2 ��� ����� �(EAS)
� ��� ������.
4. �� db2appserveruninstall �� �����.
5. ����� � �� ��� ���� ����� ��� �����.
– db2_install_path/bin ���� ������.
– ������ ���� ���� �� �� �����.
./db2greg -dump
EAS � � � ��� ����.
S,DB2EAS,6.1.0.7,AppServer_install_path,,,,,,,
��� AppServer_install_path� EAS� ��� �����.
– �� �� �����.
db2greg -delservrec service=DB2EAS,version=6.1.0.7,installpath=AppServer_install_path
��� AppServer_install_path� EAS� ��� �����.
– EAS� ��� �� ��� ���� ������.
��� ���� � ���� ����. � ���� TEMP �� ��� �
�� ���� �� db2appserveruninstall.log �� ��� �����.
v Windows�� DB2 ��� ����� �(EAS)� �� ����� ��� �
����.
1. Windows ����� ��� ��� �� ���� DB2 �� ������
�.
2. �� �� �����.
APPSERVER_INSTALL_PATH₩db2appserveruninstall.exe
��� APPSERVER_INSTALL_PATH� DB2 ��� ����� �(EAS)
� ��� ������.
3. �� ���� �����.
APPSERVER_INSTALL_PATH₩uninstall₩db2appserveruninstall
��� APPSERVER_INSTALL_PATH� DB2 ��� ����� �(EAS)
� ��� ������.
284 DB2 Servers� �� �
4. �� db2appserveruninstall.exe �� �����.
5. ����� � �� ��� ���� ����� ��� �����.
– regedit� ��� HKEY_LOCAL_MACHINE → SOFTWARE → IBM
→ DB2EAS� �� DB2EAS �� ������.
– EAS� ��� Windows ��� ���� ������.
� 31 � DB2 � ����� �� �� 285
286 DB2 Servers� �� �
� 8 � ��
© Copyright IBM Corp. 1993, 2007 287
288 DB2 Servers� �� �
�� A. DB2 �� 9 �� � �� ��
DB2 � 9 �� ��� ��� ���� http://www-1.ibm.com/support/
docview.wss?rs=73&uid=swg21219983� ��� �����.
© IBM Corporation 1993, 2007 289
290 DB2 Servers� �� �
�� B. DB2 � �� ��
DB2 � ��� �� �� ���� ��� ��� � ����.
v DB2 �� ��
– �� � (���, �� � � )
– DB2 ��� �� ���
– �� ���
– ���
v DB2 �
– PDF ��(���)
– PDF ��(DB2 PDF DVD)
– �� �
v � ���
– � ���
– ��� ���
�: DB2 �� ��� ��� PDF �� ��� ��� �� �����. �� �
�� ��� �� ��� �� ��� ����� ibm.com®�� DB2 �� ��� �
����.
ibm.com�� ��, �� IBM Redbooks �� �� �� DB2 � ��� �
� �� ��� � ����. DB2 �� � ���� ����� ���
http://www.ibm.com/software/data/sw-library/� ������.
�� ���
DB2 ��� �� ���� ����. DB2 ��� ���� � �� ��� ��
����� ��� [email protected]�� �� �� �����. DB2 �� �
��� ��� � ���� ��� � �� �� ����. ��� ��� � �
��� � ��� ��� ��� �� �� �������. �� �� �� ��� �
�� �� ���� ��� � , � URL� ������.
DB2 �� ��� ����� � �� � ��� ���� ����. ���� ��
� � �� DB2 � ���� �� � , �� ��� IBM ��� ��� ���
�����.
© IBM Corporation 1993, 2007 291
DB2 � ����(���� �� PDF ��)
�� � IBM Publications Center(www.ibm.com/shop/publications/order)�� �
�� � �� DB2 ����� �� ����. PDF ��� � DB2 � 9.5
�� � ��� �� www. ibm.com/ suppo r t / docv i ew .wss? r s=71
&uid=swg2700947�� ���� � ����.
� �� � �� �� �� �� � ��, �� �� �� ���� �� ��
��� � �� �� ����.
25. DB2 � ��
�� � �� ��
Administrative API Reference SC23-5842-00 �
Administrative Routines and Views SC23-5843-00 ��
Call Level Interface Guide and
Reference, Volume 1
SC23-5844-00 �
Call Level Interface Guide and
Reference, Volume 2
SC23-5845-00 �
Command Reference SC23-5846-00 �
Data Movement Utilities Guide and
Reference
SC23-5847-00 �
D a t a R e c o v e r y a n d H i g h
Availability Guide and Reference
SC23-5848-00 �
Data Servers, Databases, and
Database Objects Guide
SC23-5849-00 �
Database Security Guide SC23-5850-00 �
Developing ADO.NET and OLE
DB Applications
SC23-5851-00 �
Deve lop ing Embedded SQL
Applications
SC23-5852-00 �
Developing Java Applications SC23-5853-00 �
Deve lop ing Per l and PHP
Applications
SC23-5854-00 ��
Developing User-defined Routines
(SQL and External)
SC23-5855-00 �
Getting Started with Database
Application Development
GC23-5856-00 �
Linux Windows�� DB2 ��
� ���
GA30-3480-00 �
Internationalization Guide SC23-5858-00 �
Message Reference, Volume 1 GI11-7855-00 ��
Message Reference, Volume 2 GI11-7856-00 ��
�� ��� GA30-3479-00 �
292 DB2 Servers� �� �
25. DB2 � �� (��)
�� � �� ��
Net Search Extender Administration
and User’s Guide
�: � ��� ��� DB2 �� �
�� ���� ����.
SC23-8509-00 �
Partitioning and Clustering Guide SC23-5860-00 �
Query Patroller � ��� �
��
SA30-3539-00 �
IBM Data Server Clients� �� �
GA30-3482-00 ��
DB2 Servers� �� � GA30-3481-00 �
Spatial Extender and Geodetic
Data Management Feature User’s
Guide and Reference
SC23-8508-00 �
SQL Reference, Volume 1 SC23-5861-00 �
SQL Reference, Volume 2 SC23-5862-00 �
Sys tem Moni tor Guide and
Reference
SC23-5865-00 �
Text Search Guide SC23-5866-00 �
Troubleshooting Guide GI11-7857-00 ��
Tuning Database Performance SC23-5867-00 �
Visual Explain ��� SA30-3487-00 ��
�� �� SA30-3486-00 �
Workload Manager Guide and
Reference
SC23-5870-00 �
pureXML Guide SC23-5871-00 �
XQuery Reference SC23-5872-00 ��
26. DB2 Connect �� � ��
�� � �� ��
DB2 Connect Personal Edition�
�� �
GA30-3484-00 �
DB2 Connect Servers� �� � GA30-3485-00 �
DB2 Connect ��� ��� SA30-3483-00 �
27. Information Integration � ��
�� � �� ��
I n f o r m a t i o n I n t e g r a t i o n :
Administration Guide for Federated
Systems
SC19-1020-01 �
Information Integration: ASNCLP
Program Reference for Replication
and Event Publishing
SC19-1018-02 �
�� B. DB2 � �� �� 293
27. Information Integration � �� (��)
�� � �� ��
I n f o r m a t i o n I n t e g r a t i o n :
Configuration Guide for Federated
Data Sources
SC19-1034-01 ��
Information Integration: SQL
Replication Guide and Reference
SC19-1030-01 �
I n f o r m a t i o n I n t e g r a t i o n :
Introduction to Replication and
Event Publishing
SC19-1028-01 �
�� DB2 �� �
�� DB2 �� ��� � , ��� �� �� ��� � ��� � �� �
� ��� ����� ����. ���� �� ��� IBM ������ �� DB2
�� ��� � ����. DB2 PDF �� DVD� �� ���� �� ��
� ��� �� ������. �� �� DB2 ��� ��� � �� �� �
�� ��� � ����.
DB2 PDF �� DVD�� ��� � �� ��� DB2 �� �� �� IBM
�� ��� ��� � ����. ���� ��� �� IBM Publications Center�
� �� �� �� ��� �� ����. �� �� �� ���� �� ���
�����, ���� �� ��� IBM ������ �� DB2 �� ��� �
����. DB2 PDF �� DVD� � �� �� �� ��� �� �����
�.
�: �� �� ��� DB2 ��� http://publib.boulder.ibm.com/infocenter/
db2luw/v9r5� DB2 �� ���� �������.
�� DB2 �� ����� ��� �����.
v �� �� �� ���� �� DB2 �� �� �� ��� � ��� ���
� ��� http://www.ibm.com/shop/publications/order� IBM Publications Center
� � ����. � �� ��� ����� ��/��/��� ��� �� �
� ���� �� ����� �����.
v �� ��� IBM ������ �� DB2 �� ����� ��� ����
�.
1. �� � ��� � ���� �� �� ���� �� ��� ��� ����
�.
– www.ibm.com/planetwide� �� IBM �� ��� ��� ���
294 DB2 Servers� �� �
– http://www.ibm.com/shop/publications/order� IBM Publications � ���.
�� ��� �� � � ���� ����� �� ��, �� �� ��
� ��� ���. � ����� ″� ��� ��″ ��� �����.
2. ��� ��� � , ��� DB2 �� ������.
3. ����� ����� �� � �� ��� ������. �� �
�� ��� 292 ���� �DB2 � ����(��� �� PDF ��)�
� �����.
��� ����� SQL �� � � �
DB2� SQL�� ��� � �� �� �� SQLSTATE �� ����.
SQLSTATE ���� SQL �� SQL �� ��� ��� ��� ����.
SQL �� ���� ����� � ���� �� ��� ������.
? sqlstate or ? class code
���, sqlstate� �� 5�� ��� � SQL ���� class code� SQL ���
�� 2�� ��� ����.
�� ��, ? 08003� 08003 SQL ��� �� ���� ���, ? 08� 08 ��
� ��� �� ���� ����.
DB2 �� ��� �� ��� ���
DB2 � 9.5 ��� � DB2 �� �� URL� http://publib.boulder.ibm.com/
infocenter/db2luw/v9r5/���.
DB2 � 9 ��� � DB2 �� �� URL� http://publib.boulder.ibm.com/
infocenter/db2luw/v9/���.
DB2 � 8 ��� � 8 �� �� URL http://publib.boulder.ibm.com/infocenter/
db2luw/v8/� �����.
DB2 �� ���� ��� ��� �� �
DB2 �� ��� � � �� ��� ��� ��� �� � � ����. ��
� ��� ��� ���� �� � , DB2 �� ��� �� �� � � ��
��.
v Internet Explorer � ��� ��� ��� � � ���� ��� ���
��.
�� B. DB2 � �� �� 295
1. Internet Explorer�� � —> �� �� —> ��... �� ����. �
� �� �� �� ����.
2. ��� ��� �� �� � �� � �� ������ � ����.
– �� � ��� ����� ��... �� ����.
�: ��� ����� � �� ��� ��� � � ��� � ���
��� ���� �� ���.
– ��� � ��� ����, ��� ��� � ��� �� �� � �
� � � �� � �� �� ����.
3. � � ��� � � ���� �� �� ��� ��� DB2 �� ���
�����.
v Firefox �� Mozilla � ��� ��� ��� �� � � ���� ���
�����.
1. � —> �� —> �� �� ��� �� ���� �� ������. �
� �� �� �� ��� ����.
2. ��� ��� �� �� � �� � �� ������ � ����.
– �� � ��� ����� ��... �� �� �� �� ��� ���
�����.
– ��� � ��� ����, ��� ��� � ��� �� �� � �
� � � �� � �� �� ����.
3. � � ��� � � ���� �� �� ��� ��� DB2 �� ���
�����.
�� � � �� ���, ��� �� ��� ��� ���
��� ��� � �� ����.
��� �� ���� ��� ��� DB2 �� �� �
DB2 �� ��� ��� ��� � , IBM� �� ����� �� ��� ���
�� ��� � ����.
��� ��� DB2 �� ��� ����� ��� �����.
1. � ��� DB2 �� ��� ��� � ��� ��� �� �����. ��
� ��� �� ��� ��� ���� ����� ��� �� ���� �
� ��� ��� � ���� ��� ����� �� � ����.
2. � ��� �� ���� � ��� �� ��� ������. ���� ��
��� �� � , �� ��� ���� ��� ��� � ����.
296 DB2 Servers� �� �
�: ��� ���� �� ��� DB2 �� �� ����� ���� � ,
��� ��� ��� ���� �� ���� �� �� ���� ��� DB2
�� ��� �����. ���� �� �� ����� ����� ���� �
� � �� �� ���� ��� ����� �� ���� ���� ��� �
�� ��� � � �� ��� � � �� � ����.
�� ���� �� ���� �� ��� ���� ���� �������. �
�� �� ��� ��� ���� ��� � ����.
3. ��� �� ��� ��� � � ��� DB2 �� ��� ������.
�: Windows Vista��� ��� � ��� �� �� ���. �� �
� ���� � � �� �� ��� ��� ���� �� � � ���
�� � � ���� ��� ������.
� � �� ��� �� ��� DB2 �� ��� ����� ��� ����
�.
1. DB2 �� ��� ������.
v Windows��� �� → ��� → �� � → ���� ����. �� ��
DB2 �� �� ���� � � ��� �� � � �� ������.
v Linux��� �� �� ������.
/etc/init.d/db2icdv95 stop
2. ��� ��� �� ��� �����.
v Windows ���:
a. � �� ����.
b. �� ��� ��� ��� �����. DB2 �� ��� <Program
Files>₩IBM₩DB2 Information Center₩Version 9.5 ���� �� �
����. ��� <Program Files>� ��� �� ���� ��� �
���.
c. �� ����� doc₩bin ���� �����.
d. ��� �� help_start.bat ��� �����.
help_start.bat
v Linux ���:
a. �� ��� ��� ��� �����. DB2 �� ��� /opt/ibm/
db2ic/V9.5 ���� �� �����.
b. �� ����� doc/bin ���� �����.
c. ��� �� help_start ����� �����.
help_start
��� �� ��� ��� �� ���� �� � � �� ����.
�� B. DB2 � �� �� 297
3. �� �( )� ����. �� ��� ��� ���� �� ��� ���
�. �� ��� �� �� ����.
4. ��� ���� ���� ���� ���� ��� � �� ��� �
���.
5. ��� �� ���� ���� ��� ����.
6. ��� �� ��� ������.
v Windows�� �� ���� doc₩bin ���� �� � ��� ��
help_end.bat ��� �����.
help_end.bat
�: help_end ���� ���� help_start ���� ��� �� ����
���� ���� � ��� �� ���� ����. help_start.bat� ��
�� � Ctrl-C �� �� ���� ���� ����.
v Linux�� �� ���� doc/bin ���� �� � ��� �� help_end
����� �����.
help_end
�: help_end ������ help_start ����� �� ���� ����
���� � ��� �� ���� ����. help_start ����� ����
� �� ���� ���� ����.
7. DB2 �� ��� ������.
v Windows��� �� → ��� → �� � → ���� ����. �� ��
DB2 �� �� ���� � � ��� �� � � ��� ������.
v Linux��� �� �� ������.
/etc/init.d/db2icdv95 start
��� DB2 �� ���� �� ��� ��� ����.
DB2 ���
DB2 ���� DB2 ��� ��� �� �� ���� � �����. � ���
� ����� �����.
��� ��
http://publib.boulder.ibm.com/infocenter/db2help/� �� ���� XHTML �� �
��� � ����.
�� ����� �� ���� ��� �����. �� ���� �� ��� �
� ���� �����.
298 DB2 Servers� �� �
DB2 ���
���� ��� � � ����.
�pureXML™�(pureXML Guide)
XML ���� ���� �� XML ��� ���� �� � ���
� DB2 ������� ������.
Visual Explain ���� �Visual Explain�
Visual Explain� ���� ��� ���� � ��� SQL�� ��, �
� ����.
DB2 �� � ��
DB2 �� �� ��� �� ���� ��� �� �� � �� ��� ���
�.
DB2 �
��� �� ��� DB2 ��� �� ��� �� DB2 �� ��� ��
��� �� ��� ����. DB2 � �� ����� ���� ���
� ��� ��� ��, � �� �� �� ���� �� ���
DB2 ���� �� � �� ���� ���� ��� �� �� ����
� �� ��� ����.
DB2 �� �� ���
���� �� � � ���� ���� DB2 � �� � ����
�����. � �� ����� �� DB2 �, ��, APAR(Authorized
Program Analysis Report �� � ��), FixPack �� ��� �� �
�� ����. ��� � ��� ��� ��� �� ��� ���� �
� � ����.
http://www.ibm.com/software/data/db2/udb/support.html�� DB2 � ��
� ���� ������.
��
�� �� �� � ��� ��� � ����.
�� ��: � ��� ��� ��� � � ��� ��� � ��� � ,
��� ��� ��� � ����. ��� IBM� � � �� � �� ��
� ��� �� �� ����� 2� ��� �� � ����.
�� B. DB2 � �� �� 299
��� ��: � ��� ��� ��� � � ��� ��� � ��� �� �
�� ���� ��, �� ��� � ����. ��� IBM� � � �� �
��� 2� ��� ���� � �� �� � ��� ��, �� �� �� � �
����.
� ���� ��� ��� � � ����, � ��� � ��� ��� ��, �
��, ����� �� �� � ���� �� ��� ��� ���� �� ���
� �� ���� ���� ����.
IBM� � ��� ��� IBM� ��� ���� ���� ��� ��� ����
� ���� ���� ��� � ���� � ����� ��� ��� ��� �
����.
�� ��� � ��� ���� � � ��� �" ��� ��� ���
� � �� ��� � ��� ���, �� �� ���� � ����.
IBM� � ��� ��� �� ��� ��� ���� ����. � ��� ���,
�� ��� �� �� ��� �� �� ��� ����(, �� ���
��) ��� ���� ��� �� �� ″�����″ �����.
300 DB2 Servers� �� �
�� C. ���
� ��� ���� ���� �� ������ �� ����.
IBM� �� ���� � �� �� ��, ��� �� ��� ���� �� ��
����. �� ��� � �� �� ���� �� ��� �� IBM �����
������. � ��� IBM ��, ��� �� ���� ����� �� �� IBM
��, ��� �� ����� ��� � ��� �� ����� ����. IBM�
� ���� ���� �� �, ����� �� ��, ��� �� ���� �
� ��� �� ����. ��� �IBM ��, ��� �� ���� � ��
�� ��� ���� �����.
IBM� � ��� ��� �� �� ��� �� ��� ���� ��� �� ��
�� �� � ����. � �� ����� �� ��� �� ����� ����
�� ���. ����� �� ����� ���� ������.
135-270
���� ��� �! 467-12, � �����
�� �.�. ����
������
����: 080-023-8080
2���(DBCS) ��� � ���� ��� �� IBM ������� �����
�� ��� �� ����� ����.
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan
�� �� ��� ���� �� �� ���� ���� ����. IBM�
� � �� ���, ��� �� �� ��� �� �� ��� ����
(, �� ��� ��) ���� ��� ��� �� ���� � �� ���
���� �����. �� ����� �� ���� � �� �� ��� ��
��� ���� ����, � ��� ��� �� �� ����.
� ���� ��� ���� ���� ��� �� �� � ����. � �
�� ���� ����, ��� ��� ���� �����. IBM� � ��� �
� �� /�� ���� �� �� �� ���� �� /�� ��� � ��
��.
© IBM Corporation 1993, 2007 301
� ��� �IBM � ��� ��� �� �� �� �� �����. IBM� �
���� �, �� �� �� � �� � �IBM � ��� �� �� ��
��� �� �, �� �� ���� ����. �IBM � ����� ��� IBM
� ��� � ��� �� ���� ��� �� ��� ����� �� ���� �
���. �� IBM ����� �� ��� � �����(�� ��� �� �� �
�� �����) IBM� �� ��� ��� ��� ���� �� �� ����
����. ��� IBM� ��� �� ��� �� ��� ��� �� ���� ��
�, ��� ��� �� ���� ��� � �� ���, ���, �� �� �� ��
� �� �� ��� ��� �� ��� � �� ����. �� ��� ���
������ �� ������ ��� ���� �� ����.
IBM� ��� ��� ���� �� �� ��� ���� ���� ���� ��
� ��� ��� ����� ��� � ����.
(i) ���� �� ���� �� ���(� ��� ��) � �� ��
(ii) ��� ��� �� ��� �� � ���� � ��� ��� �� �
��� ���� �� ��� ������.
135-270
���� ��� �! 467-12, � �����
�� �.�. . ����
������
��� ��� �� �(�� ��, ��� �� �)��� �� � ����.
� ��� �� ����� ��� ��� ���� �� �� ��� �
����� ��� ��� IBM� IBM �� ��, IBM ��� ���� ��(IPLA)
�� �� �� ��� �� ��� ����.
� ��� ��� � �� ���� ��� ���� ��� ����. ��� ��
���� ��� ��� ��� �� � ����. �� ��� � �� ��
��� ���� � ���, ��� ��� ��� ���� ���� �� ��
���� ��� ��� ����� ��� � ����. �� �� ��� ���
�� � ��� �� ���� �� ��� �� � ����. � �� ���� ��
���� � � �� ���� ��� ���.
�IBM ��� � ��� �� ��� ����, �� �� �� �� �� �� �
���� �� ����. IBM��� ��� ���� ���� �����, �IBM
��� �� ��� ���, ��� �� �� �� ���� ��� � ����.
�IBM ��� ��� �� ����� �� ��� ����� ������.
IBM� ���� �� �� ��� � � ��� �� �� �� �� � �
���.
302 DB2 Servers� �� �
� ���� ��� ���� �� ���� �� ���� �� ��� ��
����. �� ���� ��� ��� ���� ��� ��� � , ��, �
��� ��� �� � ����. �� ��� � ��� ��� �� ��� ��
��� ������ �� ��� ����.
�� ����:
� ���� �� ����� ����� ��� ���� �� ��� � �
� ������ �� ����. ��� ��� �� ���� � ��� �
��� ����� ����� ����(API)� ���� ������ �
, ��, �� �� ��� �� �� ���� �� �� ���� ��� �
��� ��, �� ��� � ����. ��� �� ���� � � ���
��� ��� �� ���. ��� IBM� ��� ���� ���, ��� �
�� �� ��� ����� ��� ����.
��� �� ��� �� �� ��� � ���� ���� ��� ��� �� �
� �� ���� ���.
© (��� ��) (��). � ��� ��� IBM Corp.� �� ����� ���
��. © Copyright IBM Corp. _enter ��_. All rights reserved.
��
DB2 � 9.5 �� ���� ���� ��� ��, �� �� ��� ���
IBM(International Business Machines) Corporation �� �� ��� � �� �
�����. �� �� �� ���� ���� IBM Corporation� �� �� �
�� http://www.ibm.com/legal/copytrade.shtml� ����.
�� ��� �� ��� � �� �����, DB2 �� ����� �� ��
� ��� ���� �����.
Microsoft, Windows, Windows NT® Windows ��� �� �� �� ����
���� Microsoft Corporation� ����.
Intel, Intel ��, Intel Inside® ��, Intel Centrino®, Intel Centrino ��, Celeron®,
Intel Xeon, Intel SpeedStep®, Itanium Pentium� �� �� �� ���� ��
�� Intel Corporation� ����.
Java � Java �� �� �� �� �� ���� ���� Sun Microsystems,
Inc.� ����.
UNIX� �� �� �� ���� ���� Open Group� ������.
Linux� �� �� �� ���� ���� Linus Torvalds� ������.
�� C. ���� 303
Adobe®, Adobe ��, PostScript® PostScript ��� �� �� �� ���� �
��� Adobe Systems Inc.� ��� �� ����.
�� ��, �� ��� ��� �� ��� � �� ������.
304 DB2 Servers� �� �
��
�����
�� �� 228, 296
DB2 �� �� 228, 296
����
�� �� �� 207
db2nodes.cfg(UNIX) 207
rhosts �� 211
��
��� �� � 149
�� ����
�� DB2 ��� �� 245
�� DB2 ��� �� 246
�� ����
fcm_num_buffers 38
���� ulimit �� 47
�
password 27
��
ID � 45, 149
�� ���� �� �
DB2 ���� 197
�������
DB2 �� ���, �� 113
��
FCM �(UNIX) 42
�� �� ��
��(UNIX) 207
� 201
������ �
�� 182
��� ��
DB2 ��� �� 133
������
���� �� 95
������ � ��� ��
��
TCP/IP �� 252
������ � 3
������ ��� �
��
� �� 106
�� ��(UNIX) 209
������ ��� � �� 97
���
� 295
SQL�� �� 295
���
�� �� �� 109
��� � 86
Linux 173
Windows 169
��� ���
��
Windows .NET 39
�
�� ��
�� �� � 227
�� ����
Linux 11
UNIX 11
Windows 11
� �� ��
Windows 8
� DB2 ��
�� � �� 183
� IBM ������ ����� ���� ��
�� � �� 183
�������
�� 257, 258
����� 257
� 256
�� ��� 260
���� ��
�� ��� 260
���� �� 255
© Copyright IBM Corp. 1993, 2007 305
���� �� (��)
�� �� 260
�����
�� � 99
���
���� 6
�� �� ��
��� ��� 91
�� �� �� ��
��� ��� 91
�� �� 86
��� � 86
��� 86
�� ��
�� 267
�� 267
��
�, UNIX�� �� 211
��
���� �� �� �
DB2 �� 159
�����
CD �� DVD
AIX 67
HP-UX 68
Solaris �� 69
CDs �� DVD
Linux 68
�� ����
Linux 11
UNIX 11
Windows 11
��� �
FCM(Fast Communications Manager) 38
�
�� � �� 211
db2fs 178
db2idrop 267
db2ilist 266
db2licm 258
db2nchg 35
db2osconf 49
db2sampl 166
db2secv82 181
db2setup 6
� (��)
db2start 38
db2stop 266
db2_deinstall 268
doce_deinstall 268
FORCE APPLICATION 266
� ���(CLP)
�� � 166
��
�� � 299
�� �� �� 217
PDF �� �� 292
�� �� 291
��� �
�� �� 299
��� 299
��� ��
�� �� 299
��� 299
�����
FixPack 281
��
Windows � �� �� 8
�� 44
��� �� 181
�� ���
�� 45, 149
��� �� 86, 87, 90
��� � 86
�� �� �� �� 91
�� �� 272
��� 86
�� 87
FixPack 200
ulimit �� 47
��� ��
�� 272
�� 272
�����
������ ��� ��(UNIX) 209
�� �� �
UNIX 213
306 DB2 Servers� �� �
��� ��
���� � 255
���� ��
DB2 ���� � 257
���� ����� 257
DB2 ���� �� �� 259
���
���� DB2 � �
AIX 151
HP-UX 153
Linux 154
Solaris �� 155
��� ��
�� 181
DB2ADMNS 181
DB2USERS 181
��� ��
��� ���(Windows) 29
�� ���(Windows) 29
DB2 Administration Server(Windows) 29
��� ��
Windows 37
��� �� ���� 47
��� ID
� 45, 149
��
�� �� 267
��� �� 272
Firefox � � ���� 180
��
� �� 120
�� ������
��� � 165
� 165
�
� �� �� 116
��� ��
��
TCP/IP �� 253
��
��� � 182
�� 178
�� � 182
LANG �� �� 6, 8
��
�� DB2 �� 41
������ ��� � 56
� �� 106
�� (��)
���
UNIX 3
Windows 3
�
�� �� 177
DB2 ���� ���� 145
db2_install 141, 223
doce_install 141, 223
����(Solaris ��) 24
�� ���(Linux) 19
�� ���(Solaris ��) 24
�� ���(Windows) 14
� �� 108
� �� 107, 119
�� 101
SMS(Microsoft Systems Management Server) 115
� �� �� 101
����� �(AS) 238
� 103, 108
���
AIX 16
Linux 19
Solaris �� 24
Windows 14
���(AIX) 16
���(HP-UX) 17
���(Linux) 19
���(Windows) 14
�� �� 217, 219, 221
�� �� 197
���� ����(Solaris ��) 24
���� ���(Linux) 19
���� ���(Windows) 14
DB2 ������ ��� ��(Windows) 29
DB2 �� ��� ��� 132
DB2 ��
� 157
� ��� ��� �� 139
Java ���� 14
Java ���(AIX) 16
S/390� Linux� DB2 44
Windows �� �� 33
�� ���� 44
�� �� 281
��� 272
� �� 264
����� �(AS) 283
307
�� �� (��)
DB2 ������
Windows 263
DB2 �� 273
FixPack 281
IBM ������ ����� ���� �� 273
��
�� ����(HP-UX) 48
�� ����(Linux) 49
�� ����(Solaris) 51
��� �� ��
DB2 ������
Windows 38
�
����� �(AS)
��� 240
�����
� 27
��
�� ID� DB2 �� ��� 6
�����
32�� DB2 �� 182
64�� DB2 ��� 182
DB2 �� ���
Linux UNIX 135
Windows 136
���
�� DB2 ��� ���� IBM ��� � ����� 195
��� ��
DB2 ������ 40
�
� �� � �� 107, 119
����
ulimit 47
��
���
AIX 16
HP-UX 17
Linux 19
Solaris 24
Windows 14
� ��
� ������� �� 116
� ��
� 240
����
� �� �� ��� 118
� �� �� 97
���� �� 120
� ��
�� 101
�� ���� ���� 133
�� ���� ��� 133
�� 120
�� ���
�� 118
��
������ ��� � 106
�� 101
DB2 ��� �� ���� ��� 108
DB2 ��� �� 134
db2cli.ini �� 118
Linux UNIX 105
SMS �� 115
UNIX 103
Windows 108
�� � 110
�� � �� 107, 119
�� 101, 102
�
DB2 �� �� 102
UNIX 104
Windows 109
��� 120
DB2 �� �� �� 264
����� �(AS)
�� 238
�� �� 283
�
��� 240
�� 234
�� 283
DB2 ��� ����� �(EAS)
�� 237
����
���� 133
�� �
�� 294
��
�� 266
��� 271
�� 267
308 DB2 Servers� �� �
�� (��)
�
db2icrt �� 158
�� 267
�� 266, 271
���� �� 6
��
UNIX 8
Windows 8
���� ��
� �� �� 120
���
���� 133
������
db2setup � 6
� �� 103, 108
� �� �� 101
��� 120
� �� �� 264
���
��� �� ��� � 299
Visual Explain 298
�
�� ������ 165
� ��
DB2 �� �� 102
rhosts �� 211
SMS ��� ��� 113
��
����� �(AS) 234
�� ��
�� 228, 296
�� ��� �� 295
� 295
�� 217, 219, 221
�� �� � � 227
�� �� � �� 227
��
����� �(AS) 283
DAS 266
DB2 ������
Windows 263
DB2(��)
Linux 265
UNIX 265
�� (��)
DB2(���)
UNIX 271
FixPack 281
�� ��
DB2 � �� �� 247
�
� �� 299
���� 301
���� �
���� 178
�
DB2 �� 165
Firefox ���� �� 180
��� ��
TCP/IP �� 253
�� �� ����
��(HP-UX) 49
��(HP-UX) 48
��(Linux) 49
��(Solaris) 51
db2osconf �(HP-UX) 49
�� ���
���� 6
����� ���
�� DB2 �� �� 195
�����
�� 42
FCM(Fast Communication Manager) 42
�� ����
��
�� DB2 ��� �� 245
�� DB2 ��� �� 246
��, DB2 ��� �� 249
�� �
��� 182
309
����� �
� 42
db2fcmr � 42
db2fcms � 42
�� ���
���� DB2 � � 56
Linux 61
Solaris �� 62
��� ������ �
�� 167
�� �
Windows 167
���� ������ ��
� ��, UNIX�� � 168
�� 95
�� ��
�� �� ���
Windows 40
�� ��
�(UNIX) 209
�� ���
UNIX 55
�� �� �� ��� 40
UNIX 209
����
���� 133
��� 133
�������
���
AIX 16
HP-UX 17
Linux 19
Solaris �� 24
Windows 14
��
��� �� 87
�
����� �� 99
�� ��
UNIX�� �� ��� 55
Windows�� �� ��� 40
DB2 ��
� � �� 165
AAIX
��
DB2 � 81
�� ���� 16
�� ��� 16
�
�� ���, ���� DB2 � ��� 151
DB2 � �� ���, ���� ������ ���� 56
���� ��� 16
�
NFS� � � 65
�� ��� �� 51
CD �� DVD �� 67
ESE ������ � �� 54
CCD
��
Linux 68
CD-ROM
��
AIX 67
HP-UX 68
Solaris �� 69
DDB2
��� 6
�� �� ��
Linux 266
UNIX 266
��� �� ��
UNIX 271
��
�� � 166
� 157
FixPack � 197
UNIX 3
Windows 3
�� ��� 3
���� �� 6
��(��)
Linux 265
UNIX 265
310 DB2 Servers� �� �
DB2 (��)
��(���)
UNIX 271
�� ��� 6
���� ��
AIX �� ��� �� 51
Administration Server ��
Linux 265
UNIX 265
DB2 Administration Server(DAS)
� 157
�� 266
�� 265
DB2 Enterprise Server Edition
��
Windows 35
DB2 ��
� 3
IBM ��� � ����� 3
DB2 ����
���� �� 145
DB2 ��
UNIX 42
DB2 ������
��� ��(Windows) 29
�� �� 263
��� �� 40
�� 263
zSeries� Linux�
�� 44
DB2 ������ ��
��� �
Linux 173
Windows 169
DB2 ���� ��
��
���� �� �� 259
db2licm � �� 258
DB2 ���� �
�� 258
���� �� �� 257
DB2 �� ��
�� 267
DB2 ��� ��
�� 272
DB2 �� 41
� � � �� 74
�� �� 273
DB2 �� (��)
�� � � �� �� 183
���� 74
��� 74
DB2 ���
UNIX 42
DB2 �
�� ����(AIX) 16
�� ����(HP-UX) 17
�� ����(Linux) 19
�� ����(Solaris ��) 24
�� ����(Windows) 14
��� �� � �� 149
�
�� ID 45, 149
��� ID 45, 149
����
Windows �� �� 35
���� ��� 17
Linux �� UNIX� �� 81
Windows �� 72
DB2 � ��
��
�� �� �� 247
DB2 ���
Windows 29
DB2 � �� 294
DB2 ��
�
� � �� 165
DB2 �� ��
�� ID 6
� �� � 102
DB2 � ��
Linux 82
UNIX 82
DB2 �� ���
�� ���� ��� ��� ������ ��� 132
DB2 �� ��
SMS� ��� 112
DB2 �� ���
��
����� 113
DB2 ��� �� �� 38
DB2 ��
��
UNIX 3
Windows 3
311
DB2 �� (��)
�� ��� 3
DB2 ��
��
TCP/IP �� 160, 251
�� 266
��� 271
�� 266, 271
�� ���� �� 249
DB2 �� ��
�� 228, 296
�� ��� �� 295
� 295
�� 217, 219, 221
DB2 ��
��
db2_install � �� 141, 223
doce_install � �� 141, 223
SMS �� 111
� ��� ��� �� �� 139
��� ��
�� �� 177
��
�� �� 177
Linux 268
UNIX 268
DB2 �� ���
����� 135, 136
DB2 �� ����
� 256
DB2 �� ��
��� ���� 90
DB2 �� �� 289
DB2 �� SDK �� 12
DB2 ��� �� Java ����� �� 12
DB2 ��
�� � 159
DB2 ��� �� 289
DB2 ���
��
��� �� � 133
� �� �� �� 134
DB2 � �� ���
���� ������ ��� 56
AIX 56
HP-UX 59
DB2ADMNS
��� �� 181
db2cli.ini ��
� �� ��� �� �� 118
db2fcmr �
� 42
db2fcms �
� 42
db2icrt �
�� � 158
db2iupdt �
32�� DB2 �� ����� 182
db2licm �
���� � 255
���� �� 258
�� ��� 260
DB2 ���� �� �� 258
db2nodes.cfg �� 201, 207
���� �� �� 35
db2osconf � 49
db2rfe 87, 91
db2setup
�� �� 6
�
��� 6
DB2USERS
��� �� 181
DB2WebServices �����
�� 233
�� �� 283
db2_deinstall � 268
db2_install � 141, 223
doce_deinstall 268
doce_install � 141, 223
DPF(Database Partitioning Feature)
�� ��(UNIX) 209
DVD
��
AIX 67
HP-UX 68
Linux 68
Solaris �� 69
EESE ����� 54
312 DB2 Servers� �� �
FFCM(Fast Communication Manager)
�� 38
������ ��� � �� �� 209
��� � 38
�� �� 209
�� �� 40
FCM(Fast Communications Manager) 38
Windows 38
fcm_num_buffers �� ���� 38
Firefox
� � ���� �� 180
FixPack 281
�� 281
��� �� 200
�� �� 281
� 197
�� 281
HHP-UX
��
DB2 � 81
�� ���� 17
��
�� ���� 48
�� ��� 17
�
�� ���, ���� DB2 ��� 153
DB2 � �� ���, ���� ������ ���� 59
�� �� ���� 49
���� ��� 17
�
NFS� � � 65
CD �� DVD �� 68
IIBM ��� � ����� 3
�� ����(AIX) 16
�� ����(HP-UX) 17
�� ����(Linux) 19
�� ����(Solaris ��) 24
�� ����(Windows) 14
IBM ������ ����� ���� ��
�� �� 273
IBM ������ ����� ���� �� (��)
�� � � �� �� 183
JJava
DB2 ��(HP-UX)
��� 17
Java� SDK(Software Development Kit)
DB2 �� �� 12
LLANG �� ��
�� 6, 8
Linux
��
DB2 � 81
DB2 �� ���� ��� DB2 � 82
�� ���� 19
��
�� ���� 49
�� ��� 19
� �� �� 103, 105
�
���� DB2 �� �� �� ��� 154
���� DB2 �� �� ��� 61
��
DB2 �� �� 267
DB2 �� 268
DB2(��) 265
���� ��� 19
�
NFS� � � 65
CD �� DVD �� 68
DB2 ������ ��
zSeries� 44
Linux ����
libaio.so.1 19
libstdc++so.5 19
NNFS(Network File System)
� 65
313
Rrhosts ��
�� 211
� 211
rsh 211
SSMS(Systems Management Server)
DB2 �� �� ��� 112
DB2 �� �� 111
SMS �� ��� � 113
Solaris
��
DB2 � 81
��
�� ���� 51
�
NFS� � � 65
Solaris ��
�� ���� 24
�� ��� 24
�
�� ���, ���� DB2 � 62
�� ���, ���� DB2 � 155
���� ��� 24
CD �� DVD �� 69
SQL�
��� � 295
ssh 211
SYSADM
Windows 38
sysadm_group �� ���� 38
S/390
Linux� DB2 ������ �� 44
TTCP/IP
��
������ � ��� �� �� 252
��
DB2 �� 160, 251
��
��� �� �� 253
Uulimit �� 47
UNIX
�� �� �� �� 207
� �� �� 209
��
�� � 211
�� �� � 213
��
DB2 �� ���� ��� DB2 � 82
� �� �� 103, 105
� �� � 104
��
�� �� 177
DB2 �� �� 267
DB2 ��� �� 272
DB2 �� 268
DB2(��) 265
DB2(���) 271
���� ������ � �� � 168
DB2 �� 42
DB2 ��� 42
DB2 ���� �� �� 8
VVisual Explain
��� 298
WWindows
��
DB2 � 71
Windows �� ��
DB2 �� �� 33
Windows ��
�� �� ��� �� 109
��� ��� ��
Windows Server 2003 39
� �� �� �� 8
��� �� �� 37
��
�� �� 33
DB2 �� ���� ��� DB2 � 72
�� ���� 14
�� ��� 14
314 DB2 Servers� �� �
Windows �� (��)
� ��
�� 108
SMS 115
�
� �� 109
����� ������� �� � 110
���� ��� 14
�
��� ������ � �� 167
DB2 ������ 263
DB2 ��� �� 29
DB2 ��� 29
DB2 ��� �� �� 38
FCM(Fast Communications Manager) 38
ZzSeries
Linux� DB2 ������ �� 44
315
316 DB2 Servers� �� �
���
GA30-3481-00
Spine information:
DB2 �� 9.5 Linux, UNIX � Windows� �� 9 ��� 5 DB2 Servers� �� �� ���