How to import DDL for multiple tables referencing each other?

Hello people,
I'm having a non-trivial problem. I need to copy a few tables from one machine to another, both 10g. Just DDL, data copying is not necessary. When I export the DDL to an SQL file using Oracle SQL Developer, the resulting file is refused at the import (again, SQL Developer). The problem is that every table references some other table(s), so every single "create table" command is refused, because the needed table is has not been created yet. What's the best solution to be applied here?
Maybe I can draw a parallel to adding packages in Debian. When you have two packages, A and B, and they depend on each other, you cannot install them using "dpkg -i A && dpkg -i B" nor the other way around. Both calls to the dpkg will fail, due to the missing respective package. However, installing them in one command ("dpkg -i A B") is the right way. This is EXACTLY what I'd love to do with Oracle. Tell it to wait a bit, to make sure that ALL of the necessary tables are specified, and then create them virtually at once. Can it be achieved with transaction management?
Thanks a lot for any help.

Use exp/imp or expdb / impdp
They will only enable constraints after all tables are imported.

Similar Messages

  • HOW DEFINE INNER JIONS FOR MULTIPLE TABLE-FIELDS

    HI I  HAVE THE IMMEDIATE ISSUE TO RESOLVE...
    data: begin of it_jtab occurs 0,
    gsber like tgsb-gsber,
    gjahr like coss-gjahr,
    kostl like csks-kostl,
    posid like prps-posid,
    plfaz like proj-plfaz,
    plsez like proj-plsez,
    estat like tj30t-estat,
    perbl like coss-perbl,
    wkgbtr like coep-wkgbtr,
    end of it_jtab.
    HOW CAN I DO INNER JOIN FOR THE GIVEN TABLE??
    AM CURENTLY ON 4.0 VERSION HENCE HELP ME KNOW TO WORK ON JOINS ONLY.........

    Hi,
    Check this prog,
    Inner joins using 3 tables 
    Try this :-
    SELECT stpostlnr stpoidnrk mastmatnr maramtart stpo~menge 
    INTO CORRESPONDING FIELDS OF TABLE zmat1 FROM mast 
    JOIN stpo ON stpostlnr = maststlnr 
    JOIN mara ON maramatnr = mastmatnr 
    WHERE stpostlty = 'M' "AND stpoidnrk IN s_matnr 
    AND mast~werks = 1000. 
    Here s_matnr is a select-options on the selection-screen. 
    Or this. 
    Code: 
         Select single VbrkBukrs VbrkKunrg    Vbrk~Vbeln 
                       VbrkFkdat VbrkBstnk_Vf Vbrk~Zterm 
                       Tvzbt~Vtext 
                       VbakVbeln VbakBstdk 
                       LikpVbeln Likplfdat    Likp~Lfuhr 
           into w_vbrk 
           from vbrk 
          inner join       Tvzbt on TvzbtZterm        = VbrkZterm      and 
                                    Tvzbt~Spras        = sy-langu 
          Inner join       Vbfa  as SalesLnk 
                                 on SalesLnk~vbeln     = pu_vbeln        and 
                                    SalesLnk~vbtyp_v   = c_order 
                inner join Vbak  on VbakVbeln           = SalesLnkVbelv
          Inner join       Vbfa  as DeliveryLnk 
                                 on DeliveryLnk~vbeln   = pu_vbeln       and 
                                    DeliveryLnk~vbtyp_v = c_Delivery 
                inner join Likp  on LikpVbeln          = DeliveryLnkVbelv 
          where vbrk~vbeln = pu_Vbeln. 
    This code locates sales, delivery and payment terms info from a billing document number. 
    or
    Here, this one also works fine :
    select zfpcdcadivi zfpcdproforma zfpcdfactura zfpcdaniofactura 
    zfpcdmontousd zfpcdmontoap zfpcdebeln zfpcdinco1 
    zfpcdlifnr lfa1name1 zcdvsstatus zfpcdconint 
    into it_lista 
    from zfpcd inner join zcdvs 
    on zfpcdebeln = zcdvsebeln 
    and zfpcdproforma = zcdvsproforma 
    and zfpcdlifnr = zcdvslifnr 
    inner join lfa1 
    on zfpcdlifnr = lfa1lifnr 
    where zcdvs~status = '04'. 
    Regards,
    Arunsri

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • Can we use single DB Adapter for multiple tables

    Hi,
    I have 3 tables. ONE is the Master table and other 2 tables having Primary and foreign key relationships with the Master Table.
    Data is enter in the Tables 2 & 3 (based on Master Table Primary key)
    I have to use a DB Adapter in BPEL Process which will be in Transaction (what type of Transaction is Best in such a Scenario).
    - How do i implement it in BPEL.
    - Can i use a Single DB Adapter for Multiple Tables ? (*Views* should not be created for tables 1, 2 & 3),
    as we want to avoid using multiple DB Adapters, as in future Tables may increase or decrease...
    - while in Transaction if Table 2 fails in Inserting / Updating, it should roll back on error and also if Table 3 fails in Inserting / Updating, it should roll back table 2 and Table 3.
    - how access to concurrent users is maintained / managed in such a scenarios.
    But everything should be done using Single DB Adapter without creating a separate view.
    Is this Possible in BPEL..
    If not, How do we design, Implementation such a BPEL Process in Transaction with a best in Performance (both BPEL Process & DB Resources)
    thanks in advance
    thanks & regards,
    anvv sharma

    Hi,
    Thanks for your quick response.
    I have few quires.
    If we use PL/SQL, how do we implement transaction and Exception Handling appropriately based on the Error / Exception in BPEL.
    If the Table 2 or Table 3 gives out Error / Exception, i have to handle it separately and intimate accordingly.
    Suppose, if Table 2 got Error / Exception - Error Handling would be 'Roll back due to error in Table2'
    Thanks & regads,

  • Extract DDL for Partitioned tables in Oracle 8i

    Hi
    I am currently working on an Oracle 8i database. I have a need to extract the DDL of the existing tables & indexes. Dont need a schema level DDL extract, i just need it for a couple of tables and the corresponding indexes. I am currently using PL/SQL Developer a third party tool which is okay for extracting DDL for Non Partitioned tables, but when it comes to getting the DDL for PARTITIONED tables, it doesnt give me the partition information nor the tablespace information. We dont have a license for Toad or any other tools to get the DDL's. I also dont have the export/import privs on the DB. I need a free ware that can give me the DDL for the existing partitioned tables or atleast a query that I can run against the regular DBA views, which can give me the DDL along with Storage clause, the tablespace, indexes, grants & constraints.
    Thanks in Advance
    Chandra

    I also dont have the export/import privs on the DB. I need a
    free ware that can give me the DDL for the existing
    partitioned tables or atleast a query that I can run
    against the regular DBA views, which can give me the
    DDL along with Storage clause, the tablespace,
    indexes, grants & constraints.But you (or the owner or the tables you connect with) should have export/import privs on its on tables (i.e the two tables). So use the User Views instead of DBA Views.
    USER_TABLES, USER_TAB_PARTITIONS etc

  • How to import only rows of tables from from a dump file

    Good day,
    I have impoted a schema from a dump files with option rows=n,(accordingly it should import only structure of the tables)
    now i want to import rows for these tables in that schema. Kindly guide me how to do that. I have used below syntax for import.
    imp userid=system/manager@testdb fromuser=abc touser=abc file=d:\abctest\
    abc.dmp log=e:\abc15.log buffer=100000000 ignore=y constraints=n grants=n statistics=none rows=n;
    Any help willbe much appriciated.
    Regards
    Ansh

    Hi Sybrand,
    Thanx for the suggestion. Actually it is my fault that I had not explained the whole scenarion.
    Let me explain it one by one...
    (1) First i was importing a schema with rows=y option and I was getting some constraints error(can not insert NULL value in 'not null' column of some particular table) and import was unsuccesful.
    (2) Then i desided to import only structure of the tables in that schema, and later disabled that constraint which was creating the problem.
    (3) Now I m willing to import the data in these tables using that .dmp file, using rows=y, and this was my question if i m doing it in a right way or do i need to do some further step.
    Hope this time i have made picture more clear.
    Thanx a lot Hans and Sybrand
    btw no wall around so can't bang my head :)

  • What is authorization object and how to create it for a table

    Hi All,
    What is authorization object and how to create it for a table?
    Thanks

    Hi
    Authorization
    For authorization checks, there are many ways of linking authorization objects with user actions in an SAP system. The following discusses three possibilities in the context of ABAP programming.
    Authorization Check for Transactions
    You can directly link authorization objects with transaction codes. You can enter values for the fields of an authorization object in the transaction maintenance. Before the transaction is executed, the system compares these values with the values in the user master record and only starts the transaction if the appropriate authorization exists.
    Authorization Check for ABAP Programs
    For ABAP programs, the two objects S_DEVELOP (program development and program execution) and S_PROGRAM (program maintenance) exist. They contains a field P_GROUP that is connected with the program attribute authorization group. Thus, you can assign users program-specific authorizations for individual ABAP programs.
    Authorization Check in ABAP Programs
    A more sophisticated, user-programmed authorization check is possible using the Authority-Check statement. It allows you to check the entries in the user master record for specific authorization objects against any other values. Therefore, if a transaction or program is not sufficiently protected or not every user that is authorized to use the program can also execute all the actions, this statement must be used.
    AUTHORITY-CHECK OBJECT object
                            ID name1 FIELD f1
                            ID name2 FIELD f2
                            ID namen FIELD fn.
    object is the name of an authorization object. With name1, name2 ... , and so on, you must list all fields of the authorization object object. With  f1, f2 ... , and so on, you must specify the values that the system is to check against the entries in the relevant authorization of the user master record. The AUTHORITY-CHECK statement searches for the specified object in the user profile and checks the useru2019s authorizations for all values of f1, f2 ... . You can avoid checking a field name1, name2 ... by replacing FIELD f1  FIELD f2 with DUMMY.
    After the FIELD addition, you can only specify an elementary field, not a selection table. However, there are function modules available that execute the AUTHORITY-CHECK statement for all values of selection tables. The AUTHORITY-CHECK statement is supported by a statement pattern.
    Only if the user has all authorizations, is the return value sy-subrc of the AUTHORITY-CHECK statement set to 0. The most important return values are:
    ·        0: The user has an authorization for all specified values.
    ·        4: The user does not have the authorization.
    ·        8: The number of specified fields is incorrect.
    ·        12: The specified authorization object does not exist.
    A list of all possible return values is available in the ABAP keyword documentation. The content of sy-subrc has to be closely examined to ascertain the result of the authorization check and react accordingly.
    REPORT demo_authorithy_check.
    PARAMETERS pa_carr LIKE sflight-carrid.
    DATA wa_flights LIKE demo_focc.
    AT SELECTION-SCREEN.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                      ID 'CARRID' FIELD pa_carr
                      ID 'ACTVT' FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE e045(sabapdocu) WITH pa_carr.
      ELSEIF sy-subrc <> 0.
        MESSAGE e184(sabapdocu) WITH text-010.
      ENDIF.
    START-OF-SELECTION.
      SELECT  carrid connid fldate seatsmax seatsocc
        FROM  sflight
        INTO  CORRESPONDING FIELDS OF wa_flights
        WHERE carrid = pa_carr.
        WRITE: / wa_flights-carrid,
                 wa_flights-connid,
                 wa_flights-fldate,
                 wa_flights-seatsmax,
                 wa_flights-seatsocc.
      ENDSELECT.
    Regards
    Hitesh

  • Dynamic select for multiple tables

    Hi Thanks for your reply.Can you please help me in this issue.
    I have a requirement like how to select data from multiple tables using dynamic select. How do we maintain dynamic where condition.
    Manohar.

    [How to write dynamic where clause|How to write a Dynamic Where clause]

  • How do I total across multiple Tables? Help!

    how do I total across multiple Tables? Help!
    I feel like a complete noob.

    Hi Marc,
    There is no function explicitly for that sort of array calculation in Numbers.
    My favorite way is to use a list of Table Names and the INDIRECT(ADDRESS) function combination to produce a SUM across tables. I'm making the assumption that you want to do something like adding up all the values in a particular cell of multiple tables.  For example "give me the total of all the A1 cells in tables T1, T2, T3 and T4".  For this I would use the formula:
    =INDIRECT(ADDRESS(1,1,1,,A))
    to grab the cell contents of the table names mentioned in column A of a summary table.  Once you have them collected in your summary table, add them up.
    Here's a screen shot...
    Hope that gives you an idea for approaching this problem.
    Jerry

  • DDL for any table

    Hallo,, all
    i want to set DDL for 2 table and other table not have DDL,
    How to use DDL parameter in extract group..?
    Thanks,
    Riyas

    Yes, i was used that..
    how to use 1 table include DDL and many table exclude DDL..
    DDL INCLUDE MAPPED OBJNAME <schema>.<table2>
    or
    DDL INCLUDE MAPPED OBJNAME <schema>.<table2> , EXCLUDE OBJNAME <schema>.<table2>
    this params not work..:(
    thanks,
    Riyas

  • How to import XML into SQL Table

    Dear all,
    There are a lot of books about exporting data into XML format.
    Actually, how to use XML Documents? Sorry I am new that I ask such a question.
    What i think may be exchange or save data using xml. If so, How to import into MS SQL table? Do it need to do any mapping?
    Appreciate for your hints

    Are you sure you want to use XML with tables for this? No doubt importing XML into tables is useful for some specialized tasks, such as importing formatting information inside the XML itself, but for most of the familiar tasks that XML excels at, tables are neither necessary nor useful.
    In my (limited) experience, if the XML elements are well-differentiated, by which I mean different types of data have their own distinctive tags, then the special powers of XML can be exploited more fully using the more familiar tagged text, nested tags etc. in ordinary text frames using paragraph breaks, tab characters, etc. to achieve a suitably "tabular" finished appearance.
    If you must import XML into tables, I recommend Adobe's own PDF "Adobe InDesign CS3 and XML: A Technical Reference" availabe here:
    http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf
    It sounds very daunting -- the words "technical reference" make me shudder -- but actually it's very readable and not very technical at all. Some nice pics and everything!
    Jeremy

  • I have just moved from MobileMe, where I had a 'Family account' (with unique email addresses for my wife and myself) to iCloud. We share the Cal and Contacts on our iMac. How do we sync to multiple devices - we each have iPads and iPhones? Mine sync OK...

    We have just moved from MobileMe, where we had a 'Family account' (and we each have our own @me.com email addresses) to iCloud. We share the Cal and Contacts on our iMac. How do we sync to multiple devices - we each have an iPad and an iPhone, but with different accounts set up for mail. Mine syncs OK to Cal and Contacts, but hers doesn't. There must be a way! Please help.

    According the this: http://www.apple.com/mobileme/transition.html, "After moving to iCloud, family member accounts are no longer linked to the master account."  You can share an iCloud calendar (see http://support.apple.com/kb/PH2690), but I don't think you will be able to share iCloud contacts unless you are signed into the same iCloud account on both phones.

  • User Datastore for multiple tables and columns!

    Hi,
    I hop so much, someone can help me.
    I've made a user datastore to index multiple columns of multiple tables.
    Now, the Documentation of Oracle explains the idexing of one table.
    I have multiple tables, which have all, the columns descr and tagnr. I want to make a query sth like this:
    select table1.column, table2.columnd... where contains(indexed field,'gas within descr',1)>0
    is it possible to index 4 seperate tables, without having a collective key? I dont want to make a Concatenated Datastore.
    I have wrote this code.
    But it doesn't work. It's been compiled fine. But I don't get any result with my queries.
    create or replace
    procedure My_Proc_Wide
    Must be in ctxsys schema.
    In a full-scale example, this would be a wrapper
    for a proc in the user schema.
    rid in rowid,
    tlob in out NOCOPY clob /* NOCOPY instructs Oracle to pass
    this argument as fast as possible */
    is
    v_descr varchar2(80);
    v_tagnr varchar2(30);
    v_descr_name constant varchar2(20) := 'descr';
    v_descr_start_tag constant varchar2(20) := '<' || v_descr_name || '>';
    v_descr_end_tag constant varchar2(20) := '</' || v_descr_name || '>';
    v_tagnr_name constant varchar2(20) := 'tagnr';
    v_tagnr_start_tag constant varchar2(20) := '<' || v_tagnr_name || '>';
    v_tagnr_end_tag constant varchar2(20) := '</' || v_tagnr_name || '>';
    v_buffer varchar2(4000);
    v_length integer;
    begin
    /* verify the env which called this */
    if Dbms_Lob.Istemporary ( tlob ) <> 1
    then
    raise_application_error ( -20000,
    '"IN OUT" tlob isn''t temporary' );
    end if;
    /* the real logic */
    /* first tabel to be indexed */
    select t1.tagnr, t1.descr
    into v_tagnr, v_descr
    from tweb.pdp_positions t1
    where t1.rowid = rid;
    v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /* second table to be indexed */
    select t2.tagnr, t2.descr
    into v_tagnr, v_descr
    from tweb.pdp_schema_equ t2
    where t2.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /*third table to be indexed */
    select t3.tagnr, t3.descr
    into v_tagnr, v_descr
    from tweb.pdp_equipment t3
    where t3.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /* fourth table to be indexed */
    select t4.tagnr, t4.descr
    into v_tagnr, v_descr
    from tweb.pdp_Projcode t4
    where t4.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    end My_Proc_Wide;
    what have I to do, to make this work?
    Any Help would be appriciated!!
    Kind Regards,
    Arsineh

    Arsineh,
    I realise that it has been quite some time since you posted this question but I thought I'd reply just in case you never did manage to get your user datastore working.
    The reason your procedure will not work is simple. A user datastore procedure accepts a rowid input parameter. The rowid is the ID of the row that Oracle Text is currently trying to index. In the example you have given, you are attempting to use the supplied rowid as the primary key for multiple tables, this will simply never work as the rowid's across multiple tables will never correspond.
    The best way to achieve your goal is to create the index on a master table which contains the common primary keys for each of your four tables e.g.
    MASTER_TABLE
    COL:COMMON_KEY (NUMBER(n))
    COL:USER_INDEX_COLUMN (VARCHAR2(1))
    If you create the user datastore index on the MASTER_TABLE.USER_UNDEX_COLUMN column your stored proc simply needs to read the correct row from the MASTER_TABLE (SELECT t.common_key into v_CommonKey FROM master_table t WHERE t.rowid = rid) and issue subsequent queries to extract the relavant data from the t1..t4 tables using the common key e.g.
    SELECT t1.tagnr, t1.descr into v_tagnr, v_descr FROM t1 WHERE t1.[PRIMARY_KEY_FIELD] = v_CommonKey;
    SELECT t2.tagnr, t2.descr into v_tagnr, v_descr FROM t2 WHERE t2.[PRIMARY_KEY_FIELD] = v_CommonKey;
    and so on...
    Hope this helps
    Dean

  • Best way to import data to multiple tables in oracle d.b from sql server

    HI All am newbie to Oracle,
    What is the Best way to import data to multiple tables in Oracle Data base from sql server?
    1)linked server?
    2)ssis ?
    If possible share me the query to done this task using Linked server?
    Regards,
    KoteRavindra.

    check:
    http://www.mssqltips.com/sqlservertip/2011/export-sql-server-data-to-oracle-using-ssis/
          koteravindra     
    Handle:      koteravindra 
    Status Level:      Newbie
    Registered:      Jan 9, 2013
    Total Posts:      4
    Total Questions:      3 (3 unresolved)
    why so many unresolved questions? Remember to close your threads marking them as answered.

  • How to identify all the child tables referencing a master table

    Hi,
    How to identify all the child tables referencing a master table.
    Could you please help me...
    Thanks in advance...

    Hi!
    You may use this query:
    SELECT master.table_name, child.table_name
    FROM   user_constraints master, user_constraints child
    WHERE  master.table_name IN ('REGIONS')
      AND  master.constraint_name = child.r_constraint_name
    /yours sincerely
    Florian W.

Maybe you are looking for

  • Variable Screen in Analyzer 7.0

    Dear All, I am facing a peculiar problem with the variable screen. The problem is even though I define the variables to be of type Interval or Selection Options, when I execute the query It shows the variable but allows on single entry. But I do not

  • Charger port

    my charging port is not working is there a way to repair it without losing my information?

  • [Predictive Analysis 1.20] Remove a document

    I am a new user of SAP predictive analysis. Could someone please show me how to remove a document from the item list (see below)? I cannot find this option in the drop-down menus. Thank you for your help in advance.

  • Report variable on screen?

    I have a report with a begindate and an enddate as bind variables. When a user runs the report with the given values for the binds, i would like to show the report with a title on it, including the two given dates. Is that possible?

  • How to use  mmpur_remove_messages_by_id  ?

    sap ver. 4.7 badi  ME_PURCHDOC_POSTED transction  : me32k how to use  mmpur_remove_messages_by_id  ? what is the parameter (im_id)  that i have to add ? i am using "MMPUR_MESSAGE_FORCED"  to add error message  , it look like it do the job , but after