Import Database DDL in H2

2010-06-18 Thread Jaden
Hello, For unit testing purposes, I would like to import the oracle development database schema structure ONLY into an in-memory H2 database(oracle compatible). I believe oracle's import utility will not work in this case How do I do this? Please advise. Jaden -- You received this message

Re: Import Database DDL in H2

2010-06-20 Thread David Cuthbert
On Jun 18, 7:58 pm, Jaden wrote: > For unit testing purposes, I would like to import the oracle > development database schema structure ONLY into an in-memory H2 > database(oracle compatible). I've done this by examining the Oracle data dictionary views and generating DDL programatically. (I wis

Re: Import Database DDL in H2

2010-06-20 Thread Thomas Mueller
Hi, Do you have a SQL script to create the Oracle database? If yes you could use that (it's probably the easiest solution). There is a Oracle specific way to extract the SQL script from an existing Oracle database, using the exp / imp command line tools, but I forgot not sure how to do that exact

Re: Import Database DDL in H2

2010-06-21 Thread Zvonko
Hi Jaden, If you want to do it on programatic way, here are some tips (very briefly) how I did it. The most simple way to get oracle ddl is using DBMS_METADATA.GET_DDL(obj_type, obj_name, obj_schema) for tables and views, and BMS_METADATA.GET_DEPENDENT_DDL(obj_type, obj_name, obj_schema) for tabl

Re: Import Database DDL in H2

2010-06-21 Thread gilbertoca
At the end of this post[1] you will find the script to extract object definition and their grants. Regards, Gilberto [1]http://blog.gilbertoca.com/?p=338 On 20 jun, 17:30, Thomas Mueller wrote: > Hi, > > Do you have a SQL script to create the Oracle database? If yes you > could use that (it's pr