We are using H2Database for unit testing.
We have SET IDENTITY_INSERT <SchemaName.table_name> ON/OFF; in our DML .sql 
file. This works perfectly fine in our production sql server. But this 
lines fails in h2database.
H2 properties::
*{ "driverClass": "org.h2.Driver", "user": "test", "password": "test", 
"url": 
"jdbc:h2:mem:testdb;IGNORECASE=TRUE;DB_CLOSE_DELAY=-1;TRACE_LEVEL_FILE=3;TRACE_LEVEL_SYSTEM_OUT=3",
 
"properties": { "charSet": "UTF-8", "mode": "MSSQLServer" } } *

Error :
* org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement 
"SET IDENTITY_INSERT[*] mytable ON "; expected "@, AUTOCOMMIT, MVCC, 
EXCLUSIVE, IG NORECASE, PASSWORD, SALT, MODE, COMPRESS_LOB, DATABASE, 
COLLATION, BINARY_COLLATION, UUID_COLLATION, CLUSTER, 
DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFA ULT_TABLE_TYPE, CREATE, 
HSQLDB.DEFAULT_TABLE_TYPE, PAGE_STORE, CACHE_TYPE, FILE_LOCK, 
DB_CLOSE_ON_EXIT, AUTO_SERVER, AUTO_SERVER_PORT, AUTO_RECONNECT, ASSE RT, 
ACCESS_MODE_DATA, OPEN_NEW, JMX, PAGE_SIZE, RECOVER, NAMES, 
SCOPE_GENERATED_KEYS, SCHEMA, DATESTYLE, SEARCH_PATH, SCHEMA_SEARCH_PATH, 
JAVA_OBJECT_SERIA LIZER, LOGSIZE, FOREIGN_KEY_CHECKS"; SQL statement: SET 
IDENTITY_INSERT mytable ON [42001-199]*

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/be7ef819-00cf-4e31-85a7-5d00b4c26ca6n%40googlegroups.com.

Reply via email to