tags:

views:

494

answers:

2

I am having a strange DB2 issue when I run DBUnit tests. My DBUnit tests are highly customized, but I don't think it is the issue. When I run the tests, I get a failure SQLCODE: -1084, SQLSTATE: 57019, which translates to "SQL1084C Shared memory segments cannot be allocated."

It sounds like a weird memory issue, though here's the big strange thing. If I ssh to the test database server, then go in to db2 and do "connect to MY_DB", the tests start succeeding! This seems to have no relation to the supposed memory error that is being reported.

I have 2 tests, and the first one actually succeeds, the second one is the one that fails. However, it fails in the DBUnit setup code, when it is obtaining the connection to the DB server to load my xml dataset.

Any ideas what might be going on?

+1  A: 

Well, I think I fixed it by doing the following:

db2stop force
db2start

At least, things seem to be working now.....

Mike Stone
+1  A: 

In my case it was an expired DB/2 license. You can see your licenses by issuing db2licm -l

If you have a license file you can install it by, for example: db2licm -a db2ese.lic

See also: http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDS.doc/pdguide10.htm