Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_metadata set_remap_param tablespace
Ronald Rood wrote:
> Hi,
>
> I must be missing something but fail to see what ... When I try to
> use the remap tablespace transformation I get the ddl returned
> without tablespace assignment instead of what I was hoping for, the
> new value for the tablespace that I tried to remap the table to.
>
> Does anybody know of simple example that shows how to use this ? I
> already lost my hair ... ;-)
>
> objectOpenHandle := dbms_metadata.open(object_type => object.type,
> network_link => 'bron');
> dbms_metadata.set_filter(objectOpenHandle,'NAME',object.name);
> dbms_metadata.set_filter(objectOpenHandle,'SCHEMA',object.owner);
> objectTransHandle:=dbms_metadata.add_transform(objectOpenHandle,'DDL');
> dbms_metadata.set_remap_param(objectTransHandle,'TABLESPACE',
> object.remap_from, object.remap_to);
> objectDDLs := dbms_metadata.fetch_ddl(objectOpenHandle);
>
> Here objectDDLs(1).ddltext contains sql of the table but has no
> tablespace. Without the set_remap_param it shows the complete ddl,
> including tablespace.
I guess you need to add a Modify transform like described in Example 18.5
in:
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/metadata_api.htm
HTH
-- JeroenReceived on Sun Apr 22 2007 - 16:17:45 CDT