It's all about the answers!

Ask a question

How can I see what repotools -createTables is going to create?


0
1
Martha (Ruby) Andrews (3.0k44251) | asked Nov 30 '12, 7:35 p.m.
JAZZ DEVELOPER
Several customers have asked "How can I tell what repotools -createTables is going to do before I run it? My database administrator does not want to run the script 'blindly'".

One answer



permanent link
Martha (Ruby) Andrews (3.0k44251) | answered Nov 30 '12, 7:37 p.m.
JAZZ DEVELOPER
edited Dec 03 '12, 1:20 p.m.

There is a logger in log4j.properties for each application, e.g., in server/conf/jts/log4j.properties:

# Turn on debugging of all SQL queries
#log4j.logger.sqlTxLogger=DEBUG

If you enable that logger, then all the SQL executed by repotools will get logged (to the createTables log file that gets generated).  So, you can install CLM and your database on a test machine and run repotools -createTables against a test database with logging enabled to see the SQL being executed.  Just be sure not to enable this in production as it would log excessively when the server is running.

This is a way to see what will happen, but it is not sufficient to *only* run the SQL commands; repotools must be run on any new database to set up bootstrapping data. In other words, running repotools will show the DDL that will be used but the DDL cannot be used itself to create the new database.



Martha (Ruby) Andrews
Jazz L3 Developer


Comments
Martha (Ruby) Andrews commented Nov 30 '12, 7:49 p.m.
JAZZ DEVELOPER

It is also possible to use IBM Data Studio to export the DDL, which may be wa bit more readable than the repotools tracing.
The IBM Data Studio full client is an Eclipse-based component of the IBM Data Studio product that provides an integrated development environment for database administration and application development. You can use the client to perform database administration tasks, including query analysis and tuning, and you can create, deploy, and debug database applications.

Once you install the data studio, you define a database connection within the data studio (machine, port, id, password, and so on).  Then you can "Connect" to the data base and there is a right mouse button option to "Generate DDL"


Martha (Ruby) Andrews commented Nov 30 '12, 7:50 p.m.
JAZZ DEVELOPER

One more note:
The names in the DDL are not fixed. For example, you could have a different DB name.


Martha (Ruby) Andrews commented Jul 03 '13, 2:29 p.m.
JAZZ DEVELOPER

And one more note:
This tech note explains how to turn on tracing with repotools:

http://www-01.ibm.com/support/docview.wss?uid=swg21322003

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.