Re: remapping output from dbms_metadata.get_ddl

  • From: Adric Norris <spikey.mcmarbles@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 19 Feb 2010 12:18:52 -0600

Sorry folks... the idjit submitter pasted part of his example from the wrong
window. :(  It didn't really change the results, but certainly made it looks
like the output was as expected.  The corrected example is:

SQL> create materialized view mv
  2     tablespace users
  3     refresh force on demand
  4  as select * from dual;

Materialized view created.

SQL> begin
  2     dbms_metadata.set_remap_param(
  3        dbms_metadata.session_transform,
  4        'REMAP_TABLESPACE',
  5        'USERS', 'FOO');
  6  end;
  7  /

PL/SQL procedure successfully completed.

SQL> select dbms_metadata.get_ddl('MATERIALIZED_VIEW', 'MV') ddl from dual;

  CREATE MATERIALIZED VIEW "SYSTEM"."MV" ("DUMMY")
  ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS
LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS"
  BUILD IMMEDIATE
  USING INDEX
  REFRESH FORCE ON DEMAND
  USING DEFAULT LOCAL ROLLBACK SEGMENT
  USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE
  AS select * from dual

Sorry for the confusion.

-- 
"I'm too sexy for my code." -Awk Sed Fred.

Other related posts: