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

Thread: Export- takes very long

  1. #1
    Join Date
    Jan 2001
    Posts
    642
    Hi,
    I am trying to export a table which has 40Million records.
    It takes a very long time and due to network problems ,gets aborted.
    I am using this conventional method to export:

    exp rei/nas@rel file=expdat.dmp tables=rei_usage_history

    Is there any way where I specify a '"direct"' export which takes less time.

    Badrinath

  2. #2
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    Include direct=y in the exp commnad itself. For example:
    -
    exp rei/nas@rel file=expdat.dmp tables=rei_usage_history direct=y

  3. #3
    Join Date
    Jan 2001
    Posts
    642
    Thanks Halo,


    Another simple question, When I export a table for example
    (rei_account_partition) and if I want to rename the table at the time of import to (rei_account)

    ...How can I do It?

    Badrinath

  4. #4
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    After doing the import

    do


    create table new_name as select * from old_name;

    drop table old_name;


    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  5. #5
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    I don't know if you can do it "during" the import but after that (or any time in a database) you can rename a table --

    alter table old_table rename to new_table;

    - Rajeev
    Rajeev Suri

  6. #6
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    AFAIK, you can't do that at the time of import. Confirm this. IMO, best thing to do is to import the table first and then rename it OR rename it before export, export the table, drop old table and then import.

  7. #7
    Join Date
    Jan 2001
    Posts
    642
    I feel I was not clear in question!

    I have a table rei_account which has about 5M records,for performance purpose I have created a partitioned table as

    rei_account_partition. (similar to rei_account)

    Now I want to export rei_account but while importing I want to import into rei_account_partition

    Please advise
    Badrinath

  8. #8
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    Oh ic. This should do it.
    -
    1. rename rei_account to rei_account_partition.
    2. export rei_account_partition.
    3. rename rei_account_partition back to rei_account
    4. precreate table rei_account_partition
    5. import.

  9. #9
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    I think the source (export) and target (import) tables have to have the same name and structure.
    You will have to export/import the table as it is and then transfer data from one table to another at the target location.

    Anybody else with other opinions ?

    - Rajeev
    Rajeev Suri

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