DBMS_METADATA get DLL edit it and put XML problem
601606Jun 11 2008 — edited Jun 12 2008Hello
I am trying to use DBMS_METADATA.PUT function to have synchronized two DB schemas on object (not data) level. I do comparing of table structures and packages. I retrieve, for example, table from one schema and I have it converted into DDL (DBMS_METADATA.ADD_TRANSFORM(l_h, 'DDL') transform added).
I've got rid of tablespace, storage clausules, indexes, PKs, FKs, ... I have only clean structure of table that contains name of table, column names and column data types. DDL is stored in CLOB. This cleaning has been done by applying DBMS_METADATA.SET_TRANSFORM_PARAM functions.
DDL is processed and changed exactly how I want, but problem is how to commit this CLOB into DB by using DBMS_METADATA.PUT that accepts only XML. This XML format looks a bit strange to me (as I can see it when I retrieve table structure without using DBMS_METADATA.ADD_TRANSFORM(l_h, 'DDL') transformation) and I haven't found way how to convert DDL back into this XML yet.
Is there any way how to transform my modified DDL as I described higher into that strange XML that I can pass it into DBMS_METADATA.PUT function?
Thanks for help!
Jakub