Hi, I'm testing dbmonster 1.0.2 against Oracle 9.2.0.4 with JDBC driver ojdbc14.jar.
Running: dbmonster --grab -o c:/schema.xml leads to an empty schema (it does not get any table)
Running: dbmonster --grab -t (list of tables here) -o c:/schema.xml leads to an xml file containing only table names, and no column info!!!
Can you please help me?
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did you correctly set dbmonster.jdbc.schema property in the configuration file?
Second idea is to use table names with the schema they live in when supplying -t argument, ie. --grab -t scott.employee.
Hope this will help. If not it might be something specific to oracle jdbc driver, but as I do not use oracle it's hart to tell for me what might it be?
--
Piotr Maj
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So, apart from the fact that the <name> tag is not populated it seems to me that it finds the tables, but just does not get the metadata associated to them.
I tested your suggestion and specifying -t schema.table leads to a table not found error (maybe it already prepends the schema):
12:42:41,392 FATAL SchemaGrabber - No such table <SCHEMA.TABLE>.
java.sql.SQLException: No such table <SCHEMA.TABLE>.
at pl.kernelpanic.dbmonster.SchemaGrabber.addTable(SchemaGrabber.java:39
9)
Please help! Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll try to reproduce this error after I download Oracle 9i and set up a simple instance (which may take some hours...). Then I'll try to find out what's happening. Have you tried tables grabbing with an old Oracle 8i?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My bad, it was a case problem, I specified the schema in the .properties file and I wrote it lowercase. This caused the problem.
I redid it with the schema specified in uppercase and it worked.
Sorry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm testing dbmonster 1.0.2 against Oracle 9.2.0.4 with JDBC driver ojdbc14.jar.
Running: dbmonster --grab -o c:/schema.xml leads to an empty schema (it does not get any table)
Running: dbmonster --grab -t (list of tables here) -o c:/schema.xml leads to an xml file containing only table names, and no column info!!!
Can you please help me?
Thanks in advance.
Did you correctly set dbmonster.jdbc.schema property in the configuration file?
Second idea is to use table names with the schema they live in when supplying -t argument, ie. --grab -t scott.employee.
Hope this will help. If not it might be something specific to oracle jdbc driver, but as I do not use oracle it's hart to tell for me what might it be?
--
Piotr Maj
Yes, the dbmonster.jdbc.schema property is set up, I've supplied the table list without schema/owner and it grabbed them to a flat list like:
<dbmonster-schema>
<name>Change me!</name>
<table name="schema.TABLE" rows="1000">
</table>
So, apart from the fact that the <name> tag is not populated it seems to me that it finds the tables, but just does not get the metadata associated to them.
I tested your suggestion and specifying -t schema.table leads to a table not found error (maybe it already prepends the schema):
12:42:41,392 FATAL SchemaGrabber - No such table <SCHEMA.TABLE>.
java.sql.SQLException: No such table <SCHEMA.TABLE>.
at pl.kernelpanic.dbmonster.SchemaGrabber.addTable(SchemaGrabber.java:39
9)
Please help! Thanks
I'll try to reproduce this error after I download Oracle 9i and set up a simple instance (which may take some hours...). Then I'll try to find out what's happening. Have you tried tables grabbing with an old Oracle 8i?
With Oracle it's good to use the supplied SCOTT schema to develop and test, it's built in and available to others (much like Firebird's employee.fdb).
hi Pablo,
Finally I've managed to set up Oracle 10g with a sample instance.
My test.properties file looks like:
.:.majek@hp:ora.:.$ cat test.properties
dbmonster.jdbc.driver=oracle.jdbc.driver.OracleDriver
dbmonster.jdbc.url=jdbc:oracle:thin:scott/tiger@127.0.0.1:1521:HPORA
dbmonster.jdbc.username=scott
dbmonster.jdbc.password=tiger
dbmonster.jdbc.schema=
The command I've used:
.:.majek@hp:ora.:.$ dbmonster -c test.properties --grab -t emp
The result:
2005-01-28 10:01:06,756 INFO SchemaGrabber - Grabbing schema from database. 1 tables to grab.
2005-01-28 10:01:07,179 INFO SchemaGrabber - Grabbing table EMP. 100% done.
2005-01-28 10:01:07,181 INFO SchemaGrabber - Grabbing schema from database complete.
<?xml version="1.0"?>
<!DOCTYPE dbmonster-schema PUBLIC "-//kernelpanic.pl//DBMonster Database Schema DTD 1.1//EN" "http://dbmonster.kernelpanic.pl/dtd/dbmonster-schema-1.1.dtd">
<dbmonster-schema>
<name>Change me!</name>
<table name="EMP" rows="1000">
<key databaseDefault="false">
<generator type="pl.kernelpanic.dbmonster.generator.MaxKeyGenerator">
<property name="columnName" value="EMPNO"/>
</generator>
</key>
<column name="ENAME" databaseDefault="false">
<generator type="pl.kernelpanic.dbmonster.generator.StringGenerator">
<property name="allowSpaces" value="true"/>
<property name="excludeChars" value=""/>
<property name="maxLength" value="10"/>
<property name="minLength" value="0"/>
<property name="nulls" value="10"/>
</generator>
</column>
[... followed by all remaining collumns definitions...]
So it looks like dbmonster works pretty well with Oracle 10g using ojdbc14.jar as JDBC driver.
My bad, it was a case problem, I specified the schema in the .properties file and I wrote it lowercase. This caused the problem.
I redid it with the schema specified in uppercase and it worked.
Sorry