Export rows with all dependent rows

Hello everyone!
I have a rather complex database schema with a lot of parent-child-relationships. On demand, I want to export a single row identified by its primary key from a table 'TABLE_A' to another Oracle database which has got the same schema but is located on a different host.
The problem here is that I'd like to "automatically" locate all of the dependent objects (foreign key relationships in 'TABLE_A') so that those rows get exported as well!
Is sth like this possible using just database features?
Thanks for hints!

Well, you might find some script to locate all foreign keys and modify it to just output the tablenames, and all the other stuff for a proper parfile. A quick look at myoracle found Note:16414.1, haven't tried it personally.
To see the "correct" way to do it these days, google on the following terms:
dbms_metadata ref_constraint

Similar Messages

  • How can I export schema with all objects and few tables without data

    Hi all
    Verion 10g EE.
    I have to export schema with all objects but i need to ingnore some of the table data.
    There are 4 table those have huge data, we need not to export those tables data but structure should export.
    Thanks,
    Nr

    You can do this with a single command.  Run your export as normal and add query parameters for the 4 tables that you don't want any rows:
    expdp ...  query=schema1.table1:"where rownum = 0" query=schema2.table2:"where rownum = 0" ...
    It is best to put the query parameters in a parameter file so you don't have to worry about escaping any OS special characters.
    Dean

  • Gallery problems and photo export issues with all images JPG Raw damaged.

    I'm starting to panic. I trusted Aperture 3 and upgraded entire library from Aperture 2.0.
    Yesterday I uploaded new project from a photoshoot. and today is gone. Just like that. I did some export already before from that project so I know that it was there.
    Yesterday I had couple crashes. But it should be saved??
    Now I have serious problem. I export any Jpegs from Aperture. and when I want to process them in CS4 photomatix etc I get this http://www.flickr.com/photos/procekim/4360611822/
    It does it in 32 and 64 bit? What is the problem? I can expot JPG and raw and get same result. entire gallery from 2000 to 2010 same issue.
    I'm badly hurt!!!!!!!!!!!! do you have same problem??

    this gave me a scare. I deleted preferences + everything in pro applications. I deleted Aperture and reinstall everything from the disk. Updated library and now it works. I even get my lost project back. It remembered my Places, but not faces, strange.
    I have no idea what happened. But from now on I double copy files.

  • Importing shared calendar with all posted items

    We have a shared calendar with all our area events, which exists in my account, but now we wish - as a matter of urgency - to export this (with all its posted events) to a generic account, which can be updated by a few named employees - and not be tied to one user's account. Unfortunately, when I import the ics file into the generic account it appears with no contents. It seems that I will have to create a new blank calendar in the generic account, and share it's contents with all my colleagues again. Please can anyone confirm if this is so, or explain what I need to do to make it happen.
    Thank you,
    Ted.

    Aplogies. I have finally worked this out. Since I am the owner of the shared area calendar, only I have the right to add, edit or delete calendar items, but can allow those rights to other accounts. To move all calendar items, as advised, I shared the calendar (right-click on calendar in folder list, and select "Sharing") with the generic account by entering that account in the Name box, clicking the "Add User" button. Then I selected the account, now in the list of shared accounts, ticked the add, edit and, crucially, the delete box. The latter enabled me to move items from one calendar to another in the generic account, after setting the properties of both to detail view. One thing that can't be done is transfer the shared-with list, so I guess I'll need to re-share with all area staff. Thanks Danita. I got there in the end!

  • Best way to export data with r.t. prompts and have dense dim mbrs on rows?

    Hi All-
    What is the best way to export data with Run time prompts out of Essbase?
    One thought was to use Business Rules with run time variables and DATAEXPORT command, but I came across at least one limitation where I cannot have months (part of dense Time Periods dimension) on rows.
    I have only two dense dimensions: Accounts and Time Periods and I need both of these on rows. This would come handy when user enter Start and End month and year for data to be exported e.g. If start period is Feb 2010 and end is Jan 2011, I get data for all months in 2010 and 2011.
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000",14202.24,14341.62,14560,13557.54,11711.92,10261.58,12540.31,15307.83,16232.88,17054.62,18121.76,18236
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000",19241,21372.84,21008.4,18952.75,23442.13,19938.18,22689.61,23729.29,22807.48,23365,23915.3,24253
    "CORP1","0173","FY11","Working","Budget","Local","HSP_InputValue","404000",21364,22970.37,23186,27302,25144.38,27847.91,27632.11,29007.39,24749.42,27183.39,26599,27112.79
    where ideally I would need to get the following:
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Feb",14341.62
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Mar",14560
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Apr",13557.54
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","May",11711.92
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Jun",10261.58
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Jul",12540.31
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Aug",15307.83
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Sep",16232.88
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Oct",17054.62
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Nov",18121.76
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","402000","Dec",18236
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Feb",21372.84
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Mar",21008.4,
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Apr",18952.75
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","May",23442.13
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Jun",19938.18
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Jul",22689.61
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Aug",23729.29
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Sep",22807.48
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Oct",23365
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Nov",23915.3
    "CORP1","0173","FY10","Working","Budget","Local","HSP_InputValue","403000","Dec",24253
    "CORP1","0173","FY11","Working","Budget","Local","HSP_InputValue","404000","Jan",21364
    Thank you in advance for any tips.

    Have a read of the following post :- export data to sql
    It may give you a further option.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • MS SQL - Add column with all rows being "0"

    Add column with all rows being "0"

    nevermind
    "lee" <[email protected]> wrote in message
    news:e3b5kt$mch$[email protected]..
    > Add column with all rows being "0"
    >
    >
    >

  • Table maint genertr inserting multiple rows with all fields editable

    Hi
    I have created a ztable in se11 and maintained table maintenance generator SM30.
    Now i need to insert multiple rows into the table with all fields editable.
    How can i achieve this?
    Thanks in advance.

    >
    deepak thimmegowda wrote:
    > Hi
    >
    > I have created a ztable in se11 and maintained table maintenance generator SM30.
    >
    > Now i need to insert multiple rows into the table with all fields editable.
    >
    > How can i achieve this?
    >
    > Thanks in advance.
    Create a Table maintenance generator with One Step .
    regards,
    Jinson.

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • Export / import tablespace with all objects (datas, users, roles)

    Hi, i have a problem or question to the topic export / import tablespace.
    On the one hand, i have a database 10g (A) and on the other hand, a database 11g (B).
    On A there is a tablespace called PRO.
    Furthermore 3 Users:
    PRO_Main - contains the datas - Tablespace PRO
    PRO_Users1 with a role PRO_UROLE - Tablespace PRO
    PRO_Users2 with a role PRO_UROLE - Tablespace PRO
    Now, i want to transfer the whole tablespace PRO (included users PRO_MAIN, PRO_USER1, PRO_User2 and the role PRO_UROLE) from A to B.
    On B, I 've created the user PRO_Main and the tablespace PRO.
    On A , i execute following statement:
    expdp PRO_Main/XXX TABLESPACES=PRO DIRECTORY=backup_datapump DUMPFILE=TSpro.dmp LOGFILE=TSpro.log
    On B:
    impdp PRO_Main/XXX TABLESPACES=PRO DIRECTORY=backup_datapump DUMPFILE=TSpro.dmp LOGFILE=TSpro.log
    Result:
    The User PRO_Main was imported with all the datas.
    But i 'm missing PRO_USER1, PRO_User2 and the role PRO_UROLE...
    I assume, i 've used wrong parameters in my expd and / or impdp.
    It would be nice, if anybody can give me a hint.
    Thanks in advance.
    Best Regards,
    Frank

    When you do a TABLESPACE mode export by specifying just the tablespaces, then all that gets exported are the tables and their dependent objects. The users, roles, and the tablespace definitions themselves don't get exported.
    When you do a SCHEMA mode export by specifying the schemas, you will get the schema definitions (if the schema running the export is privied) and all of the objects that the schema owns. The schema does not own roles or tablespace definitions.
    In your case, you want to move
    1. schemas - which you already created 1 on your target database
    2. roles
    3. everything in the tablespaces owned by multiple schemas.
    There is no 1 export/import command that will do this. This is how i would do this:
    1 - move the schema definitions
    a. you can either create these manually or
    b1. expdp schemas=<your list of schemas> include=user
    b2 impdp the results from b1.
    2. move the roles
    expdp full=y include=role ...
    remember, this will include all roles. If you want to limit what gets exported, then use:
    include=role:"in ('ROLE1', 'ROLE2', ETC.)
    impdo the roles just exported
    3. move the user information
    a. If you want to move all of the schema's objects like functions, packages, etc, then you need to use a schema mode
    export
    expdp user/password schemas=a,b,c ...
    b. If you want to move only the objects in those tablespaces, then use the tablespace export
    expdp user/password tablespaces=tbs1, tbs2, ...
    c. import the dumpfile generated in step 3
    impdp user/password ...
    Hope this helps.
    Dean

  • How to most efficiently export photos on their original format with all metadata and adjustments?

    How do I most efficiently export photos on their original format with all metadata and adjustments applied? I am looking for a solution for exporting corrected photos between computers with Lightroom 5 installed. Preferably with no exporting or merging of catalogs.
    Thanks in advance for you support,
    JP Jacobsen

    And yet exporting a catalog is the perfect solution for communicating with another LR catalog...
    But if you really want to export photos , File>Export should work. I guess I don't really understand what your concerns are.

  • Export whole database with all stored data

    how can i export the whole database with all tables, sequences, views etc to a textfile and then import it again? it should contain all availabe data.
    thank you.

    Joshua,
    You can use the Data Pump import and export utilities to export and import an entire database (or traditional import and export utilities if pre-10g database).
    http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10825/toc.htm
    The export is not to a text file, though.
    Joel

  • Essbase export with a "string" appended with all account dimension members

    Hi Everyone ,
    can any one please suggest , how i can do my essbase export with a string appended with all account dimension members.
    i have tried more options but it doesn't looks working. i tried it by report scripts using RENAME function , but it works for 1 member at a time..
    please suggest !
    thanks
    Edited by: Vivek on Jun 19, 2012 6:55 PM

    Hi,
    If you're looking for the ability to append different strings, then you should probably be looking to an external process.
    If you're looking to append the same string, I can think of one way. Make your report script fixed-width (that way you always know which character in the line you're changing) and then utilize the MASK command. (you can find it in the Tech Ref under Report Commands)
    Robert

  • Chapters now working with all export options

    iMovie '09 chapters used to work only with Share > iDVD. Don't know when it has been changed, but it appears that Apple has quietly improved the feature and chapters are now transfered with all export options (Apple presets and Export using Quicktime). I guess it happened with Snow Leopard.
    So now it's possible to create higher quality DVDs with chapters. iDVD preset scales all videos to 960x540 (in case of 16:9) in interim file. Then iDVD has to scale it to correct NTSC or PAL size, and at least in case of PAL the output isn't very nice. There are aliasing artifacts, as vertically 540 lines have to be upscaled to 576 lines. Now it's possible with Export using Quicktime to output the video from iMovie in correct frame size with chapters and make DVDs with much better quality from that.
    With SD source material you still lose a field, but from HD it's now easier to get higher quality DVDs. iMovie scales progressive video very well. From 720P content iMovie output in both 960x540 and 1024x576 sizes is really good, but iDVD can't scale the first one so well.

    There is a bug. MacElk found it. His post is here:
    http://discussions.apple.com/thread.jspa?threadID=2147921&tstart=0
    My projects now export w. chapters intact. I file a bug report w. Apple.

  • Export table with LOB column

    Hi!
    I have to export table with lob column (3 GB is the size of lob segment) and then drop that lob column from table. Table has about 350k rows.
    (I was thinking) - I have to:
    1. create new tablespace
    2. create copy of my table with CTAS in new tablespace
    3. alter new table to be NOLOGGING
    4. insert all rows from original table with APPEND hint
    5. export copy of table using transport tablespace feature
    6. drop newly created tablespace
    7. drop lob column and rebuild original table
    DB is Oracle 9.2.0.6.0.
    UNDO tablespace limited on 2GB with retention 10800 secs.
    When I tried to insert rows to new table with /*+append*/ hint operation was very very slow so I canceled it.
    How much time should I expect for this operation to complete?
    Is my UNDO sufficient enough to avoid snapshot too old?
    What do you think?
    Thanks for your answers!
    Regards,
    Marko Sutic

    I've seen that document before I posted this question.
    Still I don't know what should I do. Look at this document - Doc ID:     281461.1
    From that document:
    FIX
    Although the performance of the export cannot be improved directly, possible
    alternative solutions are:
    +1. If not required, do not use LOB columns.+
    or:
    +2. Use Transport Tablespace export instead of full/user/table level export.+
    or:
    +3. Upgrade to Oracle10g and use Export DataPump and Import DataPump.+
    I just have to speed up CTAS little more somehow (maybe using parallel processing).
    Anyway thanks for suggestion.
    Regards,
    Marko

  • Export fails with 904 and 10003 errors

    I have Oracle 8i on Windows 2000. Windows 2000 is sp3 and 8i is 8.1.6. patched with 8.1.6.3.0 and 8.1.3.8. I have 5 servers with the same configuration using the exact same downloaded patches. One server is a test server.
    Two of the servers are running the database perfectly. Three others cannot export sucessfully. All exports are done in WE8IS08859P1
    First I export the entire database. It starts to export table definitions,profiles, user definitions...... successfully until it reaches
    about to export system's tables via conventional path...
    .exporting table DEF$_AQCALL 0 rows exported
    EXP_00008: ORACLE error 904 encountered
    ORA_00904: Invalid column name
    from then on I get
    EXP_00008: ORACLE error 1003 encountered
    ORA-01003: no statement parsed
    I have tried to redo the patches. The Oracle Installer tells me that the patch has already run and will not reapply it. I copy all of the required .dll's, .exe's and whatever again. I reran catalog.sql and catproc.sql I run describe dbms_java and get a long package description. When I try to run create or replace java system again (the last step of the second patch), it just hangs.
    I have used "Beyond Compare 2" to compare the BIN folders of working and non-working databases. I find that some of the .dll's were slightly different sizes. I don't understand that - I didn't think that the sizes would change. I recopied the .dll's from the working server to the failing test server - no difference. I checked every object that the patch has you copy again and all were correct. - the export still fails.
    Every forum I have tried tells me to run catalog.sql and catproc.sql to correct this but it doesn't work.
    I would appreciate and more suggestions please!

    First of all, you are talking to a novice Oracle person. No one here is an expert. If I sound stupid - I am!
    Yes, they are exactly the same. This is what I get on the bad server and the good server
    Path=D:\Oracle\Ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\WINNT\system32
    ;C:\WINNT;C:\WINNT\System32\Wbem;D:\Oracle\Ora81\orb\bin
    I don't quite see a version here other than the 1.1.7 but it is the same on the good and bad server.
    I am sorry to say, I don't know what recycling the database is so no, I didn't.
    Thanks for taking another stab at helping!

Maybe you are looking for