Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2012
    Posts
    3

    Unanswered: Oracle export-import scripts for Windows

    Hi,
    I was able to do Oracle export-import through windows command prompt using the following scripts:

    exp <user>/<password>@<db> file=test.dmp log=test.log tables=test_tbl query="'where processing_date = 20120603'"

    impdp <user>/<password>@<db> file=test.dmp log=test.log fromuser=user1 touser=user2

    but what i need to do is append into the target table the new export file that will be created. I used table_exists_action=APPEND, but it says LRM-00101: unknown parameter name 'table_exists_action'.
    What should be the correct syntax for appending records during Import.
    thanks!

  2. #2
    Join Date
    Jul 2012
    Posts
    3
    these are the import script that I tried, but no good:

    1.) imp <user>/<password>@<db> file=test.dmp log=test.log fromuser=user1 touser=user2 table_exists_action=APPEND

    2.) impdp <user>/<password>@<db> file=test.dmp log=test.log fromuser=user1 touser=user2 table_exists_action=APPEND

  3. #3
    Join Date
    Mar 2010
    Location
    Vienna, Austria
    Posts
    149
    HI,

    you are mixing up 2 tools: imp and impdp

    Although the syntax is somewhere similar, the data format of the two is different.

    you need to take
    imp for data exported with exp
    and
    impdp for data exported with expdp

    Hence, since you seem to have exported with exp, you need to import with imp.

    imp does not know of the keyword "table_exists_action" (this is impdp syntax) and does not clear the table before inserting, but appends by default.
    You just need to avoid the warning when the table cannot be created (because it already exists):

    If you exported like mentioned in your first post, this should work:

    imp <user>/<password>@<db> file=test.dmp log=test.log fromuser=user1 touser=user2 data_only=y
    "There is always an easy solution to every problem - neat, plausible, and wrong."
    -- H.L. Mencken

  4. #4
    Join Date
    Jul 2012
    Posts
    3
    hi Magicwand,
    thanks for your response. what I did is:

    imp <user>/<password>@<db> file=test.dmp log=test.log fromuser=user1 touser=user2 IGNORE=YES

    and was able to add the records to the existing table. i put a delete script first before importing to avoid duplicate records.

    =)

Tags for this Thread

Posting Permissions

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