Using exp to export part of a table

Hi, can anybody help with how to export a portion of a table using exp?
Ive tried the following but it errors.
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > test.table where user = 'john'
Does exp work like this or do i need to export the whole table?
Thanks

Not really. What I posted is all there is to it. I suggest you open the Utilities manual for your version of Oracle and look at the chapter on exp for more information. The query must apply to every table in the export, if you are exporting more than one table.
Actually if you are on 11g pulling the 9.2 manual (available online) might be a better manual since the utilities manual now spends most of its coverage on expdp.
The expdp utility also has an ability to filter tables based on a query.
HTH -- Mark D Powell --

Similar Messages

  • Using expdp to export a mix of tables with data and tables without data

    Hi,
    I would like to create a .dmp file using expdp, exporting a set of tables with data and another set without data. Is there a way to do this in a single .dmp file? For example, I want all the tables in a schema with data, but for the fact tables in that schema, I only want the fact table objects, not the data. I thought it might be easier to create two separate .dmp files, one for each scenario, but would be nice to have one .dmp file that satisfies my requirement. Any help is appreciated.
    Thanks,
    -Rodolfo
    Edited by: user6902559 on May 11, 2010 12:05 PM

    You could do this with where clauses. Let's say you have 10 tables to export, 5 with data and 5 without data. I would do it like this
    tab1_w_data
    tab2_w_data
    tab3_w_data
    tab4_w_data
    tab5_w_data
    tab1_wo_data
    tab2_wo_data
    tab3_wo_data
    tab4_wo_data
    tab5_wo_data
    I would make one generic query
    query="where rownum = 0"
    and I would make 5 specific queries
    query=tab1_w_data:"where rownum > 0"
    query=tab2_w_data:"where rownum > 0"
    query=tab3_w_data:"where rownum > 0"
    query=tab4_w_data:"where rownum > 0"
    query=tab5_w_data:"where rownum > 0"
    The first query will be applied to all tables that don't have their own specific query and it will export no rows, the next 5 will apply to each of the corresponding table.
    Dean

  • Is there any issues to use exp in a live production instance?

    Hi all,
    I'll migrate from 9.0.1 o hp-ux to a 10gR2 on Redhat AS E4
    To prepare my upgrade, I need the whole structure from our 9.0.1 instance.
    Can I without any danger / problem use exp to export the structure of our live instance while its actively running? (I mean while all our users are connected)
    I suppose its ok but I'm trying to avoid all problems...
    Thanks in advance, your advices are greatly appreciated

    I'm trying to avoid all problems...Well, it depends on what you consider a problem. Assuming people are doing updates, an export on a running DB means that you'll lose some changes.
    Another "problem" can be consistency : if you don't use CONSISTENT=Y you'll risk inconsistencies, if you set it, then you may need a lot of undo segments.
    Apart from that, it should work...

  • Export 50K tables using exp/expdp command

    Hi,
    I am trying to export around 52,000 tables using parfile in oracle 10g/Solaris machine.
    But I am not able to do that....
    IS there a limitation to specify for the number of tables in a parfile ??? If so, how much..
    I get the error "LRM-00116: syntax error at <table_name> followed by <table_name>
    If I split the tables counts, I am able to export using the same parfile.....
    I have used both exp and expdp...but get the same error...
    Pleas help...

    I assume your version is 10gr2
    when I checked the docs I can see there is no table count limitation.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm#sthref165
    see "Restrictions" section.
    Double check your table name list please.
    I would try to use wildcards in TABLES definition or I would export full SCHEMAS.

  • Export all tables in schema using exp utility

    I need to export all the tables in a schema based on a where clause, how can I do this without having to identify all the tables in the tables= parameter?

    You can get all the tables by doing a user-level export, i.e.
    exp scott/tiger@TNS_name owner=scottwill export all Scott's tables. If you need to export only some of the tables owned by a particular user, you're stuck giving an explicit list until 10g.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Exporting using exp and TRIGGERS=N doesn't  work

    Exporting using exp on version Export: Release 8.1.6.0.0 - with the option TRIGGERS=N stills exports with triggers. is it a bug ?
    Any sugesttions ?

    This is actually a known behaviour.
    As of table level export, all the dependent objects are exported and is expected namely, indexes, constraints, triggers... and even restricting with other parameters set to n will not disable their export.
    As of schema level export, the whole schema is exported and with this we can pose our restrictions like no constraints, no rows, no indexes, no triggers etc.. which will work because we have control.
    For table level export we dont have control on individual objects. 10g solves your problem.

  • Error in exporting files using exp

    Hi all,
    I am getting the following error, when trying to export data. Can anyone please tell me how to resolve this?
    Here is the screen shot of error:
    =================================================================
    C:\Users\assiddi.NA>exp userid=assiddi/msdf71@vmdev file=asdf.dmp log=exp_assiddi_vmdev.dmp
    Export: Release 11.2.0.1.0 - Production on Thu Jun 30 11:06:04 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    server uses WE8ISO8859P1 character set (possible charset conversion)
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user ASSIDDI
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user ASSIDDI
    About to export ASSIDDI's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export ASSIDDI's tables via Conventional Path ...
    EXP-00008: ORACLE error 904 encountered
    ORA-00904: "POLTYP": invalid identifier ========================> this is the error I am getting
    EXP-00000: Export terminated unsuccessfully
    ====================================================================
    (Note: I have Oracle client 11.2 on my machine, and the database server version is 11.1, and I am getting this error. I have also tried the same export using Oracle client 11.1, in that case I get the error "New partitioning scheme not supported" for tables having interval partitioning on date values).
    Please help me on how to do this export. Thanks in advance.

    As you can see in this forum: the so called "old export utility" is much better than NEW expdp if we want dump files on client machines. Here is my reply to one post similar to your one:
    Data pump export can only generate dump files on the server. And I am a client, and want dump files on my machine. I even don't have access to server file system, it is in a different city and only DBAs have access to it.
    (Please see my questions and their replies, about Expdp and Impdp in this forum, which were posted just a short while ago today. It clearly confirms that Expdp is of no use for dumping files on client computers)

  • Incremental Export using EXP Command

    Hi all,
    I am trying to get incremental backup using oracle 9i "Exp" command. But this backup is being taken full of table data where changes made. Actually incremental backup should take a backup only the data last changes made.
    Please help me, how can I take the real incremental backup using exp command.
    Thanks
    Khalil

    should take a backup only the data last changes made.In order to be able to do that, Oracle would have to track rows that have changed since the last export. Think of a database with few hundred to a few thousand tables and tables with tens to tens-of-million rows.
    In a table, a single column in a single row may have been updated.
    However, in another table 40 columns in 3million rows may have been updated since the last export.
    In another table, some rows might be deleted. (how would "incremental" compute the difference between "there were 1000 rows yesterday, there are 942 rows today")
    In a fourth table, 3million rows have been inserted since the last export.
    Can you conceive of the scale of "tracking" that Oracle would have to do if you want "only the last changes" to be exported ? Next, how would you "merge" data from two exports when you import them -- e.g. if the non-primarykey columns have been updated ; or primarykey has been updated ; or the table has no primarykey ?
    The only way an "Incremental" change can be identified is by tracking if any change (whether 1 columm in 1 row or all the columns in all the rows) has been made to the table since the last export. If a single byte has been changed in the table, the whole table will be exported.
    Are you sure you were able to use Incremental Export in 9i ? Incremental Export is documented in 8.1.7 but hasn't appeared in the 9.2 documentation.
    The 8.1.7 documentation says "+An incremental Export backs up only tables that have changed since the last incremental, cumulative, or complete Export. An incremental Export exports the table definition and all its data, *not just the changed rows*. Typically, you perform incremental Exports more often than cumulative or complete Exports.+ "
    Oracle had announced the end of Error Correction Support for the Incremental Export effective 31-Dec-1999. It ended Extended Assistance Support 31-Dec-2002. See Oracle Note#170483.1 on the support site.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Using exp dump file, how to know schema/tablespace/database/table....

    Hi
    I have export dump file. I don't have any information other then that about the dumpfile.
    1. How do I know what version of exp was used(or database version)?
    2. what does the exp contain, whether it is table/schema/tablespace/database level export?
    3. Is it possible that I can used impdp command to export a file which was exported using "exp" command?

    1. Sorry for my ignorance but in first case how do I know if i have to use "imp or impdp".
    As discussed in the above mentioned thread strings might reveal something but not sure. Otherwise you can always confirm by trying to run it.
    And assuming that if I imported the dump(using trial and error rule), how do I know what level of export was the dump file created... ie
    how do I know the present object(object imported in target) was belonging to which tablespace and schema in source database(question 2 of "Sidhu")?
    When you will import it back in a new database, everything will be same as the original database. All objects will belong to their respective tablespaces,schemas blah blah...(where they were in the original database).
    Sidhu

  • Read the .dmp file exported using exp

    Hi,
    Could anyone tell me what option in imp i can use to just read or check whether schema that i am expecting exists in the .dmp file (exported using exp) or not before importing into the database. Also is there any option in the imp to search for the table in the entire dump file? Please let me know.
    Thanks,
    Nagarjun.

    Hi,
    In the import command, You can give Show=y and log file option. Show =y will run the import command but will not import anything and will create a log file that will contain all the statements in the sequence which will be executed when import is done. In that import file you can look for tables and schema what ever you want.
    Regards

  • How to Export data from a Table to Excel using PL/SQL Code

    Hi,
    I need to export data from a table to the excel sheet using PL/SQL script.
    could you pls provide with custom codes or sample procedures.
    Bobby

    http://asktom.oracle.com/pls/ask/f?p=4950:8:7947129213057862756::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:728625409049

  • Export data from a table to text file using srcipt task

    Hi
    i am new to SSIS
    i have to export data from a table and append it into a existing file through SSIS script task
    please help
    Thanks
    Umesh

    Hi Umesh,
    The data structure of the source table and the structure of the destination file are the same, right? Is the destination file a flat file? Do you have to do it through Script Task? If the destination file is a flat file, this can be done easily by using
    the stock tasks/components other than .NET code. In the Data Flow Task, we choose the appropriate source adapter (such as OLE DB Source or ADO.NET Source) to extract data from the source table, perform transformation if necessary, and then load to the destination
    file via a Flat File Destination. When setting up the Flat File Destination, uncheck the “Overwrite data in the file” option so that the extracted data will be appended to the existing file.
    If you need to implement it through Script Task/Component indeed, you may benefit from the following code examples:
    http://stackoverflow.com/questions/8070163/how-to-add-custom-footer-to-an-ssis-flat-file-seperate-component-or-script-tas 
    http://stackoverflow.com/questions/8467326/add-header-and-footer-row-flat-file-ssis 
    If you need further help about the script, I suggest that you ask a new question in .NET forums where you can get more dedicated support:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=netdevelopment 
    Regards,
    Mike Yin
    TechNet Community Support

  • How can we use IMPORT-EXPORT as structure and TABLES parameters?

    Hello Sir,
    I have used SAPRFC with single IMPORT and EXPORT parameter.
    Could anybody give me an example in I can use IMPORT/EXPORT as structure and TABLE parameter as input?
    of course from/to PHP.
    Regards,
    RH

    Thanks

  • Export parts of my library (referenced) to be used on other Mac w/ Aperture

    I need to export parts of my library (all items are referenced, none internal) to be used on other Mac with Aperture. So my images, projects and albums shall end up on the other Mac in Aperture. A simple proejct export doe snot do the job as the path to the referenced images are not available on the other Mac. Thus, I need to hand them over within the project, or how?
    How can my workflow look like to be able to do this export?

    Have you tried exporting the items as a new library?
    1) In Aperture 3 select the projects you want to export (you can command-click to select non-contiguously)
    2) Go to File>Export>Items as New Library…
    3) In the following dialog you'll have the choice of consolidating the files in the new library package: do that.
    Once this is done you should have an independent library containing all the needed files. When you've copied this new library to the other computer, you can keep the files managed or simply use Relocate Masters to put them on another referenced drive. It should work.
    Jade

  • Refresh using exp/imp

    Hi All,
    I need to refresh one of my development database using exp/imp utility,i did refreshing using the copy datafiles but new to this ,i have gone thru this forum and did some search on google too but the part that am not getting is suppose my development db already created with same tablespaces name and size and containes every schema as that of source and has data in it which is refreshed earlier, so do i need to wipe out everything and do it right from scratch(create db,tablespace,users) or just wipe out tables and import with (ignore=Y) .Any feedback would be apperciated.
    Thanks

    <p class="MsoNormal">Hi,</p>
    <p class="MsoNormal"> </p>
    <p class="MsoNormal">>> do i need to wipe out everything and do it right from
    scratch(create db,tablespace,users)</p>
    <p class="MsoNormal"> </p>
    <p class="MsoNormal">Well you have choices, and you can do whatever you want,
    but there are some “best practices”.  I’m assuming that you are copying your
    PROD database into DEV (a great practice to have a full-sized production system
    the TEST and DEV):</p>
    <p class="MsoNormal"> </p>
    <p class="MsoNormal">- You can restore PROD into TEST using RMAN.</p>
    <p class="MsoNormal"> </p>
    <p class="MsoNormal">- You can use the
    <a style="color: blue; text-decoration: underline; text-underline: single" href="http://download-east.oracle.com/docs/html/B16227_02/oui7_cloning.htm">
    Oracle Universal Installer</a> to clone a database.</p>
    <p class="MsoNormal"> </p>
    <p class="MsoNormal">- You can “<a style="color: blue; text-decoration: underline; text-underline: single" href="oracle_tips_db_copy.htm">clone
    the whole database</a>”, moving the current datafiles and recreating the
    instance</p>
    <p class="MsoNormal"> </p>
    <p class="MsoNormal">- You can export from PROD, truncate the tables in DEV
    (after a backup) and import IGNORE=Y.  This can be very slow, especially for a
    large database.  However, there are some
    <a style="color: blue; text-decoration: underline; text-underline: single" href="http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1240595435323">
    tips to speed-up imports</a>.</p>
    <p class="MsoNormal"> </p>
    <p class="MsoNormal">Check the
    <a style="color: blue; text-decoration: underline; text-underline: single" href="http://search.oracle.com/">
    Oracle docs</a>.  Also, Dave Moore has a book on
    <a style="color: blue; text-decoration: underline; text-underline: single" href="http://www.amazon.com/Oracle-Utilities-Programs-Oradebug-Dbverify/dp/0972751351">
    Oracle Utilities</a> that you might like.</p>
    Hope this helps . . . .
    Don Burleson
    <p>
    www.dba-oracle.com

Maybe you are looking for

  • Mac OS 10.7 (Lion) won't start After Effects CS5.5 because it's a powerpc app!?

    I've had CS 5.5 Master Collection installed on my Mac since it came out. All the CS 5/5.5 apps I've used up to now have worked fine, in 64-bit mode (Photoshop, Illustrator, Acrobat Pro, InDesign). Now I need to use After Effects, but I can't get it t

  • How to change font size

    Just purchased Deskjet 1010 & don't know how to change font size.

  • What's wrong?  I can't open any PDF Files

    From emails or the web.  I get a message that reads Adobe reader could not open XXX because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded).  An

  • Error message installing WIndows 32bit on T530

    I have a T530 laptop that I am trying to install WIndows 7 32-bit version from an ISO but I get the following error message right after I click the "Install" button during setup. "A required CD/DVD drive device driver is missing. If you have a driver

  • How do i do change the color(complete newbie)

    i want to have a special button inside the applet which will automatically change the color from red to yellow, HELP!!! import java.awt.*; import java.applet.Applet; import java.awt.event.*; public class Cookie extends Applet     implements Adjustmen