Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Praveen Devarao
RE: Connecting to Informix [ reply ]  
2010-07-16 07:13
Hi Martin,

A new version, 2.5.5, of ibm_db containing the fix for the problem described is now available. Give a try and let us know how it goes.

Thanks

Praveen

By: Martin Little
RE: Connecting to Informix [ reply ]  
2010-06-21 16:21
That seems to have fixed the problem, thanks.

By: Praveen Devarao
RE: Connecting to Informix [ reply ]  
2010-06-21 13:00
I will need to be more clear here. A Similar problem was reported against CLI (The DB2 client to which the ruby driver talks) when running against DB2 on IBMi and pinging the DB, to find if connection is active. While looking into this defect it was also found that this problem occurs with Informix too.

The problem is been solved in version 9.7 fixpak 2, hence asked you to upgrade to version 9.7 Fixpak 2.

Let me know how it goes.

Thanks

Praveen

By: Praveen Devarao
RE: Connecting to Informix [ reply ]  
2010-06-19 02:55
Hi Martin,

Ok I get it now, the problem is with the the IBM DataServer Client V97 fixpak 0. Could you upgrade the client to the latest fixpak (V97fp2). [ http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg24026929 ].

With this you should be able to use the IBM_DB gem with IDS.

Let me know how it goes.

Thanks

Praveen

By: Martin Little
RE: Connecting to Informix [ reply ]  
2010-06-18 20:15
Under C7 it exhibits the same behaviour.

I built my copy of the driver with the ming32 version of ruby on windows.


By: Martin Little
RE: Connecting to Informix [ reply ]  
2010-06-18 18:52
Here's the end of the trace

SQLGetInfo( hDbc=0:1, fInfoType=SQL_MAX_TABLE_NAME_LEN, rgbInfoValue=&0245d68e, cbInfoValueMax=2, pcbInfoValue=&0245e3a6 )
---> Time elapsed - +6.152000E-003 seconds

SQLGetInfo( rgbInfoValue=128, pcbInfoValue=2 )
<--- SQL_SUCCESS Time elapsed - +3.241900E-002 seconds

SQLGetInfo( hDbc=0:1, fInfoType=SQL_NON_NULLABLE_COLUMNS, rgbInfoValue=&0245d68e, cbInfoValueMax=2, pcbInfoValue=&0245e3a6 )
---> Time elapsed - +3.480000E-004 seconds

SQLGetInfo( rgbInfoValue=1, pcbInfoValue=2 )
<--- SQL_SUCCESS Time elapsed - +3.261100E-002 seconds

SQLGetConnectAttr( hDbc=0:1, fOption=SQL_ATTR_PING_DB, pvParam=&0245ec68, cbParamMax=0, pcbParam=<NULL pointer> )
---> Time elapsed - +6.161000E-003 seconds

After that I see double free errors in the db database which persist until I kill the server.

14:45:48 Condition Failed (Memory pointer (0x10bb3f4b0) freed twice), In (mt_shm_free)
14:45:48 Assert Failed: Condition Failed (Memory pointer (0x10bb3f4b0) freed twice), In (mt_shm_free)


I'm going to try to upgrade the test site to C7 and see if this hasn't been fixed in a bug fix.

By: Praveen Devarao
RE: Connecting to Informix [ reply ]  
2010-06-18 05:27
Hi Martin,

I will wait for the repro scenario. Along with the use case if you can provide me with the CLI trace during the test run, it will be great. To enable CLI trace edit the db2cli.ini file (should be present in your installed directory) as below [add the following]

;---------------------
[COMMON]
trace=1
tracepathname=<directory to save the trace file>
;---------------------

To turn OFF the trace set the trace=0

You mentioned that you rebuilt the binaries on windows, could you let me know what was the steps you followed to do the same.

Thanks

Praveen

By: Martin Little
RE: Connecting to Informix [ reply ]  
2010-06-17 20:48
DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL09070" with level identifier "08010107".
Informational tokens are "DB2 v9.7.0.441", "s090521", "NT3297", and Fix Pack "0".
Product is installed at "C:\IBMDSD" with DB2 Copy Name "IBM Data Server Driver for ODBC and CLI".

A sample script to test connection to IDS and retrieve the server info
Connection complete
IDS/UNIX64
Script run complete

After this I did a trace of a migration and it got hung up in the tables metadata call of active record adapter.
I'll see if I can't recreate the hang by extracting just that section.

By: Praveen Devarao
RE: Connecting to Informix [ reply ]  
2010-06-17 17:16
Hi Martin,

Could you try the sample script below. This could help us know if the problem is really the server_info or something else.

BTW, what is the version of your IBM Dataserver client? To know issue db2level (Yes that's right db2level). If db2level is not in your path you should find the db2level script under the bin directory of the IBM Dataserver client.

#sample.rb
#----------------------
require 'ibm_db'

puts "A sample script to test connection to IDS and retrieve the server info"

conn = IBM_DB.connect('DRIVER={IBM DB2 ODBC DRIVER};DATABASE=dbname;HOSTNAME=1.234.456.89;PORT=9091;PROTOCOL=TCPIP;UID=username;PWD=password;','','')

puts "Connection complete"

srvinf = IBM_DB.server_info(conn)

puts srvinf.DBMS_NAME

IBM_DB.close conn

puts "Script run complete"
#----------------------
#End of Script

Thanks

Praveen

By: Martin Little
RE: Connecting to Informix [ reply ]  
2010-06-17 13:47
Hi Praveen,

I rebuilt my windows driver with your patch, but it still is hanging when it tries to query the server info causing an exception on the server side and locking the connection so that I have to kill the server to clean up.
I'm not sure if it's because I'm running my test instance on opensolaris which isn't the supported solaris version and I'm hesitant to try it on my production test site because of the hang on the server side.
I'm currently running C4, I'll try upgrading to the latest build and see if that helps with the problem.

Thanks

Martin

By: Praveen Devarao
RE: Connecting to Informix [ reply ]  
2010-06-11 05:30
Hi Martin,

After answering to your queries, I was trying out the Rails IBM_DB Adapter with Informix and found a bug in the driver.

If you are using a Rails application to connect to Informix, you will need to apply the patch attached in the report at http://rubyforge.org/tracker/index.php?func=detail&aid=28295&group_id=2361&atid=9175

If doing driver programming you will need this patch only if using the API IBM_DB.server_info.

Let me know if you need more clarity/details on setting up IBM_DB gem with informix.

Thanks

Praveen

By: Praveen Devarao
RE: Connecting to Informix [ reply ]  
2010-06-10 05:26
Hi Martin,

To connect to a informix server you will need to have the Informix server configured with DRDA support. Once DRDA is set up you can connect to the Informix server following the same steps as for DB2 through the DRDA port.

You could follow this document http://rubyforge.org/docman/view.php/2361/10532/IBM_DB.pdf to quickly get started with using the IBM_DB driver.

Thanks

Praveen

By: Martin Little
Connecting to Informix [ reply ]  
2010-06-09 20:32
I was trying to play around with this driver since it currently works with Ruby 1.9.x to connect to my informix 11.5 server, but since all the documentation is very DB2 specific I'm not sure what I need to configure in the driver directory itself.
I tried to create just a connection string to verify the driver but I constantly get a communications error.

Is anyone successfully using this with informix that can give me some pointers?