DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: exp/imp

  1. #1
    Join Date
    Jun 2000
    Posts
    315

    exp/imp

    Hi, Is there a easy way to export or import all tables under one schema except one table?

    Thanks,

    Lisa

  2. #2
    Join Date
    Jan 2001
    Posts
    3,134
    Sure, do the whole thing and then drop the table.

    MH
    I remember when this place was cool.

  3. #3
    Join Date
    Jun 2000
    Posts
    315
    What I wanted was to export all tables from one schema except one table from one database, then import into another database. The table I don't need is too big. So if there is a way to avoid to export it, it would save me plenty of time for both export and import.

    Thanks!

  4. #4
    Join Date
    May 2002
    Posts
    2,645
    Sure, list all the tables you do want.

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Short of listing all tables except the big one in your TABLES=(...) parameter when exporting (which has its own problems and gotchas), I could think of couple of ways to exclude a few tables from full/schema export:

    - If your release support it, you could use row level security (aka RLS, FGAC, VPD) feature - check this article that describes exactly this scenario: http://www.dbasupport.com/oracle/ora9i/FGAC.shtml

    - A more crude method, which can be used if you can afford the big table to be unavailable to anyone during the time of export:
    Move that table to a separate tablespace, put the tablespace offline, perform full/schema export and bring that tablespace back online. As the big table is not available during the export it will not be included in the dump file (you will probably get some EXP error message as a warning about that, though).
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  6. #6
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    quick and dirty...

    1. export foo/bar@db1 file=foo.dmp owner=yourowner
    2. sqlplus foo2/bar@db1 << !
    create table table_I_want_to_exclude (x char(1));
    !
    3. imp system/manager@db1 file=foo.dmp fromuser=foo touser=bar ignore=n
    Jeff Hunter

  7. #7
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Yep, however he explicitly stated he wants to avoid exporting of that big table in order to save time for export too, not only for import...
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width