Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Smile Unanswered: 2 Questions about EXP -- IMP

    hi all
    Q1 :
    guess I have table x with 20 rows, I make backup for this table using EXP, after that I make many DML on this table, I want to return the data as it in the dmp file,how I can do that using IMP?
    Note : there is another table y has field referenced by table x , so I can't delete x then IMP it from dmp file direct.

    Q2 :
    guess I have table x with 20 rows, I make backup for this table using EXP,
    I want to retrive the data from dmp file into another table y (which has the same structure)

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    These are my suggestions ... I hope they might work:

    A1: Disable referential integrity constraint that bothers you. Delete data from table "x", import backuped data (don't forget IGNORE=Y) and enable constraint again. It'll work if DML commands didn't make changes to table "y" in a way that re-enabling constraint fails due to "child record not found" or similar error.

    A2: As far as I know, you can't do that. Import data into another user, grant select on table "another_user.x" to your current user and insert rows using "INSERT INTO y SELECT * FROM another_user.x" statement.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    can't you use a deferrable constraint?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Feb 2004
    Location
    Jordan
    Posts
    137

    Red face

    hi Duck

    Its running system,
    what about the seconed question?

  5. #5
    Join Date
    Jul 2003
    Posts
    2,296
    I wouldn't bother to import the data (maybe export once for safe-keeping).
    Just make a copy of the data into another table like so:
    create table temp_data as
    select * from original_table;


    then, whenever you want to reload the table just select into from your
    temp_data table.

    this would seem to be much faster than constantly importing the data
    over and over again.

    If you set that constraint as deferrable, then you wouldn't have any problem
    deleting all the data, select-into from the temp_table and then commit.
    All should be fine.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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