ibm_db 0.7.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +6 -1
- data/README +367 -346
- data/ext/ibm_db.c +75 -17
- data/ext/ruby_ibm_db.h +9 -0
- data/lib/active_record/connection_adapters/ibm_db_adapter.rb +258 -78
- data/test/adapter_test.rb +3 -0
- data/test/fixtures/db_definitions/ids/ibm_db.drop.sql +32 -0
- data/test/fixtures/db_definitions/ids/ibm_db.sql +234 -0
- data/test/fixtures/db_definitions/ids/ibm_db2.drop.sql +2 -0
- data/test/fixtures/db_definitions/ids/ibm_db2.sql +5 -0
- metadata +14 -12
- data/lib/linux32/ibm_db.so +0 -0
data/CHANGES
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
Change Log
|
2
2
|
==============
|
3
|
+
2007/07/05 (IBM_DB adapter 0.8.0, driver 0.7.0):
|
4
|
+
- Support for Informix Dynamic Server 11.10
|
5
|
+
- New driver method get_last_serial_value to retrieve last inserted serial
|
6
|
+
value for Informix Dynamic Server
|
7
|
+
|
3
8
|
2007/06/19 (IBM_DB adapter 0.7.5, driver 0.6.0):
|
4
9
|
- Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
|
5
10
|
- Fixed client attributes initialization on connection setup [11264]
|
@@ -56,4 +61,4 @@ Change Log
|
|
56
61
|
- Fixed compatibility issue with other adapters
|
57
62
|
- If a schema is omitted in database.yml, the username is now used as default schema
|
58
63
|
- Introduced descriptive CLI error messages when a connection or an execute statement fails
|
59
|
-
- Introduced check against schema in method 'indexes'
|
64
|
+
- Introduced check against schema in method 'indexes'
|
data/README
CHANGED
@@ -1,346 +1,367 @@
|
|
1
|
-
=====================================================================
|
2
|
-
README for the IBM_DB Adapter 0.
|
3
|
-
For ActiveRecord Version 1.15.3 (and Rails 1.2.3)
|
4
|
-
=====================================================================
|
5
|
-
|
6
|
-
Change Log
|
7
|
-
==============
|
8
|
-
2007/
|
9
|
-
-
|
10
|
-
-
|
11
|
-
|
12
|
-
|
13
|
-
2007/06/
|
14
|
-
- Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
|
15
|
-
- Fixed
|
16
|
-
- Fixed
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
- Fixed
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
-
|
29
|
-
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
-
|
37
|
-
- Improved documentation
|
38
|
-
|
39
|
-
2007/04/20 (0.4.
|
40
|
-
- Fixed
|
41
|
-
-
|
42
|
-
- Improved
|
43
|
-
|
44
|
-
2007/
|
45
|
-
-
|
46
|
-
-
|
47
|
-
- Improved
|
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
|
-
|
259
|
-
|
260
|
-
|
261
|
-
- To configure database
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
rake
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
-
|
309
|
-
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
- The
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
1
|
+
=====================================================================
|
2
|
+
README for the IBM_DB Adapter 0.8.0 and Driver 0.7.0 (2007/07/11)
|
3
|
+
For ActiveRecord Version 1.15.3 (and Rails 1.2.3)
|
4
|
+
=====================================================================
|
5
|
+
|
6
|
+
Change Log
|
7
|
+
==============
|
8
|
+
2007/07/11 (IBM_DB adapter 0.8.0, driver 0.7.0):
|
9
|
+
- Support for Informix Dynamic Server 11.10 and beyond
|
10
|
+
- New driver method get_last_serial_value to retrieve last inserted serial
|
11
|
+
value for Informix Dynamic Server
|
12
|
+
|
13
|
+
2007/06/19 (IBM_DB adapter 0.7.5, driver 0.6.0):
|
14
|
+
- Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
|
15
|
+
- Fixed client attributes initialization on connection setup [11264]
|
16
|
+
- Fixed rake db:schema:dump native data types limits incompatible with table create
|
17
|
+
|
18
|
+
2007/06/01 (IBM_DB adapter 0.7.0, driver 0.6.0):
|
19
|
+
- Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
|
20
|
+
- Fixed remaining failure on {:null => true} option for XML data type [#10877]
|
21
|
+
- Fixed handling of {:id => false} option during table creation in DB2 for zOS
|
22
|
+
- Fixed handle_lobs failures in table creation for has_many/belongs_to [#10701]
|
23
|
+
- Fixe db2-i5-zOS.yaml content (removed inadvertent tab) [#11234]
|
24
|
+
|
25
|
+
2007/05/10 (IBM_DB adapter 0.6.5, driver 0.6.0):
|
26
|
+
- Driver code (ibm_db.c) remains at the same level: 0.6.0 (no changes)
|
27
|
+
- Fixed regression for reconnect after being inactive (connection recycle)
|
28
|
+
- Fixed rake db:schema:load failures on boolean data type [#10683]
|
29
|
+
- Fixed XML default option (:null => true for XML data type) [#10754]
|
30
|
+
- Fixed DB2 for zOS version 9 handling of column changes for DEFAULT NULL
|
31
|
+
|
32
|
+
2007/04/30 (0.6.0):
|
33
|
+
- Support for remote connections to DB2 Universal Database on z/OS version 9
|
34
|
+
- Support for result set pagination via ActiveRecord add_limit_offset! method
|
35
|
+
for DB2 Universal Database on z/OS and i5/OS
|
36
|
+
- Defect fixes
|
37
|
+
- Improved documentation
|
38
|
+
|
39
|
+
2007/04/20 (0.4.6):
|
40
|
+
- Fixed XML columns creation default value (NOT NULL)
|
41
|
+
- Fixed border case for IS NULL in where clauses
|
42
|
+
- Improved documentation (connection attributes)
|
43
|
+
|
44
|
+
2007/04/20 (0.4.5):
|
45
|
+
- Fixed reconnect problems: driver (IBM_DB::active) and adapter (active)
|
46
|
+
- Client connection attribute rename (app_user to replace user)
|
47
|
+
- Improved support for ROWID data type (DB2 for zOS version 8 and 9)
|
48
|
+
|
49
|
+
2007/03/21 (0.4.0):
|
50
|
+
- Support added for remote connectivity to DB2 zOS version 8
|
51
|
+
- Support added for remote connectivity to DB2 i5 v5r3 and v5r4
|
52
|
+
- Improved migration support (added change_column method)
|
53
|
+
- Support for setting and retrieving values for client attributes (user,
|
54
|
+
account, application, workstation)
|
55
|
+
|
56
|
+
2006/10/31 (0.2.0):
|
57
|
+
- Significant performance improvements
|
58
|
+
- Improved stored procedure support at driver level
|
59
|
+
- Added support for Large Object data types (LOBs) greater than 32K (BLOB, CLOB, XML) in size
|
60
|
+
- Added XML data type support for native storage of XML documents
|
61
|
+
- Significant quality improvements, through many bug fixes in the driver and adapter
|
62
|
+
- Improved migration support (added add_column and remove_column methods)
|
63
|
+
|
64
|
+
2006/06/07 (0.1.0):
|
65
|
+
|
66
|
+
- Fixed compatibility issue with other adapters
|
67
|
+
- If a schema is omitted in database.yml, the username is now used as default schema
|
68
|
+
- Introduced descriptive CLI error messages when a connection or an execute statement fails
|
69
|
+
- Introduced check against schema in method 'indexes'
|
70
|
+
|
71
|
+
Supported Operating Systems
|
72
|
+
============================
|
73
|
+
- Linux 32/64 bit
|
74
|
+
- Microsoft Windows 32 bit
|
75
|
+
- IBM AIX 32/64 bit
|
76
|
+
- HP-UX 32/64 bit
|
77
|
+
- Sun Solaris 32/64 bit
|
78
|
+
|
79
|
+
|
80
|
+
Supported Databases
|
81
|
+
====================
|
82
|
+
- IBM DB2 Universal Database on Linux/Unix/Windows versions 8 and 9
|
83
|
+
- Remote connections to IBM DB2 Universal Database on i5/OS versions V5R3 and V5R4.
|
84
|
+
Please ensure PTF SI27358 (includes SI27250) is installed in i5/OS version 5R3 and
|
85
|
+
and PTF SI27256 is installed while using i5/OS version 5R4.
|
86
|
+
- Remote connections to IBM DB2 Universal Database on z/OS version 8 and 9
|
87
|
+
- Informix Dynamic Server 11.10 and beyond.
|
88
|
+
Please ensure that the IBM DataServer Viper 2 client is installed.
|
89
|
+
|
90
|
+
|
91
|
+
There are two alternatives for installing the IBM_DB adapter and driver:
|
92
|
+
A. Installing as a Ruby gem in the Ruby runtime
|
93
|
+
B. Installing as a Rails plugin in a specific Rails application runtime
|
94
|
+
Note: The IBM_DB driver can also be built separately (from source) and used in direct API calls.
|
95
|
+
|
96
|
+
A. Installing the IBM_DB adapter and driver as a Ruby gem
|
97
|
+
=======================================================
|
98
|
+
The IBM_DB gem is an ActiveRecord adapter and requires the abstract adapter to register it
|
99
|
+
in the list of RAILS_CONNECTION_ADAPTERS (active_record.rb) before it can be utilized in
|
100
|
+
the Rails framework. Once registered, the IBM_DB adapter and its dependencies (ibm_db Ruby
|
101
|
+
driver and the IBM Driver for ODBC and CLI) are loaded. This enables any application in the
|
102
|
+
Ruby environment, including Rails, to interact with IBM data servers.
|
103
|
+
|
104
|
+
1. Windows platforms:
|
105
|
+
=====================
|
106
|
+
INSTALL (as Ruby gem)
|
107
|
+
To remove previous gem version (optionally):
|
108
|
+
D:\>gem uninstall ibm_db
|
109
|
+
Successfully uninstalled ibm_db version 0.6.0
|
110
|
+
|
111
|
+
Example:
|
112
|
+
D:\>gem install ibm_db
|
113
|
+
Bulk updating gem source index for: http://gems.rubyforge.org
|
114
|
+
Select which gem to install for your platform (i386-mswin32)
|
115
|
+
1. ibm_db 0.6.5 (mswin32)
|
116
|
+
2. ibm_db 0.6.5 (ruby)
|
117
|
+
3. ibm_db 0.6.0 (mswin32)
|
118
|
+
4. ibm_db 0.6.0 (ruby)
|
119
|
+
|
120
|
+
Running gem install ibm_db you are presented with two choices for each release
|
121
|
+
(mswin32 or ruby). Choose mswin32 and the native extension (ibm_db driver)
|
122
|
+
binary file for Windows is installed.
|
123
|
+
|
124
|
+
TEST (simple gem install verification)
|
125
|
+
Note: IBM_DB gem requires a manual step after install:
|
126
|
+
add ibm_db into gems\1.8\gems\activerecord-1.15.3\lib\active_record.rb (Line 77)
|
127
|
+
D:\NewApp>dir vendor\plugins
|
128
|
+
D:\NewApp>irb
|
129
|
+
irb(main):001:0> gem 'ibm_db'
|
130
|
+
irb(main):002:0> require 'mswin32/ibm_db' // notice the [mswin32] in the library path
|
131
|
+
irb(main):003:0> IBM_DB::connect 'sample', 'db2admin', 'secret'
|
132
|
+
D:\NewApp>ruby script\console
|
133
|
+
|
134
|
+
BUILD (optionally) ibm_db gem from sources (ibm_db-x.x.x.tar.gz):
|
135
|
+
1. Download source from Rubyforge
|
136
|
+
http://rubyforge.org/frs/?group_id=2361
|
137
|
+
2. Build gem from specification (IBM_DB.gemspec)
|
138
|
+
D:\IBM_DB_Adapter\ibm_db>gem build IBM_DB.gemspec
|
139
|
+
|
140
|
+
|
141
|
+
2. Linux and Unix platforms:
|
142
|
+
============================
|
143
|
+
|
144
|
+
INSTALL (as Ruby gem)
|
145
|
+
To remove previous gem version (optionally):
|
146
|
+
$ gem uninstall ibm_db
|
147
|
+
Successfully uninstalled ibm_db version 0.6.0
|
148
|
+
|
149
|
+
Note: DB2 environment is required while using an arbitrary user account
|
150
|
+
(other than the DB2 install user account)
|
151
|
+
$ . /home/db2inst1/sqllib/db2profile
|
152
|
+
$ export IBM_DB_DIR=/opt/ibm/db2/V9.1
|
153
|
+
$ export IBM_DB_LIB=/opt/ibm/db2/V9.1/lib32
|
154
|
+
$ gem install ibm_db
|
155
|
+
Select which gem to install for your platform (i686-linux)
|
156
|
+
1. ibm_db 0.6.5 (mswin32)
|
157
|
+
2. ibm_db 0.6.5 (ruby)
|
158
|
+
3. ibm_db 0.6.0 (ruby)
|
159
|
+
4. ibm_db 0.6.0 (mswin32)
|
160
|
+
...
|
161
|
+
Running gem install ibm_db you are presented with two choices for each release
|
162
|
+
(mswin32 or ruby). Choose ruby and the native extension (ibm_db driver) is built.
|
163
|
+
...
|
164
|
+
> 2
|
165
|
+
Building native extensions. This could take a while...
|
166
|
+
Successfully installed ibm_db-0.6.5
|
167
|
+
Installing ri documentation for ibm_db-0.6.5...
|
168
|
+
Installing RDoc documentation for ibm_db-0.6.5...
|
169
|
+
|
170
|
+
TEST (simple gem install verification)
|
171
|
+
Note: IBM_DB gem requires a manual step after install:
|
172
|
+
add ibm_db into /gems/activerecord-1.15.3/lib/active_record.rb (Line 77)
|
173
|
+
$ ls -al vendor/plugins/
|
174
|
+
$ irb
|
175
|
+
irb(main):001:0> gem 'ibm_db'
|
176
|
+
irb(main):002:0> require 'ibm_db' // notice the library path (different on win32)
|
177
|
+
irb(main):003:0> IBM_DB::connect 'sample', 'db2admin', 'secret'
|
178
|
+
$ ./script/console
|
179
|
+
|
180
|
+
BUILD (optionally) ibm_db gem from sources (ibm_db-x.x.x.tar.gz):
|
181
|
+
1. Download source from Rubyforge
|
182
|
+
http://rubyforge.org/frs/?group_id=2361
|
183
|
+
2. Build gem from specification (IBM_DB.gemspec)
|
184
|
+
$ cd IBM_DB_Adapter/ibm_db
|
185
|
+
$ gem build IBM_DB.gemspec
|
186
|
+
|
187
|
+
|
188
|
+
B. Installing the IBM_DB adapter and driver as a Rails plugin
|
189
|
+
=============================================================
|
190
|
+
IBM_DB adapter and driver install as plugin provides support for IBM data servers
|
191
|
+
within the scope of a specific and individual Rails application. Rails plugins do
|
192
|
+
not offer the version management specific to Ruby gems, but does provide an
|
193
|
+
initialization mechanism which allows the IBM_DB plugin to self-insert into the
|
194
|
+
ActiveRecord's list of supported adapters: RAILS_CONNECTION_ADAPTERS. Therefore,
|
195
|
+
after installing IBM_DB as plugin in your Rails application, no manual step is required
|
196
|
+
for the Rails framework to load it.
|
197
|
+
|
198
|
+
1. Windows platforms
|
199
|
+
=====================
|
200
|
+
Register Repository and Query:
|
201
|
+
|
202
|
+
A. Download and install Subversion (SVN) client from:
|
203
|
+
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
|
204
|
+
Register rubyibm project as plugin source
|
205
|
+
D:\NewApp>ruby script\plugin source svn://rubyforge.org/var/svn/rubyibm/trunk/IBM_DB_Adapter/
|
206
|
+
|
207
|
+
B. Accessing RubyForge repository through HTTP (no SVN client required) is NOT YET ENABLED
|
208
|
+
D:\NewApp>ruby script\plugin source http://rubyibm.rubyforge.org/IBM_DB_Adapter/
|
209
|
+
|
210
|
+
LIST plugin
|
211
|
+
D:\NewApp>ruby script\plugin list
|
212
|
+
|
213
|
+
INSTALL (as Rails plugin)
|
214
|
+
D:\NewApp>ruby script\plugin install ibm_db
|
215
|
+
|
216
|
+
TEST (simple plugin install verification)
|
217
|
+
Note: Make sure there's no ibm_db in gems\1.8\gems\activerecord-1.15.3\lib\active_record.rb (Line 77)
|
218
|
+
D:\NewApp>ruby script\console
|
219
|
+
|
220
|
+
2. Linux and Unix platforms
|
221
|
+
===========================
|
222
|
+
Register Repository and Query:
|
223
|
+
|
224
|
+
A. Ensure Subversion (SVN) client is installed or download from:
|
225
|
+
http://subversion.tigris.org/project_packages.html
|
226
|
+
Register rubyibm project as plugin source
|
227
|
+
$ ./script/plugin source svn://rubyforge.org/var/svn/rubyibm/trunk/IBM_DB_Adapter/
|
228
|
+
|
229
|
+
B. Accessing RubyForge repository through HTTP (no SVN client required) is NOT YET ENABLED
|
230
|
+
$ ./script/plugin source http://rubyibm.rubyforge.org/IBM_DB_Adapter/
|
231
|
+
|
232
|
+
LIST plugin
|
233
|
+
$ ./script/plugin list
|
234
|
+
|
235
|
+
INSTALL (as Rails plugin)
|
236
|
+
$ ./script/plugin install ibm_db
|
237
|
+
|
238
|
+
TEST (simple plugin install verification)
|
239
|
+
Note: Make sure there's no ibm_db in /gems/activerecord-1.15.3/lib/active_record.rb (Line 77)
|
240
|
+
$ ./script/console
|
241
|
+
|
242
|
+
|
243
|
+
Instructions for building and installing the IBM_DB driver from source
|
244
|
+
=======================================================================
|
245
|
+
Building the driver manually as described below is not required if any the install
|
246
|
+
alternatives above have been pursued. This manual procedure is in fact automated
|
247
|
+
on Linux and UNIX platforms by the IBM_DB gem and plugin install, but is presented
|
248
|
+
here only for reference, and also involves running the unit tests.
|
249
|
+
|
250
|
+
Prerequisites:
|
251
|
+
Install Ruby from:
|
252
|
+
http://rubyforge.org
|
253
|
+
|
254
|
+
Linux and Unix platforms:
|
255
|
+
Note: commands may vary depending on the shell used
|
256
|
+
- To setup DB2 environment while using an arbitrary user account
|
257
|
+
(other than the DB2 install user account):
|
258
|
+
Example:
|
259
|
+
$ . /home/db2inst1/sqllib/db2profile
|
260
|
+
|
261
|
+
- To configure test database:
|
262
|
+
DB2 v9.x: some IBM_DB driver tests require a UTF-8 database:
|
263
|
+
$ db2 CREATE DATABASE testdrv USING CODESET UTF-8 \
|
264
|
+
TERRITORY US COLLATE USING SYSTEM PAGESIZE 32768
|
265
|
+
DB2 v8.x: driver tests 195 and 52949 requires XML functionality
|
266
|
+
only available in DB2 v9.x
|
267
|
+
|
268
|
+
- To configure database connection parameters edit config.yaml
|
269
|
+
Example:
|
270
|
+
database: testdrv
|
271
|
+
user: db2inst1
|
272
|
+
password: password
|
273
|
+
hostname: localhost
|
274
|
+
port: 50000
|
275
|
+
|
276
|
+
- To compile and link with DB2 client libraries:
|
277
|
+
$ export IBM_DB_DIR=/opt/ibm/db2/V9.1
|
278
|
+
$ export IBM_DB_LIB=/opt/ibm/db2/V9.1/lib32
|
279
|
+
|
280
|
+
Windows platforms:
|
281
|
+
- Install Visual C++ 2003, Platform SDK (latest), .Net SDK Version 1.1 from:
|
282
|
+
http://wiki.tcl.tk/11431
|
283
|
+
- Set environment:
|
284
|
+
CALL "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd"
|
285
|
+
CALL "C:\Program Files\Microsoft Visual C++ Toolkit 2003\vcvars32.bat"
|
286
|
+
SET LIB=%LIB%;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
|
287
|
+
- To configure database connection parameters edit config.yaml
|
288
|
+
|
289
|
+
Build and Execution:
|
290
|
+
rake
|
291
|
+
|
292
|
+
Execution of tests without compilation (must have .so in ibm_db source directory):
|
293
|
+
rake onlytests
|
294
|
+
|
295
|
+
Execution of a single test inside the tests directory can be done by the following:
|
296
|
+
export SINGLE_RUBY_TEST=test_001.rb
|
297
|
+
rake
|
298
|
+
|
299
|
+
|
300
|
+
Limitations and known problems
|
301
|
+
==============================
|
302
|
+
- ActiveRecord rename_column method is not supported for DB2 LUW, zOS and i5
|
303
|
+
- ActiveRecord remove_column method is not supported for DB2 zOS
|
304
|
+
- The following tests from the ActiveRecord 1.15.3 test suite are expected to fail
|
305
|
+
- test_limited_eager_with_multiple_order_columns
|
306
|
+
- test_limited_eager_with_order
|
307
|
+
- test_assign_ids_ignoring_blanks
|
308
|
+
- test_build_by_new_record
|
309
|
+
- test_get_ids
|
310
|
+
- test_select_limited_ids_list
|
311
|
+
- test_add_index
|
312
|
+
- The following tests from the driver test suite are expected to fail on DB2 version 8
|
313
|
+
on Linux/Unix/Windows and Informix Dynamic Server because of missing native XML support. If you want to
|
314
|
+
make use of the native XML features in DB2, please upgrade to version 9 or later
|
315
|
+
- test_195.rb
|
316
|
+
- test_52949.rb
|
317
|
+
- The driver returns an error when you try to insert a TIMESTAMP value into a DATE column.
|
318
|
+
To fix this, please ensure that the following configuration keyword PATCH2=58 is set
|
319
|
+
in the COMMON section of your DB2 CLI initialization file (db2cli.ini):
|
320
|
+
- set: db2 UPDATE CLI CFG FOR SECTION COMMON USING PATCH2 58
|
321
|
+
- verify: db2 GET CLI CFG FOR SECTION COMMON
|
322
|
+
Please refer to http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.apdv.cli.doc/doc/c0007882.htm
|
323
|
+
for more information.
|
324
|
+
- The behaviour of ActiveRecord::Base.find(:first) without an :order attribute can be unpredictable.
|
325
|
+
The first record (i.e. the record with the minimum id) may be not be retrieved. In a relational model,
|
326
|
+
the order of the rows returned is unpredictable and independent of the order of insertion.
|
327
|
+
This issue may be addressed in a future release.
|
328
|
+
- Rails applications on DB2 9 require the APPLHEAPSZ database configuration parameter to be
|
329
|
+
set to or above 1024. You will need to set this parameter for each database for which you will be
|
330
|
+
running DB2 on Rails applications. Following is the command syntax for updating the
|
331
|
+
applheapsz parameter:
|
332
|
+
> db2 update db cfg for <database_name> using APPLHEAPSZ 1024
|
333
|
+
To enable this parameter, you need to restart your DB2 instance.
|
334
|
+
- If you see connectivity issues with Informix Dynamic Server, please ensure that the server is configured to accept DRDA connections.
|
335
|
+
Please refer to http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.admin.doc/admin154.htm for more information.
|
336
|
+
- The following tests from the ActiveRecord 1.15.3 test suite are expected to fail on Informix Dynamic Server
|
337
|
+
- test_quote
|
338
|
+
- test_to_xml
|
339
|
+
- test_should_calculate_grouped_by_function
|
340
|
+
- test_should_calculate_grouped_by_function_with_table_alias
|
341
|
+
- test_inserts_with_pre_and_suffix
|
342
|
+
- test_add_table_with_decimals
|
343
|
+
- test_no_limits_datatypes_IBM_DB
|
344
|
+
- test_instance_update_should_quote_pkey
|
345
|
+
- test_integer_columns
|
346
|
+
- test_arguments_line_up
|
347
|
+
- test_no_dump_errors
|
348
|
+
- test_schema_dump_includes_decimal_options
|
349
|
+
- IBM_DB is not supported on JRuby. As stated in the JRuby Wiki, "Basics of Getting JRuby Running":
|
350
|
+
'You may install other gems, but keep in mind that libraries with C extension dependencies
|
351
|
+
will not work in JRuby.' http://www.headius.com/jrubywiki/index.php/Getting_Started
|
352
|
+
The IBM_DB adapter relies on IBM_DB driver (C extension) and the IBM Driver for ODBC and
|
353
|
+
CLI to access databases on IBM data servers. Alternatively, you can either use the regular C
|
354
|
+
implementation of Ruby, or use ActiveRecord-JDBC adapter to access databases.
|
355
|
+
|
356
|
+
To Do
|
357
|
+
====
|
358
|
+
- Support ActiveRecord remove_column method for DB2 zOS version 9
|
359
|
+
|
360
|
+
|
361
|
+
Feedback
|
362
|
+
========
|
363
|
+
Your feedback is very much appreciated and expected through Rubyforge:
|
364
|
+
- rubyibm project: http://rubyforge.org/projects/rubyibm/
|
365
|
+
- rubyibm forum: http://rubyforge.org/forum/?group_id=2361
|
366
|
+
- rubyibm bug reports: http://rubyforge.org/tracker/?group_id=2361
|
367
|
+
- IBM_DB developers: rubyibm-developers@rubyforge.org
|