Symptom
- SAP HANA JDBC PreparedStatement used to insert Timestamp values into SAP HANA DB.
- The Timestamp value is passed into the PreparedStatement as a String.
- The Timestamp value happen to reside within the time where clock shift occurs for Daylight Saving Time (DST) for the local time zone.
- The Timestamp value is shifted by one hour by the SAP HANA JDBC driver before the PreparedStatement is sent to the SAP HANA DB.
- This results in an incorrect value being stored in the database, or an error being triggered from constraint violation:
com.sap.db.jdbc.exceptions.jdbc40.SQLIntegrityConstraintViolationException: [301]: unique constraint violated
Read more...
Environment
- SAP HANA DB 1.0
- SAP HANA DB JDBC driver
- SAP HANA Studio
- Note: this issue does not occur for the SAP HANA DB ODBC driver.
Product
SAP HANA 1.0, platform edition
Keywords
SQL, Prepared Statement, Time zone, timezone, timestamp, time stamp, java.sql.Timestamp, TimeZone, UTC, user.timezone , KBA , HAN-DB-CLI , SAP HANA Clients (JDBC, ODBC) , HAN-DB , SAP HANA Database , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.