Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Praveen Devarao
RE: database migration issues with db2 [ reply ]  
2010-05-04 15:25
Hi Rakesh,

Not sure if the IBM_DB gem can be used with websphere. I have not used this configuration ( Websphere and IBM_DB ).

However if you are going to use the IBM_DB gem with Ruby (Matz Ruby) surely you will be able to carry out migrations successfully.

If you can't go with Matz Ruby and IBM_DB gem might be you can patch the JDBC adapter by trying to issue the REORG command after every schema operation in the adapter. You can use the IBM_DB adapter as a reference to do the same.

Thanks

Praveen

By: Rakesh Arora
RE: database migration issues with db2 [ reply ]  
2010-05-04 14:40
Hi Praveen,

I am using jdbc adapter and not IBM_DB gem. I need to deploy the application in WebSphere. Can I use IBM_DB gem?

Here is my database.yml configuration:

development:
adapter: jdbc
driver: com.ibm.db2.jcc.DB2Driver
username: db2inst1
password: <password>
database: ermdb
schema: db2inst1
url: jdbc:db2://localhost:50000/ERMDB

DB2 version is 9.5

Thanks,
-Rakesh

By: Praveen Devarao
RE: database migration issues with db2 [ reply ]  
2010-05-03 16:53
Rakesh,

Could you also let me know the version of DB2 (if using client server configuration provide details of both client and server) and the version of IBM_DB gem that you are using.

Thanks

Praveen

By: Praveen Devarao
RE: database migration issues with db2 [ reply ]  
2010-05-03 16:48
Hi Rakesh,

Right, DB2 needs REORG after 3 Reorg operations. The same is taken care for in the adapter, by issuing a reorg after every migration operation.

Might be something is missed out. Could you get a use case with which I can reproduce the issue?

Thanks

Praveen

By: Rakesh Arora
database migration issues with db2 [ reply ]  
2010-05-03 14:51
I have been trying to run our application with db2. We have lots of migration files (37 in total) and having issue running rake db:migrate with db2.

It seems that db2 requires a reorg of the table that had gone through three REORG-recommended operations (drop column is one such operation):

http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/t0021584.htm

Any idea how to fix this issue?

Thanks,
-Rakesh