2 Replies Latest reply on Mar 8, 2004 7:23 AM by Milen Dyankov

    Export database schema

    Milen Dyankov Newbie

      Is it possible to export the database schema used by JBoss?

      What I mean is that when I have <create-table>true</create-table> JBoss will execute a set of SQL queries to create all tables, indexes, constraints, etc.

      Is it possible to view or export all these queries in the exact order they (should) have been executed? May be it is possible to do so through web-console?

        • 1. Re: Export database schema
          Alexey Loubyansky Master

          You can increase log level to DEBUG for org.jboss.ejb,plugins.cmp and watch executed SQL or copy it from server.log

          • 2. Re: Export database schema
            Milen Dyankov Newbie

            Yes, one can have all SQL stuff logged and then find it in the log files. However it can not be done if tables are already created and one does not want to drop them.

            We have situation where we have set JBoss to create tables on deploy. It is very convenient while we are developing and testing. But now we are going to move to production environment and would like to create tables manually so we can do some optimizations. I thought it would be nice if I could simply export database schema from JBoss and just make small corrections instead of typing hundreds of lines of SQL code.

            I just think such functionality may be very useful. In future JBoss versions may be.