Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

repotools -export and -import

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

0 votes



2 answers

Permanent link
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

0 votes


Permanent link
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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Jun 08 '09, 11:50 a.m.

Question was seen: 7,028 times

Last updated: Jun 08 '09, 11:50 a.m.

Related questions
Confirmation Cancel Confirm