2

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.

  • 2
    Exported by what tool? – Balazs Papp Sep 1 '17 at 14:04
  • I'm not sure, its been provided by a third party, I believe it was Oracle expdp. – Seb Sep 1 '17 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. – Andrew Brennan Sep 1 '17 at 16:03
  • But as @BalazsPapp implies, if this is standard format XML then there's already loads of tools for importing it – Andrew Brennan Sep 1 '17 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 Sep 1 '17 at 16:31
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!

  • "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 !! – granadaCoder Apr 3 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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