If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Is it possible to export data model in XML ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-31-07, 02:28
mr_coffee mr_coffee is offline
Registered User
 
Join Date: Aug 2007
Posts: 28
Question Is it possible to export data model in XML ?

Hello everyone.

I was wondering if it was possible to export a physical database model (db2) with XML?

Right now I'm using Rational Software Architect (IBM) but I wasn't able to get the export/import XML feature to work.

I just wasn't sure if it was even possible or not to export a database schema/data in XML.
Reply With Quote
  #2 (permalink)  
Old 08-31-07, 06:30
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You can use DB2's pureXML functions to build XML documents and export those. For the schema, you just query the DB2 catalog.

What were your problems with the XML feature? (Which platform, which version of DB2, what exactly did you try, what was the exact error message?)
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 08-31-07, 13:34
mr_coffee mr_coffee is offline
Registered User
 
Join Date: Aug 2007
Posts: 28
Thanks for the reply!

I'm also working at IBM, just a co-op though at RTP, NC.

I tried the following:

I went to Rational Software Architect, and once I connected to a database I then opened up a schema and selected one of the tables.

I then clicked extra data as XML.

I then clicked:
com.ibm.db2.jcc.c.SqlException

NOTE: I changed the naem to Blah.Blah_STORAGE during this paste so nothing confidential is shown. But the real name is valid.


Code:
com.ibm.db2.jcc.c.SqlException: "Blah.Blah_STORAGE" is an undefined name.
	at com.ibm.db2.jcc.c.fg.e(Unknown Source)
	at com.ibm.db2.jcc.c.fg.a(Unknown Source)
	at com.ibm.db2.jcc.b.gb.g(Unknown Source)
	at com.ibm.db2.jcc.b.gb.a(Unknown Source)
	at com.ibm.db2.jcc.b.w.a(Unknown Source)
	at com.ibm.db2.jcc.b.vb.g(Unknown Source)
	at com.ibm.db2.jcc.c.fg.n(Unknown Source)
	at com.ibm.db2.jcc.c.fg.a(Unknown Source)
	at com.ibm.db2.jcc.c.fg.a(Unknown Source)
	at com.ibm.db2.jcc.c.fg.executeQuery(Unknown Source)
	at org.eclipse.wst.rdb.internal.core.connection.StatementAdapter.executeQuery(Unknown Source)
	at com.ibm.etools.sqltoxml.SQLDatabaseObject.executeStatement(Unknown Source)
	at com.ibm.etools.sqltoxml.SQLToXML.executeStatement(Unknown Source)
	at com.ibm.etools.sqltoxml.SQLToXML.executeQuery(Unknown Source)
	at com.ibm.etools.sqltoxml.SQLToXML.execute(Unknown Source)
	at com.ibm.etools.sqltoxml.SQLToXML.execute(Unknown Source)
	at com.ibm.ccl.xtt.sqlxml.ui.extract.XMLFromSQLPage.generateAllArtifacts(Unknown Source)
	at com.ibm.ccl.xtt.sqlxml.ui.extract.GenerateXMLOperation.execute(Unknown Source)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1****n(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace****n(Unknown Source)
	at org.eclipse.ui.actions.WorkspaceModifyOperation****n(Unknown Source)
	at org.eclipse.jface.operation.ModalContext****nInCurrentThread(Unknown Source)
	at org.eclipse.jface.operation.ModalContext****n(Unknown Source)
	at org.eclipse.jface.wizard.WizardDialog****n(Unknown Source)
	at com.ibm.ccl.xtt.sqlxml.ui.extract.XMLFromSQLPage.generate(Unknown Source)
	at com.ibm.ccl.xtt.sqlxml.ui.extract.GenerateXMLFromSQLWizard.performFinish(Unknown Source)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(Unknown Source)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(Unknown Source)
	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Unknown Source)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Display****nDeferredEvents(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.eclipse.jface.window.Window****nEventLoop(Unknown Source)
	at org.eclipse.jface.window.Window.open(Unknown Source)
	at com.ibm.ccl.xtt.sqlxml.ui.extract.ExtractDataAction****n(Unknown Source)
	at org.eclipse.ui.internal.PluginAction****nWithEvent(Unknown Source)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Unknown Source)
	at org.eclipse.jface.action.ActionContributionItem.access$2(Unknown Source)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Display****nDeferredEvents(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.eclipse.ui.internal.Workbench****nEventLoop(Unknown Source)
	at org.eclipse.ui.internal.Workbench****nUI(Unknown Source)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.internal.ide.IDEApplication****n(Unknown Source)
	at org.eclipse.core.internal****ntime.PlatformActivator$1****n(Unknown Source)
	at org.eclipse.core****ntime.internal.adaptor.EclipseAppLauncher****nApplication(Unknown Source)
	at org.eclipse.core****ntime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
	at org.eclipse.core****ntime.adaptor.EclipseStarter****n(Unknown Source)
	at org.eclipse.core****ntime.adaptor.EclipseStarter****n(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
	at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
	at org.eclipse.core.launcher.Main****n(Unknown Source)
	at org.eclipse.core.launcher.Main.main(Unknown Source)
I also tried to export the physical model in RSA of the database and got the following error:

I clicked my project, clicked export, then seelected Data then Data model export wizard,

I then get the following error:

MITI.bridges.mimb.MIRModelBridge (initialization failure)

Code:
java.lang.NoClassDefFoundError: MITI.bridges.mimb.MIRModelBridge (initialization failure)
	at java.lang.J9VMInternals.initialize(Unknown Source)
	at com.ibm.datatools.metadata.wizards.miti.pages.MitiInitialExportPage.<init>(Unknown Source)
	at com.ibm.datatools.metadata.wizards.miti.pages.MitiExportWizard.addPages(Unknown Source)
	at org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(Unknown Source)
	at org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(Unknown Source)
	at org.eclipse.ui.internal.dialogs.ImportExportPage.getNextPage(Unknown Source)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed(Unknown Source)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(Unknown Source)
	at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Unknown Source)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Display****nDeferredEvents(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.eclipse.jface.window.Window****nEventLoop(Unknown Source)
	at org.eclipse.jface.window.Window.open(Unknown Source)
	at org.eclipse.ui.actions.ExportResourcesAction****n(Unknown Source)
	at org.eclipse.ui.actions.BaseSelectionListenerAction****nWithEvent(Unknown Source)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Unknown Source)
	at org.eclipse.jface.action.ActionContributionItem.access$2(Unknown Source)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Display****nDeferredEvents(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.eclipse.ui.internal.Workbench****nEventLoop(Unknown Source)
	at org.eclipse.ui.internal.Workbench****nUI(Unknown Source)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.internal.ide.IDEApplication****n(Unknown Source)
	at org.eclipse.core.internal****ntime.PlatformActivator$1****n(Unknown Source)
	at org.eclipse.core****ntime.internal.adaptor.EclipseAppLauncher****nApplication(Unknown Source)
	at org.eclipse.core****ntime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
	at org.eclipse.core****ntime.adaptor.EclipseStarter****n(Unknown Source)
	at org.eclipse.core****ntime.adaptor.EclipseStarter****n(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
	at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
	at org.eclipse.core.launcher.Main****n(Unknown Source)
	at org.eclipse.core.launcher.Main.main(Unknown Source)
I googled this error and it seems that I have to set the class path....but I have no idea what the variable is called nor where I would set the class path.

On an IBM forum someone said:
Quote:
I saw someone else said to do the following:
With RDA v7.0, you need to set the PATH varible for Import/Export to

"C:\Program Files\IBM\SDP70Shared\plugins\com.ibm.datatools.me tadata.wizards.miti.win32_1.0.0.v200611151024\Meta Integration\bin"
The database is DB2 v8.2
Software Architect v 7.0.0.3
Windows Xp Pro


What I'm trying to do is figure out a way to translate this database that is object oriented and make it into a DB2 database, and its data then re-read it into Rational Software Architect to create a physical data model, then I could just generate the DDL through its generation function since I can't directly reverse engineer the Object Oriented Database.

I thought maybe XML could help me make this translation....do you have any better ideas?


Thanks!

Last edited by mr_coffee; 08-31-07 at 13:38.
Reply With Quote
  #4 (permalink)  
Old 09-02-07, 15:03
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
If your real "Blah.Blah_STORAGE" is really valid and exists, it may be a good idea to collect a JDBC trace to see what is going on between RAD and DB2.

p.s: If you want to, you can drop me an email.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On