Jump to content
Changes to the Jaspersoft community edition download ×

DB2 support for jasper db


chernandeznet

Recommended Posts

has anyone installed the jasperserver.war and ran it against a DB2 database? Does anyone have scripts for creating the jasper db in DB2?

 

I did get the Type 4 drivers loaded by putting them in the jasperserver.warweb-inflib directory.

 

But still would like the jasper db for db2.

 

thanks,

Chuck

Post edited by: chernandeznet, at: 2006/10/10 17:21

Link to comment
Share on other sites

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

  • 8 months later...

has anyone installed the jasperserver.war and ran it against a DB2 database? Does anyone have scripts for creating the jasper db in DB2?

 

I am interested in an answer to the original post. Is a DB2 schema available for use with jasperserver?

Link to comment
Share on other sites

We have certified our Pro version for DB2, and have a complete schema for that.

 

For open source:

 

You can create a schema for DB2 with the build process after setting the appropriate values.

 

You can edit the supplied MySQL schema to be DB2 compliant.

 

 

Sherman

JasperSoft

Link to comment
Share on other sites

You can create a schema for DB2 with the build process after setting the appropriate values.

 

Thanks for the tip. I did this and it worked pretty well. The schema it generated was DB2 compliant except for one table:

 

Code:

create table JILogEvent (
id bigint generated by default as identity,
occurrence_date timestamp not null,
event_type smallint not null,
username varchar(100),
component varchar(100),
message varchar(250) not null,
resource_uri varchar(250),
event_text varchar(4000),
event_data varchar(1048576) for bit data,
event_state smallint,
primary key (id)
);

 

The event_data field has a length of 1048576. The max length for varchar fields on DB2 8.x is 32762. Should this field be a BLOB/CLOB? Or should I reduce the field length? I would appreciate some guidance on this table, since I don't know what it is used for.

Link to comment
Share on other sites

sschaub wrote:

The event_data field has a length of 1048576. The max length for varchar fields on DB2 8.x is 32762. Should this field be a BLOB/CLOB? Or should I reduce the field length?

 

This looks like a problem of the Hibernate DB2 dialect. The Hibernate property is defined as type="binary" length="1048576" which gets correctly translated into MySQL mediumblob and PostgreSQL bytea. The DB2 Hibernate dialect, on the other hand, produces the invalid column type.

 

I don't know much about DB2 so I'm not sure what type of column should Hibernate generate for the property.

 

For now, you can decrease the column length since this property is not actually used in JasperServer.

 

Regards,

Lucian

Link to comment
Share on other sites

I agree, it's an issue with the Hibernate dialect. It should be possible to modify the dialect to get the correct mapping, but I have not looked into this yet.

 

I think the correct data type for the event_data column in DB2 v9 should be "long varchar for bit data". Like this:

 

Code:
create table JILogEvent (
id integer generated by default as identity,
occurrence_date timestamp not null,
event_type smallint not null,
username varchar(100),
component varchar(100),
message varchar(250) not null,
resource_uri varchar(250),
event_text clob(4000),
event_data long varchar for bit data,
event_state smallint,
primary key (id)
);

 

I noticed that sschaub was using DB2 8.x and got varchar(4000) where I got clob(4000). I'm not sure what the significance of the difference will be. Both store characters... but sometimes clob is less flexible.

 

-Matt

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

yup, One look to the file would be great.

I'm also not really sure where can I  get the mysql schema, but it should be easy to find.

By the way, how much is ONLY the jasperserver pro edition?(or its only sold in a bundle=?), I know it sould like a silly question , but I haven't find a straight answer in the web site.

Link to comment
Share on other sites

  • 3 months later...

Hi gedevane,

There are a bunch of different questions on this post ;-) Not sure which one is your question.

Also, were you able to get any answers from the Sales team regarding a jasperserver Pro (which has fully certified DB2 support - ie procedures and QA testing)?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...