It's all about the answers!

Ask a question

repotools -export and -import


David Weber (761810) | asked Jun 08 '09, 11:50 a.m.
I need to understand how to apply schema changes from a new plugin component with an ecore model to the database.

For example, I provision a new component with an ecore model. After provisioning, I run 'repotools -addTables' against the database, and a new schema gets created for the component. All is well so far.

Now, the developer updates the ecore model for the same component. From a previous jazz.net question, I understand that this scenario must be handled with repotools -export/-import.

My question is.... when I run -import after provisioning the updated component, do I first need to drop the database and recreate it, or can I just run repotools -import against the existing database?

Thanks,

Dave

2 answers



permanent link
Manoj Tiwari (4684) | answered Jun 09 '09, 10:43 a.m.
JAZZ DEVELOPER
I need to understand how to apply schema changes from a new plugin component with an ecore model to the database.

For example, I provision a new component with an ecore model. After provisioning, I run 'repotools -addTables' against the database, and a new schema gets created for the component. All is well so far.

Now, the developer updates the ecore model for the same component. From a previous jazz.net question, I understand that this scenario must be handled with repotools -export/-import.

My question is.... when I run -import after provisioning the updated component, do I first need to drop the database and recreate it, or can I just run repotools -import against the existing database?

Thanks,

Dave


Hi,

From command prompt try this syntax (for export and Import option seperately), before running make sure that Tomcat/WAS server is shutdown.

eg. repotools -export toFile=/export.tar

Regards,
Manoj

permanent link
Balaji Krish (1.8k12) | answered Jun 09 '09, 10:32 a.m.
JAZZ DEVELOPER
repotools -import drops and recreates the tables (i.e. import = creating a new database + importing the contents of the tar created during export).

So, you need to do an export first to export the contents to a tar file. You might also need to write a migrate handler to migrate the old schema contents to new contents. Then perform an import using the exported tar file. If the model change is a simple addition or removal of attributes, you don't need to write a migration handler.


--- Balaji
Jazz Server Team

I need to understand how to apply schema changes from a new plugin component with an ecore model to the database.

For example, I provision a new component with an ecore model. After provisioning, I run 'repotools -addTables' against the database, and a new schema gets created for the component. All is well so far.

Now, the developer updates the ecore model for the same component. From a previous jazz.net question, I understand that this scenario must be handled with repotools -export/-import.

My question is.... when I run -import after provisioning the updated component, do I first need to drop the database and recreate it, or can I just run repotools -import against the existing database?

Thanks,

Dave

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.