Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Moving data from one table with column of xmltype to another.

sbordenMar 7 2011 — edited Mar 8 2011
I am running into some issues on Oracle 11G(11.2.0.2) where I cannot move table from one table with a column of xmltype (using OR) to another. The following statement fails:


SQL> insert into schema_a.table_a
2 select * from schema_b.table_b
3 where rownum <2;
insert into schema_a.table_a
*
ERROR at line 1:
ORA-19007: Schema http://......... does
not match expected http://.........


There are 2 separate, but identical xml schemas that are registered to separate db schemas in the same rac cluster. Both schemas have had identical changes applied to them using the inplaceevolve procedure.

The only way we can get this to work is by doing this:

SQL> insert into schema_a.table_a
2 (col_a,col_b,col_c,col_d,col_e,col_f,col_g,col_h,col_i,col_j)
3 select col_a,col_b,col_c,col_d,XMLTYPE.CREATEXML(tbl_b.col_e.getclobval()),col_f,col_g,col_h,col_i,col_j from schema_b.table_b tbl_b
4 where rownum <2;

1 row created.

Also, this process is for archival and query by reporting users. We know that the source has been already passed schema validation so is there also a way to bypass that upon moving it to the archive table?

Would there be a better storage model (one that allows indexing for reports) than Object relational for this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2011
Added on Mar 7 2011
3 comments
345 views