3

I have a database schema exported into XML format.

My goal is to create a DDL statement from the XSD files that I can use to import the data into a different platform without manually having to parse it myself.

There is very little information on XSD files in general and it seems that only Oracle have any support at all for them.

8
  • 2
    Exported by what tool? Commented Sep 1, 2017 at 14:04
  • I'm not sure, its been provided by a third party, I believe it was Oracle expdp.
    – Seb
    Commented Sep 1, 2017 at 15:34
  • You could use the XMLTable function to generate a create table statement and an XPath based on the XSD, but you might be better off just figuring out the XPath yourself and using XMLTable on the XML itself. Skip the middleman. Commented Sep 1, 2017 at 16:03
  • But as @BalazsPapp implies, if this is standard format XML then there's already loads of tools for importing it Commented Sep 1, 2017 at 16:05
  • You probably should investigate using impdp with sqlfile parameter to make life easier. your comment mentions expdp, so likely you have a expdp dump file.
    – Raj
    Commented Sep 1, 2017 at 16:31

1 Answer 1

2

Sometimes you overlook the basic tools; Microsoft Access Imported the file straight up.

Opened a new Blank Database in Access

External Data -> XML File -> Select the file.

Then I pointed my Access database to an SQL Server backend and just used SSMS to generate the DDL Statement to make the schema portable.

Thanks for the help!

1
  • "Database Tools" / "Sql Server" will create Sql Server as well (you pick the objects to create on sql-server). Also, you can internet search "Access Upsizing Wizard". But thanks for this tip, I did overlook it !! Commented Apr 3, 2019 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.