Convert table definition to DTD

does anybody know an easy way to create a DTD of an existing ORACLE database?
Can I use "transx"?
Thanks, Luis

If you mean creating a DTD from a data dictionary then you may try using PL/SQL to DBMS_xmlquery.

Similar Messages

  • Exporting and importing just table definitions

    Hi,
    I have this production database that has a huge amount of data in it. I was asked to set up a test database based on the exact same schema as the live database. When I tried to do an export (from live) and import (to test), with the parameters rows=N and compress=y, the target (test database) data file will still grow enormously, presumably because of the huge number of extents already allocated to the table in the live database. My test database of course, has a limited hard-disk space.
    Is there a way to export and import the table definitions without having the target database experiencing a huge growth in the size of the tablespace?
    Thanks,
    Chris.

    If an export with compress=n is still creating initial extents that a too large, you can still build with the import file but it will take a little work.
    run imp with indexfile=somefile.sql
    when imp is finished, edit somefile.sql by:
    1. remove all the REM statements.
    2. remove all the storage clauses (tables and indexes)
    Make sure your tablespaces have a small (say 1k) default initial extent.
    run imp again with rows=n
    All your tables and indexes will be created with the default tablespace initial extent.

  • How can I convert table object into table record format?

    I need to write a store procedure to convert table object into table record. The stored procedure will have a table object IN and then pass the data into another stored procedure with a table record IN. Data passed in may contain more than one record in the table object. Is there any example I can take a look? Thanks.

    I'm afraid it's a bit labourious but here's an example.
    I think it's a good idea to work with SQL objects rather than PL/SQL nested tables.
    SQL> CREATE OR REPLACE TYPE emp_t AS OBJECT
      2      (eno NUMBER(4)
      3      , ename  VARCHAR2(10)
      4      , job VARCHAR2(9)
      5      , mgr  NUMBER(4)
      6      , hiredate  DATE
      7      , sal  NUMBER(7,2)
      8      , comm  NUMBER(7,2)
      9      , deptno  NUMBER(2));
    10  /
    Type created.
    SQL> CREATE OR REPLACE TYPE staff_nt AS TABLE OF emp_t
      2  /
    Type created.
    SQL> Now we've got some Types let's use them. I've only implemented this as one public procedure but you can see the principles in action.
    SQL> CREATE OR REPLACE PACKAGE emp_utils AS
      2      TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
      3      PROCEDURE pop_emp (p_emps in staff_nt);
      4  END  emp_utils;
      5  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY emp_utils AS
      2      FUNCTION emp_obj_to_rows (p_emps IN staff_nt) RETURN EmpCurTyp IS
      3          rc EmpCurTyp;
      4      BEGIN
      5          OPEN rc FOR SELECT * FROM TABLE( CAST ( p_emps AS staff_nt ));
      6          RETURN rc;
      7      END  emp_obj_to_rows;
      8      PROCEDURE pop_emp (p_emps in staff_nt) is
      9          e_rec emp%ROWTYPE;
    10          l_emps EmpCurTyp;
    11      BEGIN
    12          l_emps := emp_obj_to_rows(p_emps);
    13          FETCH l_emps INTO e_rec;
    14          LOOP
    15              EXIT WHEN l_emps%NOTFOUND;
    16              INSERT INTO emp VALUES e_rec;
    17              FETCH l_emps INTO e_rec;
    18          END LOOP;
    19          CLOSE l_emps;
    20      END pop_emp;   
    21  END;
    22  /
    Package body created.
    SQL>Looks good. Let's see it in action...
    SQL> DECLARE
      2      newbies staff_nt :=  staff_nt();
      3  BEGIN
      4      newbies.extend(2);
      5      newbies(1) := emp_t(7777, 'APC', 'CODER', 7902, sysdate, 1700, null, 40);
      6      newbies(2) := emp_t(7778, 'J RANDOM', 'HACKER', 7902, sysdate, 1800, null, 40);
      7      emp_utils.pop_emp(newbies);
      8  END;
      9  /
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM emp WHERE deptno = 40
      2  /
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7777 APC        CODER           7902 17-NOV-05       1700
            40
          7778 J RANDOM   HACKER          7902 17-NOV-05       1800
            40
    SQL>     Cheers, APC

  • How to count number of Relational Table definitions?

    Hi,
    How can I get the number of tables existing in a particular container? some thing similar to 'select count(1) from tab'. Thanks,

    No, you don't have to be the repository owner or SYS (very bad idea to log in as SYS to do anything except things that ONLY SYS can do, like upgrade the database). You can be any user that has been granted access to the repository via the repository administration utility. With one caveat:
    Before you execute any queries on the CI views, you really ought to activate a workarea with jr_context.set_workarea (workarea_name). This will be GLOBAL_SHARED_WORKAREA if you do not use version control. You must be authorized for the workarea, and will only be able to count table definitions that are in the current workarea.

  • Can't convert oracle.xml.parser.DTD to oracle.xml.parser.v2.DTD.

    I am getting the following Error while trying
    to compile the SampleMain.java file(Generating an XML document from a given Employee.dtd).
    I have set my classpath to use xmlparser.jar.
    D:\XMls>javac SampleMain.java
    SampleMain.java:65: Can't convert oracle.xml.parser.DTD to oracle.xml.parser.v2.DTD.
    main(java.l
    ang.String[]).
    generator.generate(dtd, doctype_name);

    Would you check the java parser version you are using? If using java parser V2, the normal lib name is xmlparserv2.jar.
    null

  • Converting XML file to DTD or XSD file

    Hi everyone,
    We're currently doing an IDOC to File. The file should be in XML format. Right now, we have a sample XML file. We need to convert the file to DTD or XSD and then upload this in XI to be able to get it structure. We've tried different conversion tools to do this, however, the converted DTD/XSD file still has errors when we load it to XI. What we're thinking is to create a data type to achieve this. These are some of the fields in the file.
    <messageHeader creationDate>
    <catellae:gTTSDataDelivery creationDate="X" (...)>
    */<catellae:(…)>/<txnId>
    */<catellae:(…)>/<items>/<item>/<quantity>
    */<catellae:(…)>/<items>/<item>/<unitOfMea>
    */<catellae:(…)>/<items>/<item>/<prodDesc>/<matType>
    */<catellae:(…)>/<shipToAddress>/<nameAndAddress>/<city>
    */<catellae:(…)>/<shipToAddress>/<contactInformation>/<communicationChannel (…)
    It seems that there are more than 3 nodes. And in XI, only three nodes are allowed. Could you tell us how should we create the data type for this? Thanks in advance!

    Hi Mariel,
              Refer to the below link for conversion of XML to Xsd using Altova XML Spy.
    Re: data type for xml file
    For altova free trial Download:
    http://www.altova.com/download.html
    Please let me know if u need furthur information.
    Thanks,
    Bhargav.
    Note:Award points if found useful

  • [[DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Column name or number of supplied values does not match table definition.]

    Hii ..
    need help on this ..
    This what I am doing ..
    I am using a DATAEXPORT function to export level0 data from my essbase 11.1.2.2 to Microsoft SQL 2008 tables.
    So what I did first I exported the level0 data to a flat file using DATAEXPORT and the created the SQL columns by the same  in that order only in my SQL table.
    When I run it fails with this error:
    ODBC Layer Error: [21S01] ==> [[DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Column name or number of supplied values does not match table definition.]
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021014)
    ODBC Layer Error: Native Error code [213]
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Error(1012085)
    Unable to export data to SQL table [dataexp]. Check the Essbase server log and the system console to determine the cause of the problem.
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021002)
    SQL Connection is Freed
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Warning(1080014)
    Transaction [ 0x1c50001( 0x51ee7d66.0x80342 ) ] aborted due to status [1012085].
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1012579)
    Total Calc Elapsed Time for [test.csc] : [1.44] seconds
    =============================================================
    I did a simple test on my Sample.basic application then ..
    loaded the calc data to it and then used the below script to export to a flat file
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
                    DataExportLevel "Level0";
                    DataExportOverwriteFile ON;
                    DataExportColFormat OFF;
                    DataExportDimHeader OFF;
    FIX(
                "Jan",
                "Sales",
                "Actual"
    /*DATAEXPORT "File" "," "/home/hypadmin/samtest.txt";*/
    DATAEXPORT "DSN" "Abhitest" "sample" "sa" "welcome1";
    ENDFIX
    out put as below:
    "Sales"
    "100-30","California"
    "Jan","Actual",145
    Now In sql I created only 3 columns with name Jan/Sales/Actual and when I run this script again with comments removed .. I get the same error as what I have got in my first test case with other application ..
    but when I create the columns with same name as what its in export
    Sales/100-30/Califirnia/Jan/Actual
    It created the new rows successfully ..
    So with this I think the error which I am getting with my other application might be because of the same column issue  .. but then I have created all the columns by looking at the export file only as I did in sample ..
    Any idea would be helpful ..
    Thanks
    Abhishek
    I

    First make sure you add
    DataExportRelationalFile ON;
    to your set commands it is missing
    I alwats like to also add
    DataExportColHeader dimensionName;
    so I am sure what dimension is getting put into the columns.
    Then count the number of dimensions in your outline (exclude attribute dimensions). You need at least that many columns in your table  -1 + the number of  members you will be returning as columns in the export
    Taking your example Sample basic has 5 dimensions
    Measures
    Years
    Scenario
    Product
    Market
    Since you did not specify a dataexportcolheader it took the dense dimension Scenario as the columns. Your fix statement is limiting that to one member. Doing the math
    5 -1 + 1 = 5 columns in your table which is what you found works.  Suppose you fixed on bothe Actual and budget in scenario then you would need 6 columns 5 -1 +2

  • Troubles creating table definition in new repositiory

    hi there,
    we installed a designer 6i repositiory on a linux 8.1.7.2 ee server database, all worked fine. installation of the same repositiory version under on a windows 2000 pro system with a 8.1.7.4 ee server database works fine, too. but when trying to create objects in the windows repos we keep getting errors concerning non existing repository objects. example: attempting to create a relational table definition fail with the following stack trace:
    Message
    RME-02105: Oracle error occurred...
    ORA-06550: line 2, column 11:
    PLS-00201: identifier 'CIOTABLE_DEFINITION.DATA' must be declared
    ORA-06550: line 2, column 11:
    PL/SQL: Item ignored
    ORA-06550: line 9, column 3:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 9, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 3:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 10, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 11, column 3:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 11, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 12, column 3:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 12, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 13, column 3:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 13, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 14, col
    Message
    RME-02124: Failed to execute SQL statement: declare
    pl1_el0 CIOTABLE_DEFINITION.data;
    utility varchar2(3);
    curr_el integer;
    begin
    savepoint rm_dispatch;
    rmmes.clear;
    curr_el := 0;
    pl1_el0.i.INDEX_ONLY_FLAG := true;
    pl1_el0.v.INDEX_ONLY_FLAG := :p2_el0;
    pl1_el0.i.COLUMN_PREFIX := true;
    pl1_el0.v.COLUMN_PREFIX := :p3_el0;
    pl1_el0.i.TYPES := true;
    pl1_el0.v.TYPES := :p4_el0;
    pl1_el0.i.IRID := true;
    pl1_el0.v.IRID := :p5_el0;
    pl1_el0.i.IVID := true;
    pl1_el0.v.IVID := :p6_el0;
    pl1_el0.i.NUMBER_OF_TIMES_MODIFIED := true;
    pl1_el0.v.NUMBER_OF_TIMES_MODIFIED := :p7_el0;
    pl1_el0.i.ALIAS := true;
    pl1_el0.v.ALIAS := :p8_el0;
    pl1_el0.i.ID := true;
    pl1_el0.v.ID := :p9_el0;
    pl1_el0.i.NAME := true;
    pl1_el0.v.NAME := :p10_el0;
    pl1_el0.i.JOURNAL_LOCATION := true;
    pl1_el0.v.JOURNAL_LOCATION := :p11_el0;
    pl1_el0.i.DISPLAY_TITLE := true;
    pl1_el0.v.DISPLAY_TITLE := :p12_el0;
    CIOTABLE_DEFINITION.INS(:p1_el0,pl1_el0);
    :errcnt := 0;
    exception when others then
    rmmes.get_error_state(utility,:excode);
    rmmes.get_product(utility,:exprod);
    :exutil := utility;
    :errcnt := rmmes.getsize;
    :sqlcod := SQLCODE;
    :sqlmsg := SQLERRM;
    :currel := curr_el;
    rollback to savepoint rm_dispatch;
    end;
    Message
    RME-00222: Failed to dispatch operation to Repository
    any help appreciated,
    greetings,
    friedrich.

    Hi,
    Actually the errors thrown here are not exactly non-existing database objects.These are Table and API definitions of the repository which are used when you create Database objects.
    You can try by checking if there are any invalid objects in the repository(Compile them first if there are any)and can give it a shot after running a full reconcile of the repository.
    If still the problem persists, can you give the details about which Designer Version you are using.
    Thanks
    Vishal Jain

  • When converting tables in a MS Word 2010 or 2007 to PDF the table borders do not retain the correct thickness as identified in the word document.  Is there a solution for this issue?

    When converting tables in a MS Word 2010 or 2007 to PDF the table borders do not retain the correct thickness as identified in the word document.  Is there a solution for this issue?

    Please try with latest version of MS Word and Acrobat.
    Regards,
    Anoop

  • UPPER() in external table definition

    Hi,
    Is it possible to apply the UPPER() function to character columns within an external table definition using the ORACLE_LOADER driver?
    I've tried myself and have looked through the documentation, and it seems like this is not possible ... just wanted to double-check before moving forward with a different solution.
    Thanks.
    - k r
    Message was edited by:
    kenny r.

    I've never seen an example of doing it nor do I see anywhere in the syntax that lends itself to such manipulation.
    Consider creating a view.

  • Substr in external table definition

    Hi Guys,
    I have an external table where I am loading a txt file. The issue being, in the txt file I have a column with a variable length. This column houses the application/website link that is not of a fixed length. My external table field width is 100, but the txt file value is more than that. Now, I want to only insert this field for the 100 characters.
    I tried using substr as shown in the example below, but it fails. Any idea what could be the alternative or if I am doing it right?
    Here's my external table properties (access parameters) and I am trying to use 'substr' on field4
    records delimited BY NEWLINE
    badfile BAD_DIR:'email_events%a_%p.bad'
    LOGFILE LOG_DIR:'email_events%a_%p.log'
    fields terminated by '\t'
    missing field values are null
    event_type,
    cm_timestamp,
    issue_id,
    cm_uid,
    field1,
    field2,
    field3,
    field4 "substr(:field4,1,100)",
    field5,
    field6,
    field7,
    field8,
    field9,
    field10,
    field11,
    field12,
    field13,
    field14
    )

    Just set your external table definition to query the full thing and then when you come to insert that data to a real table from the external table you can apply the substr in that query.

  • Error during transport-Structure change at field level (convert table /BIC)

    Hi,
    I am trying to transport from DEV to Test when I encountered this error.
    The tables are both consistent when I checked with SE14.
    Start of the after-import method RS_CUBE_AFTER_IMPORT for object type(s) CUBE (Activation Mode)
    Error/warning in dict. activator, detailed log    > Detail
    Structure change at field level (convert table /BIC/DZCRUSDI026)
    Table /BIC/DZCRUSDI026 could not be activated
    Return code..............: 8
    Following tables must be converted
    DDIC Object TABL /BIC/DZCRUSDI026 has not been activated
    Error when activating InfoCube ZCRUSDI02
    Error/warning in dict. activator, detailed log    > Detail
    Structure change at field level (convert table /BIC/DZCRUSDI023)
    Structure change at field level (convert table /BIC/FZCRUSDI02)
    Table /BIC/DZCRUSDI023 could not be activated
    Table /BIC/FZCRUSDI02 could not be activated
    Return code..............: 8
    Following tables must be converted
    DDIC Object TABL /BIC/DZCRUSDI023 has not been activated
    Error when resetting InfoCube ZCRUSDI02 to the active version
    How do I resolve this
    thanks

    Hi,
    There are no Inactive objects in the cube in DEV system. Also must of the changes I made in Test are already in the cube in TEST But the cube is not active.
    SAP proposed that the cube be activated manually but is not a good procedure to activate in TEST system.
    Error when resetting InfoCube ZCRUSDI02 to the active version
    Message no. RSO410
    Diagnosis
    Errors arose when activating InfoCube ZCRUSDI02. An active version already existed before the activation.
    System Response
    InfoCube ZCRUSDI02 could not be reset to the old active version. Since the generated objects no longer correspond to the old active version, they were reset to inactive.
    Procedure
    The old active version of InfoCube ZCRUSDI02 can no longer be used. Remove the cause of the activation error and activate InfoCube ZCRUSDI02 anew.
    thanks

  • Not allow changes to table definition

    Hi all,
         I need not to allow any changes to a specific custom table definition. I'm looking for something similar to the "lock editor" in se38 applied to SE11. Can anybody help me ?
    Thanks in advance,
        Gianluca

    Hello Gianluca,
    When you have created the table and the required entries have been made ..change the data browser/table maintainance view attribute in the 'Delivery and maintenace tab 'to either  'Display/Maintenance allowed with restrictions' or 'Display or maintenace not allowed' according to the requirement.
    hope this will resolve your issue.
    Regards,
    bhumika

  • Convert tables into text

    Is it possible to convert tables into text (easy way and no changes)?
    Thanks!

    After copy & paste use DW's Find & Replace feature (Ctrl+F)
    Find in: Current document
    Search: Specific Tag   table
    Action:  Strip tag.
    Repeat for tr,  th, td,  tbody, etc...
    Nancy O.

  • Error running Table Definition (cktci) Repository Report in Designer 10G

    Hi
    There seems to be some internal limitation when running the Table Definition Repository Report (cktci).
    We have over a thousand tables defined in Designer and if I try to run the report for all tables it falls over with the reports.log saying
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-271504897: Error executing CA utility.
    REP-3335: Unhandled Internal CA Error.
    caxml 2
    REP-0002: Unable to retrieve a string from the Report Builder message file.
    REP-271504897:
    Not very useful information.
    If the report is run using a smaller subset of tables. For example if I use a parameter of A% for the table name then it works OK.
    I have been able to create reports up to about 600 pages but after that it falls over. So if I try to run the report with a parameter like S% it will fall over.
    Just wondering if anyone else has come across this issue and found a fix.
    There is the obvious workaround of running the report for smaller subsets of data but we would like it to be able to run for all tables if possible.
    Any feedback appreciated.
    Regards,
    Adrian

    Sorry for the slow reply. I've been trying a number of different things to get this to work.
    I reinstalled Developer as suggested but we don't have a patched version so there were no additional patches to apply. I re-ran the installer anyway to see if it would update anything.
    I couldn't find any reference to Developer patches that might fix this issue in metalink.
    I also tried messing with the JVM options to give it more memory etc but that didn't help.
    After using the Designer diagnostics trace I got the arguments it uses to run the same report from the command line.
    This resulted in the same issue. So at least it was consistent from Designer as well as the command line.
    This suggests it is a reports issue rather than Designer.
    Running the reports trace didn't provide any extra information. Found a bug that suggested changing any formula columns to not return NULL.
    Tried updating the report to fix that too but no joy.
    I will post here if I discover the solution.

Maybe you are looking for

  • Please help - I'm getting an error when

    I just installed several Adobe products today (I use Windows XP) - including Adobe Acrobat 8.1.0 Professional, Photoshop and Illustrator (the purchased version - not the trial versions) from a set of CDs. To be specific, I'm clicking on a URL (I've t

  • My files don't send

    All of a sudden my mail does not go out an error mess. says: "This message could not be delivered and will remain in your Outbox until it can be delivered. Verify that you have addressed this message correctly. Check your SMTP server settings in Mail

  • Basic transitions need to be rendered

    I just installed the uprage to FCP 6 and the some of the basic transitions need to be rendered before I can view them. I never had this problem before upgrading, so am assuming it is a setting that I am missing. A couple would play (some dissolves, a

  • Is there a way to repair my ipod touch from water damage

    i need to know if i can get my ipod touch fix from water damage

  • I can download iphone only games on my ipod

    Hello, I discovered this glitch a couple months ago it allows me to download iphone games (when it says not compatible with this ipod) on my ipod 5 no I am not using some sort of hacking tool because the glitch only works on the App Store on the devi