db2 « SQL « JPA Q&A





1. Hibernate static SQL?    stackoverflow.com

Is it possible for Hibernate to be configured to generate static SQL?
Is there a Hibernate configuration/set-up parameter that forces Hibernate to generate static SQL as opposed to dynamic?
Can not find this ...

2. com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED.    forum.hibernate.org

DebugPreparedStatement.executeQuery SQLException occurred for sql: values nextval for schemaA.CUSTID_SEQ com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED. SQLCODE=-142, SQLSTATE=42612, DRIVER=3.52.99 I am using sequence to generate unique values but getting above error. @SequenceGenerator(name="CUSTID_SEQ", sequenceName="CUSTID_SEQ") public class Customer implements Serializable{ @Id @Column(name = "custId") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CUSTID_SEQ") private Integer custId. } I tried using all possible DB2 dialects. Please provide solution so that I ...

3. SQL -401 SQLSTATE 42818 with DB2 9.7.2    forum.hibernate.org

I am using hibernate 3.3 to access DB2 tables. When we upgraded to DB2 9.7.2 on Linux last week, we found we had to modify some of our hibernate SQL queries in order to be compatible with DB2 9.7.2. With DB2 9.7.1 our hibernate SQL worked fine, but with DB2 9.7.2 we receive the SQL -401 SQLSTATE 42818 error with certain ...

4. SQL Generation for DB2 - Varchar size problem    forum.hibernate.org

The SQL Generated code is great for most of my tables, but some of the columns have very large text strings. The generation is creating them as varchar(16000000) which is well beyond the maximum for a db2 varchar. Is there a way to tell hibernate to have the create script use a blob whenever it encounters a string too large for ...

5. 518 and 514 sql errors with db2    forum.hibernate.org

I wanted to provide some additional info. We are using a message driven bean to which has container managed transactions. We are looking up and using a stateless session bean with container managed transctions. The message bean and the required bean both have "Required" level transaction level. So I assume it will reuse the same transaction from the message bean to ...

6. Strange SQL-Statement when using DB2-Dialect!!!    forum.hibernate.org

Newbie Joined: Tue May 26, 2009 6:01 am Posts: 3 Location: Hannover, Germany Hi everyone! I'm facing a problem with the DB2-Dialect. Has anyone an idea where the problem is and how to fix it?!? I'm using a DB2-Database on a z/OS-HOST and in my persistence.xml I set the dialect to "org.hibernate.dialect.DB2Dialect". In my example I try to exequte a Named ...