-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How do you get to your database using DB2 z/OS?
PostPosted: Thu Oct 27, 2011 1:59 pm 
Newbie

Joined: Thu Oct 27, 2011 1:31 pm
Posts: 2
I am writing an application that can connect to SQL Server, Oracle, DB2 LUW, and DB2 z/OS. I have the first three working fine. The only thing I change is the hibernate.cfg.xml file and I am able to switch databases. However, DB2 z/OS doesn't work. I am able to connect to the DB2 Subsytem, but it appears I am trying to create the table in DB2's default database (DSNDB04). I get the following message:

DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=USER1;CREATE TABLE;DSNDB04, DRIVER=3.57.82

The problem is that you specify the DB2 Subsystem name not the database name (like you do on the others) on the connection.url property. Below are the connection related properties I have specified in hibernate.cfg.xml:

Code:
<property name="connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="connection.url">jdbc:db2://my.company.com:1234/DB2SBSYS</property>       
<property name="connection.username">USER1</property>
<property name="connection.password">PW</property>
<property name="dialect">org.hibernate.dialect.DB2390Dialect</property>

How do I specify the database name?


Top
 Profile  
 
 Post subject: Re: How do you get to your database using DB2 z/OS?
PostPosted: Wed Dec 14, 2011 6:14 am 
Newbie

Joined: Wed Oct 12, 2011 8:47 am
Posts: 3
Hi dlpolitis

We are having the same problem in a project so I would like to know if you have found a solution to the problem?

regards
Korsbecker


Top
 Profile  
 
 Post subject: Re: How do you get to your database using DB2 z/OS?
PostPosted: Fri Jan 20, 2012 4:12 pm 
Newbie

Joined: Thu Oct 27, 2011 1:31 pm
Posts: 2
Sorry, I haven't. Currently, I am using the Hibernate to connect; but using JDBC to create and insert into my table.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.