简体   繁体   中英

Oracle to H2/hsqldb etc adapter

I can't be the only person who has this problem so I am looking for suggestions.

We run our apps on Oracle but our integration tests use h2 for speedy in-memory testing, the database being built from DDL scripts at the start of testing.

The problem is that the use/syntax of some DDL commands differs between Oracle and h2/hsqldb. For example today I spent some time before I realised that 'grant select on ...' works on sequences in Oracle but only on tables in h2.

In a previous project we had an adapter to remove/translate such erroneous commands, which meant that our test database ran quite different code to that we implement to prod. While everything is very thoroughly acceptance tested it means that certain problems might not be spotted until quite late on in the dev cycle.

On my latest project I sense I am going down the same path - so surely others must also have trodden it.

Any suggestions? We're using java/maven so appropriate soutions welcome!

There isn't such an adapter to my knowledge.

Anyway, I'd say that you're not going to achieve your goals with such an adapter. For one, the feature set of Oracle is not easily found in any other solution ( not that that's necessarily an advantage for Oracle).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM