Problem with dbms_metadata.get_ddl

When I issue following statement:
Select DBMS_METADATA.GET_DDL ('TABLE', 'ACQ_OPSC')
From Dual;
I get these errors.
Error:
ORA-06502: PL/SQL: Numeric or Value Error.
LPX-00210: Expected '<' instead of 'n'
ORA-06512: at "sys.utl_xml", line 0
bunch more ORA-06512 errors.
Oracle version: Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
What is the problem?

Please check dbmssml.sql and initmeta.sql under $ORACLE_HOME/rdbms/admin if you have changed your oracle home after installation to patch - A common practice though not blessed by oracle. These files will have value of original ORACLE_HOME hard coded in them. You have to update them manually with the new ORACLE_HOME. Once you update it run them on each database that is using this ORACLE_HOME.

Similar Messages

  • Problem with DBMS_METADATA.GET_DDL and subpartitions

    I have problems with DBMS_METADATA.GET_DDL in a 11gR2 (11.2.0.3) database on Linux. The following example shows the problem:
    CREATE TABLE Test_tbl
    C1 NUMBER(14),
    C2 NUMBER(14),
    C3 NUMBER(14)
    PARTITION BY RANGE (C1)
    SUBPARTITION BY LIST (C2)
    PARTITION Part1 VALUES LESS THAN (1000)
    , PARTITION Part2 VALUES LESS THAN (2000)
    CREATE INDEX Test_idx ON Test_tbl (C3) LOCAL;
    When I execute
    SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    on a 10g database (10.2.0.2.0) on Solaris Sparc and on a 11.1.0.7 on Windows, it gives the correct DDL statement within some seconds.
    On the 11.2.0.3 database (Linux) it hangs forever.
    SQL> SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    ^CERROR:
    ORA-01013: user requested cancel of current operation
    This behavior only seems to occur in combination with local indexes and subpartitions.
    Anyone any idea?
    Thx, Carsten

    user592634 wrote:
    I have problems with DBMS_METADATA.GET_DDL in a 11gR2 (11.2.0.3) database on Linux. The following example shows the problem:
    CREATE TABLE Test_tbl
    C1 NUMBER(14),
    C2 NUMBER(14),
    C3 NUMBER(14)
    PARTITION BY RANGE (C1)
    SUBPARTITION BY LIST (C2)
    PARTITION Part1 VALUES LESS THAN (1000)
    , PARTITION Part2 VALUES LESS THAN (2000)
    CREATE INDEX Test_idx ON Test_tbl (C3) LOCAL;
    When I execute
    SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    on a 10g database (10.2.0.2.0) on Solaris Sparc and on a 11.1.0.7 on Windows, it gives the correct DDL statement within some seconds.
    On the 11.2.0.3 database (Linux) it hangs forever.
    SQL> SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    ^CERROR:
    ORA-01013: user requested cancel of current operationWhy did you cencel this operation? Usually it takes time. If its taking more then it would be better to gather dictionary stats once.
    SQL>exec DBMS_STATS.GATHER_DICTIONARY_STATS;
    >
    This behavior only seems to occur in combination with local indexes and subpartitions.
    Anyone any idea?
    Thx, CarstenI didn't get any problem in 11.2.0.1 database:
    SQL> CREATE TABLE Test_tbl
      2  (
      3  C1 NUMBER(14),
      4  C2 NUMBER(14),
      5  C3 NUMBER(14)
      6  )
      7  PARTITION BY RANGE (C1)
      8  SUBPARTITION BY LIST (C2)
      9  (
    10  PARTITION Part1 VALUES LESS THAN (1000)
    11  , PARTITION Part2 VALUES LESS THAN (2000)
    12  );
    Table created.
    SQL>
    SQL> CREATE INDEX Test_idx ON Test_tbl (C3) LOCAL;
    Index created.
    SQL>
    SQL> SELECT DBMS_METADATA.GET_DDL('INDEX','TEST_IDX') from dual;
    DBMS_METADATA.GET_DDL('INDEX','TEST_IDX')
      CREATE INDEX "SYS"."TEST_IDX" ON "SYS"."TEST_TBL" ("C3")
      PCTFREE 10 INITRAEdited by: 909592 on Mar 22, 2012 9:01 PM

  • Spool Command with dbms_metadata.GET_DDL function

    Hi All,
    My requirement is before applying a patch on the Database Schema, I need to take a backup of the db objects DDL script, so that incase if I want to rollback I can use it. what I am trying to use is the dbms_metadata.GET_DDL function to get the DDL script and with the help of spool command store that in a text file.
    The problem I am encountering is the whole script runs without an error but whne I check the spool file for certain big packages the DDL script is not fully exported. The below is the script that I make use of to generate the DDL script.
    set heading off
    set feedback off
    set echo off
    set term off
    set newpage none
    set space 0
    set trimout on
    set TRIMSPOOL ON
    column c1 format a4000
    set long 99999
    set lines 1000
    exec DBMS_METADATA.SET_TRANSFORM_PARAM (DBMS_METADATA.SESSION_TRANSFORM, 'PRETTY', true);
    spool c:\Rollback.sql
    select dbms_metadata.GET_DDL('FUNCTION',u.object_name) || '/' c1
    from user_objects u
    where object_type = 'FUNCTION'
    and object_name in ('FN_CALCMASTERDATA_AGE','FUNC_ASSIGNBENEFITSNONFLEX','FUNC_CHECKNEWEMPLOYEE');
    select dbms_metadata.GET_DDL('PACKAGE_SPEC',u.object_name) || '/' c1
    from user_objects u
    where object_type = 'PACKAGE'
    and object_name in('PKGT_BEN_YEAR_DETL','PKGT_BENS_TEST');
    select dbms_metadata.GET_DDL('PACKAGE_BODY',u.object_name) || '/' c1
    from user_objects u
    where object_type = 'PACKAGE'
    and object_name in ('PKGT_BEN_YEAR_DETL','PKGT_BENS_TEST','PKGT_FLEX_INITIALIZATION','PKGT_EMP');
    spool off
    Note: Database Oracle 10 g,
    Client Machine Windows XP from where the script is ran.
    Is there any limitation in amount of data that can be spooled? or is there is any better way to accomplish this task, please help.
    Thanks
    Saami

    set long longer ;-)
    set long 1000000 longchunksize 1000000 linesize 32000 pagesize 0

  • Dbms_metadata.get_ddl and select_catalog_role

    Hi,
    We have been requested to give support staff the ability to see table triggers, stored procedures, etc only for specific schemas and they don't have access to the schema password. We can't give them SELECT_CATALOG_ROLE because they are not allowed to see all schemas. I wish there were a way to grant a version of SELECT_CATALOG_ROLE for only certain schemas......
    I've played around with dbms_metadata.get_ddl with no luck (as per the documentation, but just had to try it anyway). I've even considered the script below, but it requires creating a view under the SYS schema and I can't figure out how to add triggers to the view.
    Any ideas would be greatly appreciated!
    Thanks,
    Susan
    accept 1 prompt "Enter Owner:"
    create or replace view all_dev_source
    (OWNER, NAME, TYPE, LINE, TEXT)
    as
    select u.name, o.name,
    decode(o.type#, 7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
    11, 'PACKAGE BODY', 13, 'TYPE', 14, 'TYPE BODY',
    'UNDEFINED'),
    s.line, s.source
    from sys.obj$ o, sys.source$ s, sys.user$ u
    where
    u.name = upper('&&1') and
    o.obj# = s.obj#
    and o.owner# = u.user#
    and o.type# in (7, 8, 9, 11, 13, 14)
    and
    o.owner# in (userenv('SCHEMAID'), 1 /* PUBLIC */)
    or
    (o.type# = 7 or o.type# = 8 or o.type# = 9)
    and
    o.obj# in (select obj# from sys.objauth$
    where grantee# in (select kzsrorol from x$kzsro)
    and privilege# = 12 /* EXECUTE */)
    or
    exists
    select null from sys.sysauth$
    where grantee# in (select kzsrorol from x$kzsro)
    and
    /* procedure */
    (o.type# = 7 or o.type# = 8 or o.type# = 9)
    or
    privilege# = -144 /* EXECUTE ANY PROCEDURE */
    or
    privilege# = -141 /* CREATE ANY PROCEDURE */
         or
    /* package body */
    o.type# = 11 or
    privilege# = -141 /* CREATE ANY PROCEDURE */
    or
    /* type */
    o.type# = 13
    or
    privilege# = -184 /* EXECUTE ANY TYPE */
    or
    privilege# = -181 /* CREATE ANY TYPE */
         or
    /* type body */
    o.type# = 14 and
    privilege# = -181 /* CREATE ANY TYPE */
    union
    select u.name, o.name, 'JAVA SOURCE', s.joxftlno, s.joxftsrc
    from sys.obj$ o, x$joxfs s, sys.user$ u
    where
    u.name = upper('&&1') and
    o.obj# = s.joxftobn
    and o.owner# = u.user#
    and o.type# = 28
    and
    o.owner# in (userenv('SCHEMAID'), 1 /* PUBLIC */)
    or
    o.obj# in (select obj# from sys.objauth$
    where grantee# in (select kzsrorol from x$kzsro)
    and privilege# = 12 /* EXECUTE */)
    or
    exists
    select null from sys.sysauth$
    where grantee# in (select kzsrorol from x$kzsro)
    and
    /* procedure */
    privilege# = -144 /* EXECUTE ANY PROCEDURE */
    or
    privilege# = -141 /* CREATE ANY PROCEDURE */
    comment on table all_dev_source is
    'Current source on stored objects that user is allowed to create'
    comment on column all_dev_source.OWNER is
    'Owner of the object'
    comment on column all_dev_source.NAME is
    'Name of the object'
    comment on column all_dev_source.TYPE is
    'Type of the object: "TYPE", "TYPE BODY", "PROCEDURE", "FUNCTION",
    "PACKAGE", "PACKAGE BODY" or "JAVA SOURCE"'
    comment on column all_dev_source.LINE is
    'Line number of this line of source'
    comment on column all_dev_source.TEXT is
    'Source text'
    grant select on all_dev_source to <username>
    /

    user632322 wrote:
    I think I am misunderstanding your reply becauseI had to be more specific. By "privileged user" I meant SYS. SELECT_CATALOG_ROLE is a role itself, so it will be ignored by definer rights SP/SF. That is why it has to be owned by privileged user SYS:
    SQL> select * from v$version
      2  /
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> show user
    USER is "SYS"
    SQL> create user u1 identified by u1 default tablespace users quota unlimited on users
      2  /
    User created.
    SQL> grant create session to u1
      2  /
    Grant succeeded.
    SQL> create or replace
      2    function get_ddl(
      3                     p_type varchar2,
      4                     p_object varchar2,
      5                     p_owner varchar2
      6                    )
      7      return clob
      8      is
      9      begin
    10          return dbms_metadata.get_ddl(p_type,p_object,p_owner);
    11  end;
    12  /
    Function created.
    SQL> grant execute on get_ddl to u1
      2  /
    Grant succeeded.
    SQL> connect u1/u1
    Connected.
    SQL> set serveroutput on
    SQL> exec dbms_output.put_line(dbms_metadata.get_ddl('TABLE','EMP','SCOTT'));
    BEGIN dbms_output.put_line(dbms_metadata.get_ddl('TABLE','EMP','SCOTT')); END;
    ERROR at line 1:
    ORA-31603: object "EMP" of type TABLE not found in schema "SCOTT"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 2806
    ORA-06512: at "SYS.DBMS_METADATA", line 4333
    ORA-06512: at line 1
    SQL> exec dbms_output.put_line(sys.get_ddl('TABLE','EMP','SCOTT'));
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL"
    NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT
    "PK_EMP" PRIMARY KEY ("EMPNO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
    COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
    2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
    REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) 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)
      TABLESPACE "USERS"
    PL/SQL procedure successfully completed.
    SQL> Now one more correction to my previous reply. Driver table shoudl not be owned by SYS (that would be bad practice). Create it in some other schema. Just make sure your "support staff" has no access to it.
    SY.

  • Use of DBMS_METADATA.GET_DDL with respect to triggers

    We are very pleased with DMBS_METADATA for punching DDLs in general, We use the following to create executable scripts for recreating any object in our databases.
    SELECT DBMS_METADATA.GET_DDL('OBJECT_TYPE', 'OBJECT_NAME', 'SAINADM' ) from dual;
    In most types of object, the DDL produced can be executed without errors, providing that the original target object was well founded. However, we have found that in the case of a triggers, the DDL produced does not function for the following reason:
    EXAMPLE
    -- This set of instructions is produced by a metascript too complicated to show here
    SPOOL TRIGGER_NAME.trg
    SELECT DBMS_METADATA.GET_DDL('TRIGGER', 'TRIGGER_NAME', 'SCHEMA_NAME' ) txt
    FROM DUAL;
    SPOOL OFF
    END OF EXAMPLE
    This will produce the following output, spooled to the file TRIGGER_NAME.trg
    OUTPUT
    -- we have anonymised our object names
    -- the syntax is what I would like you to focus on
    CREATE OR REPLACE TRIGGER "SCHEMA_NAME"."TRIGGER_NAME"
    BEFORE INSERT on SCHEMA_NAME.TABLE_NAME FOR EACH ROW
    BEGIN
    select SCHEMA_NAME.SEQUENCE_NAME.nextval
    into :new.colname
    from dual;
    END;
    ALTER TRIGGER SCHEMA_NAME"."TRIGGER_NAME" ENABLE
    _END OF OUTPUT_
    Note what has happened.
    1. The trigger DDL has been produced
    2. So has a the ALTER TRIGGER ... ENABLE
    3. BUT => between the trigger DDL and the alter trigger statement the is no slash (of course, because naturally DBMS_METADATA does not produce such characters). BUT this is problematic, because the combination of the Create trigger statement and the alter trigger statement, without a slash in between means that the spool file is atomically illegal. Because in real life we need a slash between the two staements.
    Why is this a problem for us?
    - Because we are about to introduce the automation of object changes between our "Development" "Integration" "Quality Assurance" and "Production" databases based on the execution of files produced by DBMS_METADATA.GET_DDL. For every other type of object, the file produced is well founded and executable DDL that will create the object. But in the case of triggers, the existence of the alter trigger statement renders the foregoing create trigger statement unexecutable.
    The use of DMBS_METADATA is more or less vanilla. That is to say, there appears to be no scope for instructing DBMS_METADATA to abstain form including the alter trigger statement
    SELECT DBMS_METADATA.GET_DDL('TRIGGER', 'TRIGGER_NAME', 'SCHEMA_NAME' ) txt
    Here are my questions
    1. How can we punch the DDL for triggers without bringing the alter trigger statement
    2. Alternatively, how can we automate the insertion of the slash character in between the CREATE TRIGGER and the ALTER TRIGGER in the original metascript that creates the example spool file.
    Thanks for your attention. Every response will be welcomed.
    Edited by: user10248070 on Mar 2, 2010 3:54 AM

    You can use
    dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR', TRUE );See http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10577/d_metada.htm#BGBJBFGE.
    Example:
    SQL> set long 1000
    SQL> set heading off
    SQL> select * from v$version;
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> exec dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR', TRUE );
    PL/SQL procedure successfully completed.
    SQL> SELECT DBMS_METADATA.GET_DDL('TRIGGER', 'UPDATE_JOB_HISTORY', 'HR' ) txt
      2  FROM DUAL;
      CREATE OR REPLACE TRIGGER "HR"."UPDATE_JOB_HISTORY"
      AFTER UPDATE OF job_id, department_id ON employees
      FOR EACH ROW
    BEGIN
      add_job_history(:old.employee_id, :old.hire_date, sysdate,
                      :old.job_id, :old.department_id);
    END;
    ALTER TRIGGER "HR"."UPDATE_JOB_HISTORY" ENABLE;Edited by: P. Forstmann on 2 mars 2010 13:48

  • Execute immediate on DBMS_METADATA.GET_DDL with error of ORA-01031: insufficient privileges

    I want to mirror a schema to a existing schema by creating DDL and recreate on the other schema with same name.
    I wrote the code below:
    create or replace
    PROCEDURE                                    SCHEMA_A."MAI__DWHMIRROR"
    AS
    v_sqlstatement CLOB:='bos';
    str varchar2(3999);
    BEGIN
      select
        replace(
          replace(replace(
          replace(DBMS_METADATA.GET_DDL('TABLE','XXXX','SCHEMA_A'),'(CLOB)',''),';','')
        ,'SCHEMA_A'
        ,'SCHEMA_B'
      into v_sqlstatement
      from dual;
      select  CAST(v_sqlstatement AS VARCHAR2(3999)) into str from dual;
      execute immediate ''||str;
    END;
    And Executing this block with below code:
    set serveroutput on
    begin
    SCHEMA_A.MAI__DWHMIRROR;
    end;
    But still getting the following error code:
    Error report:
    ORA-01031: insufficient privileges
    ORA-06512: at "SCHEMA_A.MAI__DWHMIRROR", line 47
    ORA-06512: at line 2
    01031. 00000 -  "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
               without the appropriate privilege. This error also occurs if
               attempting to install a database without the necessary operating
               system privileges.
               When Trusted Oracle is configure in DBMS MAC, this error may occur
               if the user was granted the necessary privilege at a higher label
               than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
               the required privileges.
               For Trusted Oracle users getting this error although granted the
               the appropriate privilege at a higher label, ask the database
               administrator to regrant the privilege at the appropriate label.

    user5199319 wrote:
    USER has DBA Role
    when all  else fails Read The Fine Manual
    DBMS_METADATA

  • DBMS_METADATA.GET_DDL has problem

    Hi all,
    I ran the following statement to get detail about index
    SELECT DBMS_METADATA.GET_DDL('INDEX','u.UX_myIndex)
    FROM USER_INDEXES u;
    and I got the error message:
    RA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 653
    ORA-06512: at "SYS.DBMS_METADATA", line 1260
    ORA-06512: at line 1
    Do you have any idea what is the problem here and
    how to fix it.
    Thank in advance,
    JP

    SELECT DBMS_METADATA.GET_DDL('INDEX','u.UX_myIndex)FROM USER_INDEXES u;
    in the above qry ending single quote is missing ('u.UX_myIndex)
    and object name won't be there like this u._____________
    and how many time u want the same data suppose user_indexes have 1000 rows the it will display 1000 times why don't to use dual table
    regs,
    naresh

  • Getting table script using dbms_metadata.get_ddl, but with clob field

    So, Oracle 11g R2..
    I'm using dbms_metadata.get_ddl to get table scripts and it's working fine..
    now, I have a table with clob field, and it's not working... I got an 'missing right parenthesis (ora-0907)' error...
    I could paste a script that I got, but I don't think it makes any sense..
    does anybody have some experience on using this package on clob tables?
    tnx

    this is script that I got... it's long, and it looks like it's not good
    CREATE TABLE "COMMON"."TEST_AAA2"
       (    "ID" NUMBER(10,0),
        "TEKST" VARCHAR2(200 CHAR),
        "UPDATESTAMP" DATE,
        "OBJEKAT" CLOB,
         CONSTRAINT "TEST_PART_PK2" PRIMARY KEY ("ID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      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"
      ALTER INDEX "COMMON"."TEST_PART_PK2"  UNUSABLE ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS  LOGGING
      STORAGE(
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE LOGGING
      STORAGE(
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))
      PARTITION BY RANGE ("UPDATESTAMP")
    (PARTITION "P_201012"  VALUES LESS THAN (TO_DATE(' 2011-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_201101"  VALUES LESS THAN (TO_DATE(' 2011-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_201102"  VALUES LESS THAN (TO_DATE(' 2011-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_ARCHIVE"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_201103"  VALUES LESS THAN (TO_DATE(' 2011-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_201104"  VALUES LESS THAN (TO_DATE(' 2011-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_ARCHIVE"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_201105"  VALUES LESS THAN (TO_DATE(' 2011-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_201106"  VALUES LESS THAN (TO_DATE(' 2011-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_ARCHIVE"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_201107"  VALUES LESS THAN (TO_DATE(' 2011-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE 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)) NOCOMPRESS ,
    PARTITION "P_MAXVALUE"  VALUES LESS THAN (MAXVALUE)
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      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 "COMMON_DATA"
    LOB ("OBJEKAT") STORE AS BASICFILE (
      TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      NOCACHE 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)) NOCOMPRESS )

  • Problem with UTL_FILE (please see my last post on this thread)

    Hi all,
    I'm trying to get the code (procedures, functions, etc) of my schemas. I've tried it using DBMS_METADATA.GET_DDL but it fails with many objects. Finally, I'm trying to create a procedure to extract the code.
    I've created this two procedures:
    CREATE OR REPLACE PROCEDURE spool_code (code IN varchar2, propi IN varchar2) is
    CURSOR codigo is
    select text from dba_source where name = code and owner = propi order by line;
    line varchar2(4000);
    BEGIN
    open codigo;
    loop
    fetch codigo into line;
    exit when codigo%notfound;
    dbms_output.put_line(line);
    end loop
    close;
    END;
    CREATE OR REPLACE PROCEDURE ext_codigo is
    CURSOR objeto is
    select object_name, owner from dba_objects where object_type in ('PROCEDURE','FUNCTION','PACKAGE')
    and owner not in ('OUTLN','DBSNMP','SYSTEM','SYS','REPADMIN','PERFSTAT','SPOTLIGHT','MONITOR','PRUEBAS','TOAD')
    and status='VALID';
    nom varchar2(128);
    owner varchar2(30);
    BEGIN
    open objeto;
    loop
    fetch objeto into nom, owner;
    exit when objeto%notfound;
    spool_code(nom, owner);
    end loop;
    close objeto;
    END;
    And I'm calling from sqlplus to spool it:
    SQL> spool Users_code.sql
    SQL> exec ext_codigo;
    But it don't bring me results...
    where is the problem??
    Thanks in advance for your support!
    dbajug
    Edited by: dbajug on Aug 29, 2012 6:36 AM

    Hi,
    yes guys, I've set serverout on using the max limit but, always fails with:
    ERROR at line 1:
    ORA-20000: ORU-10027: buffer overflow, limit of 1000000 bytes
    ORA-06512: at "SYS.DBMS_OUTPUT", line 35
    ORA-06512: at "SYS.DBMS_OUTPUT", line 198
    ORA-06512: at "SYS.DBMS_OUTPUT", line 139
    ORA-06512: at "SYS.SPOOL_CODE", line 15
    ORA-06512: at "SYS.EXT_CODIGO", line 17
    ORA-06512: at line 1
    I'm working with a 9i version trying to extract the code to migrate it to a 11g.
    In order to avoid the buffer error, I've decide use the UTL_FILE package but I'm having another problem: my procedure now is this
    CREATE OR REPLACE PROCEDURE spool_code (code IN varchar2, propi IN varchar2) is
    CURSOR codigo is
    select text from dba_source where name = code and owner = propi order by line;
    line varchar2(4000);
    out_file UTL_FILE.File_Type;
    BEGIN
    begin
    out_file := UTL_FILE.Fopen('/export/home/oracle', 'Users_code.sql', 'w');
    exception
    when others then
    dbms_output.put_line('Error opening file');
    end;
    open codigo;
    loop
    fetch codigo into line;
    exit when codigo%notfound;
    UTL_FILE.Put_Line(out_file, line);
    end loop;
    close codigo;
    UTL_FILE.Fclose(out_file);
    END;
    The directory exists and the file too but fails with this error:
    ERROR at line 1:
    **ORA-29282: invalid file ID**
    ORA-06512: at "SYS.UTL_FILE", line 714
    ORA-06512: at "SYS.SPOOL_CODE", line 23
    ORA-06512: at "SYS.EXT_CODIGO", line 17
    ORA-06512: at line 1
    any idea? about the reason? The file is a text file on the server:
    ls -lrt /export/home/oracle/Users_code.sql
    -rw-rw-r-- 1 oracle dba 0 Aug 29 14:43 /export/home/oracle/Users_code.sql
    best regards,
    dbajug

  • [RESOLVED] dbms_metadata.get_ddl() issues

    Hi all,
    I'm having a bit of an issue using the dbms_metadata package. I've never used it so possibly I'm unaware of something basic.
    I'm getting diferent results in my production and dev servers, both of which have this configuration:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    I am trying to replicate the DDL for one particular schema and so tried the following:
    SQL> select dbms_metadata.get_ddl('TABLE',u.table_name)
      2  from user_tables u
      3  where rownum = 1;
    ERROR:
    ORA-06502: PL/SQL: numeric or value error
    LPX-00210: expected '<' instead of 'n'
    ORA-06512: at "SYS.UTL_XML", line 0
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3698
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4553
    ORA-06512: at "SYS.DBMS_METADATA", line 458
    ORA-06512: at "SYS.DBMS_METADATA", line 615
    ORA-06512: at "SYS.DBMS_METADATA", line 1221
    ORA-06512: at line 1I tried again with hard-coding a table name and got these very scary results:
    SQL> select dbms_metadata.get_ddl('TABLE','CAMPAIGN_LOOKUP','XMLUSER') FROM DUAL;
    ERROR:
    ORA-06502: PL/SQL: numeric or value error
    ORA-31605: the following was returned from LpxXSLResetAllVars in routine
    kuxslResetParams:
    LPX-1: NULL pointer
    ORA-06512: at "SYS.UTL_XML", line 0
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3722
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4553
    ORA-06512: at "SYS.DBMS_METADATA", line 458
    ORA-06512: at "SYS.DBMS_METADATA", line 615
    ORA-06512: at "SYS.DBMS_METADATA", line 1221
    ORA-06512: at line 1in the above, I am logging in as the XMLUSER user and so owns the table campaign_lookup.
    Next I tried getting the DDL for another schema that while still logged in as xmluser.
    I'm certain that I have access read/write from the tclient table but got these results:
    possibly the dbms_metadata package requires you to be loged in as the schema owner though
    the oracle documentation link gives me a 404 error at the moment so I can't check.
    SQL> select dbms_metadata.get_ddl('TABLE','TCLIENT','TRAVEL') from dual;
    ERROR:
    ORA-31603: object "TCLIENT" of type TABLE not found in schema "TRAVEL"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 628
    ORA-06512: at "SYS.DBMS_METADATA", line 1221
    ORA-06512: at line 1So now I log into production:
    SQL> select dbms_metadata.get_ddl('TABLE',u.table_name)
      2      from user_tables u
      3      where rownum = 1;
    DBMS_METADATA.GET_DDL('TABLE',
      CREATE TABLE "XMLUSER"."CAMPAIGN_LOOKUP"
       (    "SCHEME_ID" VARCHAR2(30),
            "S
    etc...but still can't extract DDL for another schema.
    my main issue is, I can't log into production (or our implementation environment) as the schema
    I want to extract due to big nasty DBAs locking it all down. however I can in dev, but get the above errors.
    thoughts anyone?

    Hi,
    For your table not existing error it could be
    1) Table not existing
    or
    2) Nonprivileged users can see the metadata of only their own objects.
    SYS and users with SELECT_CATALOG_ROLE can see all objects
    For other problem, there is a bug reported for your version, can search in metalink for workaround
    Regards

  • Dbms_metadata.get_ddl not working in 11g

    Hi All,
    I need a quick help from you. Following is not working in 11g.
    dbms_metadata.get_ddl( 'MATERIALIZED_VIEW', Mview_name, owner )
    It is throwing me an error saying the Materialized view does not exist, though its exist.
    Please let me know, what is wrong here with 11g.

    Please let me know, what is wrong here with 11g.No problem here: Can you reproduce these steps:
    SQL> select * from v$version where rownum = 1
    BANNER                                                                         
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production         
    1 row selected.
    SQL> create materialized view mv_dummy as select * from dual
    Materialized View created.
    SQL> select dbms_metadata.get_ddl ('MATERIALIZED_VIEW', 'MV_DUMMY', user) ddl from dual
    DDL                                                                            
      CREATE MATERIALIZED VIEW "MICHAEL"."MV_DUMMY" ("DUMMY")                      
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOG
    GING                                                                           
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645        
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL 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                                                        
    1 row selected.?

  • Dbms_metadata.get_ddl wonder...

    I'm in the middle of testing a export/import of one database -A - to another - B - (the why is a long, complicated and convoluted discussion of business rules). So I want to grab the ddl for A, in order to create the tablespaces for B prior to importing. Okay, I'll just use dbms_metadata.get_ddl in A, do some editing, and run it in B. No problem. Worked fine. But... when I ran the import, I ran into error after error complaining about space. ?? I look at the script some more and see that the tablespace its importing into is only 1 MB. Its currently 1.5 GB in database A. More poking around, and I fine a difference between the script created with dbms_metadata.get_dd and one I've extracted from Enterprise Manager.
    dbms_metadata.get_dd:
    CREATE TABLESPACE "PTTBL" DATAFILE
    '/oradata/DBATST/data1/pttbl01.dbf' SIZE 1114112
    LOGGING ONLINE PERMANENT BLOCKSIZE 8192
    EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT MANUAL
    EM:
    CREATE TABLESPACE "PTTBL"
    LOGGING
    DATAFILE '/oradata/HSCPY/data1/pttbl01.dbf' SIZE 2000M REUSE
    AUTOEXTEND
    ON NEXT 51200K MAXSIZE 3000M EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT MANUAL
    Why the difference? I'm sure I'm missing something obvious, but I've been searching for an answer for this for quite a while.
    Thanks,
    Hal...

    here you go...
    13:00:46 hscpy.system> select * from DBA_TABLESPACES where tablespace_name = 'PTTBL';
    TABLESPACE_NAME BLOCK_SIZE INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE MIN_EXTLEN STATUS CONTENTS LOGGING FOR EXTENT_MAN ALLOCATIO PLU SEGMEN DEF_TAB_
    RETENTION BIG
    PTTBL 8192 65536 1 2147483645 65536 ONLINE PERMANENT LOGGING NO LOCAL SYSTEM NO MANUAL DISABLED
    NOT APPLY NO
    1 row selected.
    13:00:48 hscpy.system> select * from DBA_DATA_FILES where tablespace_name = 'PTTBL';
    FILE_NAME
    FILE_ID TABLESPACE_NAME BYTES BLOCKS STATUS RELATIVE_FNO AUT MAXBYTES MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS
    /oradata/HSCPY/data1/pttbl01.dbf
    102 PTTBL 2097152000 256000 AVAILABLE 102 YES 3145728000 384000 6400 2097086464 255992
    1 row selected.
    Yes, its a PeopleSoft database, and its not 1 MB in our "running" version. ;-) I've also looked more closely at the script I created with my incredibly complex script (select 'select dbms_metadata.get_ddl(''TABLESPACE'',''' || tablespace_name || ''') from dual;' from dba_tablespaces;) and am seeing more than a few with SIZE 1114112.
    I am running it in the same version of sqlplus. I've set my Oracle environment (with oraenv) to this HSCPY environment and use sqlplus from the same Oracle Home.
    Thanks,
    Hal...

  • Dbms_metadata.get_ddl and lob columns

    Good day, all,
    I get the disappointing results, below, when trying to use the 9i dbms_metadata browsing package against a table with a BLOB (or CLOB) column. In other cases, it works fine; so I believe that it is not a "setup" or security problem.
    Do you know any magic to get this to work?
    Thanks!
    Don M.
    SQL> create table x (c1 blob);
    Table created.
    SQL> select dbms_metadata.get_ddl ('TABLE','X','DMAIER') from dual;
    ERROR:
    ORA-19206: Invalid value for query or REF CURSOR parameter
    ORA-06512: at "SYS.DBMS_XMLGEN", line 83
    ORA-06512: at "SYS.DBMS_METADATA", line 345
    ORA-06512: at "SYS.DBMS_METADATA", line 410
    ORA-06512: at "SYS.DBMS_METADATA", line 449
    ORA-06512: at "SYS.DBMS_METADATA", line 615
    ORA-06512: at "SYS.DBMS_METADATA", line 1221
    ORA-06512: at line 1

    I have gone through some errors with invalid XDB objects when wanted to run dbms_metadata.get_ddl too. That was on 10gR2 (10.2.0.1 - though other instance was installed in "same" manner and everything worked ok). I had to drop and recreate XDK objects again - following some metalink note - I have posted the exact steps on metalink, I think I ran following commands from $ORACLE_HOME/RDBMS/ADMIN
    catnomta.sql
    catnodp.sql
    rmxml.sql
    catxml.sql
    utlcxml.sql
    prvtcxml.plb
    catnomta.sql
    dbmsmeta.sql
    dbmsmeti.sql
    dbmsmetu.sql
    catemeta.sql
    prvtmeta.plb
    prvtmeti.plb
    prvtmetu.plb
    initmeta.sql
    catdph.sql
    catdpb.sql
    initmeta.sql

  • Dbms_metadata.get_ddl returns text of table script but not the view

    Hi all
    I am using a DDL trigger like
    CREATE OR REPLACE TRIGGER SYS.log_ddl AFTER DDL
    ON DATABASE
    declare
    n_text varchar2(2000);
    begin
    if ora_sysevent='CREATE' and ora_dict_obj_type='VIEW' then
    select dbms_metadata.get_ddl
    (ora_dict_obj_type ,ora_dict_obj_name,ora_dict_obj_owner)
    into n_text from dual;
    elsif ora_sysevent='CREATE' and ora_dict_obj_type='TABLE' then
    select dbms_metadata.get_ddl
    (ora_dict_obj_type ,ora_dict_obj_name,ora_dict_obj_owner) into n_text from dual
    end if;
    end;
    on execution
    the first condition produces an error if the view does not already exists
    ORA-31603: object "TEST" of type VIEW not found in schema "SHAI"
    but the second condition of table creation executs successfuly and return the script of the table
    what can be the main theory behind this.

    I think some of the bug fixes were targeted for 9.2.0.5, but I can't tell you for certain.
    One of the things I really don't like about DBMS_METADATA is that it returns an error if a specified object does not exist. For example, I created a sql script that would accept a schema name as the input parameter and would generate all the ddl for the schema. If the schema did not have a particular object, for example a sequence, the call to DBMS_METADATA to generate the sequence ddl would return an error instead of returning nothing. I had error checking in the script, so this caused problems. (Oracle's response is that this is expected behaviour).
    This might be what is happening with your call.
    Dan

  • Performance issue when trying to execute DBMS_METADATA.GET_DDL of a table

    Hello.
    I have a database with lots of partitioned tables and indexes and when I try to get the DDL of a partitioned table the query runs for hours and does not end.
    I tried do gather data dictionary statistics but it had no impact on performance.
    Can anybody help me find what's causing this performance problem?
    Information about the enviorment:
    Oracle version:
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    DDL query:
    select dbms_metadata.get_ddl('TABLE', 'TABLE1') from dual;
    On the "Top Activity" of the Database Control console, this is the query that's running:
    SELECT /*+all_rows*/ SYS_XMLGEN(VALUE(KU$), XMLFORMAT.createFormat2('TABLE_T', '7')), KU$.OBJ_NUM
    FROM SYS.KU$_PHTABLE_VIEW KU$
    WHERE NOT (BITAND (KU$.PROPERTY,8192)=8192) AND NOT BITAND(KU$.SCHEMA_OBJ.FLAGS,128)!=0 AND KU$.SCHEMA_OBJ.NAME=:NAME1 AND KU$.SCHEMA_OBJ.OWNER_NAME=:SCHEMA2;
    Edited by: Krulikowski on Jan 11, 2013 10:44 AM

    |*563 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |
    | 564 | TABLE ACCESS CLUSTER | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*565 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 566 | VIEW | | 1 | 86 | | 4 (25)| 00:00:01 |
    | 567 | SORT ORDER BY | | 1 | 64 | | 4 (25)| 00:00:01 |
    | 568 | NESTED LOOPS | | 1 | 64 | | 3 (0)| 00:00:01 |
    | 569 | ID TABLE ACCESS BY INDEX ROW | SUBPARTCOL$ | 1 | 15 | | 2 (0)| 00:00:01 |
    |*570 | INDEX RANGE SCAN | I_SUBPARTCOL$ | 1 | | | 1 (0)| 00:00:01 |
    |*571 | TABLE ACCESS CLUSTER | COL$ | 1 | 49 | | 1 (0)| 00:00:01 |
    |*572 | INDEX UNIQUE SCAN | I_OBJ# | 1 | | | 0 (0)| 00:00:01 |
    | 573 | TABLE ACCESS CLUSTER | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*574 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 575 | TABLE ACCESS CLUSTER | SEG$ | 1 | 70 | | 3 (0)| 00:00:01 |
    |*576 | INDEX UNIQUE SCAN | I_FILE#_BLOCK# | 1 | | | 2 (0)| 00:00:01 |
    | 577 | ROWID TABLE ACCESS BY INDEX | DEFERRED_STG$ | 1 | 28 | | 2 (0)| 00:00:01 |
    |*578 | INDEX UNIQUE SCAN | I_DEFERRED_STG1 | 1 | | | 1 (0)| 00:00:01 |
    | 579 | TABLE ACCESS CLUSTER | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*580 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 581 | NESTED LOOPS | | 1 | 120 | | 5 (0)| 00:00:01 |
    | 582 | X ROWID TABLE ACCESS BY INDE | OBJ$ | 1 | 101 | | 4 (0)| 00:00:01 |
    |*583 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |
    | 584 | TABLE ACCESS CLUSTER | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*585 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 586 | R TABLE ACCESS CLUSTE | SEG$ | 1 | 70 | | 3 (0)| 00:00:01 |
    |*587 | INDEX UNIQUE SCAN | I_FILE#_BLOCK# | 1 | | | 2 (0)| 00:00:01 |
    | 588 | DEX ROWID TABLE ACCESS BY IN | DEFERRED_STG$ | 1 | 28 | | 2 (0)| 00:00:01 |
    |*589 | INDEX UNIQUE SCAN | I_DEFERRED_STG1 | 1 | | | 1 (0)| 00:00:01 |
    | 590 | TER TABLE ACCESS CLUS | TS$ | 1 | 18 | | 1 (0)| 00:00:01 |
    |*591 | N INDEX UNIQUE SCA | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 592 | STER TABLE ACCESS CLU | TS$ | 1 | 8 | | 1 (0)| 00:00:01 |
    |*593 | AN INDEX UNIQUE SC | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 594 | USTER TABLE ACCESS CL | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*595 | CAN INDEX UNIQUE S | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 596 | LUSTER TABLE ACCESS C | SEG$ | 1 | 70 | | 3 (0)| 00:00:01 |
    |*597 | SCAN INDEX UNIQUE | I_FILE#_BLOCK# | 1 | | | 2 (0)| 00:00:01 |
    | 598 | BY INDEX ROWID TABLE ACCESS | DEFERRED_STG$ | 1 | 28 | | 2 (0)| 00:00:01 |
    |*599 | SCAN INDEX UNIQUE | I_DEFERRED_STG1 | 1 | | | 1 (0)| 00:00:01 |
    | 600 | NESTED LOOPS | | 1 | 447 | | 900 (1)| 00:00:04 |
    |*601 | HASH JOIN | | 1 | 425 | | 899 (1)| 00:00:04 |
    | 602 | NESTED LOOPS | | 1 | 120 | | 5 (0)| 00:00:01 |
    | 603 | BY INDEX ROWID TABLE ACCESS | OBJ$ | 1 | 101 | | 4 (0)| 00:00:01 |
    |*604 | SCAN INDEX RANGE | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |
    | 605 | CLUSTER TABLE ACCESS | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*606 | E SCAN INDEX UNIQU | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    |*607 | VIEW | INDPARTV$ | 33387 | 9944K| | 893 (1)| 00:00:04 |
    | 608 | R WINDOW BUFFE | | 33387 | 4336K| | 893 (1)| 00:00:04 |
    | 609 | S BY INDEX ROWID TABLE ACCES | INDPART$ | 33387 | 4336K| | 893 (1)| 00:00:04 |
    | 610 | SCAN INDEX FULL | I_INDPART_BOPART$ | 33387 | | | 103 (1)| 00:00:01 |
    | 611 | LUSTER TABLE ACCESS C | TS$ | 1 | 22 | | 1 (0)| 00:00:01 |
    |*612 | SCAN INDEX UNIQUE | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 613 | VIEW | | 19858 | 40M| | 1471 (1)| 00:00:07 |
    | 614 | SORT ORDER BY | | 19858 | 3956K| 4688K| 1471 (1)| 00:00:07 |
    |*615 | HASH JOIN | | 19858 | 3956K| | 698 (1)| 00:00:03 |
    | 616 | TABLE ACCESS FULL | LOB$ | 1547 | 24752 | | 461 (1)| 00:00:02 |
    |*617 | VIEW | LOBFRAGV$ | 19858 | 3645K| | 236 (1)| 00:00:01 |
    | 618 | WINDOW BUFFER | | 19858 | 1066K| | 236 (1)| 00:00:01 |
    | 619 | INDEX ROWID TABLE ACCESS BY | LOBFRAG$ | 19858 | 1066K| | 236 (1)| 00:00:01 |
    | 620 | INDEX FULL SCAN | I_LOBFRAG_PARENTOBJFRAG$ | 19858 | | | 61 (0)| 00:00:01 |
    | 621 | ER TABLE ACCESS CLUST | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*622 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 623 | NESTED LOOPS | | 1 | 120 | | 5 (0)| 00:00:01 |
    | 624 | NDEX ROWID TABLE ACCESS BY I | OBJ$ | 1 | 101 | | 4 (0)| 00:00:01 |
    |*625 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |
    | 626 | TER TABLE ACCESS CLUS | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*627 | N INDEX UNIQUE SCA | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 628 | NESTED LOOPS | | 1 | 53 | | 5 (0)| 00:00:01 |
    | 629 | INDEX ROWID TABLE ACCESS BY | OBJ$ | 1 | 34 | | 4 (0)| 00:00:01 |
    |*630 | AN INDEX RANGE SC | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |
    | 631 | USTER TABLE ACCESS CL | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*632 | CAN INDEX UNIQUE S | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    |*633 | STER TABLE ACCESS CLU | COL$ | 1 | 49 | | 2 (0)| 00:00:01 |
    |*634 | AN INDEX UNIQUE SC | I_OBJ# | 1 | | | 1 (0)| 00:00:01 |
    | 635 | USTER TABLE ACCESS CL | TAB$ | 1 | 13 | | 2 (0)| 00:00:01 |
    |*636 | CAN INDEX UNIQUE S | I_OBJ# | 1 | | | 1 (0)| 00:00:01 |
    | 637 | Y INDEX ROWID TABLE ACCESS B | COLTYPE$ | 1 | 13 | | 2 (0)| 00:00:01 |
    |*638 | SCAN INDEX UNIQUE | I_COLTYPE2 | 1 | | | 1 (0)| 00:00:01 |
    | 639 | CLUSTER TABLE ACCESS | SEG$ | 1 | 70 | | 3 (0)| 00:00:01 |
    |*640 | SCAN INDEX UNIQUE | I_FILE#_BLOCK# | 1 | | | 2 (0)| 00:00:01 |
    | 641 | BY INDEX ROWID TABLE ACCESS | DEFERRED_STG$ | 1 | 28 | | 2 (0)| 00:00:01 |
    |*642 | E SCAN INDEX UNIQU | I_DEFERRED_STG1 | 1 | | | 1 (0)| 00:00:01 |
    | 643 | S CLUSTER TABLE ACCES | TS$ | 1 | 18 | | 1 (0)| 00:00:01 |
    |*644 | UE SCAN INDEX UNIQ | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 645 | SS CLUSTER TABLE ACCE | TS$ | 1 | 8 | | 1 (0)| 00:00:01 |
    |*646 | QUE SCAN INDEX UNI | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 647 | NESTED LOOPS | | 1 | 55 | | 3 (0)| 00:00:01 |
    | 648 | BY INDEX ROWID TABLE ACCESS | TABPART$ | 1 | 42 | | 2 (0)| 00:00:01 |
    |*649 | E SCAN INDEX UNIQU | I_TABPART_OBJ$ | 1 | | | 1 (0)| 00:00:01 |
    |*650 | CLUSTER TABLE ACCESS | TAB$ | 1 | 13 | | 1 (0)| 00:00:01 |
    |*651 | E SCAN INDEX UNIQU | I_OBJ# | 1 | | | 0 (0)| 00:00:01 |
    |*652 | FILTER | | | | | | |
    | 653 | MERGE JOIN | | 53239 | 2287K| | 1334 (2)| 00:00:06 |
    |*654 | VIEW | TABPARTV$ | 96857 | 3026K| | 872 (2)| 00:00:04 |
    | 655 | WINDOW SORT | | 96857 | 1513K| 2672K| 872 (2)| 00:00:04 |
    | 656 | ULL TABLE ACCESS F | TABPART$ | 96857 | 1513K| | 414 (2)| 00:00:02 |
    |*657 | SORT JOIN | | 273 | 3276 | | 462 (1)| 00:00:02 |
    | 658 | LL TABLE ACCESS FU | NTAB$ | 273 | 3276 | | 461 (1)| 00:00:02 |
    |*659 | FILTER | | | | | | |
    |*660 | FILTERING (UNIQUE) CONNECT BY WITH | | | | | | |
    | 661 | INDEX ROWID TABLE ACCESS BY | NTAB$ | 2 | 16 | | 2 (0)| 00:00:01 |
    |*662 | AN INDEX RANGE SC | I_NTAB1 | 2 | | | 1 (0)| 00:00:01 |
    | 663 | NESTED LOOPS | | 4 | 84 | | 4 (0)| 00:00:01 |
    | 664 | P CONNECT BY PUM | | | | | | |
    | 665 | LUSTER TABLE ACCESS C | NTAB$ | 2 | 16 | | 1 (0)| 00:00:01 |
    |*666 | SCAN INDEX UNIQUE | I_OBJ# | 1 | | | 0 (0)| 00:00:01 |
    |*667 | HASH JOIN | | 1 | 32 | | 5 (20)| 00:00:01 |
    |*668 | TER TABLE ACCESS CLUS | TAB$ | 1 | 13 | | 2 (0)| 00:00:01 |
    |*669 | N INDEX UNIQUE SCA | I_OBJ# | 1 | | | 1 (0)| 00:00:01 |
    |*670 | VIEW | TABPARTV$ | 214 | 4066 | | 2 (0)| 00:00:01 |
    | 671 | WINDOW BUFFER | | 214 | 2140 | | 2 (0)| 00:00:01 |
    |*672 | N INDEX RANGE SCA | I_TABPART_BOPART$ | 214 | 2140 | | 2 (0)| 00:00:01 |
    | 673 | VIEW | | 214 | 1304K| | 1555 (2)| 00:00:07 |
    | 674 | SORT ORDER BY | | 214 | 72546 | | 1555 (2)| 00:00:07 |
    |*675 | HASH JOIN | | 214 | 72546 | | 1554 (2)| 00:00:07 |
    | 676 | TABLE ACCESS FULL | USER$ | 184 | 3496 | | 4 (0)| 00:00:01 |
    | 677 | NESTED LOOPS | | | | | | |
    | 678 | NESTED LOOPS | | 214 | 68480 | | 1549 (2)| 00:00:07 |
    |*679 | HASH JOIN | | 214 | 46866 | | 907 (2)| 00:00:04 |
    |*680 | HASH JOIN | | 214 | 42800 | | 34 (3)| 00:00:01 |
    | 681 | TABLE ACCESS FULL | TS$ | 138 | 3036 | | 26 (0)| 00:00:01 |
    | 682 | NDEX ROWID TABLE ACCESS BY I | TABPART$ | 214 | 38092 | | 7 (0)| 00:00:01 |
    |*683 | INDEX RANGE SCAN | I_TABPART_BOPART$ | 214 | | | 2 (0)| 00:00:01 |
    | 684 | VIEW | TABPARTV$ | 96857 | 1797K| | 872 (2)| 00:00:04 |
    | 685 | WINDOW SORT | | 96857 | 1513K| 2672K| 872 (2)| 00:00:04 |
    | 686 | L TABLE ACCESS FUL | TABPART$ | 96857 | 1513K| | 414 (2)| 00:00:02 |
    |*687 | INDEX RANGE SCAN | I_OBJ1 | 1 | | | 2 (0)| 00:00:01 |
    | 688 | X ROWID TABLE ACCESS BY INDE | OBJ$ | 1 | 101 | | 3 (0)| 00:00:01 |
    | 689 | TABLE ACCESS CLUSTER | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*690 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 691 | TABLE ACCESS CLUSTER | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*692 | INDEX UNIQUE SCAN | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 693 | R TABLE ACCESS CLUSTE | SEG$ | 1 | 70 | | 3 (0)| 00:00:01 |
    |*694 | INDEX UNIQUE SCAN | I_FILE#_BLOCK# | 1 | | | 2 (0)| 00:00:01 |
    | 695 | DEX ROWID TABLE ACCESS BY IN | DEFERRED_STG$ | 1 | 28 | | 2 (0)| 00:00:01 |
    |*696 | INDEX UNIQUE SCAN | I_DEFERRED_STG1 | 1 | | | 1 (0)| 00:00:01 |
    | 697 | TER TABLE ACCESS CLUS | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*698 | N INDEX UNIQUE SCA | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 699 | NESTED LOOPS | | 1 | 120 | | 5 (0)| 00:00:01 |
    | 700 | INDEX ROWID TABLE ACCESS BY | OBJ$ | 1 | 101 | | 4 (0)| 00:00:01 |
    |*701 | N INDEX RANGE SCA | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |
    | 702 | STER TABLE ACCESS CLU | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*703 | AN INDEX UNIQUE SC | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 704 | USTER TABLE ACCESS CL | SEG$ | 1 | 70 | | 3 (0)| 00:00:01 |
    |*705 | CAN INDEX UNIQUE S | I_FILE#_BLOCK# | 1 | | | 2 (0)| 00:00:01 |
    | 706 | Y INDEX ROWID TABLE ACCESS B | DEFERRED_STG$ | 1 | 28 | | 2 (0)| 00:00:01 |
    |*707 | SCAN INDEX UNIQUE | I_DEFERRED_STG1 | 1 | | | 1 (0)| 00:00:01 |
    | 708 | CLUSTER TABLE ACCESS | TS$ | 1 | 18 | | 1 (0)| 00:00:01 |
    |*709 | SCAN INDEX UNIQUE | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 710 | CLUSTER TABLE ACCESS | TS$ | 1 | 8 | | 1 (0)| 00:00:01 |
    |*711 | E SCAN INDEX UNIQU | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 712 | S CLUSTER TABLE ACCES | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*713 | UE SCAN INDEX UNIQ | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 714 | SS CLUSTER TABLE ACCE | SEG$ | 1 | 70 | | 3 (0)| 00:00:01 |
    |*715 | QUE SCAN INDEX UNI | I_FILE#_BLOCK# | 1 | | | 2 (0)| 00:00:01 |
    | 716 | ESS BY INDEX ROWID TABLE ACC | DEFERRED_STG$ | 1 | 28 | | 2 (0)| 00:00:01 |
    |*717 | IQUE SCAN INDEX UN | I_DEFERRED_STG1 | 1 | | | 1 (0)| 00:00:01 |
    | 718 | S NESTED LOOP | | 1 | 421 | | 2864 (1)| 00:00:13 |
    | 719 | PS NESTED LOO | | 1 | 402 | | 2863 (1)| 00:00:13 |
    | 720 | N MERGE JOI | | 1 | 380 | | 2862 (1)| 00:00:13 |
    |*721 | VIEW | INDSUBPARTV$ | 203K| 54M| | 2857 (1)| 00:00:13 |
    | 722 | BUFFER WINDOW | | 203K| 13M| | 2857 (1)| 00:00:13 |
    | 723 | ACCESS BY INDEX ROWID TABLE | INDSUBPART$ | 203K| 13M| | 2857 (1)| 00:00:13 |
    | 724 | FULL SCAN INDEX | I_INDSUBPART_POBJSUBPART$ | 203K| | | 517 (1)| 00:00:03 |
    |*725 | N SORT JOI | | 1 | 101 | | 5 (20)| 00:00:01 |
    | 726 | CCESS BY INDEX ROWID TABLE A | OBJ$ | 1 | 101 | | 4 (0)| 00:00:01 |
    |*727 | RANGE SCAN INDEX | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |
    | 728 | ESS CLUSTER TABLE ACC | TS$ | 1 | 22 | | 1 (0)| 00:00:01 |
    |*729 | IQUE SCAN INDEX UN | I_TS# | 1 | | | 0 (0)| 00:00:01 |
    | 730 | SS CLUSTER TABLE ACCE | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*731 | QUE SCAN INDEX UNI | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 732 | VIEW | | 3220 | 6653K| | 252 (2)| 00:00:02 |
    | 733 | SORT ORDER BY | | 3220 | 679K| | 252 (2)| 00:00:02 |
    |*734 | HASH JOIN | | 3220 | 679K| | 251 (1)| 00:00:02 |
    | 735 | NESTED LOOPS | | | | | | |
    | 736 | NESTED LOOPS | | 12 | 336 | | 14 (0)| 00:00:01 |
    | 737 | FULL TABLE ACCESS | LOBCOMPPART$ | 12 | 144 | | 2 (0)| 00:00:01 |
    |*738 | SCAN INDEX UNIQUE | I_LOB2 | 1 | | | 0 (0)| 00:00:01 |
    | 739 | BY INDEX ROWID TABLE ACCESS | LOB$ | 1 | 16 | | 1 (0)| 00:00:01 |
    |*740 | VIEW | LOBFRAGV$ | 19858 | 3645K| | 236 (1)| 00:00:01 |
    | 741 | WINDOW BUFFER | | 19858 | 1066K| | 236 (1)| 00:00:01 |
    | 742 | BY INDEX ROWID TABLE ACCESS | LOBFRAG$ | 19858 | 1066K| | 236 (1)| 00:00:01 |
    | 743 | SCAN INDEX FULL | I_LOBFRAG_PARENTOBJFRAG$ | 19858 | | | 61 (0)| 00:00:01 |
    | 744 | Y INDEX ROWID TABLE ACCESS B | TABSUBPART$ | 1 | 111 | | 3 (0)| 00:00:01 |
    |*745 | SCAN INDEX UNIQUE | I_TABSUBPART$_OBJ$ | 1 | | | 2 (0)| 00:00:01 |
    | 746 | VIEW | | 418K| 2477M| | 38130 (1)| 00:02:41 |
    | 747 | SORT ORDER BY | | 418K| 177M| 192M| 38130 (1)| 00:02:41 |
    |*748 | HASH JOIN | | 418K| 177M| | 3590 (3)| 00:00:16 |
    | 749 | TABLE ACCESS FULL | USER$ | 184 | 3496 | | 4 (0)| 00:00:01 |
    |*750 | HASH JOIN | | 418K| 170M| | 3582 (2)| 00:00:16 |
    | 751 | L TABLE ACCESS FUL | TS$ | 138 | 3036 | | 26 (0)| 00:00:01 |
    |*752 | HASH JOIN | | 418K| 161M| | 3552 (2)| 00:00:15 |
    | 753 | VIEW | TABSUBPARTV$ | 30 | 9120 | | 4 (0)| 00:00:01 |
    | 754 | WINDOW BUFFER | | 30 | 3750 | | 4 (0)| 00:00:01 |
    | 755 | BY INDEX ROWID TABLE ACCESS | TABSUBPART$ | 30 | 3750 | | 4 (0)| 00:00:01 |
    |*756 | SCAN INDEX RANGE | I_TABSUBPART_POBJSUBPART$ | 30 | | | 3 (0)| 00:00:01 |
    | 757 | LL TABLE ACCESS FU | OBJ$ | 825K| 79M| | 3539 (2)| 00:00:15 |
    | 758 | NDEX ROWID TABLE ACCESS BY I | LOB$ | 1 | 10 | | 2 (0)| 00:00:01 |
    |*759 | N INDEX UNIQUE SCA | I_LOB2 | 1 | | | 1 (0)| 00:00:01 |
    | 760 | STER TABLE ACCESS CLU | USER$ | 1 | 19 | | 1 (0)| 00:00:01 |
    |*761 | AN INDEX UNIQUE SC | I_USER# | 1 | | | 0 (0)| 00:00:01 |
    | 762 | NESTED LOOPS | | 1 | 120 | | 5 (0)| 00:00:01 |
    | 763 | INDEX ROWID TABLE ACCESS BY | OBJ$ | 1 | 101 | | 4 (0)| 00:00:01 |
    |*764 | AN INDEX RANGE SC | I_OBJ1 | 1 | | | 3 (0)| 00:00:01 |

Maybe you are looking for

  • IPhone 4 voice call problems on 3G

    I noticed at the weekend that my iPhone 4 was having trouble with voice calls. Incoming calls would sometimes hang up when I answered them, outgoing calls would take a very long time to connect (or freeze), and when I did get through to someone the c

  • Unable To Save Quark XPress File In Mac OS 10.2.8

    I have been trying to save a layout I created using Quark XPress 6.1 on an iMac with a 10.2.8 OS. When I first created the document, I was able to save it with no problem. However, after I had done some more work on it, I tried to save the changes --

  • Help with inserting a list element in a Web page

    Hello, I�m a newbie. I want to introduce an element list in a web page. I have source that creates a List as a standalone application (with a main procedure..) , through the JList class, but I want this list to appear integrated in the web page. How

  • 23" Cinema Display Hinge is Broken

    Does anyone know where I can order this part (it's the hinge/base device that attaches to the back of the monitor)? I've checked with both of my local authorized service shops and they want to charge me around $450 plus leave the monitor for several

  • Suggestion: JavaScript scope variables and event listeners

    Invoking Java from JavaScript in ADF Mobile is surprisingly efficient although it is still relatively expensive compared to plain HTML5/JavaScript/CSS stuff in the native UIWebView. But whenever you want to do something "dynamic" you have to revert t