Great open source java ERD tool - for analysing db schema

For those who got the Open Source fever, sharing only makes you hot!

Moderator: neilg

Great open source java ERD tool - for analysing db schema

Postby neilg » Fri Nov 18, 2005 9:55 pm

Didn't even know I was looking for it until I found it

http://schemaspy.sourceforge.net

Builds to html page. Finds some obvious problems on your schema.

Only problem I had was getting it to run. This worked for me (copy oracle.jar to the same dir as the spy jar):

Code: Select all
java -cp ./oracle.jar:./schemaSpy_2.0.0.jar net.sourceforge.schemaspy.Main -t orathin -p myPassword -s COMPIERE -db myDb -host myHost -port 1521 -u myUser -o myOutputDir
Last edited by neilg on Mon Nov 21, 2005 4:34 pm, edited 1 time in total.
neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby new_soft » Sat Nov 19, 2005 7:51 pm

Hi,
Many thanks Neil for this idea about this tool.
i had encountred some errors and finally i launched it with this command.

java -jar schemaSpy_2.0.0.jar -cp oracle.jar net.sourceforge.schemaspy.Main -t orathin -p myPassword -s COMPIERE -db myDb -host myHost -port 1521 -u myUser -o myOutputDir
Best Regards,

Khaled Najeh.
new_soft
 
Posts: 28
Joined: Tue Dec 21, 2004 9:29 pm
Location: TUNISIA

Postby afalcone » Tue Nov 22, 2005 12:55 am

Hi,

First: Thanks to neilg for the discovery !!! :wink:

Second: I have a problem.... :cry:

I receive some error messages of the dot.exe (popup windows), i.e.

..............................................................................................................(84sec)
Writing/graphing summary .....net.sourceforge.schemaspy.util.Dot$DotFailure: 'dot -Tpng G:\SchemaSpy\graphs\summary\relationships.real.large.dot -oG:\SchemaSpy\graphs\summary\relationships.real.large.png'
failed with return code -1073741571.....(185sec)

Writing/graphing results................................... net.sourceforge.schemaspy.util.Dot$DotFailure: 'dot -Tpng G:\SchemaSpy\graphs\C_CAMPAIGN.implied2degrees.dot -oG:\SchemaSpy\graphs\C_CAMPAIGN.implied2degrees.png'
failed with return code -1073741571

.....................net.sourceforge.schemaspy.util.Dot$DotFailure: 'dot -Tpng G:\SchemaSpy\graphs\C_BPARTNER.implied 2degrees.dot -oG:\SchemaSpy\graphs\C_BPARTNER.implied2degrees.png'
failed with return code -1073741571

.............net.sourceforge.schemaspy.util.Dot$DotFailure: 'dot -Tpng G:\SchemaSpy\graphs\M_PRODUCT.implied2degrees.dot -oG:\SchemaSpy\graphs\M_PRODUCT.implied 2degrees.png'
failed with return code -1073741571


.... and more tables too....


I see that these files have 0 Kb size.

Someone had this problem also?

Thanks

Best Regards
afalcone
Regular
 
Posts: 120
Joined: Fri Jun 24, 2005 4:09 am
Location: Argentina

Graphviz

Postby neilg » Tue Nov 22, 2005 5:47 pm

I'm assuming you've followed the instructions from the author's web site:

SchemaSpy uses the dot executable from Graphviz to generate graphical representations of the table/view relationships. This was initially added for people who see things visually. Now the graphical representation of relationships is a fundamental feature of the tool. Graphvis is not required to view the output generated by SchemaSpy, but the dot program should be in your PATH (not CLASSPATH) when running SchemaSpy or none of the graphs will be generated.


I used the graphviz application (not webdot). Perhaps you can try a support request with the author if you don't come right.
neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby afalcone » Tue Nov 22, 2005 7:25 pm

Hi neilg,

Yes I'm using the graphviz application and the dot program is in my Path.
The error is only for some tables (for the others work fine and the graphics are generated).

I will try to consult in the forum of SchemaSpy.

Thanks for you reply.

Best regards

Alejandro
afalcone
Regular
 
Posts: 120
Joined: Fri Jun 24, 2005 4:09 am
Location: Argentina

Postby neilg » Tue Nov 22, 2005 7:42 pm

afalcone wrote:The error is only for some tables (for the others work fine and the graphics are generated).

I will try to consult in the forum of SchemaSpy.


Let us know the answer. I realize now I had the same problem - e.g. with C_BPartner
neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby afalcone » Tue Nov 22, 2005 8:03 pm

Yes in the 2.5.2d are:

AD_CLIENTINFO
AD_ORGINFO
AD_USER
C_ACTIVITY
C_BPARTNER
C_CAMPAIGN
C_CURRENCY
C_LOCATION
M_ATTRIBUTESETINSTANCE
M_PRODUCT

All those have 0 Kb size.

I already have placed a post in the forum of SchemaSpy. When it obtain answer I will cause I will know him.

Regards

Alejandro
afalcone
Regular
 
Posts: 120
Joined: Fri Jun 24, 2005 4:09 am
Location: Argentina

Postby afalcone » Wed Nov 23, 2005 1:04 am

By: John Currier - johncurrierProject AdminAccepting Donations
RE: Error: failed with return code -107374157
2005-11-22 11:37
See if the development snapshot version of Graphviz fixes your problem (http://www.graphviz.org/Download_windows.php). There was a bug in dot 2.6 that gave issues similar to what you're seeing. It was fixed in September, but hasn't made it into the official release yet.

If that doesn't fix your problem then open a SchemaSpy bug and attach (not paste) the offending .dot and I'll try to track down the problem for you with the Graphviz people.

John



The link is:
http://sourceforge.net/forum/forum.php? ... _id=462850

I have dischargeed the new version of Graphviz (2.7), but seems that the problem continues.
afalcone
Regular
 
Posts: 120
Joined: Fri Jun 24, 2005 4:09 am
Location: Argentina

Postby afalcone » Thu Nov 24, 2005 2:22 am

The News:

Yes, with the new version of Graphviz (2.7) the problem continues.

I've opened a bug against SchemaSpy and I received answer from John that say:

There are a couple of things that you can try to resolve this.
One is to use SchemaSpy's -noimplied option. That might reduce the size of the generated images to a point where dot won't blow up.

Another option is to manually edit the .dots that are blowing up, remove the rankdir="RL" line and run dot against them manually, using the command line that was displayed in the error message. Note that these are extremely large images, so dot will take a while to generate them.


Well, at this time I tried both ways.

1) With the option -noimplied, no longer I receive error messages and the graphics apparently they are generated in a correct way. :D

2) I remove the line in .dot file that he indicates and then I run dot again. It works fine, graphics are generated (with advice note at bottom). It say:
"SchemaSpy was unable to generate a graphical representation of table relationships.
An appropriate version of dot must be in your path when generating these pages.
Requires dot version 2.2.1 or versions greater than 2.4 from www.graphviz.org."


Regards

Alejandro
afalcone
Regular
 
Posts: 120
Joined: Fri Jun 24, 2005 4:09 am
Location: Argentina

Postby afalcone » Sat Nov 26, 2005 9:51 pm

I have followed in contact with John Currier (SchemaSpy's developer), who has developed a new version of schemaspy, the 2.1.0.
With that version, should run the program with the undocumented option -rankdirbug.

The command is:

java -jar schemaSpy_2.1.0.jar -cp oracle.jar net.sourceforge.schemaspy.Main -t orathin -p myPassword -s COMPIERE -db myDb -host myHost -port 1521 -u myUser -o myOutputDir -rankdirbug

In this way, the errors they are avoided and the graphics they are generated well. They are not as pretty as the previous, but in them we can see the relations among the tables, thing that before failed for some tables (e.g. C_BPARTNER, C_CAMPAIGN, C_ACTIVITY, and others).

Regards
afalcone
Regular
 
Posts: 120
Joined: Fri Jun 24, 2005 4:09 am
Location: Argentina

Postby Usman » Sat Jul 01, 2006 10:13 am

Another cool ERD tool :

http://sourceforge.net/projects/oraschemadoc

It work nicely, try it out..
Usman
Regular
 
Posts: 97
Joined: Thu Jan 12, 2006 9:30 am
Location: Indonesia


Return to Contributor's Corner

Who is online

Users browsing this forum: No registered users and 1 guest