本文发表在 rolia.net 枫下论坛刚完成了DB2的安装,呵呵,是新手,花了不少时间,发现AIX 5.3的第4张盘上的DB2安装进去以后无法使用...只能去download了一个Trial版本,经测试一切正常
----------------
db2inst1:/home/db2inst1 > ps -ef|grep db2
db2inst1 23606 41130 0 22:37:39 - 0:00 db2tcpcm 0
db2inst1 24490 41130 0 22:37:44 - 0:05 db2hmon 0
db2inst1 27092 41130 0 22:37:39 - 0:00 db2ipccm 0
root 27592 41130 0 22:37:39 - 0:00 db2ckpwd 0
db2inst1 29220 1 0 22:54:36 - 0:00 /home/db2inst1/sqllib/bin/db2bp 52238A108 5 A
db2inst1 37332 41130 0 22:37:39 - 0:00 db2tcpcm 0
dasusr1 39758 1 0 22:36:13 - 0:00 /home/dasusr1/das/adm/db2dasrrm
db2inst1 41130 50974 0 22:37:39 - 0:00 db2sysc 0
dasusr1 43932 1 0 22:36:39 - 0:00 /home/dasusr1/das/bin/db2fmd -i dasusr1 -m /home/dasusr1/das/lib/libdb2dasgcf.a
db2inst1 44906 52238 2 22:57:29 pts/6 0:00 grep db2
root 47856 41130 0 22:37:39 - 0:00 db2ckpwd 0
db2inst1 48118 49362 0 22:37:44 - 0:00 db2spmlw 0
root 48726 1 0 22:36:39 - 0:00 /usr/opt/db2_08_01/bin/db2fmcd
db2inst1 49362 41130 0 22:37:39 - 0:00 db2gds 0
db2inst1 50192 41130 0 22:37:40 - 0:00 db2resync 0
root 50974 1 0 22:37:38 - 0:00 db2wdog 0
db2inst1 51582 49362 0 22:37:40 - 0:00 db2srvlst 0
root 51920 41130 0 22:37:39 - 0:00 db2ckpwd 0
db2inst1 52094 41130 0 22:37:40 - 0:00 db2spmrsy 0
db2inst1 52238 28276 1 22:54:11 pts/6 0:00 -ksh
db2inst1 52866 27092 0 22:47:48 - 0:00 db2agent (idle) 0
db2inst1 53208 27092 0 22:37:52 - 0:05 db2agent (idle) 0
db2inst1 55988 27092 0 22:47:47 - 0:59 db2agent (idle) 0
db2inst1 58318 52238 12 22:57:29 pts/6 0:00 ps -ef
db2inst1:/home/db2inst1 > db2 connect to sample
Database Connection Information
Database server = DB2/6000 8.2.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
db2inst1:/home/db2inst1 > db2 "select * from staff";
ID NAME DEPT JOB YEARS SALARY COMM
------ --------- ------ ----- ------ --------- ---------
10 Sanders 20 Mgr 7 18357.50 -
20 Pernal 20 Sales 8 18171.25 612.45
30 Marenghi 38 Mgr 5 17506.75 -
40 O'Brien 38 Sales 6 18006.00 846.55
50 Hanes 15 Mgr 10 20659.80 -
60 Quigley 38 Sales - 16808.30 650.25
70 Rothman 15 Sales 7 16502.83 1152.00
80 James 20 Clerk - 13504.60 128.20
90 Koonitz 42 Sales 6 18001.75 1386.70
100 Plotz 42 Mgr 7 18352.80 -
110 Ngan 15 Clerk 5 12508.20 206.60
120 Naughton 38 Clerk - 12954.75 180.00
130 Yamaguchi 42 Clerk 6 10505.90 75.60
140 Fraye 51 Mgr 6 21150.00 -
150 Williams 51 Sales 6 19456.50 637.65
160 Molinare 10 Mgr 7 22959.20 -
170 Kermisch 15 Clerk 4 12258.50 110.10
180 Abrahams 38 Clerk 3 12009.75 236.50
190 Sneider 20 Clerk 8 14252.75 126.50
200 Scoutten 42 Clerk - 11508.60 84.20
210 Lu 10 Mgr 10 20010.00 -
220 Smith 51 Sales 7 17654.50 992.80
230 Lundquist 51 Clerk 3 13369.80 189.65
240 Daniels 10 Mgr 5 19260.25 -
250 Wheeler 51 Clerk 6 14460.00 513.30
260 Jones 10 Mgr 12 21234.00 -
270 Lea 66 Mgr 9 18555.50 -
280 Wilson 66 Sales 9 18674.50 811.50
290 Quill 84 Mgr 10 19818.00 -
300 Davis 84 Sales 5 15454.50 806.10
310 Graham 66 Sales 13 21000.00 200.30
320 Gonzales 66 Sales 4 16858.20 844.00
330 Burke 66 Clerk 1 10988.00 55.50
340 Edwards 84 Sales 7 17844.00 1285.00
350 Gafney 84 Clerk 5 13030.50 188.00
35 record(s) selected.
db2inst1:/home/db2inst1 > db2 connect reset
DB20000I The SQL command completed successfully.
db2inst1:/home/db2inst1 >更多精彩文章及讨论,请光临枫下论坛 rolia.net
----------------
db2inst1:/home/db2inst1 > ps -ef|grep db2
db2inst1 23606 41130 0 22:37:39 - 0:00 db2tcpcm 0
db2inst1 24490 41130 0 22:37:44 - 0:05 db2hmon 0
db2inst1 27092 41130 0 22:37:39 - 0:00 db2ipccm 0
root 27592 41130 0 22:37:39 - 0:00 db2ckpwd 0
db2inst1 29220 1 0 22:54:36 - 0:00 /home/db2inst1/sqllib/bin/db2bp 52238A108 5 A
db2inst1 37332 41130 0 22:37:39 - 0:00 db2tcpcm 0
dasusr1 39758 1 0 22:36:13 - 0:00 /home/dasusr1/das/adm/db2dasrrm
db2inst1 41130 50974 0 22:37:39 - 0:00 db2sysc 0
dasusr1 43932 1 0 22:36:39 - 0:00 /home/dasusr1/das/bin/db2fmd -i dasusr1 -m /home/dasusr1/das/lib/libdb2dasgcf.a
db2inst1 44906 52238 2 22:57:29 pts/6 0:00 grep db2
root 47856 41130 0 22:37:39 - 0:00 db2ckpwd 0
db2inst1 48118 49362 0 22:37:44 - 0:00 db2spmlw 0
root 48726 1 0 22:36:39 - 0:00 /usr/opt/db2_08_01/bin/db2fmcd
db2inst1 49362 41130 0 22:37:39 - 0:00 db2gds 0
db2inst1 50192 41130 0 22:37:40 - 0:00 db2resync 0
root 50974 1 0 22:37:38 - 0:00 db2wdog 0
db2inst1 51582 49362 0 22:37:40 - 0:00 db2srvlst 0
root 51920 41130 0 22:37:39 - 0:00 db2ckpwd 0
db2inst1 52094 41130 0 22:37:40 - 0:00 db2spmrsy 0
db2inst1 52238 28276 1 22:54:11 pts/6 0:00 -ksh
db2inst1 52866 27092 0 22:47:48 - 0:00 db2agent (idle) 0
db2inst1 53208 27092 0 22:37:52 - 0:05 db2agent (idle) 0
db2inst1 55988 27092 0 22:47:47 - 0:59 db2agent (idle) 0
db2inst1 58318 52238 12 22:57:29 pts/6 0:00 ps -ef
db2inst1:/home/db2inst1 > db2 connect to sample
Database Connection Information
Database server = DB2/6000 8.2.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
db2inst1:/home/db2inst1 > db2 "select * from staff";
ID NAME DEPT JOB YEARS SALARY COMM
------ --------- ------ ----- ------ --------- ---------
10 Sanders 20 Mgr 7 18357.50 -
20 Pernal 20 Sales 8 18171.25 612.45
30 Marenghi 38 Mgr 5 17506.75 -
40 O'Brien 38 Sales 6 18006.00 846.55
50 Hanes 15 Mgr 10 20659.80 -
60 Quigley 38 Sales - 16808.30 650.25
70 Rothman 15 Sales 7 16502.83 1152.00
80 James 20 Clerk - 13504.60 128.20
90 Koonitz 42 Sales 6 18001.75 1386.70
100 Plotz 42 Mgr 7 18352.80 -
110 Ngan 15 Clerk 5 12508.20 206.60
120 Naughton 38 Clerk - 12954.75 180.00
130 Yamaguchi 42 Clerk 6 10505.90 75.60
140 Fraye 51 Mgr 6 21150.00 -
150 Williams 51 Sales 6 19456.50 637.65
160 Molinare 10 Mgr 7 22959.20 -
170 Kermisch 15 Clerk 4 12258.50 110.10
180 Abrahams 38 Clerk 3 12009.75 236.50
190 Sneider 20 Clerk 8 14252.75 126.50
200 Scoutten 42 Clerk - 11508.60 84.20
210 Lu 10 Mgr 10 20010.00 -
220 Smith 51 Sales 7 17654.50 992.80
230 Lundquist 51 Clerk 3 13369.80 189.65
240 Daniels 10 Mgr 5 19260.25 -
250 Wheeler 51 Clerk 6 14460.00 513.30
260 Jones 10 Mgr 12 21234.00 -
270 Lea 66 Mgr 9 18555.50 -
280 Wilson 66 Sales 9 18674.50 811.50
290 Quill 84 Mgr 10 19818.00 -
300 Davis 84 Sales 5 15454.50 806.10
310 Graham 66 Sales 13 21000.00 200.30
320 Gonzales 66 Sales 4 16858.20 844.00
330 Burke 66 Clerk 1 10988.00 55.50
340 Edwards 84 Sales 7 17844.00 1285.00
350 Gafney 84 Clerk 5 13030.50 188.00
35 record(s) selected.
db2inst1:/home/db2inst1 > db2 connect reset
DB20000I The SQL command completed successfully.
db2inst1:/home/db2inst1 >更多精彩文章及讨论,请光临枫下论坛 rolia.net