-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDBMeter_Readme.txt
258 lines (145 loc) · 7.16 KB
/
DBMeter_Readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
DB2
username: db2inst1
password: tpcc
1. Create Database
2. Create Table
db2batch -d tpcc -f sql/example/db2/create_table.sql
3. Load Data
java -cp bin/DBMeter_v1.0.jar:lib/db2jcc4.jar rdbms.DBMeter.Loader conf/example/db2/loader.properties
4. Create index
db2batch -d tpcc -f sql/example/db2/create_index.sql
5. Run Master
java -cp bin/DBMeter_v1.0.jar:lib/db2jcc4.jar rdbms.DBMeter.Master conf/example/db2/master.properties
6. Run Slaves on Clients
java -cp bin/DBMeter_v1.0.jar:lib/db2jcc4.jar rdbms.DBMeter.Slave conf/example/db2/slave001.properties
java -cp bin/DBMeter_v1.0.jar:lib/db2jcc4.jar rdbms.DBMeter.Slave conf/example/db2/slave002.properties
7. Check Data and Result
## count table data
db2batch -d tpcc -f sql/example/mysql/select_cnt.sql
## check result, compare with log_master
db2batch -d tpcc -f sql/example/mysql/chk_rlt.sql
MySQL
username: root
password: tpcc
1. Create Database
mysql -uroot -prootroot -vvv -n < sql/example/mysql/create_database.sql
2. Create Table
mysql -uroot -prootroot -vvv -n < sql/example/mysql/create_table.sql
3. Load Data
java -cp bin/DBMeter_v1.0.jar:lib/mysql-connector-java-5.1.7-bin.jar rdbms.DBMeter.Loader conf/example/mysql/loader.properties
4. Create index
mysql -uroot -prootroot -vvv -n < sql/example/mysql/create_index.sql
5. Run Master
java -cp bin/DBMeter_v1.0.jar:lib/mysql-connector-java-5.1.7-bin.jar rdbms.DBMeter.Master conf/example/mysql/master.properties
6. Run Slaves on Clients
java -cp bin/DBMeter_v1.0.jar:lib/mysql-connector-java-5.1.7-bin.jar rdbms.DBMeter.Slave conf/example/mysql/slave001.properties
java -cp bin/DBMeter_v1.0.jar:lib/mysql-connector-java-5.1.7-bin.jar rdbms.DBMeter.Slave conf/example/mysql/slave002.properties
7. Check Data and Result
## count table data
mysql -uroot -prootroot -vvv -n < sql/example/mysql/select_cnt.sql
## check result, compare with log_master
mysql -uroot -prootroot -vvv -n < sql/example/mysql/chk_rlt.sql
PostgreSQL
username: tpcc
password: tpcc
1. Create User & Database
psql -d postgres -f sql/example/postgresql/create_user.sql
psql -d postgres -f sql/example/postgresql/create_database.sql
2. Create Table
psql -U tpcc -d tpcc -f sql/example/postgresql/create_table.sql
3. Load Data
java -cp bin/DBMeter_v1.0.jar:lib/postgresql-42.2.8.jar rdbms.DBMeter.Loader conf/example/postgresql/loader.properties
4. Create index
psql -U tpcc -d tpcc -f sql/example/postgresql/create_index.sql
5. Run Master
java -cp bin/DBMeter_v1.0.jar:lib/postgresql-42.2.8.jar rdbms.DBMeter.Master conf/example/postgresql/master.properties
6. Run Slaves on Clients
java -cp bin/DBMeter_v1.0.jar:lib/postgresql-42.2.8.jar rdbms.DBMeter.Slave conf/example/postgresql/slave001.properties
java -cp bin/DBMeter_v1.0.jar:lib/postgresql-42.2.8.jar rdbms.DBMeter.Slave conf/example/postgresql/slave002.properties
7. Check Data and Result
## count table data
psql -U tpcc -d tpcc -f sql/example/postgresql/select_cnt.sql
## check result, compare with log_master
psql -U tpcc -d tpcc -f sql/example/postgresql/chk_rlt.sql
SQLServer
1. Create Database
sqlcmd -e -p 1 -y 30 -Y 30 -i sql\example\sqlserver\create_database.sql
2. Create User
sqlcmd -e -p 1 -y 30 -Y 30 -i sql\example\sqlserver\create_user.sql
3. Create Tables
sqlcmd -e -p 1 -y 30 -Y 30 -i sql\example\sqlserver\create_table.sql
4. Load Data
java -cp bin/DBMeter_v1.0.jar;lib\sqljdbc4.jar rdbms.DBMeter.Loader conf\example\sqlserver\loader.properties
5. Create index
sqlcmd -e -p 1 -y 30 -Y 30 -i sql\example\sqlserver\create_index.sql
6. Run Master
java -cp bin/DBMeter_v1.0.jar;lib\sqljdbc4.jar rdbms.DBMeter.Master conf\example\sqlserver\master.properties
7. Run Slaves on Clients
java -cp bin/DBMeter_v1.0.jar;lib\sqljdbc4.jar rdbms.DBMeter.Slave conf\example\sqlserver\slave001.properties
java -cp bin/DBMeter_v1.0.jar;lib\sqljdbc4.jar rdbms.DBMeter.Slave conf\example\sqlserver\slave002.properties
Oracle
1. Create Tablespace
sqlplus / as sysdba @sql/example/oracle/create_tablespace.sql
2. Create User
sqlplus / as sysdba @sql/example/oracle/create_user.sql
3. Create Tables
sqlplus user1/pswd @sql/example/oracle/create_table.sql
4. Load Data
java -cp bin/DBMeter_v1.0.jar:lib/ojdbc8.jar:lib/orai18n.jar rdbms.DBMeter.Loader conf/example/oracle/loader.properties
5. Create index
sqlplus user1/pswd @sql/example/oracle/create_index.sql
6. Run Master
java -cp bin/DBMeter_v1.0.jar:lib/ojdbc8.jar:lib/orai18n.jar rdbms.DBMeter.Master conf/example/oracle/master.properties
7. Run Slaves on Clients
java -cp bin/DBMeter_v1.0.jar:lib/ojdbc8.jar:lib/orai18n.jar rdbms.DBMeter.Slave conf/example/oracle/slave001.properties
java -cp bin/DBMeter_v1.0.jar:lib/ojdbc8.jar:lib/orai18n.jar rdbms.DBMeter.Slave conf/example/oracle/slave002.properties
8. Check Data and Result
## count table data
sqlplus tpcc/tpcc @sql/example/oracle/select_cnt.sql
## check result, compare with log_master
sqlplus tpcc/tpcc @sql/example/oracle/chk_rlt.sql
KDB
1. Create Tablespace
kdsql sys/kdb @sql/example/kdb/create_tablespace.sql
2. Create User
kdsql sys/kdb @sql/example/kdb/create_user.sql
3. Create Tables
kdsql tpcc/tpcc @sql/example/kdb/create_table.sql
4. Load Data
java -cp bin/DBMeter_v1.0.jar:lib/inspur11-jdbc.jar rdbms.DBMeter.Loader conf/example/kdb/loader.properties
5. Create index
kdsql tpcc/tpcc @sql/example/kdb/create_index.sql
6. Run Master
java -cp bin/DBMeter_v1.0.jar:lib/inspur11-jdbc.jar rdbms.DBMeter.Master conf/example/kdb/master.properties
7. Run Slaves on Clients
java -cp bin/DBMeter_v1.0.jar:lib/inspur11-jdbc.jar rdbms.DBMeter.Slave conf/example/kdb/slave001.properties
java -cp bin/DBMeter_v1.0.jar:lib/inspur11-jdbc.jar rdbms.DBMeter.Slave conf/example/kdb/slave002.properties
8. Check Data and Result
## count table data
kdsql sys/kdb @sql/example/kdb/select_cnt.sql
## check result, compare with log_master
kdsql sys/kdb @sql/example/kdb/chk_rlt.sql
Informix
username: informix
password: tpcc
1. Create dbspace
onspaces -c -d tpccdbs1 -p $INFORMIXDIR/data/tpccdbs1 -o 0 -s `cat /proc/partitions | awk '/sdc/{printf "%d000",$3/1000}'` -ef 1024 -en 8192 -k 4
printf "\n" | ontape -s -L 0
2. Create Database
dbaccess - sql/example/informix/create_database.sql
3. Create Tables
dbaccess tpcc sql/example/informix/create_table.sql
4. Load Data
java -cp bin/DBMeter_v1.0.jar:lib/ifxjdbc.jar rdbms.DBMeter.Loader conf/example/informix/loader.properties
5. Create index
dbaccess tpcc sql/example/informix/create_index.sql
6. Run Master
java -cp bin/DBMeter_v1.0.jar:lib/ifxjdbc.jar rdbms.DBMeter.Master conf/example/informix/master.properties
7. Run Slaves on Clients
java -cp bin/DBMeter_v1.0.jar:lib/ifxjdbc.jar rdbms.DBMeter.Slave conf/example/informix/slave001.properties
java -cp bin/DBMeter_v1.0.jar:lib/ifxjdbc.jar rdbms.DBMeter.Slave conf/example/informix/slave002.properties
8. Check Data and Result
## count table data
dbaccess tpcc sql/example/kdb/select_cnt.sql
## check result, compare with log_master
dbaccess tpcc sql/example/kdb/chk_rlt.sql